> 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-portal/accept-the-terms-at-the-counter.md).

# Accept the terms at the counter

The customer signs the terms of the service order, on the device at the counter. The drawn signature is kept on the acceptance, whose method is COUNTER\_DEVICE, together with the terms exactly as the customer was shown them — so what was agreed to can always be established, however the terms are changed afterwards. A TERMS\_ACCEPTED event is written on the timeline. It is refused with a 404 while a standing acceptance already exists on the service order — accepted in the portal or recorded by staff after this session was opened — because there is nothing left to sign. The acceptance record — when, how, the wording, and the signature image — is kept whole. The session stops working the moment the terms are accepted: the token is spent, and a second attempt with it is answered as an unknown token like any other. The signing page is returned with termsAccepted true, so the device shows the customer that their signature landed. A signature that is missing, empty, longer than 500000 characters or not a valid base64 encoding is refused with a 400. It is judged only once the token has been found good, so a request with an unknown, expired or used token is answered with the 404 whatever its body holds, and a refused signature writes nothing and leaves the session open for another try. A request that declares a body over one megabyte is refused with a 413 before the token is looked at.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServicePortal","description":"The customer-facing service portal: the page the link in a service message opens, and the actions the customer can take from it. Authorized by the unguessable per-service-order token in the path and nothing else."}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[],"paths":{"/portal/signing/{signingToken}/accept":{"post":{"summary":"Accept the terms at the counter","operationId":"post-portal-signing-accept","description":"The customer signs the terms of the service order, on the device at the counter. The drawn signature is kept on the acceptance, whose method is COUNTER_DEVICE, together with the terms exactly as the customer was shown them — so what was agreed to can always be established, however the terms are changed afterwards. A TERMS_ACCEPTED event is written on the timeline. It is refused with a 404 while a standing acceptance already exists on the service order — accepted in the portal or recorded by staff after this session was opened — because there is nothing left to sign.\nThe acceptance record — when, how, the wording, and the signature image — is kept whole.\nThe session stops working the moment the terms are accepted: the token is spent, and a second attempt with it is answered as an unknown token like any other.\nThe signing page is returned with termsAccepted true, so the device shows the customer that their signature landed.\nA signature that is missing, empty, longer than 500000 characters or not a valid base64 encoding is refused with a 400. It is judged only once the token has been found good, so a request with an unknown, expired or used token is answered with the 404 whatever its body holds, and a refused signature writes nothing and leaves the session open for another try. A request that declares a body over one megabyte is refused with a 413 before the token is looked at.","responses":{"200":{"$ref":"#/components/responses/PortalSigningResponse"},"404":{"description":"Unknown, expired or already used token. The same answer is given whichever it is — whether the token never existed, the session timed out, the terms have already been accepted, or a newer session replaced this one — because the page never reveals whether a service order exists behind a token."},"429":{"description":"Too many requests for this link. The signing page is rate limited per link, whatever the address the requests come from, and a request over the limit is refused rather than queued — nothing is written and the session is not spent. The limit is judged before the token, and every request counts whatever the token, so a 429 says nothing about whether the link works."}},"requestBody":{"$ref":"#/components/requestBodies/PortalSigningAcceptRequest"},"tags":["ServicePortal"]}}},"components":{"responses":{"PortalSigningResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSigningResponseSchema"}}}}},"schemas":{"PortalSigningResponseSchema":{"title":"PortalSigningResponseSchema","description":"The counter signing page, as the customer sees it on the device that has been handed to them. It is a representation of its own and holds only what signing needs: which case is being signed for, where, the terms to read, whether they have been accepted yet, the language to show the page in, and the tenant's accent color to draw it in.\nNothing else about the service order is here — no timeline, no quote, no prices, no messages. A device left on this page shows the terms and nothing more.","type":"object","required":["serviceNumber","storeName","termsText","termsUrl","termsAccepted","preferredLanguage","accentColor"],"properties":{"serviceNumber":{"type":"string","description":"The running service number of the case the terms are being signed for — enough for the customer to see they are signing for their own device."},"storeName":{"type":"string","description":"The store the service order belongs to."},"termsText":{"type":"string","description":"The terms the customer is signing, exactly as the service order carries them — the same wording the acceptance records, in the terms format that termsText in the service settings describes, markers included. The page renders that format."},"termsUrl":{"type":"string","description":"Where the tenant publishes their terms, shown as a link beside the text. An empty string when there is none."},"termsAccepted":{"type":"boolean","description":"Whether the terms have been accepted on the service order. It is false on the page the customer is handed, and true in the answer to the acceptance — which is also the moment the session stops working."},"preferredLanguage":{"description":"The language the signing page should be shown in: the service order's customer's own where one is known, otherwise the tenant's — the same language the service portal shows this case in.","allOf":[{"$ref":"#/components/schemas/LanguageCode"}]},"accentColor":{"type":"string","description":"The tenant's accent color, the serviceAccentColor of the service settings: a # followed by six lowercase hex digits, such as #f97316, that the signing page draws its buttons, links and highlights in. An empty string when the tenant has not chosen one, and the page then uses its default accent color."}}},"LanguageCode":{"title":"LanguageCode","description":"Lowercase two-letter ISO 639-1 language code, like nb, en or sv.","type":"string"},"PortalSigningAcceptRequestSchema":{"title":"PortalSigningAcceptRequestSchema","description":"The customer's signature, drawn on the counter device. Sending it records the acceptance of the service order's terms and closes the signing session.","type":"object","required":["signature"],"properties":{"signature":{"type":"string","minLength":1,"maxLength":500000,"description":"The signature as it was drawn, a PNG image encoded in base64 — never empty, a signing without a drawing is refused. It is kept on the acceptance itself, whose method is COUNTER_DEVICE, together with the terms exactly as the customer was shown them, so what was signed can always be established."}}}},"requestBodies":{"PortalSigningAcceptRequest":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSigningAcceptRequestSchema"}}}}}}}
```


---

# 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-portal/accept-the-terms-at-the-counter.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.
