iotoms Docs

List order returns

GET
/api/v1/transaction/returns

Lists order returns. Only one filter is applied, in this order of priority: transactionId, dayCycleId, registerId, businessDate; with a filter, results are newest first, and with no filter the order is not guaranteed. Paginated with 0-based page (default 0) and size (default 20, maximum 100); the response is a plain list without page totals.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

transactionId?string

Return only returns against this sale. Takes priority over the other filters.

Formatuuid
businessDate?string

Return only returns whose original sale is on this business date (YYYY-MM-DD). Used only when no other filter is sent.

dayCycleId?string

Return only returns from this day cycle. Used when transactionId is not sent.

Formatuuid
registerId?integer

Return only returns from this register (till or device). Used when transactionId and dayCycleId are not sent.

Formatint64
page?integer

Page number, starting at 0. See Paging.

Formatint32
Default0
size?integer

Number of records per page.

Formatint32
Default20

Header Parameters

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when it worked, ERROR when it failed.

message*string

Short human-readable message describing the outcome, for example "Vendor created". Do not parse it.

data?array<>|

The requested page of order returns (newest first when a filter is sent). This is a plain list with no page totals.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/transaction/returns'
Example Response
{  "status": "string",  "message": "string",  "data": [    {      "returnId": "251a8eaa-420a-41f0-8ae1-5162d9422d98",      "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",      "clientReturnId": "string",      "channel": "LINE_DISTRIBUTION",      "businessDate": "2019-08-24",      "dayCycleId": "bbed7a30-80be-4ccf-810d-a33c370a67d1",      "registerId": 0,      "returnDate": "2019-08-24",      "reasonCode": "string",      "reasonNote": "string",      "subtotal": 0,      "taxTotal": 0,      "discountTotal": 0,      "grandTotal": 0,      "storeCreditAmount": 0,      "reasonBreakdowns": [        {          "scope": "ITEM",          "referenceKey": "string",          "reasonCode": "string",          "reasonNote": "string",          "quantity": 0        }      ],      "lines": [        {          "itemId": "string",          "description": "string",          "quantity": 0,          "unitPrice": 0,          "discountAmount": 0,          "taxAmount": 0,          "lineSubtotal": 0,          "lineTotal": 0,          "reasonCode": "string",          "reasonNote": "string",          "batchNumber": "string",          "expiryDate": "2019-08-24"        }      ],      "settlement": {        "settlementId": "b4887549-5aec-4adc-bf32-5fb69ede72ea",        "returnId": "251a8eaa-420a-41f0-8ae1-5162d9422d98",        "clientSettlementId": "string",        "settlementMode": "STORE_CREDIT",        "storeCreditAmount": 0,        "refundCashAmount": 0,        "refundDigitalAmount": 0,        "refundReference": "string",        "notes": "string",        "createdBy": "string",        "createdAt": "2019-08-24T14:15:22Z"      },      "status": "DRAFT",      "syncStatus": "string",      "createdBy": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ]}