iotoms Docs

Get sales vs purchases via legacy path

GET
/api/v1/reports/financial/profit-loss

Deprecated alias of the sales vs purchases report, kept so existing callers keep working; use /sales-vs-purchases instead. Despite the path name, the response is not a profit-and-loss statement. from and to are required.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

from*string

ISO date (YYYY-MM-DD)

Formatdate
to*string

ISO date (YYYY-MM-DD)

Formatdate

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 worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

Net sales and purchases received for the period, with the difference between them. An estimate, not profit.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/financial/profit-loss?from=2019-08-24&to=2019-08-24' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "tenantId": "string",    "from": "2019-08-24",    "to": "2019-08-24",    "grossSales": 0,    "taxCollected": 0,    "totalReturns": 0,    "returnsTax": 0,    "netSales": 0,    "purchasesReceived": 0,    "purchaseReceiptCount": 0,    "netSalesLessPurchases": 0,    "differencePctOfNetSales": 0,    "costOfGoodsSoldAvailable": true,    "label": "string",    "basis": "string"  }}