51 lines
1.7 KiB
Markdown
51 lines
1.7 KiB
Markdown
# `GET /v1/init`
|
|
|
|
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|
|
|
POS sync initialization counts
|
|
|
|
Returns entity change counts since the provided `lastChanged*` sync queue ID cursors
|
|
(`posterminalsyncqueue.id` / `posterminalobituary.id`) for the authenticated POS terminal
|
|
(`Authorization: Bearer <authToken>`).
|
|
|
|
|
|
## Query parameters
|
|
|
|
| Param | Required | Type | Description |
|
|
|-------|----------|------|-------------|
|
|
| `lastChangedProduct` | no | integer | Sequential ID cursor of last synced product entry (`posterminalsyncqueue.id`) |
|
|
| `lastChangedCategory` | no | integer | Sequential ID cursor of last synced category entry (`posterminalsyncqueue.id`) |
|
|
| `lastChangedCustomer` | no | integer | Sequential ID cursor of last synced customer entry (`posterminalsyncqueue.id`) |
|
|
| `lastChangedCustomerGroup` | no | integer | Sequential ID cursor of last synced customer group entry (`posterminalsyncqueue.id`) |
|
|
| `lastChangedCompositeProduct` | no | integer | Sequential ID cursor of last synced composite product entry (`posterminalsyncqueue.id`) |
|
|
| `lastChangedDeletedEntity` | no | integer | Sequential ID cursor of last synced deleted entity (`posterminalobituary.id`) |
|
|
|
|
## Response `200`
|
|
|
|
Sync initialization counts
|
|
|
|
```json
|
|
{
|
|
"version": "1.10.12.0",
|
|
"product_count": "19",
|
|
"category_count": "4",
|
|
"customer_count": "0",
|
|
"customerGroup_count": "1",
|
|
"compositeProduct_count": "0",
|
|
"configurationGroup_count": "0",
|
|
"configurationItem_count": "0",
|
|
"deletedEntity_count": "0",
|
|
"max_orderId_count": "0"
|
|
}
|
|
```
|
|
|
|
## Errors
|
|
|
|
| Status | Description |
|
|
|--------|-------------|
|
|
| 401 | Missing or invalid POS Authorization token |
|
|
|
|
---
|
|
|
|
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|