For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add new service-order secret

Put a secret on a service order, such as a device passcode. The value is stored encrypted and is never returned in a response — read it through the secrets reveal endpoint. Supply secretUid to make the call idempotent: a repeat with the same secretUid on the same service order returns the secret already created and writes nothing, while a secretUid already used on another service order is refused with a 400, and a malformed uid stays refused. Set serviceFormFieldUid to capture the secret for a SECRET field on the service order's intake form; a required SECRET field on that form is satisfied by a secret carrying its serviceFormFieldUid, and the label then defaults to the label of the field. A secret for a SECRET placement that is not visible, given the values on the service order, is rejected — and when an update's answers later close the branch, the secrets created for its SECRET placements are deleted in the same write. A secret without a serviceFormFieldUid is not tied to the form and must carry a label of its own. A required SECRET placement is demanded when the service order is created and never afterwards: a secret deleted on its own, or with the finished case, is not asked for again. 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

post
/tenants/{tenantUid}/stores/{storeUid}/serviceorders/{serviceOrderUid}/secrets
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
storeUidstringRequired

Reference to a Store.

Pattern: ^[A-Za-z0-9-_]+
serviceOrderUidstringRequired

Reference to a service order

Pattern: ^[A-Za-z0-9-_]+
Body

A new secret on a service order. The value is stored encrypted and is write-only: it is never returned in any response, and can only be read through the secrets reveal endpoint. Supply secretUid to make the call idempotent: a repeat with the same secretUid on the same service order returns the secret already created and writes nothing, while a secretUid already used on another service order is refused with a 400, and a malformed uid stays refused. Set serviceFormFieldUid to capture the secret for a SECRET field on the service order's intake form — a required SECRET field on that form is satisfied by a secret carrying its serviceFormFieldUid. The label may then be left out and defaults to the label of that field; a secret without a serviceFormFieldUid must carry a label of its own. A secret can be deleted on its own as soon as it is no longer needed, and every secret still on the service order is deleted when it reaches a terminal state. A required SECRET field is demanded when the service order is created and never on an update: a secret deleted on its own, or with the finished case, is not asked for again.

secretUidstringOptionalPattern: ^[A-Za-z0-9-_]+
labelstringOptional

What the secret is, so it can be shown in a list without revealing the value. Defaults to the label of the form field when serviceFormFieldUid is given; required when it is not.

valuestringRequired

The secret value. Stored encrypted, never returned in a response, and readable only through the secrets reveal endpoint.

serviceFormFieldUidstringOptional

The SECRET field on the service order's intake form this secret is captured for. Leave it out, or send an empty string, for a secret that is not tied to a form field. The field must be of type SECRET and must be placed on the service order's intake form.

Pattern: ^[A-Za-z0-9-_]*
Responses
201

Example response

application/json

An encrypted secret kept on a service order, such as a device passcode. A service order can hold any number of secrets. The value is never returned here: a secret is listed by its label alone and can only be read through the secrets reveal endpoint, which writes a SECRET_VIEWED event on the service order. A secret is never edited. It is created, revealed and deleted, and nothing else — a value that has to change is a new secret and the old one deleted, which is why the record carries when it was created and by whom and nothing about a later change. Secrets are never included in search results, webhooks or exports. A secret can be deleted on its own as soon as it is no longer needed, and every secret still on the service order is deleted in the same transaction as the service order reaching a terminal state. Reopening the service order afterwards does not bring them back.

secretUidstringRequiredPattern: ^[A-Za-z0-9-_]+
serviceOrderUidstringRequiredPattern: ^[A-Za-z0-9-_]+
labelstringRequired

What the secret is, so it can be shown in a list without revealing the value. Snapshotted when the secret is created — editing the label of the form field afterwards does not change it, and a platform field's label snapshots in the language the capturing user read it in.

serviceFormFieldUidstringRequired

The SECRET field on the intake form this secret was captured for. An empty string on a secret that was added on its own, without a form field.

Pattern: ^[A-Za-z0-9-_]*
createdAtstring · date-timeRequired
createdBystringRequired
post/tenants/{tenantUid}/stores/{storeUid}/serviceorders/{serviceOrderUid}/secrets
POST /v2/tenants/{tenantUid}/stores/{storeUid}/serviceorders/{serviceOrderUid}/secrets HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "secretUid": "text",
  "label": "text",
  "value": "text",
  "serviceFormFieldUid": "text"
}
201

Example response

{
  "secretUid": "text",
  "serviceOrderUid": "text",
  "label": "text",
  "serviceFormFieldUid": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "createdBy": "text"
}

Last updated

Was this helpful?