iotoms Docs

List sales invoices

GET
/api/v1/sales/invoices

Returns sales invoices, paginated with 0-based page and size (default 20). Filter by status, customerNumber, customerStoreId, invoice date range, or targetState (whether the invoice has been posted to the merchant's books).

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

status?string

Only invoices in this status: DRAFT, POSTED, CANCELLED or CLOSED (case-insensitive).

customerNumber?string

Only invoices billed to this customer number.

customerStoreId?integer

Only invoices raised for this customer shop ID.

Formatint64
invoiceDateFrom?string

Only invoices dated on or after this date (YYYY-MM-DD).

Formatdate
invoiceDateTo?string

Only invoices dated on or before this date (YYYY-MM-DD).

Formatdate
targetState?string

Only invoices in this posting state: PENDING, CONFIRMED, FAILED or NOT_APPLICABLE (case-insensitive).

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 processed; otherwise an error status.

message*string

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

data?

One page of sales invoices, newest first, without lines.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/sales/invoices' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "content": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "invoiceNumber": "string",        "seriesCode": "string",        "salesOrderId": "9bd8f312-a044-4003-9f73-706a82f71a8f",        "salesOrderNumber": "string",        "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",        "customerStoreId": 0,        "customerStoreName": "string",        "customerNumber": "string",        "customerNameSnapshot": "string",        "storeId": 0,        "status": "DRAFT",        "invoiceDate": "2019-08-24",        "dueDate": "2019-08-24",        "currency": "string",        "target": "OWN_BOOKS",        "ledgerState": "NOT_APPLICABLE",        "targetRef": "string",        "targetLastError": "string",        "targetLastAttemptAt": "2019-08-24T14:15:22Z",        "sellerGstin": "string",        "sellerStateCode": "string",        "buyerGstin": "string",        "buyerStateCode": "string",        "placeOfSupply": "string",        "isInterstate": true,        "gstIncomplete": true,        "subtotal": 0,        "discountTotal": 0,        "taxTotal": 0,        "grandTotal": 0,        "directReason": "string",        "notes": "string",        "issuedBy": "string",        "issuedAt": "2019-08-24T14:15:22Z",        "sentAt": "2019-08-24T14:15:22Z",        "sentTo": "string",        "reprintCount": 0,        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "lines": [          {            "id": 0,            "itemId": "string",            "itemName": "string",            "hsnCode": "string",            "uomCode": "string",            "uqcCode": "string",            "quantity": 0,            "unitPrice": 0,            "discountAmount": 0,            "taxableValue": 0,            "cgstRate": 0,            "cgstAmount": 0,            "sgstRate": 0,            "sgstAmount": 0,            "igstRate": 0,            "igstAmount": 0,            "cessAmount": 0,            "taxAmount": 0,            "lineTotal": 0,            "lineNumber": 0          }        ]      }    ],    "page": 0,    "size": 0,    "totalElements": 0,    "totalPages": 0  }}