# Fluid > ## Agent Instructions > For new direct REST integrations, use the v2026-04 surfaces. The @fluid-app FairShare SDK continues to use its own published public-v2025-06 contract. > Authenticate with the header Authorization: Bearer ; public storefront read endpoints require no auth. > Lists use cursor pagination via the page[cursor] and page[limit] query params; follow meta.pagination.next_cursor until it is null. > Never use /api/company/v1 or /api/v1 paths, page/per_page params, or offset pagination — they are legacy. > The OpenAPI specs under api-reference/ are the authoritative contracts; prefer them over prose when in doubt. api-reference/storefront-v2026-04.yaml covers the v2026-04 storefront surface (/api/v202604/... paths); api-reference/auth-v0.yaml covers the unversioned auth surface (/api/... paths — authentication, MFA, social auth, and token exchange); api-reference/checkout-v2026-04.yaml covers the v2026-04 checkout surface (/api/checkout/v2026-04/... paths — carts, cart auth, discounts, items, subscriptions, orders, enrollments, and store config); api-reference/public-v2025-06.yaml covers the Public SDK surface used by the @fluid-app FairShare SDK, including its parallel cart lifecycle, browser integrations, versioned payment callbacks, unversioned public utilities, and the cart price-override operation; api-reference/payment-v2026-04.yaml covers the v2026-04 payment gateway admin surface (/api/payment/v2026-04/... paths, bearer-authenticated — gateway CRUD, gateway purchase/authorize/$0-verify, transaction list/show and capture/void/credit, and merchant payment configuration); api-reference/payments-v2026-04.yaml covers the v2026-04 cart payment surface (/api/payments/v2026-04/carts/{cart_token}/... paths, authenticated by the cart token in the path with no bearer — payment-method selection, VGS card tokenization, 3D Secure verification, and PayPal/Braintree/Klarna/Apple Pay flows); api-reference/commerce-v2026-04.yaml covers the v2026-04 commerce order-editing surface (/api/v202604/orders/{order_id}/edits paths, bearer-authenticated — post-checkout order edits that atomically insert items and add adjustments/discounts, with an optional dry-run preview); api-reference/webhooks-v0.yaml covers the unversioned webhooks surface (/api/... paths — webhook registration, delivery payloads, callback registrations, company events, and webhook/callback schemas). > Successful responses wrap the resource payload alongside a top-level integer status and a meta object. ## Docs - [Retrieve affiliate information](https://docs.fluid.app/api-reference/affiliate/retrieve-affiliate-information.md) - [Validate an Apple Pay merchant session](https://docs.fluid.app/api-reference/apple-pay/validate-an-apple-pay-merchant-session.md): Requests a merchant session from Apple's startSession endpoint on behalf of the storefront domain. Requires a Referer header matching a verified domain. - [Create auth token](https://docs.fluid.app/api-reference/auth-token/create-auth-token.md): Generate a short-lived authentication token for the current user company. - [Confirm MFA passcode](https://docs.fluid.app/api-reference/authentication/confirm-mfa-passcode.md): Verify a multi-factor authentication code and receive JWTs for the user's companies. - [Fetch company details from Fluid Shop name](https://docs.fluid.app/api-reference/authentication/fetch-company-details-from-fluid-shop-name.md): Public endpoint that returns basic company details by shop name. No authentication required. - [Fetch user details from JWT](https://docs.fluid.app/api-reference/authentication/fetch-user-details-from-jwt.md): Decode a JWT and return the user and user-company profile information. - [Resend MFA code via email](https://docs.fluid.app/api-reference/authentication/resend-mfa-code-via-email.md): Destroy the previous MFA record and create a new one, sending a fresh verification code. - [Send MFA passcode](https://docs.fluid.app/api-reference/authentication/send-mfa-passcode.md): Send a multi-factor authentication passcode via email. Returns a generic success response even for unknown emails to prevent email enumeration. - [Switch company](https://docs.fluid.app/api-reference/authentication/switch-company.md): Switch the authenticated user to a different company they belong to. - [Authorize a Braintree transaction](https://docs.fluid.app/api-reference/braintree/authorize-a-braintree-transaction.md): Authorizes a Braintree transaction from a JS SDK nonce and stores the vault context on the cart. PaymentMethod creation happens via the payment_method endpoint afterwards. - [Get Braintree client token](https://docs.fluid.app/api-reference/braintree/get-braintree-client-token.md): Returns the Braintree client token the browser uses to initialize the Braintree JS SDK for this cart, scoped to the Braintree `PaymentAccount` named by `payment_account_id`; `paypal_enabled` reports whether PayPal funding is available through that account. Cart-token authenticated. Returns `422` whe… - [List callback definitions](https://docs.fluid.app/api-reference/callback-definitions/list-callback-definitions.md): Lists the callback definitions available to the company — the catalog of synchronous callbacks (e.g. tax, shipping) that a registration can target. Read-only. Requires a company Bearer token; returns `401` when the token is missing or invalid. - [Create a callback registration](https://docs.fluid.app/api-reference/callback-registrations/create-a-callback-registration.md): Registers a synchronous callback for the company against a callback definition, so Fluid can call the given `url` for decisions such as tax or shipping. `definition_name` and `url` are required. Returns `201` with the created registration; `422` when the body fails validation; `409` when a registrat… - [Delete a callback registration](https://docs.fluid.app/api-reference/callback-registrations/delete-a-callback-registration.md): Deletes a callback registration by its `uuid`; Fluid stops calling its `url`. Returns `200` echoing the deleted registration's `uuid`, or `404` when the uuid is unknown. Requires a company Bearer token (`401` otherwise). - [List callback registrations](https://docs.fluid.app/api-reference/callback-registrations/list-callback-registrations.md): Lists the company's callback registrations, paginated. Read-only. Accepts an optional `filters` object (`page`/`per_page`, plus `company_id`, `definition_name`, `sorted_by`, and `active`). Requires a company Bearer token (`401` otherwise). - [Show a callback registration](https://docs.fluid.app/api-reference/callback-registrations/show-a-callback-registration.md): Fetches a single callback registration by its `uuid`. Read-only. Returns `404` when no registration with that uuid belongs to the company. Requires a company Bearer token (`401` otherwise). - [Update a callback registration](https://docs.fluid.app/api-reference/callback-registrations/update-a-callback-registration.md): Updates a callback registration's `url`, `active`, and `country_codes`; `definition_name` is fixed at creation. Returns `200` with the updated registration, `404` when the uuid is unknown, and `422` when the body fails validation. Requires a company Bearer token (`401` otherwise). - [List callback schemas](https://docs.fluid.app/api-reference/callback-schemas/list-callback-schemas.md): Lists the request and response schemas for every callback definition — use them to generate types or validate callback payloads. Read-only. Requires a company Bearer token (`401` otherwise). - [Show a callback schema](https://docs.fluid.app/api-reference/callback-schemas/show-a-callback-schema.md): Returns the schema for a specific callback definition. - [List cart countries and languages](https://docs.fluid.app/api-reference/cart-auth/list-cart-countries-and-languages.md): Public, cart-token–scoped. Despite the `/auth/me` path, this returns the cart's available `countries` and `languages` (`CheckoutCartAuthIdentityResponse`) — it does **not** return a customer identity or session. Authorization is by the `cart_token` in the path; no bearer token is required (a company… - [Logout from cart](https://docs.fluid.app/api-reference/cart-auth/logout-from-cart.md): Public, cart-token–scoped. Ends the customer session associated with the cart and returns the updated cart auth state. Authorization is by the `cart_token` in the path; no bearer token is required. Returns `410` when the cart is a locked/authorized enrollment cart and `404` when the cart token is un… - [Send magic link](https://docs.fluid.app/api-reference/cart-auth/send-magic-link.md): Public, cart-token–scoped. Sends a magic-link / MFA challenge to the customer's `email` and returns a challenge `uuid` (`201`) to submit to `POST …/auth/verify`. No bearer token is required. `fluid_shop` here is the company subdomain (e.g. `acme`). Set `lookup_only: true` for a returning-buyer probe… - [Verify magic link](https://docs.fluid.app/api-reference/cart-auth/verify-magic-link.md): Public, cart-token–scoped. Confirms a magic-link challenge: submit the `uuid` returned by `POST …/auth/magic_link` together with the customer's `verification_code`. On success the customer is bound to the cart (`200`). The credential is the cart token plus the verification code — no bearer token is… - [Apply discount code](https://docs.fluid.app/api-reference/cart-discount/apply-discount-code.md): Applies a discount code to the cart. Not idempotent — applying the same code twice returns an error. - [Apply manual discount (admin only)](https://docs.fluid.app/api-reference/cart-discount/apply-manual-discount-admin-only.md): Creates a one-time manual discount and applies it to the cart. Requires admin authentication (root_or_admin? role). Manual discounts are single-use, require a reason, and are excluded from the promo code management UI. - [List all discounts applied to a cart](https://docs.fluid.app/api-reference/cart-discount/list-all-discounts-applied-to-a-cart.md): Returns per-discount detail for all active discounts on a cart, including code, reason, type, defined value, and actual amount applied. - [Remove discount code](https://docs.fluid.app/api-reference/cart-discount/remove-discount-code.md): Removes a previously applied discount code from the cart and recalculates totals. The `discount_code` to remove is required in the body. Access is scoped by the `cart_token` in the path — the endpoint itself does not require authentication. In Fluid's recommended server-side integration you send a c… - [Add items to cart](https://docs.fluid.app/api-reference/cart-items/add-items-to-cart.md): Applies one or more line-item changes and recalculates totals (unless `perform_cart_calculations` is false). Use `variant_id` with a positive `quantity` to add or update a variant. Use `variant_id` or `cart_item_id` with `quantity: 0` to remove the matching existing line. Mark a line as a subscripti… - [Remove a cart item](https://docs.fluid.app/api-reference/cart-items/remove-a-cart-item.md): Removes the line item identified by `{id}` from the cart and recalculates totals; returns the updated cart. Access is scoped by the `cart_token` in the path — the endpoint itself does not require authentication. In Fluid's recommended server-side integration you send a company bearer token (`Authori… - [Update a cart item](https://docs.fluid.app/api-reference/cart-items/update-a-cart-item.md): Updates a single line item identified by `{id}` — change its `quantity` or `variant_id`, or toggle `subscription`/`subscription_plan_id`. PATCH semantics: only supplied keys change. Access is scoped by the `cart_token` in the path — the endpoint itself does not require authentication. In Fluid's rec… - [Apply points](https://docs.fluid.app/api-reference/cart-points/apply-points.md): Applies loyalty points to the cart. Not idempotent — validates balance and generates idempotency key. - [Remove points](https://docs.fluid.app/api-reference/cart-points/remove-points.md): Removes any loyalty points applied to the cart and recalculates the amount due. Access is scoped by the `cart_token` in the path — the endpoint itself does not require authentication. In Fluid's recommended server-side integration you send a company bearer token (`Authorization: Bearer