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://docs.fluid.app/_mock/docs/apis/swagger/
Production server with company subdomain
https://{company}.fluid.app/
Local development server
http://fluid.lvh.me:{port}/

Agreements

Operations

ApplePay

Operations

Application Themes

Operations

ApplicationThemeTemplates

Operations

Authentication

Operations

Callback Definitions

Operations

Callback Registrations

Operations

Carts

Operations

Company Custom Catch Ups

Operations

Company Discounts

Operations

Company Droplets

Operations

Company 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

Contacts

Operations

Currencies

Operations

Customer Orders

Operations

CustomerNotes

Operations

Customers

Operations

List customers

Request

Get all orders with optional filters

Query
search_querystring

Filter customers with search query that matches with their email, first name or last name

sorted_bystring

Sort the records by one of the supported attributes:

  • id
  • email
  • created_at
  • updated_at
  • country
  • full_name
  • active_subscriptions_count
  • inactive_subscriptions_count
  • orders_count
  • last_ordered_at

The sort attribute should be followed by one of the order directives: '_asc', '_desc'

Example: sorted_by=id_asc
has_subscriptionboolean

Filter customers who have subscription

Default false
has_recent_ordersboolean

Filter customers who have recent orders made within last 30 days

Default false
has_failed_ordersboolean

Filter customers who have failed orders

Default false
purchased_more_than_onceboolean

Filter customers who have purchased more than once

Default false
us_customersboolean

Filter customers from US

Default false
non_us_customersboolean

Filter customers outside from US

Default false
abandoned_in_the_last_30_daysboolean

Filter customers who have abandoned cart within last 30 days

Default false
repsboolean

Filter customers who are also Reps

Default false
order_statusstring

Filter customers by their order status

Enum"fulfilled""unfulfilled"
ordered_sincestring

Filter customers who have ordered since the specified date. Can be used for e.g. last 30 days, 90 days, etc.

Example: ordered_since=2024-10-27
locationstring

Filter customers based upon their default address country iso. US, CA, UK, etc.

Example: location=CA
subscription_statusstring

Filter customers by their subscription orders status. active or inactive

Enum"active""inactive"
created_betweenstring

Filter customers by creation date range. Format: MM/DD/YYYY-MM/DD/YYYY. Example: 01/01/2024-12/31/2024

Example: created_between=01/01/2024-12/31/2024
with_total_orders_betweenstring

Filter customers by total number of orders range. Format: min-max. Example: 2-5

Example: with_total_orders_between=2-5
with_total_spent_betweenstring

Filter customers by total amount spent range. Format: min-max. Example: 200-500

Example: with_total_spent_between=200-500
active_subscription_amount_betweenstring

Filter customers by total amount of active subscription orders (e.g. '100-500' or '100-' or '-500')

Example: active_subscription_amount_between=100-500
inactive_subscription_amount_betweenstring

Filter customers by total amount of inactive subscription orders (e.g. '100-500' or '100-' or '-500')

Example: inactive_subscription_amount_between=100-500
for_repinteger

Filter customers by their rep id (user_company_id)

pageinteger

Page number for pagination

Default 1
per_pageinteger

Number of records per page

Default 10
by_metadatastring(json)

Search JSON meta data

Default "{}"
curl -i -X GET \
  'https://docs.fluid.app/_mock/docs/apis/swagger/api/customers?abandoned_in_the_last_30_days=false&active_subscription_amount_between=string&by_metadata={}&created_between=string&for_rep=0&has_failed_orders=false&has_recent_orders=false&has_subscription=false&inactive_subscription_amount_between=string&location=string&non_us_customers=false&order_status=fulfilled&ordered_since=string&page=1&per_page=10&purchased_more_than_once=false&reps=false&search_query=string&sorted_by=string&subscription_status=active&us_customers=false&with_total_orders_between=string&with_total_spent_between=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful

