API Documentation
1. Retrieving Sales Receipts
Method: GET
URL: {{domain}}/api/{{lang}}/sales/checks?new_pagination=true&page[num]=1
Request
To retrieve sales receipt data, perform a GET request at the specified URL. For authentication, use the access_token obtained during authorization (see the “Authorization” section).
Pagination
To navigate between result pages, the API supports new pagination. Main parameters:
new_pagination=true— enables new pagination.page[num]=1— page number, starting from 1.page[size]=10— number of records per page.
Sorting
The API allows sorting results by a specified field in ascending or descending order using the following parameters:
sort[column]— field name for sorting (e.g.,id_check).sort[order]— sort order (ascendingordescending).
Sorting example:
sort[column]=id_check&sort[order]=ascending — sorts results by receipt identifier (id_check) in ascending order.
Filtering
The API allows special filter conditions using the term key. This parameter defines how the filter value should be interpreted.
Main conditions:
- Without
term(default) — exact comparison is used. Example:filters[id_check][value]=323 term: like— used to search for values partially matching the specified one. Example:filters[id_check][value]=323&filters[id_check][term]=like— returns records whereid_checkcontains the substring 323.term: not— used to exclude records matching the value. Example:filters[id_check][value]=323&filters[id_check][term]=not— returns all records whereid_checkis not equal to 323.
Date range filtering example:
filters[time_check][value][from]=2023-12-31T22:00:00.000Z— includes records created on or after December 31, 2023 at 22:00 (UTC).filters[time_check][value][to]=2024-12-30T08:54:26.564Z— includes records created on or before December 30, 2024 at 08:54:26 (UTC).filters[time_check][type]=date_range— required parameter when filtering by date range.filters[time_check][type]=date_time— required parameter when filtering by a start or end date.
Filters can be combined to narrow results: filters[time_check][value][from]=2023-12-31T22:00:00.000Z&filters[time_check][value][to]=2024-12-30T08:54:26.564Z&filters[time_check][type]=date_range
Response
On a successful request, the API returns a JSON object with sales receipt data:
{
"data": [
{
"id_check": 0,
"id_registrar": "string",
"guid": "string",
"id_workplace": 0,
"id_session": 0,
"id_scheck": 0,
"time_check": "string",
"id_employee": 0,
"sum_discount": 0,
"sum_check": 0,
"type_payment": 0,
"id_discount_card": 0,
"attrs": {},
"time_create": "string",
"time_change": "string",
"id_printer": 0,
"print_mode": "string",
"fiscal_number": "string",
"sync": "string",
"lines": [
{
"id_check_line": 0,
"id_check": 0,
"guid": "string",
"id_workplace": 0,
"id_goods": 0,
"id_unit": 0,
"id_series": "string",
"search_key": "string",
"quantity": 0,
"price": 0,
"discount": 0,
"summ": 0,
"time_create": "string",
"time_change": "string",
"attrs": {},
"good": {
"id_goods": "number",
"id_group": "number",
"id_group_tax": "number",
"name_goods": "string",
"sort_order": "number | null",
"id_print_group": "number",
"type_goods": "number",
"active": "boolean",
"guid": "string",
"time_create": "string",
"time_change": "string",
"is_completed": "boolean",
"purchase_price": "number",
"sale_price": "number",
"goods_attrs": {
"id_goods": "number",
"control_rest": "boolean",
"permission_type": "number",
"extern_service_id": "number | null",
"print_name_goods": "string",
"free_price": "boolean",
"only_bar_code": "boolean",
"control_showcase": "boolean",
"min_order": "string",
"id_client": "number",
"use_series": "boolean",
"id_text": "number | null",
"id_image": "number",
"id_modificator_group": "number | null",
"weight_control": "boolean",
"guid": "string",
"time_create": "string",
"time_change": "string",
"id_excise_type": "number | null",
"forbidden_return": "boolean",
"vendor_code": "string | null",
"id_category": "number | null",
"marking": "number",
"allergen": "boolean",
"for_sale": "boolean",
"cooking_time": "number | null",
"id_cooking_place_type": "number | null",
"code_ucgfea": "string | null",
"id_country": "number",
"cooking_place_type": "string | null"
}
}
}
],
"workplace": {},
"outlet": {}
}
],
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"meta": {
"current_page": 0,
"from": 0,
"last_page": 0,
"path": "string",
"per_page": 0,
"to": 0,
"total": 0
}
}
Response Field Descriptions
data— array of objects, each representing an individual receipt.id_check— receipt identifier.guid— unique receipt identifier.time_check— receipt creation time.sum_check— total receipt amount.lines— array of line items in the receipt with detailed product information (e.g.,quantity,price,discount).links— navigation links for pagination.meta— meta information including data on the current page, number of pages, number of items, etc.
2. Authorization
Method: POST
URL: https://admin-api.poskit.com.ua/auth/login
Request Parameters
Pass the following data for authorization:
email— user’s email address.password— user’s password.
Request Example
curl -s --globoff --compressed -X POST \
-H 'Accept: application/json' -H 'Accept-Encoding: gzip, deflate, br, zstd' \
-H 'Content-Type: application/json;' \
--data-raw '{"email":"********@*******.com","password":"********"}'
Example of Using the Token for Requests
The obtained access_token is used for subsequent GET requests to the API:
curl 'https://380*********.poskit.com.ua:8443/api/en/sales/checks?new_pagination=true&page[size]=1' --compressed \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...'