Fluid Commerce APIs (1.0)

The Fluid Commerce APIs provides a comprehensive set of APIs designed to integrate Fluid's powerful services into your applications seamlessly. This bundle offers robust functionality for enhancing messaging solutions, streamlining data management, and improving customer interactions. With detailed documentation, secure authentication, and flexible integration options, the Fluid Public API Bundle is engineered to help you leverage our services efficiently and effectively, unlocking new potentials and achieving greater connectivity within your systems.

Download OpenAPI description
Overview
E-mail support@fluid.app
License MIT
Languages
Servers
Mock server
https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/
Production server with company subdomain
https://{company}.fluid.app/
Local development server
http://fluid.lvh.me:{port}/

Admins

Operations

Agreements

Operations

ApplePay

Operations

Application Theme Templates

Operations

Application Themes

Operations

ApplicationThemeTemplates

Operations

Authentication

Operations

Callback Definitions

Operations

Callback Registrations

Operations

Callback Schemas

Operations

Carts

Operations

Creates a cart

Request

Create a cart. Items, attribution, immutable_items, order_confirmation_url, 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"
visitor_tokenstring

Visitor token. DEPRECATED: Will be removed in a future version; please use session_uuid instead

Example: "vt_2a3v3f9s8xRCN"
session_uuidstring

Session UUID

Example: "0195ff0f-9a6c-70e1-9037-f42bfd23b5fb"
itemsArray of objects
immutable_itemsboolean

Whether the cart is immutable

Default false
Example: true
fluid_shopstringrequired

The domain of your Fluid shop (excluding the scheme)

Example: "myco.fluid.app"
attributionobject or object or object or object or object
Default {"id":456,"share_guid":"james-bond007"}
One of:
order_confirmation_urlstring

The URL of a custom Order Confirmation Page to send customers to after the order is approved.

Example: "https://myco.fluid.app/pages/order-confirmation?token={order_token}"
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts?jwt=string' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: string' \
  -d '{
    "country_code": "US",
    "visitor_token": "vt_2a3v3f9s8xRCN",
    "session_uuid": "0195ff0f-9a6c-70e1-9037-f42bfd23b5fb",
    "items": [
      {
        "variant_id": 90,
        "quantity": 2,
        "display_to_customer": true,
        "subscription": true,
        "subscription_plan_id": 123,
        "cv": 10,
        "qv": 10,
        "price": 100,
        "parent_id": 1
      }
    ],
    "immutable_items": true,
    "fluid_shop": "myco.fluid.app",
    "attribution": {
      "id": 456,
      "share_guid": "james-bond007"
    },
    "order_confirmation_url": "https://myco.fluid.app/pages/order-confirmation?token={order_token}"
  }'

Responses

cart created with JWT authentication and buyer_rep assignment

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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 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
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/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_code": "US"
    }
  }'

Responses

address updated with address id

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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
payment_methods_includesstring
curl -i -X GET \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}?payment_methods_includes=string'

Responses

cart found

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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
Bodyapplication/json
emailstring(email)
phonestring
Example: "4035551212"
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "user@example.com",
    "phone": "4035551212"
  }'

Responses

cart updated with phone number validation

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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" } }

Applies a discount to the cart

Request

Path
cart_tokenstringrequired
Bodyapplication/json
discount_codesArray of strings
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/discount' \
  -H 'Content-Type: application/json' \
  -d '{
    "discount_codes": [
      "string"
    ]
  }'

Responses

discount applied

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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" } }

Remove discount from the cart

Request

Path
cart_tokenstringrequired
discount_codestringrequired
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/discount/{discount_code}'

Responses

discount removed

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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 items to cart

Request

Path
cart_tokenstringrequired
Bodyapplication/json
itemsArray of objectsrequired

Either send in [variant_id, quantity] - or [title, price, quantity]

items[].​variant_idinteger

ID of the variant to add to cart

items[].​quantityintegerrequired

Quantity of the item to add

items[].​titlestring

Title for custom items without variants

items[].​pricenumber or string

Price for custom items without variants

items[].​subscriptionboolean

allow subscription for item

Example: false
items[].​subscription_plan_idinteger

ID of the subscription plan (can be passed when subscription is true)

items[].​enrollment_pack_idinteger

ID of the enrollment pack to add to cart item

curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/items' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "variant_id": 0,
        "quantity": 0,
        "title": "string",
        "price": 0,
        "subscription": false,
        "subscription_plan_id": 0,
        "enrollment_pack_id": 0
      }
    ]
  }'

Responses

item does not remove enrollment_pack_id if edited

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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 items from cart

Request

Path
cart_tokenstringrequired
Bodyapplication/json
itemsArray of objectsrequired
items[].​variant_idintegerrequired
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/items' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "variant_id": 0
      }
    ]
  }'