Bodyapplication/json
customersArray of objects
metaobject
Response
application/json
{ "customers": [ {} ], "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z", "total_count": 42, "total_pages": 3, "current_page": 1 } }

Create a customer

Request

Bodyapplication/json
first_namestring

First name of customer

Example: "John"
last_namestring

Last name of customer

Example: "Nash"
emailstringrequired

Email of customer

Example: "john.nash@example.com"
phonestring

Phone number of customer

Example: "801-000-0000"
account_idstring

A unique Account Id for customer. If empty, one is generated by the system

Example: "VKHJSGHOHSOIZQCK"
notesstring

Note for customer

Example: "Note"
metadataobject

Can hold JSON object of arbitrary structure

default_address_attributesobject
customer_notes_attributesArray of objects
curl -i -X POST \
  https://docs.fluid.app/_mock/docs/apis/swagger/api/customers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "John",
    "last_name": "Nash",
    "email": "john.nash@example.com",
    "phone": "801-000-0000",
    "account_id": "VKHJSGHOHSOIZQCK",
    "notes": "Note",
    "metadata": {},
    "default_address_attributes": {
      "address1": "234 Northern Drive",
      "address2": "Apt 5",
      "city": "Provo",
      "state": "UT",
      "postal_code": "84604",
      "country_id": 1,
      "country_code": "US",
      "name": "string",
      "default": false
    },
    "customer_notes_attributes": [
      {
        "note": "Example customer note"
      }
    ]
  }'

Responses

success

