Reveal a service-order secret
Read the decrypted value of one secret on a service order. This is the only way to read a secret value — no other endpoint ever returns it. Revealing writes a SECRET_VIEWED event on the service order timeline, carrying the label of the secret that was read. A secret that has been deleted, on its own or because the service order reached a terminal state, no longer exists and cannot be revealed. While requirePinCodeForService is on, a wrong PIN here counts against the caller on the caller's own ladder, as the tenant user verify-pin operation describes it, and a correct one resets it. An attempt made while the caller's PIN has a wait running or is locked is refused exactly as a wrong PIN, without being counted. An integration account has no PIN, so while requirePinCodeForService is on a reveal under an integration token is refused exactly as a wrong PIN, and nothing is counted. The secrets are open at the store the service order was taken in at as well as at the store that owns it — with a NOTE on the timeline, the only writes that are, because the counter a unit was handed in at is the one the customer comes back to with a passcode. At any other store of the tenant they are refused with a 403, the list included: a reveal is not a view of the case.
Required permissions: SERVICE_ORDER
Access token recevied after user login with a deviceToken
Reference to a tenant.
^[A-Za-z0-9-_]+Reference to a Store.
^[A-Za-z0-9-_]+Reference to a service order
^[A-Za-z0-9-_]+Reference to a service order secret
^[A-Za-z0-9-_]+The PIN that proves the caller is the person reading the secret. The body carries nothing else: revealing a secret takes no other input, and the value is decided entirely by the secret in the path. The SECRET_VIEWED event on the timeline names the caller as the person who looked — on a shared screen, the person whose PIN unlocked it and whose unlock token the request carries.
The PIN of the caller — on a shared screen, the person the unlock token from the tenant user verify-pin operation was issued for. When the tenant requires a PIN for service, the reveal verifies it server-side on every single call, whatever the lock screen has already established — a device that is unlocked is not on its own permission to read a customer's passcode. The request is refused when the tenant requires a PIN and none is sent, or the one sent is wrong. It is ignored when the tenant does not require one.
Example response
The decrypted value of one secret on a service order, together with its label. Revealing writes a SECRET_VIEWED event on the service order timeline, carrying the label of the secret that was read.
The label of the secret that was revealed.
The decrypted secret value.
The PIN was refused: a wrong PIN, a running wait, a lock and an integration account while the tenant requires a PIN all answer this, alike.
POST /v2/tenants/{tenantUid}/stores/{storeUid}/serviceorders/{serviceOrderUid}/secrets/{secretUid}/reveal HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"pin": "text"
}{
"label": "text",
"value": "text"
}Last updated
Was this helpful?

