Exchange a device client_id / client_secret for a session token. On success returns an access_token valid for 24 hours; each call issues a fresh token and prunes the caller's expired sessions. Set the returned token as the token header on all subsequent requests.
Recommended: handle token refresh. Every other request is authenticated and will return 403 ("Authorization error") when the token is missing, invalid, or expired. If a previously succeeding (200) session starts receiving 403, the token has almost certainly expired: call this endpoint again to obtain a fresh access_token, then retry the failed request.
| sco_id required | string (Sco Id) Examples: EXAMPLE_SCO_ID SCO ID — identifies which SCO device the events belong to. Present in the path of every request. |
| client_id required | string (Client Id) The device ID issued by Angible. Used with |
| client_secret required | string (Client Secret) The device secret issued by Angible. |
{- "client_id": "EXAMPLE_CLIENT_ID",
- "client_secret": "secret"
}{- "code": 200,
- "msg": "Success",
- "data": {
- "access_token": "EXAMPLE_ACCESS_TOKEN"
}
}Records that an item was added to the cart for the given transaction. The transaction must already exist and still be open — calls against a missing or already-finalized transaction are rejected.
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) Unique identifier for the transaction |
| item_id required | string (Item Id) Client-assigned identifier for this item, unique within the transaction. Two units of the same product share the same |
| barcode required | string (Barcode) Barcode of the item |
| name required | string (Name) Name of the item |
| quantity required | integer (Quantity) Number of scan events this action represents — currently always |
| added_method required | string (AddedMethod) Enum: "scanner" "manual" "order" "manual_input" How the item was added. One of: |
| timestamp required | integer (Timestamp) Time the action occurred on the client device, as a Unix epoch in milliseconds. |
Is Kitchen Item (boolean) or Is Kitchen Item (null) (Is Kitchen Item) Deprecated Deprecated — use | |
Is Scanning Required (boolean) or Is Scanning Required (null) (Is Scanning Required)
| |
| price | number (Price) Price of the item. Optional — send a number, or omit the key entirely when the price isn't known yet (it can be finalized later via the item-prices endpoint). Do not send |
{- "transaction_id": "txn-123456",
- "item_id": "51432",
- "barcode": "1234567890123",
- "name": "Apple",
- "quantity": 1,
- "added_method": "scanner",
- "timestamp": 1742355063000,
- "is_kitchen_item": false,
- "is_scanning_required": true,
- "price": 5.8
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Records that a previously added item was removed from the cart, identified by item_id. The transaction must already exist and still be open — calls against a missing or already-finalized transaction are rejected.
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) Unique identifier for the transaction |
| item_id required | string (Item Id) Identifier of the item being removed — the |
| barcode required | string (Barcode) Barcode of the item |
| name required | string (Name) Name of the item |
| quantity required | integer (Quantity) Number of units being removed, usually matching the quantity selected in the POS UI (e.g. |
| removed_user required | string (Removed User) Who removed the item. |
| timestamp required | integer (Timestamp) Time the action occurred on the client device, as a Unix epoch in milliseconds. |
Is Kitchen Item (boolean) or Is Kitchen Item (null) (Is Kitchen Item) Deprecated Deprecated — use | |
Is Scanning Required (boolean) or Is Scanning Required (null) (Is Scanning Required)
|
{- "transaction_id": "txn-123456",
- "item_id": "51432",
- "barcode": "1234567890123",
- "name": "Apple",
- "quantity": 1,
- "removed_user": "staff",
- "timestamp": 1742355063000,
- "is_kitchen_item": false,
- "is_scanning_required": true
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Updates the price of items already in the cart, each matched by item_id. The response reports how many items matched (modified) and any item_ids that were not found in the transaction or supplied with no price to set (unmatched_item_ids). The transaction must already exist and still be open.
To set final checkout prices, integrate either this endpoint or Finalized item prices (PUT /v1/{sco_id}/transactions/{transaction_id}/item-prices) — not both. Prefer this endpoint: because it matches per item_id, two units of the same barcode can take different prices (e.g. item1: $100, item2: $0).
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) Unique identifier for the transaction |
required | Array of objects (Items) List of items with updated information |
{- "transaction_id": "txn-123456",
- "items": [
- {
- "item_id": "51432",
- "price": 4.5
}
]
}{- "code": 200,
- "msg": "Success",
- "data": {
- "modified": 2,
- "unmatched_item_ids": [
- "99999"
]
}
}Applies the final per-item prices (after promotions/discounts) to the transaction. Prices are matched to items by barcode; quantity sets how many units each price applies to, assigned in the order the items were added. Only items still in the cart (added and not since removed) receive a price, so it should be called once the cart contents are final (all item additions and removals settled).
To set final checkout prices, integrate either this endpoint or Update items (PATCH /v1/events/{sco_id}/items) — not both. Prefer Update items unless the SCO system cannot express prices as per-item lines and must aggregate by barcode instead.
| sco_id required | string (Sco Id) |
| transaction_id required | string (Transaction Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| barcode required | string (Barcode) Barcode of the item |
| name required | string (Name) Name of the item |
| price required | number (Price) Finalized price of the item after promotions/discounts. Required. |
| quantity required | integer (Quantity) Quantity of the item at this price |
[- {
- "barcode": "1234567890123",
- "name": "Milk",
- "price": 5,
- "quantity": 2
}
]{- "code": 200,
- "msg": "Success",
- "data": { }
}| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) Unique identifier for the transaction |
| transaction_type | string (Transaction Type) Default: "pending" Transaction type (e.g., |
| ui_state required | string (Ui State) UI state change (e.g., |
| timestamp required | integer (Timestamp) Timestamp |
| reason | string (Reason) Default: "" Reason for the UI state change (e.g., |
Staff Id (string) or Staff Id (null) (Staff Id) Unique identifier for the staff member |
{- "transaction_id": "txn-123456",
- "transaction_type": "pending",
- "ui_state": "staff_mode_on",
- "timestamp": 1742355063000,
- "reason": "Manual override by staff",
- "staff_id": "staff_123"
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Call this when a customer begins a checkout session on the SCO — typically when they tap Start or touch the screen.
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) Unique identifier assigned to this transaction. |
Transaction Type (string) or Transaction Type (null) (Transaction Type) Default: "pending" Transaction type (e.g., | |
User Id (string) or User Id (null) (User Id) Unique identifier for the end customer | |
| timestamp required | integer (Timestamp) Time the event occurred on the client device, as a Unix epoch in milliseconds. |
{- "transaction_id": "txn-123456",
- "transaction_type": "pending",
- "user_id": "user_123",
- "timestamp": 1742355063000
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Call this to discard a transaction that was started but will not be completed, so its transaction_id can be used again. Everything held locally for that transaction is deleted and nothing is sent to the cloud. A transaction can be reset whether or not items were scanned — the only requirement is that it has not been completed.
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) Identifier of the transaction to discard. Must be one that has been started but not completed. |
| timestamp required | integer (Timestamp) Time the event occurred on the client device, as a Unix epoch in milliseconds. |
{- "transaction_id": "txn-123456",
- "timestamp": 1742355063000
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Call this to close the transaction — typically when payment is made or the receipt is printed. Every opened transaction must be closed. If the customer leaves the SCO idle partway through, close it with status=checkout_abandoned and open a new transaction for the next session rather than reusing the idle one.
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) The |
Final Transaction Id (string) or Final Transaction Id (null) (Final Transaction Id) Default: "" Include this only when the POS or SCO refers to this transaction by a separate ID, so the transaction's events can be looked up by that ID. | |
Transaction Type (string) or Transaction Type (null) (Transaction Type) Default: "pending" Transaction type (e.g., | |
User Id (string) or User Id (null) (User Id) Unique identifier for the end customer | |
| total_items required | integer (Total Items) Total number of items scanned |
| status required | string (Status) Status of the transaction (e.g., |
| timestamp required | integer (Timestamp) Time the event occurred on the client device, as a Unix epoch in milliseconds. |
{- "transaction_id": "txn-123456",
- "final_transaction_id": "final-txn-123456",
- "transaction_type": "pending",
- "user_id": "user_123",
- "total_items": 10,
- "status": "completed",
- "timestamp": 1742355063000
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Call this when the customer enters the scanning page — typically when the cart list appears on the screen.
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) The |
Transaction Type (string) or Transaction Type (null) (Transaction Type) Default: "pending" Transaction type (e.g., | |
| timestamp required | integer (Timestamp) Time the event occurred on the client device, as a Unix epoch in milliseconds. |
{- "transaction_id": "txn-123456",
- "transaction_type": "pending",
- "timestamp": 1742355063000
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Call this when the customer leaves the scanning page — typically when they tap Pay to move to the payment page.
| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) The |
Transaction Type (string) or Transaction Type (null) (Transaction Type) Default: "pending" Transaction type (e.g., | |
| total_items required | integer (Total Items) The number of items scanned |
| timestamp required | integer (Timestamp) Time the event occurred on the client device, as a Unix epoch in milliseconds. |
{- "transaction_id": "txn-123456",
- "transaction_type": "pending",
- "total_items": 10,
- "timestamp": 1742355063000
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Retrieve the record collected for a transaction — scan events, scanned items, states, alerts, and totals — for a given transaction_id on the SCO. Use it to confirm the submitted events were received.
| sco_id required | string (Sco Id) |
| transaction_id required | string (Transaction Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
{- "code": 200,
- "msg": "Success",
- "data": {
- "transaction_id": "string",
- "final_transaction_id": "string",
- "transaction_type": "pending",
- "timezone": "string",
- "transaction_start_timestamp": 0,
- "transaction_end_timestamp": 0,
- "scan_events": [
- {
- "action": "string",
- "timestamp": 0,
- "server_timestamp": 0
}
], - "scan_items": [
- {
- "item_id": "string",
- "barcode": "string",
- "name": "string",
- "quantity": 0,
- "price": 0,
- "is_kitchen_item": false,
- "action": "string",
- "timestamp": 0,
- "added_method": "string",
- "removed_user": "string"
}
], - "states": [
- {
- "ui_state": "string",
- "timestamp": 0,
- "reason": "string"
}
], - "sco_alerts": [
- {
- "item_id": "string",
- "item_name": "string",
- "item_barcode": "string",
- "detected_weight": 0,
- "expected_weight": 0,
- "timestamp": 0,
- "alert_reason": "string"
}
], - "total_items": 0,
- "status": "string",
- "sco_id": "string",
- "user_id": "string"
}
}| sco_id required | string (Sco Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| transaction_id required | string (Transaction Id) Unique identifier for the transaction |
| transaction_type | string (Transaction Type) Default: "pending" Transaction type (e.g., |
| item_id required | string (Item Id) Unique identifier for the item |
| name required | string (Name) Name of the item |
| barcode required | string (Barcode) Barcode of the item |
| detected_weight required | number (Detected Weight) Detected weight of the item |
| expected_weight required | number (Expected Weight) Expected weight of the item |
| timestamp required | integer (Timestamp) Timestamp |
{- "transaction_id": "txn-123456",
- "transaction_type": "pending",
- "item_id": "51432",
- "name": "Apple",
- "barcode": "1234567890123",
- "detected_weight": 50,
- "expected_weight": 100,
- "timestamp": 1742355063000
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Update how an AI alert was resolved. Prefer per-item results: give each entry in issue_items its own managed_result, so different items can carry different outcomes. A single whole-alert managed_result is the legacy pattern, used when every issue item shares the same outcome.
| alert_id required | string (Alert Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
AIServiceAlertsManagedBy (string) or null Who resolved the alert. | |
AIServiceAlertsManagedResult (string) or null Resolution applied to the entire alert (legacy). | |
Array of objects (Issue Items) Per-item resolutions (recommended). When provided, omit the root |
{- "managed_by": "staff",
- "issue_items": [
- {
- "item_id": "item_1",
- "managed_result": "rescan"
}, - {
- "item_id": "item_2",
- "managed_result": "scan_not_required"
}
]
}{- "code": 200,
- "msg": "Success",
- "data": { }
}Test-only endpoint that switches the AI box between live AI processing and alert simulations for lab integration.
An alert only fires while an active transaction_id exists — sending a "scan start" signal alone will not trigger the simulation events. You can call this again with a different event_type at any time to switch simulations.
| Event type | Triggered by | Published topic |
|---|---|---|
item_left |
Scan completed API | angible/v1/events/{sco_id}/alerts (alert_type=item_left) |
no_scan |
Item added API | angible/v1/events/{sco_id}/alerts (alert_type=no_scan) |
no_alert |
Scan completed API | angible/v1/events/{sco_id}/no-alert |
For item_left, each simulated alert varies its issue_items count (e.g. 1, then 2) to exercise UI testing.
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
| test_mode required | boolean (Test Mode)
|
| event_type | string (AIServiceEventType) Default: "no_alert" Enum: "no_alert" "no_scan" "item_left" "item_switch" AI event type to simulate (only used when |
{- "test_mode": true,
- "event_type": "no_scan"
}{- "code": 200,
- "msg": "Success",
- "data": {
- "test_mode": true,
- "event_type": "no_scan"
}
}Retrieve whether this AI box is currently in AI test mode and, if so, which event_type it is simulating.
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
{- "code": 200,
- "msg": "Success",
- "data": {
- "test_mode": true,
- "event_type": "no_scan"
}
}Serves the image file referenced by issue_items[].image_path in the MQTT alert payload — use it to display the issue-item image for an alert.
| image_id required | string (Image Id) |
| token required | string (Token) Examples: EXAMPLE_ACCESS_TOKEN Session token authenticating the request — the |
null