Fluid SDK API Documentation (0.0.6)

OpenAPI documentation for Fluid's SDK API

Download OpenAPI description
Overview
E-mail support@fluid.app
License MIT
Languages
Servers
Mock server
https://fluid-commerce.redocly.app/_mock/docs/apis/public/
Production API server
https://api.fluid.app/
Local development server
https://api.fluid.test/

Orders

Operations

affiliate

Operations

carts

Operations

Updates cart address

Request

Path
cart_tokenstringrequired
Bodyapplication/json
typestring
Enum"ship_to""bill_to"
Example: "bill_to"
jwtstring or null
Example: "eyJhbGciO1NiJ9.eyJhdXcyNjN9.AZ-4PAgFwVyGp"
address_idinteger or null
Example: 456
addressobject or null
metadataobject(RequestMetadataOptional)
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/address' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "bill_to",
    "jwt": "eyJhbGciO1NiJ9.eyJhdXcyNjN9.AZ-4PAgFwVyGp",
    "address_id": 456,
    "address": {
      "id": 456,
      "first_name": "John",
      "last_name": "Doe",
      "address1": "123 Main St",
      "city": "Anytown",
      "state": "CA",
      "postal_code": "12345",
      "country_id": 1,
      "country_code": "US"
    },
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

address updated with address id

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Completes cart checkout

Request

Path
cart_tokenstringrequired
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/checkout'

Responses

checkout completed

Bodyapplication/json
orderobject(CheckoutOrder)
metaobject(CartShopMetadata)
Response
application/json
{ "order": { "id": 0, "first_name": "string", "last_name": "string", "email": "string", "phone": "string", "order_number": "string", "token": "string", "status": "string", "order_type": "string", "amount": "string", "refundable_amount": 0, "note": "string", "recurring": [], "order_confirmation_url": "https://myco.fluid.app/pages/order-confirmation?token={order_token}", "currency_code": "string", "created_at": "string", "updated_at": "string", "metadata": {}, "external_id": "string" }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "shop_url": "https://myco.fluid.app", "timestamp": "2021-01-01T00:00:00Z" } }

Updates the country of a cart, also updates the currency code

Request

Path
cart_tokenstringrequired
Bodyapplication/json

ISO country code to update the cart to

