Orders

List orders

Returns one page of the company's orders, newest first unless `sort` and `order` say otherwise. Query parameters: - `search`: matches the order number, title, customer name or customer email, ignoring case. - `stageId`, `assigneeId`, `contactId`: only orders in that stage, assigned to that member, or for that contact. - `assignedCompanyId`: only chain orders handed to that member company. - `openOnly`: `true` leaves out orders in `DONE` and `CANCELLED` stages. - `page`: page number, starting at 1. Defaults to 1. - `pageSize`: orders per page, 1 to 100. Defaults to 25. - `sort`: `createdAt` (default), `plannedDate` or `number`. - `order`: `desc` (default) or `asc`. - `chain`: omit it for every order your company owns. `own` leaves out the orders handed to a chain member, `chain` returns only chain orders (handed out by you or to you), and `all` adds the orders a chain parent handed to you.

GET
/orders

Returns one page of the company's orders, newest first unless sort and order say otherwise.

Query parameters:

  • search: matches the order number, title, customer name or customer email, ignoring case.
  • stageId, assigneeId, contactId: only orders in that stage, assigned to that member, or for that contact.
  • assignedCompanyId: only chain orders handed to that member company.
  • openOnly: true leaves out orders in DONE and CANCELLED stages.
  • page: page number, starting at 1. Defaults to 1.
  • pageSize: orders per page, 1 to 100. Defaults to 25.
  • sort: createdAt (default), plannedDate or number.
  • order: desc (default) or asc.
  • chain: omit it for every order your company owns. own leaves out the orders handed to a chain member, chain returns only chain orders (handed out by you or to you), and all adds the orders a chain parent handed to you.

Authorization

x-api-key
x-api-key<token>

Company API key, created under Settings > API Keys.

In: header

Query Parameters

search?string
Lengthlength <= 200
stageId?string
Length1 <= length
assigneeId?string
Length1 <= length
assignedCompanyId?string
Length1 <= length
contactId?string
Length1 <= length
openOnly?boolean

Only orders still being worked: drops the Done and Cancelled stages.

page?number
Range1 <= value
pageSize?number
Range1 <= value <= 100
sort?unknown

Value in

  • "createdAt"
  • "number"
  • "plannedDate"
order?unknown

Value in

  • "asc"
  • "desc"
chain?unknown

Chain axis: own is this tenant's un-shared orders, chain only the chain-shared ones, all both. Absent keeps the tenant-only default the web board reads.

Value in

  • "all"
  • "chain"
  • "own"

Header Parameters

x-company-id?string

Optional with an API key or OAuth token: leave it out and the company the key or token belongs to is used. If sent, it must be that same company, otherwise the request is refused with 403 API_KEY_WRONG_COMPANY or OAUTH_WRONG_COMPANY.

Match^[0-9a-fA-F]{24}$

Response Body

application/json

curl -X GET "https://example.com/orders"
{  "items": [    {      "assignedCompanyName": "string",      "assigneeId": "string",      "assigneeName": "string",      "calendarState": "in_calendar",      "category": "CANCELLED",      "contactId": "string",      "contactName": "string",      "createdAt": "2019-08-24T14:15:22Z",      "dealId": "string",      "id": "string",      "invoiceStatus": "draft",      "isChainOrder": true,      "money": {        "incVatOre": 0,        "netOre": 0,        "vatOre": 0      },      "needsDecision": true,      "number": "string",      "plannedDate": "2019-08-24T14:15:22Z",      "plannedTimeSet": true,      "rank": "string",      "source": "MANUAL",      "stageId": "string",      "stageName": "string",      "title": "string"    }  ],  "page": 0,  "pageSize": 0,  "total": 0}