> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/service/reveal-a-service-order-secret.md).

# 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

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Service","description":"Service"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ServiceOrderSecretRevealResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceOrderSecretRevealResponseSchema"}}}}},"schemas":{"ServiceOrderSecretRevealResponseSchema":{"title":"ServiceOrderSecretRevealResponseSchema","description":"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.","type":"object","required":["label","value"],"properties":{"label":{"type":"string","description":"The label of the secret that was revealed."},"value":{"type":"string","description":"The decrypted secret value."}}},"ServiceOrderSecretRevealRequestSchema":{"title":"ServiceOrderSecretRevealRequestSchema","description":"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.\nThe 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.","type":"object","properties":{"pin":{"type":"string","writeOnly":true,"description":"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.\nThe 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."}}}},"requestBodies":{"ServiceOrderSecretRevealRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceOrderSecretRevealRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/serviceorders/{serviceOrderUid}/secrets/{secretUid}/reveal":{"post":{"summary":"Reveal a service-order secret","operationId":"post-serviceorders-secrets-reveal","description":"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.\nRevealing writes a SECRET_VIEWED event on the service order timeline, carrying the label of the secret that was read.\nA secret that has been deleted, on its own or because the service order reached a terminal state, no longer exists and cannot be revealed.\nWhile 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.\nThe 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.\n\nRequired permissions: SERVICE_ORDER","responses":{"200":{"$ref":"#/components/responses/ServiceOrderSecretRevealResponse"},"401":{"description":"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."}},"tags":["Service"],"requestBody":{"$ref":"#/components/requestBodies/ServiceOrderSecretRevealRequest"}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/service/reveal-a-service-order-secret.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
