Terminals
Provisioning a POS terminal for a branch. The full onboarding flow — registering a device, attaching a processor, attaching an account, activating — is covered in Terminal Payments → Onboarding.
This page focuses on the merchant-side view: who can see which terminals, how to manage them over time, and how they relate to branches and businesses.
A specific terminal a user can operate
The operator (merchant's employee) accesses a terminal via their authUserId and the terminal's deviceId:
curl https://api.ali.app/rest/devices/users/{authUserId}/terminals/{deviceId} \
-H "Authorization: Bearer <token>"
An equivalent route is exposed under the businesses resource:
curl https://api.ali.app/rest/businesses/users/{authUserId}/terminals/{deviceId} \
-H "Authorization: Bearer <token>"
Both return the same terminal; the /devices/... form is the canonical one to use, and the /businesses/... form is a legacy alias. There is no public gateway route that lists all terminals for a user without a deviceId.
Transactions on a terminal
# List (full transaction history for the device)
curl "https://api.ali.app/rest/devices/{deviceId}/transactions" \
-H "Authorization: Bearer <token>"
# Individual transaction
curl https://api.ali.app/rest/devices/{deviceId}/transactions/{transactionId} \
-H "Authorization: Bearer <token>"
Update a terminal
curl -X PATCH https://api.ali.app/rest/businesses/terminals/{deviceId} \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "isActive": false }'
| Field | Type | Required |
|---|---|---|
isActive | boolean | ✅ |
newDeviceId | string | — |
externalTerminalId | string | — |
terminalType | enum | — |
This endpoint does not reassign a terminal to a different branch — there is no branchId field. To take a terminal out of service, set "isActive": false.
Remove a terminal
curl -X DELETE https://api.ali.app/rest/businesses/terminals/{deviceId} \
-H "Authorization: Bearer <token>"
Irreversible — the physical device must be re-shipped to Migo if the merchant wants to use it again.
Terminal state
| State | Meaning |
|---|---|
registered | Device registered, no processor attached yet |
configuring | Processor handshake in progress |
active | Can accept payments |
suspended | Temporarily disabled (misuse, risk flag) |
closed | Permanently removed |