SmartGare
API referenceEndpoints

Read a payment terminal

Reads, once, what the station's hardware bridge still keeps of the payment terminal at the address and answers the last outcome it reported — APPROVED, DECLINED or CANCELLED, with when — or NO_REQUEST when it holds none, or BRIDGE_UNREACHABLE; and, apart from it, the terminal's health as the device statuses read answers it. Nothing is recorded, no payment is asked, and the bridge never fails this read. **Required permission:** `referential.device-status:read`

GET/referential/v1/payment-terminal-readings

Reads, once, what the station's hardware bridge still keeps of the payment terminal at the address and answers the last outcome it reported — APPROVED, DECLINED or CANCELLED, with when — or NO_REQUEST when it holds none, or BRIDGE_UNREACHABLE; and, apart from it, the terminal's health as the device statuses read answers it. Nothing is recorded, no payment is asked, and the bridge never fails this read.

Required permission: referential.device-status:read

AuthorizationBearer <token>

In: header

Query Parameters

address*string

The terminal's bridge address, capability@place or capability[role]@place. One terminal per read.

Match^([a-z][a-z0-9]*(?:-[a-z0-9]+)*)(?:\[([a-z][a-z0-9]*(?:-[a-z0-9]+)*)\])?@([A-Za-z0-9_.:-]+)$

Response Body

*/*

curl -X GET "https://example.com/referential/v1/payment-terminal-readings?address=string"
{  "address": "string",  "health": {    "address": "string",    "checked_at": "2019-08-24T14:15:22Z",    "condition": "HEALTHY",    "health": "AVAILABLE",    "last_confirmed_at": "2019-08-24T14:15:22Z",    "reason": "PARTIAL_FUNCTION",    "stale": true,    "status": "IN_SERVICE"  },  "last_outcome": "APPROVED",  "read": "REPORTED",  "reported_at": "2019-08-24T14:15:22Z"}