Get Transactions

Api get transactions

GET /open-apis/transactions

  • Header:

    • client_id: string Client Id

    • client_secret: string Client secret grant by Smartos

  • Parameters:

    • locationId: string Location ID filter

    • category: string Category of transactions

    • payType: string Payment Type of transactions

    • from: ISO string to specify a time range for retrieving data.

    • to: ISO string to specify a time range for retrieving data.

    • limit: int Limit the number of records per page

    • offset: int Skip the number of records

cURL example:

curl --location 'https://services.smartos.space/open-apis/transactions?locationId=114984141980697&category=INCOME&payType=cash&from=2021-07-26T09%3A51%3A51.368Z&to=2021-07-28T19%3A51%3A51.368Z&limit=50' \
--header 'client_id: clientId' \
--header 'client_secret: clientSecret'

Example response

```json
{
    "statusCode": 200,
    "data": {
        "items": [
            {
                "code": "TX000000001",
                "category": "INCOME",
                "payType": "bank",
                "transactionDate": "2022-09-08T14:17:55.768Z",
                "status": 'PAID',
                "locationName": "1 Xô Viết Nghệ Tĩnh",
                "customerName": "Hồ Tâm",
                "transactionType": "Extra Service",
                "amount": 10000,
                "amountPaid": 200000,
                "isVATInvoice": true,
                "description": "Note "
            }
        ],
        "meta": {
            "limit": 1,
            "offset": 0,
            "total": "202",
            "totalPages": 202
        }
    }
}
```

Last updated