Responses

items removed from cart

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/items/{item_id}'

Responses

item removed from cart

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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
Default "all"
Enum"pre_purchase""post_purchase""all"
curl -i -X GET \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/enroll?placement=pre_purchase'

Responses

enroll fields found

Bodyapplication/json
enrollobject
metaobject
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" } }

Sets cart payment method

Request

Path
cart_tokenstringrequired
typestringrequired

Type of payment method

Enum"credit_card""paypal""bread""affirm""klarna""g_cash_citcon""ali_pay_citcon"
Query
jwtstring

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

payment_method_idinteger

Payment Method id (Optional)

Bodyapplication/jsonrequired
billing_postal_codestring

Billing postal code

Example: "123"
payment_methodobjectrequired
payment_method.​token_providerstring

Payment method token provider (optional for spreedly)

Example: "vgs"
payment_method.​tokenstring

Payment method token from provider

payment_method.​last_fourstring

Last 4 digits of credit card (optional for vgs)

payment_method.​card_typestring

Type of credit card (visa, mastercard, etc) (optional for vgs)

payment_method.​cvv_tokenstring

CVV Token value

payment_method.​exp_monthstring

Expiration month (MM)

payment_method.​exp_yearstring

Expiration year (YYYY)

payment_method.​card_holderstring

Card holder full name (optional for spreedly)

payment_method.​payment_account_idstring

Selected payment account id (required only when integration_class is Droplet)

billing_addressobject
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/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_provider": "vgs",
      "token": "string",
      "last_four": "string",
      "card_type": "string",
      "cvv_token": "string",
      "exp_month": "string",
      "exp_year": "string",
      "card_holder": "string",
      "payment_account_id": "string"
    },
    "billing_address": {
      "address1": "123 Main St",
      "address2": "Apt 4B",
      "city": "New York",
      "state": "NY",
      "zip": "10001",
      "country": "US"
    }
  }'

Responses

payment method added with billing address

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" } }

Gets VGS vault access token

Request

Path
cart_tokenstringrequired
payment_account_idstringrequired
curl -i -X GET \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/payment_account/{payment_account_id}/vault'

Responses

VGS vault access token

Bodyapplication/json
vaultobjectrequired
vault.​vault_idstringrequired
Example: "tntydlnduqt"
vault.​environmentstringrequired
Example: "sandbox or live"
vault.​access_tokenstringrequired
Example: "eyJhbGci..."
vault.​route_idstringrequired
Example: "e83a1bc9-1212-41e8-9ed2-c04efec22b03"
metaobjectrequired
meta.​request_idstring
Example: "123e4567-e89b-12d3-a456-426614174000"
meta.​timestampstring
Example: "2021-01-01T00:00:00Z"
Response
application/json
{ "vault": { "vault_id": "tntydlnduqt", "environment": "sandbox or live", "access_token": "eyJhbGci...", "route_id": "e83a1bc9-1212-41e8-9ed2-c04efec22b03" }, "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z" } }

Sets cart shipping method

Request

Path
cart_tokenstringrequired
Bodyapplication/json
shipping_method_idstringrequired

ID of the shipping method to use

Example: 10
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/shipping_method' \
  -H 'Content-Type: application/json' \
  -d '{
    "shipping_method_id": 10
  }'

Responses

shipping method set

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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/swagger/api/carts/{cart_token}/checkout'

Responses

checkout completed

