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

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.

post
/portal/serviceorders/{portalToken}/terms/accept
Path parameters
portalTokenstringRequired

The unguessable per-service-order token carried by the link in the message the customer was sent. The token is the authorization: whoever holds the link is the customer, and the service portal has no other credential — there is nothing to sign in with and nothing to remember. A token belongs to exactly one service order and reaches nothing else. It can be revoked by regenerating the service order's portal link or by changing the service order's customer, which kills the old token on the spot. A request carrying a revoked, expired or unknown token is refused. The token keeps working for a while after the service order reaches a terminal state — COMPLETE or CANCELLED — for as many days as the tenant's servicePortalTokenExpiryDays setting allows, and stops working when that window is over. That is what keeps the pickup and completion messages useful: the link in them opens a live page rather than a dead one, on a case that is already finished. Set the tenant window to 0 to have tokens die at the terminal state instead. Reopening the service order clears the terminal clock: the link lives again, with no expiry hanging over it, until the case reaches its next terminal state and the window starts over from there.

Responses
200

Example response

application/json

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. What 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. Everything 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.

serviceNumberstringRequired

The running service number the service order is known by — what the customer quotes when they call the store.

externalSalesOrderNumberstringRequired

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.

titlestringRequired

What the service order is about, in the words it was registered with.

descriptionstringRequired

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.

serviceStatusLabelstringRequired

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.

serviceStatestring · enumRequired

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. AWAITING_PRODUCT: the service order is registered, but the device has not arrived yet. NOT_STARTED: the device is here and the work is queued. IN_TRANSIT: the service order is in a box on its way between locations. IN_PROGRESS: the work is being done. WAITING_CUSTOMER: waiting for an answer from the customer — never for the device, which is what AWAITING_PRODUCT is for. WAITING_SUPPLIER: waiting for parts or for an answer from a supplier. READY_FOR_PICKUP: the outcome is ready to be handed over. COMPLETE: the customer has the device back. This is the handover, never the payment. CANCELLED: the service order ended without a completed repair. COMPLETE and CANCELLED are the terminal states. The 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. Extensible — new states may be added, so clients must not fail on a value they do not know.

Possible values:
coveragestring · enumRequired

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. PAYABLE: 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. Pricing, 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. Extensible — new coverages may be added, so clients must not fail on a value they do not know.

Possible values:
deductibleintegerRequired

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.

maxPriceinteger · nullableRequired

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.

expectedReadyAtstring · date-time · nullableRequired

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.

termsTextstringRequired

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. An 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.

termsUrlstringRequired

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.

termsAcceptedbooleanRequired

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.

termsAcceptedAtstring · date-time · nullableRequired

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.

preferredLanguagestringRequired

Lowercase two-letter ISO 639-1 language code, like nb, en or sv.

currencystringRequired

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.

Example: NOK
timeZonestringRequired

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.

Example: Europe/Oslo
accentColorstringRequired

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.

Example: #f97316
post/portal/serviceorders/{portalToken}/terms/accept
POST /v2/portal/serviceorders/{portalToken}/terms/accept HTTP/1.1
Host: api.flowretail.com
Accept: */*
{
  "serviceNumber": "text",
  "externalSalesOrderNumber": "text",
  "title": "text",
  "description": "text",
  "serviceStatusLabel": "text",
  "serviceState": "AWAITING_PRODUCT",
  "store": {
    "name": "text",
    "phone": "text",
    "email": "text",
    "address": "text",
    "postalCode": "text",
    "city": "text",
    "websiteUrl": "text",
    "openingHours": {
      "note": "text",
      "openDays": [
        {
          "weekday": "MONDAY",
          "opensAt": "10:00",
          "closesAt": "18:00"
        }
      ]
    }
  },
  "unit": {
    "productName": "text",
    "imageUrl": "text",
    "serialNumber": "text",
    "imei": "text"
  },
  "coverage": "PAYABLE",
  "deductible": 1,
  "maxPrice": 1,
  "expectedReadyAt": "2026-01-01T00:00:00.000Z",
  "events": [
    {
      "eventType": "STATUS_CHANGED",
      "note": "text",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "quoteAmount": 1
    }
  ],
  "documents": [
    {
      "assetUid": "text",
      "name": "text",
      "url": "text",
      "mimeType": "text"
    }
  ],
  "quote": {
    "state": "NONE",
    "amount": 1
  },
  "termsText": "text",
  "termsUrl": "text",
  "termsAccepted": true,
  "termsAcceptedAt": "2026-01-01T00:00:00.000Z",
  "preferredLanguage": "text",
  "currency": "NOK",
  "timeZone": "Europe/Oslo",
  "accentColor": "#f97316"
}

Last updated

Was this helpful?