Skip to article
steward.Articles

weclapp API examples: unpaid invoices, stock and orders, with or without code

Practical weclapp REST API examples for invoices, orders and stock, and how to get the same answers in plain language without maintaining code.

The weclapp API in two minutes

weclapp has a REST API that covers almost everything you see in the application: articles, customers and other parties, quotes, sales orders, invoices, shipments and warehouse stock. Every company has its own address:

https://your-company.weclapp.com/webapp/api/v2/

Each request carries an API token in the AuthenticationToken header. The token belongs to a weclapp user and has that user’s rights. You create it in your personal weclapp settings.

Lists live at the entity name, such as /salesInvoice or /article. A few query parameters do most of the work:

Parameter What it does Example
<field>-eq and other operators Filter by a field paymentStatus-eq=OPEN
properties Return only selected fields properties=invoiceNumber,dueDate,grossAmount
page and pageSize Page through long lists page=2&pageSize=100
/count Count instead of listing /salesInvoice/count?paymentStatus-eq=OPEN

Check the interactive API reference in your own weclapp account for the exact fields and operators available to you.

Example 1: open invoices

GET /webapp/api/v2/salesInvoice?paymentStatus-eq=OPEN&properties=invoiceNumber,invoiceDate,dueDate,grossAmount
AuthenticationToken: <your token>

weclapp distinguishes payment states such as OPEN, PAID and NO_OPEN_ITEM. To find overdue invoices, compare dueDate with today in your own code. weclapp stores dates as timestamps, so convert them before showing them to anyone.

Example 2: how many open invoices?

GET /webapp/api/v2/salesInvoice/count?paymentStatus-eq=OPEN

The answer is a single number. That is ideal for a dashboard or a quick check.

Example 3: recent sales orders

GET /webapp/api/v2/salesOrder?properties=orderNumber,orderDate,status,netAmount&pageSize=50

Add a filter on orderDate or status to narrow the list. For revenue per customer, you would combine orders with party data and group the results yourself.

Example 4: stock levels

GET /webapp/api/v2/warehouseStock?pageSize=100

Stock is stored per article and warehouse. To answer “which articles will run out soon?”, you also need sales history, so this becomes a small data project.

Where the API gets expensive for a business

The requests above are easy. The work around them is not:

  • Joining data. Most business questions combine several entities, such as invoices, parties and payments.
  • Paging and limits. Large lists need loops, retries and error handling.
  • Keeping the token safe. Scripts, spreadsheets and integration tools tend to collect copies of it.
  • Writing safely. A PUT on the wrong article changes your live data. There is no built-in “please check this first”.
  • Maintenance. Every new question means new code, and the person who wrote it may not be around next year.

The same answers without code

Steward uses the same weclapp API, but your team asks in plain language. Steward already knows the weclapp entities, fields and filters, so it builds the requests, pages through the results and combines them.

Instead of… Ask Steward
Example 1 “Which invoices are overdue, and by how much in total? Group them by customer.”
Example 2 “How many invoices are still open?”
Example 3 “Compare this quarter’s order revenue per customer with last quarter.”
Example 4 “Which articles will run out within two weeks at the current sales rate?”

Three things are different from a script:

  1. The token stays protected. An administrator connects weclapp once. The token is stored encrypted and never displayed. It is never given to the AI, either. Code that Steward writes for an analysis runs without your credentials.
  2. Project roles. Viewers follow results, Contributors use configured connections and prepare changes, and Managers approve. Invited project members need no separate connection grant.
  3. You need Manager access to the proposal’s project to approve or reject changes. Contributors can prepare changes and review the details. Approval rechecks the executor’s current project access and the enabled connection before execution.

When to use the API directly

Use the API directly for permanent integrations, such as syncing a web shop, connecting a logistics provider or building your own application. Use Steward for the hundreds of questions your team asks between those integrations. Those questions rarely justify a developer, a script and a maintenance plan.

Get started

Connect weclapp, enable it for a project and ask one of the questions above in Read only mode. For a broader comparison of AI options, read How to talk to your weclapp with AI.

Try it with your own team

Connect your business tool once, choose who may read, change and approve, and ask your first question.

Get started