iotoms Docs

Preview the invoice for a sales order

GET
/api/v1/sales/orders/{orderId}/invoice-preview

Shows what the invoice for this order will contain, computed by the server. Nothing is saved and no invoice number is used up.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

orderId*string

ID of the sales order to preview, from List sales orders.

Formatuuid

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?

What the invoice for the order would contain if issued now. Nothing is saved.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/sales/orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoice-preview' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "salesOrderId": "9bd8f312-a044-4003-9f73-706a82f71a8f",    "customerStoreId": 0,    "customerStoreName": "string",    "customerNumber": "string",    "customerName": "string",    "invoiceDate": "2019-08-24",    "dueDate": "2019-08-24",    "seriesCode": "string",    "nextNumberPreview": "string",    "sellerGstin": "string",    "sellerStateCode": "string",    "buyerGstin": "string",    "buyerStateCode": "string",    "placeOfSupply": "string",    "isInterstate": true,    "gstIncomplete": true,    "gstIncompleteFields": [      "string"    ],    "target": "OWN_BOOKS",    "subtotal": 0,    "discountTotal": 0,    "taxTotal": 0,    "grandTotal": 0,    "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      }    ],    "blockedReason": "string"  }}