country_codestringrequired
Example: "US"
metadataobject(RequestMetadataOptional)
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/update_country' \
  -H 'Content-Type: application/json' \
  -d '{
    "country_code": "US",
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

cart's country and currency code changed

Bodyapplication/json
cartobject(Cart)
metaobject(CartMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z" } }

Applies a discount to the cart

Request

Path
cart_tokenstringrequired
Bodyapplication/json
discount_codestring
metadataobject(RequestMetadataOptional)
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/discount' \
  -H 'Content-Type: application/json' \
  -d '{
    "discount_code": "string",
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

discount applied

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Retrieves enroll for cart

Request

Path
cart_tokenstringrequired
Query
placementstring
Enum"pre_purchase""post_purchase""all"
fluid_shopstring

The domain of your Fluid shop (excluding the scheme)

Example: fluid_shop=myco.fluid.app
fluid_sessionstring

Session token

Example: fluid_session=fs_szwdDuRbqEe7AV7sXk7vVq
curl -i -X GET \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/enroll?fluid_session=string&fluid_shop=string&placement=pre_purchase'

Responses

enroll fields found

Bodyapplication/json
enrollobject
metaobject(CartMetadata)
Response
application/json
{ "enroll": { "id": 1, "active": true, "default": false, "title": "Customer Details", "fields": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z" } }

Add enrollment to existing cart

Request

Path
cart_tokenstringrequired
Bodyapplication/json
enrollment_pack_idintegerrequired
metadataobject(RequestMetadataOptional)
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/enrollment' \
  -H 'Content-Type: application/json' \
  -d '{
    "enrollment_pack_id": 0,
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

Enrollment pack added to cart

Bodyapplication/json
cartobject(Cart)
metaobject(CartMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z" } }

Retrieves cart company information

Request

Path
cart_tokenstringrequired
Query
fluid_shopstring

The domain of your Fluid shop (excluding the scheme)

Example: fluid_shop=myco.fluid.app
fluid_sessionstring

Session token

Example: fluid_session=fs_szwdDuRbqEe7AV7sXk7vVq
curl -i -X GET \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/cart_info?fluid_session=string&fluid_shop=string'

Responses

company info found

Bodyapplication/json
languagesArray of objects
countriesArray of objects
Response
application/json
{ "languages": [ {} ], "countries": [ {} ] }

Adds items to cart

Request

Path
cart_tokenstringrequired
Bodyapplication/json
itemsArray of objectsrequired
items[].​variant_idintegerrequired
items[].​quantityintegerrequired
items[].​subscriptionboolean
Default false
items[].​subscription_plan_idinteger or null
metadataobject(RequestMetadataOptional)
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/items' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "variant_id": 0,
        "quantity": 0,
        "subscription": false,
        "subscription_plan_id": 0
      }
    ],
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

items added to cart

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Removes item from cart

Request

Path
cart_tokenstringrequired
item_idstringrequired
Query
fluid_shopstring

The domain of your Fluid shop (excluding the scheme)

Example: fluid_shop=myco.fluid.app
fluid_sessionstring

Session token

Example: fluid_session=fs_szwdDuRbqEe7AV7sXk7vVq
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/items/{item_id}?fluid_session=string&fluid_shop=string'

Responses

cart item removed from cart

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Adds subscribe:true to cart item

Request

Path
cart_tokenstringrequired
item_idstringrequired
Query
subscription_plan_idinteger

ID of the subscription plan to use

Example: subscription_plan_id=123
Bodyapplication/json
metadataobject(RequestMetadataOptional)
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/items/{item_id}/subscribe?subscription_plan_id=0' \
  -H 'Content-Type: application/json' \
  -d '{
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

subscription true updated

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Updates subscribe:false to cart item

Request

Path
cart_tokenstringrequired
item_idstringrequired
Query
fluid_shopstring

The domain of your Fluid shop (excluding the scheme)

Example: fluid_shop=myco.fluid.app
fluid_sessionstring

Session token

Example: fluid_session=fs_szwdDuRbqEe7AV7sXk7vVq
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/items/{item_id}/subscribe?fluid_session=string&fluid_shop=string'

Responses

subscription false updated

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Updates the language of a cart

Request

Path
cart_tokenstringrequired
Bodyapplication/jsonrequired

List of valid iso are at /api/public/v2025-06/commerce/carts/{cart_token}/cart_info

language_isostringrequired
Example: "en"
metadataobject(RequestMetadataOptional)
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/change_language' \
  -H 'Content-Type: application/json' \
  -d '{
    "language_iso": "en",
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

cart's language_iso changed

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Removes rep_buyer and customer for the cart

Request

Path
cart_tokenstringrequired
Query
fluid_shopstring

The domain of your Fluid shop (excluding the scheme)

Example: fluid_shop=myco.fluid.app
fluid_sessionstring

Session token

Example: fluid_session=fs_szwdDuRbqEe7AV7sXk7vVq
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/logout?fluid_session=string&fluid_shop=string'

Responses

Logout successful

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Sets cart payment method

Request

Path
cart_tokenstringrequired
typestringrequired

Type of payment method

Value"credit_card"
Query
jwtstring

JWT token to authenticate (Optional, if payment method id is not provided)

payment_method_idinteger

Payment Method id (Optional)

Bodyapplication/json
billing_postal_codestring

Billing postal code

Example: "123"
payment_methodobjectrequired
payment_method.​tokenstring

Payment method token from Spreedly

payment_method.​last_fourstring

Last 4 digits of credit card

payment_method.​card_typestring

Type of credit card (visa, mastercard, etc)

payment_method.​exp_monthstring

Expiration month (MM)

payment_method.​exp_yearstring

Expiration year (YYYY)

metadataobject(RequestMetadataOptional)
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/payment_methods/{type}?jwt=string&payment_method_id=0' \
  -H 'Content-Type: application/json' \
  -d '{
    "billing_postal_code": "123",
    "payment_method": {
      "token": "string",
      "last_four": "string",
      "card_type": "string",
      "exp_month": "string",
      "exp_year": "string"
    },
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

payment method added

Bodyapplication/json
cardobjectrequired
card.​user_idstring or null
Example: "123"
card.​spreedly_tokenstring
Example: "01JKFTVM6Z44YFPSS9KK36KMSV"
card.​full_namestring
Example: "John Doe"
card.​monthinteger
Example: 3
card.​yearinteger
Example: 2032
card.​numberstring
Example: "XXXX-XXXX-XXXX-4444"
card.​last_four_digitsstring
Example: "4444"
card.​first_six_digitsstring or null
Example: "555555"
card.​card_typestring
Example: "master"
card.​address_idinteger or null
Example: 123
card.​fingerprintstring or null
Example: "6eb05c4c7fc52fec38ef6e0651e8225be41c"
card.​defaultboolean
Example: false
card.​activeboolean
Example: true
card.​created_atstring(date-time)
Example: "2021-01-01T00:00:00Z"
card.​updated_atstring(date-time)
Example: "2021-01-01T00:00:00Z"
card.​fluidboolean
Example: true
card.​testboolean or null
Example: "true"
card.​emailstring or null
Example: "john@example.com"
card.​customer_idstring or null
Example: "123"
card.​fluid_pay_account_idstring or null
Example: "123"
card.​token_providerstring or null
Example: "vgs"
card.​tokenstring or null
Example: "01JKFTVM6Z44YFPSS9KK36KMSV"
card.​cvv_tokenstring or null
Example: "411"
Response
application/json
{ "card": { "user_id": "123", "spreedly_token": "01JKFTVM6Z44YFPSS9KK36KMSV", "full_name": "John Doe", "month": 3, "year": 2032, "number": "XXXX-XXXX-XXXX-4444", "last_four_digits": "4444", "first_six_digits": "555555", "card_type": "master", "address_id": 123, "fingerprint": "6eb05c4c7fc52fec38ef6e0651e8225be41c", "default": false, "active": true, "created_at": "2021-01-01T00:00:00Z", "updated_at": "2021-01-01T00:00:00Z", "fluid": true, "test": "true", "email": "john@example.com", "customer_id": "123", "fluid_pay_account_id": "123", "token_provider": "vgs", "token": "01JKFTVM6Z44YFPSS9KK36KMSV", "cvv_token": "411" } }

Sets cart shipping method

Request

Path
cart_tokenstringrequired
Bodyapplication/json
shipping_method_idstringrequired

ID of the shipping method to use

Example: "fluid-shipping"
metadataobject(RequestMetadataOptional)
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}/shipping_method' \
  -H 'Content-Type: application/json' \
  -d '{
    "shipping_method_id": "fluid-shipping",
    "metadata": {
      "fluid_shop": "myshop",
      "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
      "fluid_locale": "en_US",
      "attribution": {
        "email": "salesrep@example.com"
      }
    }
  }'

Responses

shipping method set

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Creates a cart

Request

Create a cart. Items, attribution and enrollment_pack_id are optional. Buyer rep assignment follows this priority: 1. If JWT is provided, extracts user from JWT and assigns as the rep. 2. If session cookie is present, extracts user from session and assigns it as the rep. 3. If no authentication is provided, cart is created without a rep. When authenticated as a rep, the cart will include rep-specific pricing.

Query
jwtstring

JWT token for user authentication. When provided, extracts user and assigns it as the rep to the cart.

Example: jwt=eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJ1c2VyX2NvbXBhbnkiLCJpZCI6MTIzfQ...
Headers
Cookiestring

Session cookie (_fluid_session)

Bodyapplication/json

Cart params

country_codestringrequired

ISO 2-letter country code

Example: "US"
fluid_shopstringrequired

The domain of your Fluid shop (excluding the scheme)

Example: "myco.fluid.app"
fluid_sessionstring

Session token

Example: "fs_szwdDuRbqEe7AV7sXk7vVq"
visitor_tokenstring

Visitor token

Example: "vt_2a3v3f9s8xRCN"
itemsArray of objects
attributionAttributionEmail (object) or AttributionUsername (object) or AttributionSharedGuid (object) or AttributionFluidRepId (object) or AttributionExternalId (object)(Attribution)
Default {"share_guid":"james-bond007"}
Any of:
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts?jwt=string' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: string' \
  -d '{
    "country_code": "US",
    "fluid_shop": "myco.fluid.app",
    "fluid_session": "fs_szwdDuRbqEe7AV7sXk7vVq",
    "visitor_token": "vt_2a3v3f9s8xRCN",
    "items": [
      {
        "variant_id": 90,
        "quantity": 2
      }
    ],
    "attribution": {
      "email": "salesrep@example.com"
    }
  }'

Responses

cart created with JWT authentication and buyer_rep assignment

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Retrieves a cart

Request

Path
cart_tokenstringrequired
Query
fluid_shopstring

The domain of your Fluid shop (excluding the scheme)

Example: fluid_shop=myco.fluid.app
fluid_sessionstring

Session token

Example: fluid_session=fs_szwdDuRbqEe7AV7sXk7vVq
curl -i -X GET \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}?fluid_session=string&fluid_shop=string'

Responses

cart found

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

Updates a cart

Request

Path
cart_tokenstringrequired
Query
fluid_shopstring

The domain of your Fluid shop (excluding the scheme)

Example: fluid_shop=myco.fluid.app
fluid_sessionstring

Session token

Example: fluid_session=fs_szwdDuRbqEe7AV7sXk7vVq
Bodyapplication/json
emailstring(email)
phonestring
Example: "4035551212"
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/public/api/public/v2025-06/commerce/carts/{cart_token}?fluid_session=string&fluid_shop=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "user@example.com",
    "phone": "4035551212"
  }'

Responses

cart updated with phone number validation

Bodyapplication/json
cartobject(Cart)
metaobject(CartCheckoutMetadata)
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "immutable_items": false, "digital_only": false, "payment_method_auto_assignable": true, "buyer_rep_id": 1, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "volume_rep": {}, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "subtotal_after_discounts": "90.00", "sub_total_in_currency": "$100.00 (USD)", "tax_total": "20.00", "tax_total_in_currency": "$20.00 (USD)", "shipping_total": "1.65", "shipping_total_in_currency": "$1.65 (USD)", "shipping_discount": 10.25, "discount_total": "2.99", "discount_total_in_currency": "$2.99 (USD)", "transaction_fee": "1.90", "transaction_fee_in_currency": "$1.90 (USD)", "cv_total": 10, "qv_total": 15, "company": {}, "payment_method": {}, "email": "user@example.com", "enrollment_fee": "10.45", "enrollment_fee_in_currency": "$10.45", "discount_codes": [], "language_iso": "en", "cart_token": "abc123", "items": [], "ship_to": {}, "bill_to": {}, "shipping_method": {}, "available_shipping_methods": [], "available_payment_methods": [], "country": {}, "type": "regular", "enrollment_pack_id": 1, "enrollment_pack": {}, "recurring": [] }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z", "checkout_url": "https://checkout.fluid.com/checkout?jwt=abc123", "shop_url": "https://myco.fluid.app" } }

checkout

Operations

enrollment-packs

Operations

events

Operations

lead

Operations

page

Operations

url

Operations

fingerprint

Operations

media

Operations

playlist

Operations

product

Operations

session

Operations

settings

Operations

widgets

Operations