Bodyapplication/json
customerobject
metaobject
Response
application/json
{ "customer": { "id": 0, "account_id": "string", "first_name": "string", "last_name": "string", "full_name": "string", "email": "string", "verified_email": true, "phone": "string", "orders_count": 0, "total_spent": 0, "display_total_spent": "string", "last_order_id": 0, "notes": "string", "user_company_id": 0, "created_at": "string", "active": true, "active_subscriptions_count": 0, "inactive_subscriptions_count": 0, "jwt": "string", "is_rep": true, "metadata": {}, "default_address": {}, "addresses": [], "customer_notes": [] }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Get customers' stats

Request

curl -i -X GET \
  https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/stats \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful

Bodyapplication/json
total_customersinteger
total_active_subscriptionsinteger
cart_abandonment_ratenumber or string
repeat_customers_countinteger
repeat_customers_ratenumber or string
metaobject
Response
application/json
{ "total_customers": 0, "total_active_subscriptions": 0, "cart_abandonment_rate": 0, "repeat_customers_count": 0, "repeat_customers_rate": 0, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Add customer addresses

Request

Path
idintegerrequired

Customer's Id

Bodyapplication/json
addresses_attributesobject
curl -i -X PATCH \
  'https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/{id}/update_addresses' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "addresses_attributes": {
      "address1": "234 Northern Drive",
      "address2": "Apt 5",
      "city": "Provo",
      "state": "UT",
      "postal_code": "84604",
      "country_id": 1,
      "country_code": "US",
      "name": "string",
      "default": false
    }
  }'

Responses

success

Bodyapplication/json
customerobject
metaobject
Response
application/json
{ "customer": { "id": 0, "account_id": "string", "first_name": "string", "last_name": "string", "full_name": "string", "email": "string", "verified_email": true, "phone": "string", "orders_count": 0, "total_spent": 0, "display_total_spent": "string", "last_order_id": 0, "notes": "string", "user_company_id": 0, "created_at": "string", "active": true, "active_subscriptions_count": 0, "inactive_subscriptions_count": 0, "jwt": "string", "is_rep": true, "metadata": {}, "default_address": {}, "addresses": [], "customer_notes": [] }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Get a customer

Request

Path
idintegerrequired

Customer's Id

curl -i -X GET \
  'https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful

Bodyapplication/json
customerobject
metaobject
Response
application/json
{ "customer": { "id": 0, "account_id": "string", "first_name": "string", "last_name": "string", "full_name": "string", "email": "string", "verified_email": true, "phone": "string", "orders_count": 0, "total_spent": 0, "display_total_spent": "string", "last_order_id": 0, "notes": "string", "user_company_id": 0, "created_at": "string", "active": true, "active_subscriptions_count": 0, "inactive_subscriptions_count": 0, "jwt": "string", "is_rep": true, "metadata": {}, "default_address": {}, "addresses": [], "customer_notes": [], "attributable_rep": {} }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Update a customer

Request

Path
idintegerrequired

Customer's Id

Bodyapplication/json
first_namestring

First name of customer

Example: "John"
last_namestring

Last name of customer

Example: "Nash"
emailstring

Email of customer

Example: "john.nash@example.com"
phonestring

Phone number of customer

Example: "801-000-0000"
account_idstring

A unique Account Id for customer. If empty, one is generated by the system

Example: "VKHJSGHOHSOIZQCK"
notesstring

Note for customer

Example: "Note"
metadataobject

A JSON object that can store any custom data structure. When provided, replaces all existing metadata data.

default_address_attributesobject
customer_notes_attributesArray of objects
curl -i -X PATCH \
  'https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "John",
    "last_name": "Nash",
    "email": "john.nash@example.com",
    "phone": "801-000-0000",
    "account_id": "VKHJSGHOHSOIZQCK",
    "notes": "Note",
    "metadata": {},
    "default_address_attributes": {
      "address1": "234 Northern Drive",
      "address2": "Apt 5",
      "city": "Provo",
      "state": "UT",
      "postal_code": "84604",
      "country_id": 1,
      "country_code": "US",
      "name": "string",
      "default": false
    },
    "customer_notes_attributes": [
      {
        "note": "Example customer note"
      }
    ]
  }'

Responses

success

Bodyapplication/json
customerobject
metaobject
Response
application/json
{ "customer": { "id": 0, "account_id": "string", "first_name": "string", "last_name": "string", "full_name": "string", "email": "string", "verified_email": true, "phone": "string", "orders_count": 0, "total_spent": 0, "display_total_spent": "string", "last_order_id": 0, "notes": "string", "user_company_id": 0, "created_at": "string", "active": true, "active_subscriptions_count": 0, "inactive_subscriptions_count": 0, "jwt": "string", "is_rep": true, "metadata": {}, "default_address": {}, "addresses": [], "customer_notes": [] }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Delete a customer

Request

Path
idintegerrequired

Customer's Id

curl -i -X DELETE \
  'https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

success

Bodyapplication/json
idinteger
metaobject
Response
application/json
{ "id": 0, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Bulk delete customers

Request

Bodyapplication/json
customer_idsArray of integersrequired

Array of customer IDs to delete

Example: [1,2,3]
curl -i -X DELETE \
  https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/bulk_delete \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "customer_ids": [
      1,
      2,
      3
    ]
  }'

Responses

success

Bodyapplication/json
customer_idsArray of objects
Example: [{"id":1},{"id":2},{"id":3}]
metaobject
Example: {"request_id":"f5473a8c-8a86-4e0e-b3e8-95392003921b","timestamp":"2024-12-10T08:04:10Z"}
Response
application/json
{ "customer_ids": [ {}, {}, {} ], "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Generate a signed URL to upload csv for bulk importing customers

Request

Generate signed URL to allow users without credentials to perform upload (time-limited access to Cloud Storage)

curl -i -X POST \
  https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/presigned_csv_url \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful

Bodyapplication/json
urlstringrequired
Example: "https://path/to/file/sth.csv"
metaobject
Response
application/json
{ "url": "https://path/to/file/sth.csv", "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Import customers via csv file in the url

Request

Bodyapplication/json
urlstringrequired
Example: "https://example.com/path/to/csv"
curl -i -X POST \
  https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/import_csv \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example.com/path/to/csv"
  }'

Responses

successful

Bodyapplication/json
createdintegerrequired
Example: 10
failedintegerrequired
Example: 2
invalid_rowsintegerrequired
Example: 1
metaobject
Response
application/json
{ "created": 10, "failed": 2, "invalid_rows": 1, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Export customers data in a CSV file

Request

Export customers data in a CSV file

curl -i -X POST \
  https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/export_csv \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

success

Bodyapplication/json
urlstringrequired
Example: "https://fake-url.com/file.csv"
metaobject
Response
application/json
{ "url": "https://fake-url.com/file.csv", "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Append metadata field

Request

Path
idintegerrequired

Customer's Id

Bodyapplication/json
metadataobjectrequired

A JSON object that can store any custom data structure. When provided, merges with existing metadata data.

curl -i -X PATCH \
  'https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/{id}/append_metadata' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "metadata": {}
  }'

Responses

success

Bodyapplication/json
customerobject
metaobject
Response
application/json
{ "customer": { "id": 0, "account_id": "string", "first_name": "string", "last_name": "string", "full_name": "string", "email": "string", "verified_email": true, "phone": "string", "orders_count": 0, "total_spent": 0, "display_total_spent": "string", "last_order_id": 0, "notes": "string", "user_company_id": 0, "created_at": "string", "active": true, "active_subscriptions_count": 0, "inactive_subscriptions_count": 0, "jwt": "string", "is_rep": true, "metadata": {}, "default_address": {}, "addresses": [], "customer_notes": [] }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Update attributable rep for customer

Request

Path
idintegerrequired

Customer's Id

Bodyapplication/json
customerobjectrequired
customer.​user_company_idintegerrequired

ID of the user company to be set as attributable rep

Example: 1
curl -i -X PATCH \
  'https://docs.fluid.app/_mock/docs/apis/swagger/api/customers/{id}/update_attributable_rep' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "customer": {
      "user_company_id": 1
    }
  }'

Responses

success

Bodyapplication/json
customerobject
metaobject
Response
application/json
{ "customer": { "id": 0, "account_id": "string", "first_name": "string", "last_name": "string", "full_name": "string", "email": "string", "verified_email": true, "phone": "string", "orders_count": 0, "total_spent": 0, "display_total_spent": "string", "last_order_id": 0, "notes": "string", "user_company_id": 0, "created_at": "string", "active": true, "active_subscriptions_count": 0, "inactive_subscriptions_count": 0, "jwt": "string", "is_rep": true, "metadata": {}, "default_address": {}, "addresses": [], "customer_notes": [], "attributable_rep": {} }, "meta": { "request_id": "f5473a8c-8a86-4e0e-b3e8-95392003921b", "timestamp": "2024-12-10T08:04:10Z" } }

Domains

Operations

Drop Zones

Operations

Droplets

Operations

Enrollment Packs

Operations

Enrollments

Operations

Fantasy Points

Operations

Fluid Pay

Operations

GlobalEmbeds

Operations

Inventory Levels

Operations

Multi-Factor Authentications

Operations

Notifications

Operations

Order Fulfillments

Operations

Orders

Operations

Pages

Operations

Payment

Operations

Payment Accounts

Operations

Payments

Operations

Paypal

Operations

Products

Operations

Public Companies

Operations

Redirects

Operations

Refunds

Operations

Roles

Operations

Shares

Operations

Subscription Orders

Operations

Subscription Plans

Operations

Subscriptions

Operations

Tracking Informations

Operations

Tree Nodes

Operations

Trees

Operations

Users

Operations

Variant Countries

Operations

Webhooks

Operations

returns a list of all droplet categories

Request

curl -i -X GET \
  https://docs.fluid.app/_mock/docs/apis/swagger/api/droplet_categories \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

returns a list of droplet categories

Bodyapplication/json
droplet_categoriesArray of objects(DropletCategory)
metaobject
Response
application/json
{ "droplet_categories": [ {} ], "meta": { "request_id": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-01-01T00:00:00Z" } }