> 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-in-the-customer-portal.md). Agents can also search and read this documentation through its [MCP server](https://docs.flowretail.com/docs/~gitbook/mcp).

# Accept the terms in the customer portal

The customer accepts the terms and conditions on their service order. The acceptance is recorded with method PORTAL\_LINK, snapshotting the terms exactly as the portal showed them, and a TERMS\_ACCEPTED event is written on the timeline. A change of the tenant's or the type's terms afterwards never rewrites what was agreed to. It is one tap for the whole of the terms, and the call is idempotent: a double tap accepts once. The request is refused with a 409 when the service order has no terms — there is nothing to accept. Once the service order is in a terminal state the request is refused with a 404. The page stays readable for whatever is left of the token's lifetime, so the customer can still see how their case ended, but the case can no longer be acted on. The updated portal page is returned, with termsAccepted now true. Work waiting on the terms is released.

```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/serviceorders/{portalToken}/terms/accept":{"post":{"summary":"Accept the terms in the customer portal","operationId":"post-portal-serviceorders-terms-accept","description":"The customer accepts the terms and conditions on their service order. The acceptance is recorded with method PORTAL_LINK, snapshotting the terms exactly as the portal showed them, and a TERMS_ACCEPTED event is written on the timeline. A change of the tenant's or the type's terms afterwards never rewrites what was agreed to.\nIt is one tap for the whole of the terms, and the call is idempotent: a double tap accepts once. The request is refused with a 409 when the service order has no terms — there is nothing to accept.\nOnce the service order is in a terminal state the request is refused with a 404. The page stays readable for whatever is left of the token's lifetime, so the customer can still see how their case ended, but the case can no longer be acted on.\nThe updated portal page is returned, with termsAccepted now true. Work waiting on the terms is released.","responses":{"200":{"$ref":"#/components/responses/PortalServiceOrderResponse"},"404":{"description":"Unknown, revoked or expired token, or a service order that has reached a terminal state and can no longer be acted on. The same answer is given whichever it is — whether the token never existed, was replaced by a regenerated link, has passed its expiry, or the case is closed — because the page never reveals whether a service order exists behind a token."},"409":{"description":"Conflict. The service order has no terms — termsText and termsUrl are both empty — so there is nothing to accept. Nothing is written. Accepting terms that are already accepted is not a conflict and returns the page. Judged only on a working token and an open service order; a closed case answers 404 whatever its terms."},"429":{"description":"Too many requests for this link. The portal 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. The limit is judged before the token, and every request counts whatever the token, so a 429 says nothing about whether the link works."}},"tags":["ServicePortal"]}}},"components":{"responses":{"PortalServiceOrderResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalServiceOrderResponseSchema"}}}}},"schemas":{"PortalServiceOrderResponseSchema":{"title":"PortalServiceOrderResponseSchema","description":"A service order as the customer sees it in the service portal — the page the link in their message opens. It is a representation of its own, assembled field by field from customer-visible data and never derived from the service order as staff read it, so nothing internal can leak into it by being added to the service order later.\nWhat that leaves out is everything internal: costs and margins, cost prices among them, supplier and workshop arrangements, internal notes, secrets, assignments and staff names. Of the answers captured on the intake form, the product, the serial number and the IMEI (on the unit) are the only ones carried, and the max price is carried beside them; every other form answer stays out. Only timeline events whose visibility is PUBLIC are included, and only assets marked customer-visible are listed as documents, within the limits the documents field states.\nEverything the customer sends back happens here too — approving or declining the quote, accepting the terms, writing a message — and each of those returns this same page, updated, so the portal never has to ask for it again.","type":"object","required":["serviceNumber","externalSalesOrderNumber","title","description","serviceStatusLabel","serviceState","store","unit","coverage","deductible","maxPrice","expectedReadyAt","events","documents","quote","termsText","termsUrl","termsAccepted","termsAcceptedAt","preferredLanguage","currency","timeZone","accentColor"],"properties":{"serviceNumber":{"type":"string","description":"The running service number the service order is known by — what the customer quotes when they call the store."},"externalSalesOrderNumber":{"type":"string","description":"The order number of the purchase the unit in for service was bought on, as the shop's order system records it — shown so the customer can recognise the purchase. It is not the service number. An empty string when the service order names none."},"title":{"type":"string","description":"What the service order is about, in the words it was registered with."},"description":{"type":"string","description":"What is wrong with the unit: the service order's description, in full, as it stands — registered at intake, and corrected by staff since where it was. An empty string when there is none."},"serviceStatusLabel":{"type":"string","description":"Where the service order stands, in the wording meant for the customer: the status's customer-visible label, falling back to the internal name of the status when no customer-visible label has been set."},"serviceState":{"description":"The stage the service order is at, shown as the current situation of the case, never as progress. It follows the state behind the status, so renaming a status does not change it.","allOf":[{"$ref":"#/components/schemas/ServiceStateENUM"}]},"store":{"description":"The store that holds the service order — the one the customer collects from, and the one to call or write to about the case.","allOf":[{"$ref":"#/components/schemas/PortalStoreSchema"}]},"unit":{"nullable":true,"description":"The unit the case is about: the catalogue product the service order names, with the serial number and the IMEI where they were captured at intake. null when the service order names no product and neither a serial number nor an IMEI was captured.","allOf":[{"$ref":"#/components/schemas/PortalServiceOrderUnitSchema"}]},"coverage":{"description":"How the work is covered — paid by the customer, or a consumer, warranty or insurance claim. It is the coverage the service order carries, so a case reclassified during the work shows the coverage it stands on.","allOf":[{"$ref":"#/components/schemas/ServiceOrderCoverageENUM"}]},"deductible":{"type":"integer","description":"The deductible on an insurance claim, VAT included, as the service order records it, in the minor units of currency. It is 0 when there is none, and it is above 0 only on the coverage INSURANCE_CLAIM. It is information: it does not change how the case is billed, and no sale is split by it."},"maxPrice":{"type":"integer","nullable":true,"description":"The price the store may go up to without asking the customer again: up to this amount the store goes ahead with the work, and above it the customer is asked first. In the minor units of currency. null when no ceiling has been captured; a service order that records 0 has none, and answers null, so the portal never tells a customer the store may go up to nothing."},"expectedReadyAt":{"type":"string","format":"date-time","nullable":true,"description":"When the work is expected to be ready, as it has been estimated. null when no estimate has been given — the portal then says nothing about timing rather than guessing at it. It is read on the clock in timeZone: a value that reads 23:59:59 there, whatever its milliseconds, means by the end of that day with no time given, and is shown as the day and \"end of day\"; any other value is shown as the day and its time."},"events":{"type":"array","description":"The history of the service order as the customer may read it, oldest first. Only events marked visible to the customer appear here, each slimmed to what happened and when — no staff names, no statuses, no internal fields.","items":{"$ref":"#/components/schemas/PortalServiceEventSchema"}},"documents":{"type":"array","description":"The documents and photos on the service order that are marked customer-visible, such as an uploaded copy of the signed service confirmation or a photo of the damage. Anything not marked customer-visible is never listed here, and the portal has no way to reach it. Only files stored privately in Flow Retail are listed: a file fetched from the CDN without a signature (isPublic) or kept at an address of its own is never listed, whatever its flag, because its own address would outlive the document link. Only a file in the SERVICE category that is on this service order and on no other is listed: a file attached to several service orders, or of any other category, is never listed, whatever its flag. Each is opened through its own url, never the file's address.","items":{"$ref":"#/components/schemas/PortalServiceOrderDocumentSchema"}},"quote":{"description":"The price offered for the work and where that offer stands — including that there is nothing to answer.","allOf":[{"$ref":"#/components/schemas/PortalServiceOrderQuoteSchema"}]},"termsText":{"type":"string","description":"The terms and conditions that apply to this service order, exactly as the service order carries them — the same wording an acceptance records, in the terms format that termsText in the service settings describes, markers included. The portal shows them rendered in that format and, until termsAccepted is true, offers a tap to accept them.\nAn empty string when the service order has no terms text; when termsUrl is empty too, the service order has no terms, nothing is shown and nothing is asked."},"termsUrl":{"type":"string","description":"Where the tenant publishes their terms, shown as a link beside the text. An empty string when there is none. A URL alone is terms to accept, even when termsText is empty."},"termsAccepted":{"type":"boolean","description":"Whether the terms have been accepted on this service order, whether that happened here in the portal, was signed at the counter, or was given in the store and recorded by staff. True when the service order has no terms, because nothing is asked; false again if an acceptance that stood was voided, and the portal then asks again."},"termsAcceptedAt":{"type":"string","format":"date-time","nullable":true,"description":"When the acceptance that stands on the service order was given, whether that happened here in the portal, was signed at the counter, or was given in the store and recorded by staff. null when no acceptance stands — the terms were never accepted, or the acceptance that stood was voided — and null when the service order has no terms at all: termsAccepted is then true while termsAcceptedAt is null, because nothing was asked."},"preferredLanguage":{"description":"The language the portal should be shown in: the customer's own where one is known, otherwise the tenant's.","allOf":[{"$ref":"#/components/schemas/LanguageCode"}]},"currency":{"type":"string","description":"The tenant's currency, as an ISO 4217 code such as NOK. Every amount on the page — the quote's amount, the amount on each quote entry in the history, maxPrice and deductible — is in the minor units of this currency, so the portal formats a price with it rather than assuming one."},"timeZone":{"type":"string","description":"The tenant's time zone, as an IANA zone name such as Europe/Oslo — Europe/Oslo when the tenant has none set. Every date and time on the page is an instant, and the portal shows it in this zone, so the customer reads the same day and hour the store does wherever they open the link."},"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 portal draws its buttons, links and highlights in. An empty string when the tenant has not chosen one, and the portal then uses its default accent color."}}},"ServiceStateENUM":{"title":"ServiceStateENUM","description":"Where a service order stands, as the platform understands it. Every status a tenant defines maps to exactly one state, and it is the state Flow reasons about: the workspace filters, the wording the portal shows the customer and the turnaround figures all follow the state rather than the name the status was given.\nAWAITING_PRODUCT: the service order is registered, but the device has not arrived yet.\nNOT_STARTED: the device is here and the work is queued.\nIN_TRANSIT: the service order is in a box on its way between locations.\nIN_PROGRESS: the work is being done.\nWAITING_CUSTOMER: waiting for an answer from the customer — never for the device, which is what AWAITING_PRODUCT is for.\nWAITING_SUPPLIER: waiting for parts or for an answer from a supplier.\nREADY_FOR_PICKUP: the outcome is ready to be handed over.\nCOMPLETE: the customer has the device back. This is the handover, never the payment.\nCANCELLED: the service order ended without a completed repair.\nCOMPLETE and CANCELLED are the terminal states.\nThe states are owned by the platform: tenants never define or rename them, and only decide which state each of their own statuses maps to. A status that exists today keeps the state it has until the tenant remaps it — nothing is remapped for them.\nExtensible — new states may be added, so clients must not fail on a value they do not know.","type":"string","enum":["AWAITING_PRODUCT","NOT_STARTED","IN_TRANSIT","IN_PROGRESS","WAITING_CUSTOMER","WAITING_SUPPLIER","READY_FOR_PICKUP","COMPLETE","CANCELLED"]},"PortalStoreSchema":{"title":"PortalStoreSchema","description":"The store that holds a service order, as the customer sees it in the service portal: who the store is, how to reach it and when it is open. Each value is the store record's own, and nothing else about the store is carried.","type":"object","required":["name","phone","email","address","postalCode","city","websiteUrl","openingHours"],"properties":{"name":{"type":"string","description":"The store's name."},"phone":{"type":"string","description":"The store's phone number, so the customer can call instead of writing. An empty string when the store has none."},"email":{"type":"string","description":"The store's e-mail address. An empty string when the store has none."},"address":{"type":"string","description":"The store's street address. An empty string when none is set."},"postalCode":{"type":"string","description":"The postal code of the store's address. An empty string when none is set."},"city":{"type":"string","description":"The city of the store's address. An empty string when none is set."},"websiteUrl":{"type":"string","description":"The store's website, as the store record holds it and not checked by Flow. The portal links to it only when it is an http or https address. An empty string when none is set."},"openingHours":{"description":"When the store is open, as the store record holds it: the weekdays it is open with their hours (openDays, empty when the store has none) and a note in the store's own words. The seven day texts are written from openDays: HH:MM–HH:MM on a day the store is open, and empty on a day it is closed or when the store has no openDays.","allOf":[{"$ref":"#/components/schemas/OpeningHoursResponseSchema"}]}}},"OpeningHoursResponseSchema":{"title":"OpeningHoursResponseSchema","type":"object","properties":{"monday":{"type":"string","deprecated":true,"description":"Deprecated: read openDays. The day's hours as text, written from openDays: HH:MM–HH:MM on a day the store is open, and an empty string on a day it is closed or when the store has no openDays. It will be removed after the announced deprecation window; see the deprecation log for the date."},"tuesday":{"type":"string","deprecated":true,"description":"Deprecated: read openDays. The day's hours as text, written from openDays: HH:MM–HH:MM on a day the store is open, and an empty string on a day it is closed or when the store has no openDays. It will be removed after the announced deprecation window; see the deprecation log for the date."},"wednesday":{"type":"string","deprecated":true,"description":"Deprecated: read openDays. The day's hours as text, written from openDays: HH:MM–HH:MM on a day the store is open, and an empty string on a day it is closed or when the store has no openDays. It will be removed after the announced deprecation window; see the deprecation log for the date."},"thursday":{"type":"string","deprecated":true,"description":"Deprecated: read openDays. The day's hours as text, written from openDays: HH:MM–HH:MM on a day the store is open, and an empty string on a day it is closed or when the store has no openDays. It will be removed after the announced deprecation window; see the deprecation log for the date."},"friday":{"type":"string","deprecated":true,"description":"Deprecated: read openDays. The day's hours as text, written from openDays: HH:MM–HH:MM on a day the store is open, and an empty string on a day it is closed or when the store has no openDays. It will be removed after the announced deprecation window; see the deprecation log for the date."},"saturday":{"type":"string","deprecated":true,"description":"Deprecated: read openDays. The day's hours as text, written from openDays: HH:MM–HH:MM on a day the store is open, and an empty string on a day it is closed or when the store has no openDays. It will be removed after the announced deprecation window; see the deprecation log for the date."},"sunday":{"type":"string","deprecated":true,"description":"Deprecated: read openDays. The day's hours as text, written from openDays: HH:MM–HH:MM on a day the store is open, and an empty string on a day it is closed or when the store has no openDays. It will be removed after the announced deprecation window; see the deprecation log for the date."},"note":{"type":"string","description":"Free text about the store's opening hours, in the store's own words."},"openDays":{"type":"array","description":"The weekdays the store is open, Monday first, each once, with its hours; while the list holds a day, a weekday not listed is closed. Empty when the store has no opening hours per weekday: every day of the week then counts as open when its working days are counted, and the seven day texts are empty.","items":{"$ref":"#/components/schemas/OpeningHoursOpenDaySchema"}}},"required":["monday","tuesday","wednesday","thursday","friday","saturday","sunday","note","openDays"]},"OpeningHoursOpenDaySchema":{"title":"OpeningHoursOpenDaySchema","description":"One weekday the store is open, and its hours.","type":"object","required":["weekday","opensAt","closesAt"],"properties":{"weekday":{"$ref":"#/components/schemas/WeekDayENUM"},"opensAt":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"When the store opens on this weekday, as HH:MM on the clock of the tenant's timezone."},"closesAt":{"type":"string","pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$","description":"When the store closes on this weekday, as HH:MM on the clock of the tenant's timezone, later than opensAt; 24:00 is the end of the day."}}},"WeekDayENUM":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"title":"WeekDayENUM","type":"string"},"PortalServiceOrderUnitSchema":{"title":"PortalServiceOrderUnitSchema","description":"The unit a service order is about, as the customer sees it in the service portal: the catalogue product the case names, its picture, and the serial number and the IMEI captured at intake — enough for the customer to see at a glance that the page is about their own device.\nThe product, the serial number and the IMEI are platform intake fields that are never sensitive, and they are the only intake form answers the portal carries, beside the page's maxPrice; every other answer on the intake form stays out of the portal. A serial number or an IMEI that is blank once trimmed counts as not captured, as it does on the papers.","type":"object","required":["productName","imageUrl","serialNumber","imei"],"properties":{"productName":{"type":"string","description":"The name of the catalogue product the service order names — the model of the unit on the bench. An empty string when the service order names no product."},"imageUrl":{"type":"string","nullable":true,"description":"The product's catalogue picture: the main URL of its cover image, the same address the product's coverImage carries as mainUrl, served as the catalogue holds it and not checked by Flow. The portal shows it only when it is an https address, as an image source with no referrer, and shows no picture otherwise. null when the service order names no product, or the product has no cover image."},"serialNumber":{"type":"string","description":"The answer captured for the SERIAL_NUMBER platform intake field. An empty string when none was captured."},"imei":{"type":"string","description":"The answer captured for the IMEI platform intake field. An empty string when none was captured."}}},"ServiceOrderCoverageENUM":{"title":"ServiceOrderCoverageENUM","description":"Who pays for the work on a service order, and under what right. Every service order carries a coverage: it is chosen at intake, and it can be changed while the case runs — a diagnosis may reclassify it, as when water damage voids a warranty and the case becomes payable.\nPAYABLE: the customer pays. CONSUMER_CLAIM: a claim under statutory consumer rights — the seller's cost. WARRANTY_CLAIM: a claim under a warranty — the seller's or the manufacturer's cost. INSURANCE_CLAIM: a claim to an insurer — the service order names the insurer and may carry the insurer's claim number and the deductible, recorded for information.\nPricing, quoting and invoicing work the same way whatever the coverage is: the sale is billed to the service order's customer on every coverage (see post-serviceorders-orders). A covered repair can still carry billable work.\nExtensible — new coverages may be added, so clients must not fail on a value they do not know.","type":"string","enum":["PAYABLE","CONSUMER_CLAIM","WARRANTY_CLAIM","INSURANCE_CLAIM"]},"PortalServiceEventSchema":{"title":"PortalServiceEventSchema","description":"One entry in the service order history as the customer sees it. Only events marked visible to the customer ever become one of these.\nIt carries what happened and when — and, on a quote entry, the amount as it stood at that moment. The staff member behind it, the status it put the service order on, the checklist results and everything else on the staff event stay out of the portal.","type":"object","required":["eventType","note","createdAt","quoteAmount"],"properties":{"eventType":{"description":"What this entry records, so the portal can give it the right wording. A message the customer wrote themselves comes back as CUSTOMER_MESSAGE and is shown as their own; a message the store wrote to the customer comes back as STORE_MESSAGE and is shown as the store's half of the dialogue. Both sit in time order with every other entry.","allOf":[{"$ref":"#/components/schemas/ServiceEventTypeENUM"}]},"note":{"type":"string","description":"The text of the entry as it was written — the update the workshop left, the message the store wrote, or the message the customer sent. An empty string on an entry that is only the fact that something happened."},"createdAt":{"type":"string","format":"date-time","description":"When it happened."},"quoteAmount":{"type":"integer","nullable":true,"description":"The amount the quote stood at when this entry was written, in the minor units of the currency the portal page names. It is snapshotted at that moment, so a quote replaced afterwards never rewrites what an earlier entry records. Only QUOTE_SENT, QUOTE_APPROVED and QUOTE_DECLINED entries carry an amount; null on every other entry."}}},"ServiceEventTypeENUM":{"title":"ServiceEventTypeENUM","description":"What a service order timeline event records. Every event has exactly one event type.\nSTATUS_CHANGED: the event put the service order on the status it carries. The first entry on every timeline is a STATUS_CHANGED written by the create, carrying the status the service order started on, with the visibility INTERNAL; it is edited like any other status change. NOTE: a note written by staff, carrying no status change. ASSIGNED: the service order was handed to another user, or unassigned, through the assign endpoint. It is written with the visibility INTERNAL and carries no status, and its note names by display name the user it went to, or records that it went back to the store on an unassign, in the tenant's own language. REOPENED: a status change that moves the service order out of a terminal state, COMPLETE or CANCELLED, is recorded and returned as REOPENED rather than as STATUS_CHANGED. It carries the status it moved to exactly as any other status change does, and it is the one Flow-typed event a person authors: reopening is the status change, there is no separate reopen action, and a service order is never reopened by anything other than someone moving it. DIAGNOSIS: what the technician found to be wrong. RESOLUTION: what was done to resolve the issue. FIELD_CHANGE: one of the tracked fields on the service order was changed. The tracked fields are claimNumber, coverage, customerUid, deductible, externalSalesOrderNumber, priority, readyAtEstimate and title; changing any other field leaves no event. One event is written per changed field, so an update that changes three of them leaves three events. Each is written with the visibility INTERNAL and carries no status, and its note says which field changed and from what to what, in the tenant's own language. A change of customer names the customer before and the customer after. A change of the deductible names the amount before and after in the tenant's currency, as an amount, never in minor units. CUSTOMER_MESSAGE: a free-text message the customer wrote in the service portal. STORE_MESSAGE: a message the store wrote to the customer — the store's half of the dialogue in the service portal, beside CUSTOMER_MESSAGE. It is always PUBLIC and carries no status; it carries its author on the staff timeline like any staff entry, while the portal never shows who wrote it, and it is never printed on any paper. TERMS_ACCEPTED: the customer accepted the terms and conditions on the service order — in the service portal, on a counter device or in the store. TERMS_VOIDED: the acceptance recorded on the service order was voided through the void endpoint, or by a change of the service order's customer — the note carries the reason given, while who voided it and when are the event's own attribution and timestamp. QUOTE_SENT: a price was offered to the customer, whether or not a message went out with it. QUOTE_APPROVED: the customer approved the quote. QUOTE_DECLINED: the customer declined the quote. All three are written with the visibility PUBLIC and carry no status: the customer sees the offer and their own answer in the portal history, each entry carrying the amount it stood at, and each with an empty note of its own — the portal words the entry from its type. CHECKLIST_COMPLETED: a job type checklist was completed through the service order's checklist endpoint, with the result of every item snapshotted on the event. CHECKLIST_SKIPPED: a job type checklist was skipped through the service order's checklist endpoint, after the user confirmed the skip. SECRET_VIEWED: a secret on the service order was revealed through the secrets reveal endpoint. SECRET_DELETED: a secret on the service order was deleted through the secrets delete endpoint before the service order finished; the note carries the label of the secret that was removed, so the timeline says what was taken off the case and by whom. MOVED: the service order was moved to another store through the move mechanism, whether by the move endpoint or by the receipt of a shipment item at another store. It is written with the visibility INTERNAL and carries no status; movedFromStoreUid and movedToStoreUid record the store it left and the store it went to, and its note records the assignment the move ended, in the tenant's own language.\nOnly STATUS_CHANGED, NOTE, DIAGNOSIS, RESOLUTION and STORE_MESSAGE can be sent when an event is created — every other type is written by Flow when the corresponding action happens, REOPENED included, which is what a STATUS_CHANGED out of a terminal state is recorded as. Editing reaches those five and REOPENED with them; every other type is immutable.","enum":["STATUS_CHANGED","NOTE","ASSIGNED","REOPENED","DIAGNOSIS","RESOLUTION","FIELD_CHANGE","CUSTOMER_MESSAGE","STORE_MESSAGE","TERMS_ACCEPTED","TERMS_VOIDED","QUOTE_SENT","QUOTE_APPROVED","QUOTE_DECLINED","CHECKLIST_COMPLETED","CHECKLIST_SKIPPED","SECRET_VIEWED","SECRET_DELETED","MOVED"],"type":"string"},"PortalServiceOrderDocumentSchema":{"title":"PortalServiceOrderDocumentSchema","description":"A document or photo on the service order that the customer may open, such as an uploaded copy of the signed service confirmation. Only the assets the documents field admits appear here: the portal holds no credential and cannot reach anything else.","type":"object","required":["assetUid","name","url","mimeType"],"properties":{"assetUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"What the document is called, as it is listed to the customer."},"url":{"type":"string","description":"The link the customer opens the document with. It opens this one document on this one service order and nothing else — never the service order's page — so a customer can forward it without handing over their case.\nIt is an absolute URL on Flow Retail's own address, not the portal's, ending in the document's key: `/portal/documents/{documentToken}`. Put it in the page as it is, as a link or an image source. A client that passes the portal's requests on to Flow Retail from its own server may instead link to its own address with the same key, taken from the URL's last path segment, and pass the request on to this path and its redirect back to the browser, never followed. Never build a link from anything else, and never fetch it as an API call: the browser follows the redirect itself. It carries a key of its own, tied to the service order's current portal link, and is judged afresh every time it is opened. It stops working the moment the portal link is regenerated, while the portal token is past its expiry after the service order reaches a terminal state (a reopen brings it back with the portal link), when the document stops being customer-visible, when it is made CDN-public, when it is moved out of the SERVICE category, when it is attached to another service order as well, and when it is detached from the service order or deleted. Opening it hands the browser on to a short-lived address for the file itself, so a document that was already open can stay reachable at that address for up to five minutes after its link stops working. A link read from a fresh page works; one kept from an older page may have died, and the portal reloads the page for current links."},"mimeType":{"type":"string","description":"The content type of the file, so the portal knows whether to show it inline or offer it as a download."}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PortalServiceOrderQuoteSchema":{"title":"PortalServiceOrderQuoteSchema","description":"The price offered for the work on a service order and where that offer stands, as the customer sees it.\nA decision the store recorded because the customer answered over the counter, on the phone or in writing shows here exactly as one taken in the portal does — it is the same business fact either way.","type":"object","required":["state","amount"],"properties":{"state":{"description":"Where the quote stands.\nNONE: no price has been offered, and the portal has nothing to ask. SENT: a price has been offered and is waiting for the customer's answer. APPROVED: the customer accepted it. DECLINED: the customer turned it down. A new quote sent after a decision puts the state back to SENT and asks again.\nIt is the same quoteState the staff representation of the service order carries — the portal and the workshop read where the offer stands the same way.","allOf":[{"$ref":"#/components/schemas/ServiceOrderQuoteStateENUM"}]},"amount":{"type":"integer","nullable":true,"description":"The amount offered, in the minor units of the currency the portal page names. null when the state is NONE — there is nothing to show."}}},"ServiceOrderQuoteStateENUM":{"title":"ServiceOrderQuoteStateENUM","description":"Where the latest quote on a service order stands.\nNONE: nothing has been offered. SENT: an offer is outstanding, waiting for the customer's answer. APPROVED: the customer accepted the latest offer. DECLINED: the customer turned it down.\nIt is maintained solely by the quote endpoints: sending a quote sets SENT, recording a decision sets the answer that was given, and a new quote puts it back to SENT and asks again.","type":"string","enum":["NONE","SENT","APPROVED","DECLINED"]},"LanguageCode":{"title":"LanguageCode","description":"Lowercase two-letter ISO 639-1 language code, like nb, en or sv.","type":"string"}}}}
```


---

# 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-in-the-customer-portal.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.
