iotoms Docs

List sales orders

GET
/api/v1/sales/orders

Lists sales orders, filterable by status (DRAFT, SUBMITTED, CONFIRMED, CANCELLED, or INVOICED), customer, order date range, bookedBy and source. Paginated with 0-based page (default 0) and size (default 20).

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

status?string

Only orders in this status: DRAFT, SUBMITTED, CONFIRMED, CANCELLED, or INVOICED (orders with an invoice issued).

customerStoreId?integer

Only orders for this customer shop, from List customer stores.

Formatint64
customerNumber?string

Only orders billed to this customer number.

orderDateFrom?string

Earliest order date to include, YYYY-MM-DD.

Formatdate
orderDateTo?string

Latest order date to include, YYYY-MM-DD.

Formatdate
bookedBy?string

Only orders credited to this salesperson's username.

source?string

Only orders from this source: FIELD_APP, BACK_OFFICE, PHONE, PORTAL or IMPORT.

page?integer

Page number, starting at 0. See Paging.

Formatint32
Default0
size?integer

Number of records per page.

Formatint32
Default20

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was handled, ERROR otherwise.

message*string

Short human-readable message describing the outcome, e.g. which record was fetched or saved.

data?

One page of sales orders.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/sales/orders' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "content": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "orderNumber": "string",        "customerStoreId": 0,        "customerStoreName": "string",        "customerNumber": "string",        "customerNameSnapshot": "string",        "storeId": 0,        "status": "DRAFT",        "effectiveStatus": "DRAFT",        "orderDate": "2019-08-24",        "requestedDeliveryDate": "2019-08-24",        "bookedBy": "string",        "orderSource": "FIELD_APP",        "currency": "string",        "routeId": 0,        "subtotal": 0,        "discountTotal": 0,        "taxTotal": 0,        "grandTotal": 0,        "notes": "string",        "cancelReason": "string",        "overridePending": true,        "overrideApprovedBy": "string",        "overrideApprovedAt": "2019-08-24T14:15:22Z",        "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",        "invoiceNumber": "string",        "invoiceBlockedReason": "string",        "submittedAt": "2019-08-24T14:15:22Z",        "confirmedAt": "2019-08-24T14:15:22Z",        "cancelledAt": "2019-08-24T14:15:22Z",        "createdBy": "string",        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "lines": [          {            "id": 0,            "itemId": "string",            "description": "string",            "uomCode": "string",            "uomFactor": 0,            "quantity": 0,            "baseQuantity": 0,            "unitPrice": 0,            "discountAmount": 0,            "taxRate1": 0,            "taxRate2": 0,            "taxAmount": 0,            "lineTotal": 0,            "lineNumber": 0          }        ],        "revisions": [          {            "revisionNo": 0,            "changedBy": "string",            "changedAt": "2019-08-24T14:15:22Z",            "reason": "string",            "changes": "string"          }        ]      }    ],    "page": 0,    "size": 0,    "totalElements": 0,    "totalPages": 0  }}