Bodyapplication/json
orderobject
metaobject
Response
application/json
{ "order": { "id": 0, "first_name": "string", "last_name": "string", "external_id": "string", "email": "string", "phone": "string", "order_number": "string", "token": "string", "status": "string", "order_type": "string", "amount": "string", "refundable_amount": 10.5, "note": {}, "recurring": [], "order_confirmation_url": "string", "currency_code": "string", "created_at": "string", "updated_at": "string", "metadata": {} }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z", "shop_url": "https://example.com" } }

Retrieves cart company information

Request

Path
cart_tokenstringrequired
curl -i -X GET \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/cart_info'

Responses

company info found

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

Updates the language of a cart

Request

Path
cart_tokenstringrequired
Bodyapplication/jsonrequired

List of valid iso are at /api/carts/{cart_token}/cart_info

language_isostring
Example: "en"
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/change_language' \
  -H 'Content-Type: application/json' \
  -d '{
    "language_iso": "en"
  }'

Responses

cart's language_iso changed

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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 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"
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/update_country' \
  -H 'Content-Type: application/json' \
  -d '{
    "country_code": "US"
  }'

Responses

cart updated with country not in company's supported list

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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" } }

Add enrollment to existing cart

Request

Path
cart_tokenstringrequired
Bodyapplication/json
enrollment_pack_idintegerrequired
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/enrollment' \
  -H 'Content-Type: application/json' \
  -d '{
    "enrollment_pack_id": 0
  }'

Responses

Enrollment pack added to cart

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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" } }

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
curl -i -X POST \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/items/{item_id}/subscribe?subscription_plan_id=0'

Responses

subscription true updated

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/items/{item_id}/subscribe'

Responses

subscription false updated

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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
curl -i -X DELETE \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/logout'

Responses

Logout successful

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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 cart attribution

Request

Updates attribution data for a cart

Path
cart_tokenstringrequired
Bodyapplication/json
attributionobject or object or object or objectrequired
One of:
attribution.​share_guidstringrequired
Example: "james-bond007"
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/attribution' \
  -H 'Content-Type: application/json' \
  -d '{
    "attribution": {
      "share_guid": "james-bond007"
    }
  }'

Responses

attribution updated

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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" } }

Updates the buyer rep for the cart

Request

Updates the buyer rep of a cart based on the provided customer_id

Path
cart_tokenstringrequired
Bodyapplication/json
customer_idintegerrequired

ID of the customer to set as buyer rep

Example: 123
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/buyer_rep' \
  -H 'Content-Type: application/json' \
  -d '{
    "customer_id": 123
  }'

Responses

buyer rep updated

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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" } }

Updates the volume rep for the cart

Request

Updates the volume rep of a cart based on the provided volume_rep_id

Path
cart_tokenstringrequired
Bodyapplication/json
volume_rep_idinteger or null

ID of the user company to set as volume rep

Example: 123
curl -i -X PATCH \
  'https://fluid-commerce.redocly.app/_mock/docs/apis/swagger/api/carts/{cart_token}/volume_rep' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "volume_rep_id": 123
  }'

Responses

volume rep removed

Bodyapplication/json
cartobject
metaobject
Response
application/json
{ "cart": { "id": 123, "state": "start", "processed": false, "valid_for_checkout": true, "buyer_rep_id": 1, "volume_rep": {}, "currency_symbol": "$", "currency_code": "USD", "shipping_total_for_display": "Free", "phone": "4035551212", "payment_method_auto_assignable": true, "attribution": {}, "agreements": [], "amount_total": "121.65", "amount_total_in_currency": "$121.65 (USD)", "sub_total": "100.00", "sub_total_in_currency": "$100.00 (USD)", "subtotal_after_discounts": "90.00", "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", "immutable_items": false, "digital_only": false, "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" } }

Categories

Operations

Collections

Operations

Companies

Operations

Company Admins

Operations

Company Custom Catch Ups

Operations

Company Discounts

Operations

Company Mobile Widgets

Operations

Company Pages

Operations

Pages

Operations

Company Popups

Operations

Company Settings - Checkout

Operations

Company Settings - Countries

Operations

Company Settings - Languages

Operations

Company Settings - Social Media

Operations

Company Settings - Warehouses

Operations

Company Webhook Events

Operations

Contacts

Operations

Currencies

Operations

Customer Orders

Operations

CustomerNotes

Operations

Customers

Operations

DAM Query

Operations

Dam

Operations

Default Libraries

Operations

DefaultMySites

Operations

Devices

Operations

Display Settings

Operations

Domains

Operations

Drop Zones

Operations

Droplet Categories

Operations

Droplet Installations

Operations

Droplets

Operations

Enrollment Packs

Operations

Enrollments

Operations

FairShare Order Journey

Operations

Fantasy Points

Operations

Feature Flags

Operations

File Resources

Operations

Fluid Pay

Operations

Form Elements

Operations

Forms

Operations

GlobalEmbeds

Operations

Impersonation

Operations

Inventory Levels

Operations

Labels

Operations

Metafield Definitions

Operations

Multi Factor Authentications

Operations

Multi-Factor Authentications

Operations

Notifications

Operations

Onboarding

Operations

Order Fulfillments

Operations

Orders

Operations

Payment

Operations

Payment Accounts

Operations

Payment Integrations

Operations

Payments

Operations

Paypal

Operations

Products

Operations

Prompts

Operations

Public Companies

Operations

Public Drop Zones

Operations

Ranks

Operations

Redirects

Operations

Refunds

Operations

Reps

Operations

Roles

Operations

Settings

Operations

Settings - Companies

Operations

Shares

Operations

Shop

Operations

Subscription Plans

Operations

Subscriptions

Operations

System Monitoring

Operations

Tags

Operations

Tax Categories

Operations

Tracking Informations

Operations

Tree Nodes

Operations

Trees

Operations

Users

Operations

Variant Countries

Operations

Variants

Operations

Webhook Schemas

Operations

Webhooks

Operations