Mapping rules
The frontend client is implemented in live/http.ts. The shared route map is authoritative for each method.
Path and query example
Client call:Nested body example
The client input forproducts.save contains id and product. The route uses the ID in /merchant/products/:id and sends the product object itself as the body. Sending { "id": "...", "product": { ... } } to that HTTP endpoint is a different request and fails its strict schema.
Likewise, campaign draft save uses its nested draft body. The generated method page states when a payload selector applies.
Multipart uploads
Forproducts.uploadAsset, place the ID in the path and the file in the file form field. Do not JSON-stringify a File or manually write a multipart boundary. Authentication and CSRF still apply. See products and delivery for server-enforced file limits.
Arrays and structured filters
The frontend transport serializes arrays as comma-separated strings and other object-valued query fields as JSON. The public read SDK uses JSON for object/array values. Supported read services normalize their documented query inputs; use the supplied client for its method set instead of inventing a third encoding.Pagination
Many collection methods accept an optionalcursor and limit; the shared limit is commonly 1–100, but read the exact method schema. Preserve the server’s cursor unchanged and pass it back for the next page. Do not increment it as if it were a page number or a block height.
Inspect the method’s output schema for its collection envelope and nullable continuation field. Stop when the response provides no next cursor. Filter changes should start a new traversal rather than reusing a cursor from a different query.
Headers and failures
- Send
Accept: application/jsonfor JSON methods. - Send
Content-Type: application/jsonfor JSON writes. - The authenticated frontend includes cookies with
credentials: "include". - Protected writes need the exact allowed browser origin and sign-in CSRF token.
- Checkout requires an
idempotency-key; the standard client uses itsorderKey. - Keep
requestIdand anyRetry-Afterinformation when reporting or backing off from failures.
Special routes outside the method map
The canonical registry covers 189 client methods, not every auxiliary HTTP route. For example, temporary downloads and served image assets are supporting routes with their own authorization/entitlement rules. A public transport label on a tokenized download URL does not make the file public.vault.get also selects a campaign-specific route when campaignId is present. This is documented beside that method in settlement reference.