Order Fulfillment API (1.0.2)

Download OpenAPI specification:

API for creating/managing supplements orders within the DailyStak platform.

Authentication

This API uses OAuth 2.0 Client Credentials flow. To obtain an access token:

Token Endpoints:

  • Sandbox: https://auth.fulfillment.sandbox.juniperhealth.com/oauth2/token
  • Production: https://auth.fulfillment.juniperhealth.com/oauth2/token

Request:

POST /oauth2/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET

Response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 3600,
  "token_type": "Bearer"
}

Include the token in API requests using the Authorization header:

Authorization: Bearer YOUR_ACCESS_TOKEN

Orders

Create, retrieve, and manage customer orders

Create a New Order

Submit a new customer order with product line items and shipping details

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required

Order details to be created in the system

required
object

Customer information for the order

sourceId
required
string

Unique customer identifier in your system

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string <email>

Customer's email address

phone
string

Customer's phone number

daysSupply
required
integer
Enum: 30 60 90

Number of days the order is intended to supply

required
Array of objects non-empty

Products included in the order

Array (non-empty)
productId
required
integer

Unique identifier of the product

quantity
required
integer >= 1

Quantity of the product

packDescription
string

Description of the product packaging (required for pack items, optional for external items like powders)

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

shippingMethod
required
string
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Shipping method for the order

orderType
required
string
Enum: "ONE_TIME" "SUBSCRIPTION"

Type of order (this is currently only used for inventory forecasting by DailyStak)

Responses

Response Schema: application/json
id
string

Unique order identifier

discount
string

Discount percentage applied to the order

daysSupply
integer

Number of days the order is intended to supply

orderType
string
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type (one-time or subscription)

shippingMethod
string
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Selected shipping method

status
string
Enum: "NEW" "PROCESSING" "DISPENSING" "FILLED" "FULFILLED" "AWAITING_SHIPMENT" "SHIPPED" "DELIVERED" "CANCELLED"

Current status of the order

object or null

Details about the order fulfillment process. The object itself is null until the order has shipped, and individual fields are null until the carrier provides them.

carrier
string or null

Shipping carrier name

trackingNumber
string or null

Shipping carrier tracking number

trackingStatus
string or null

Current tracking status from carrier (e.g., InTransit, Delivered)

trackingUrl
string or null <uri>

URL to track the shipment

Array of objects or null

Tracking checkpoint history from carrier

Array
checkpointTime
string or null <date-time>

Timestamp of the checkpoint event

location
string or null

Location of the shipment at this checkpoint

message
string or null

Status message from the carrier

tag
string or null

Status tag (e.g., InTransit, OutForDelivery, Delivered)

Array of objects

Products included in the order

Array
productId
required
integer

Unique identifier of the product

quantity
required
integer >= 1

Quantity of the product

name
string

Product name

packDescription
string

Description of the product packaging (present for pack items, not for external items)

price
string

Per pill price of product

discountedPrice
string

Per pill price of product with partner discount applied

totalPrice
string

Total price for this line item (discountedPrice * quantity * daysSupply)

external
boolean

Whether this is an external product (powder, liquid) outside the pill pack

imageUrl
string or null <uri>

URL to the product image

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

object (Customer)

Customer information

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

sourceId
required
string

Unique customer identifier in the partner system

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string or null <email>

Customer's email address

phone
string or null

Customer's phone number

subtotalPrice
string

Order subtotal amount

totalDiscount
string

Total discount amount applied to the order

totalFees
string

Total for handling fees on external products. Each external item has a $5 handling fee.

totalShipping
string

Shipping cost

totalVolumeDiscount
string

Additional discount as for purchasing a days supply over the specified volume discount limits.

totalPrice
string

Total order amount (subtotal + shipping)

createdAt
string <date-time>

Order creation timestamp

updatedAt
string <date-time>

Order last update timestamp

Request samples

Content type
application/json
{
  • "customer": {
    },
  • "daysSupply": 30,
  • "lineItems": [
    ],
  • "shippingMethod": "STANDARD",
  • "orderType": "ONE_TIME"
}

Response samples

Content type
application/json
{
  • "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A",
  • "discount": "10%",
  • "daysSupply": 30,
  • "orderType": "SUBSCRIPTION",
  • "shippingMethod": "STANDARD",
  • "status": "NEW",
  • "fulfillmentInfo": {
    },
  • "lineItems": [
    ],
  • "customer": {
    },
  • "subtotalPrice": "30.00",
  • "totalDiscount": "27.00",
  • "totalFees": "5.00",
  • "totalShipping": "9.99",
  • "totalVolumeDiscount": "12.10",
  • "totalPrice": "36.99",
  • "createdAt": "2023-10-01T12:00:00Z",
  • "updatedAt": "2023-10-01T12:00:00Z"
}

Retrieve Orders

Retrieve a list of orders with optional filtering

Authorizations:
oauth2ClientCredentials
query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

Maximum number of results per page

cursor
string

Pagination cursor for retrieving next/previous page

direction
string
Enum: "next" "previous"

Direction for pagination (next or previous)

status
string
Enum: "NEW" "PROCESSING" "DISPENSING" "FILLED" "FULFILLED" "AWAITING_SHIPMENT" "SHIPPED" "DELIVERED" "CANCELLED"

Filter orders by status

search
string
Example: search=John Doe

Fuzzy search orders by customer name

Responses

Response Schema: application/json
Array of objects (Order)
Array
id
string

Unique order identifier

discount
string

Discount percentage applied to the order

daysSupply
integer

Number of days the order is intended to supply

orderType
string
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type (one-time or subscription)

shippingMethod
string
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Selected shipping method

status
string
Enum: "NEW" "PROCESSING" "DISPENSING" "FILLED" "FULFILLED" "AWAITING_SHIPMENT" "SHIPPED" "DELIVERED" "CANCELLED"

Current status of the order

object or null

Details about the order fulfillment process. The object itself is null until the order has shipped, and individual fields are null until the carrier provides them.

Array of objects

Products included in the order

object (Customer)

Customer information

subtotalPrice
string

Order subtotal amount

totalDiscount
string

Total discount amount applied to the order

totalFees
string

Total for handling fees on external products. Each external item has a $5 handling fee.

totalShipping
string

Shipping cost

totalVolumeDiscount
string

Additional discount as for purchasing a days supply over the specified volume discount limits.

totalPrice
string

Total order amount (subtotal + shipping)

createdAt
string <date-time>

Order creation timestamp

updatedAt
string <date-time>

Order last update timestamp

cursor
string or null (Cursor)

Pagination cursor for retrieving next/previous page. Null when there are no more pages in the requested direction.

Response samples

Content type
application/json
{
  • "orders": [
    ],
  • "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Retrieve Order Details

Get detailed information for a specific order

Authorizations:
oauth2ClientCredentials
path Parameters
orderId
required
string
Example: 2vSGym0bH8qVEwCIGlyFoRgJq1A

Responses

Response Schema: application/json
id
string

Unique order identifier

discount
string

Discount percentage applied to the order

daysSupply
integer

Number of days the order is intended to supply

orderType
string
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type (one-time or subscription)

shippingMethod
string
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Selected shipping method

status
string
Enum: "NEW" "PROCESSING" "DISPENSING" "FILLED" "FULFILLED" "AWAITING_SHIPMENT" "SHIPPED" "DELIVERED" "CANCELLED"

Current status of the order

object or null

Details about the order fulfillment process. The object itself is null until the order has shipped, and individual fields are null until the carrier provides them.

carrier
string or null

Shipping carrier name

trackingNumber
string or null

Shipping carrier tracking number

trackingStatus
string or null

Current tracking status from carrier (e.g., InTransit, Delivered)

trackingUrl
string or null <uri>

URL to track the shipment

Array of objects or null

Tracking checkpoint history from carrier

Array
checkpointTime
string or null <date-time>

Timestamp of the checkpoint event

location
string or null

Location of the shipment at this checkpoint

message
string or null

Status message from the carrier

tag
string or null

Status tag (e.g., InTransit, OutForDelivery, Delivered)

Array of objects

Products included in the order

Array
productId
required
integer

Unique identifier of the product

quantity
required
integer >= 1

Quantity of the product

name
string

Product name

packDescription
string

Description of the product packaging (present for pack items, not for external items)

price
string

Per pill price of product

discountedPrice
string

Per pill price of product with partner discount applied

totalPrice
string

Total price for this line item (discountedPrice * quantity * daysSupply)

external
boolean

Whether this is an external product (powder, liquid) outside the pill pack

imageUrl
string or null <uri>

URL to the product image

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

object (Customer)

Customer information

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

sourceId
required
string

Unique customer identifier in the partner system

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string or null <email>

Customer's email address

phone
string or null

Customer's phone number

subtotalPrice
string

Order subtotal amount

totalDiscount
string

Total discount amount applied to the order

totalFees
string

Total for handling fees on external products. Each external item has a $5 handling fee.

totalShipping
string

Shipping cost

totalVolumeDiscount
string

Additional discount as for purchasing a days supply over the specified volume discount limits.

totalPrice
string

Total order amount (subtotal + shipping)

createdAt
string <date-time>

Order creation timestamp

updatedAt
string <date-time>

Order last update timestamp

Response samples

Content type
application/json
{
  • "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A",
  • "discount": "10%",
  • "daysSupply": 30,
  • "orderType": "SUBSCRIPTION",
  • "shippingMethod": "STANDARD",
  • "status": "NEW",
  • "fulfillmentInfo": {
    },
  • "lineItems": [
    ],
  • "customer": {
    },
  • "subtotalPrice": "30.00",
  • "totalDiscount": "27.00",
  • "totalFees": "5.00",
  • "totalShipping": "9.99",
  • "totalVolumeDiscount": "12.10",
  • "totalPrice": "36.99",
  • "createdAt": "2023-10-01T12:00:00Z",
  • "updatedAt": "2023-10-01T12:00:00Z"
}

Cancel an Order

Cancel a partner-managed order that has not been dispensed. Cancelling never refunds. The order must be PARTNER_MANAGED (the billing mode frozen on it, or for a legacy order your account's current mode), NEW or PROCESSING with no fill order dispensed, unlabelled, not on an invoice, and carry no Shopify or DailyStak payment. Otherwise the answer is 409 with the rule in reason; a JUNIPER_MANAGED order is refused with "Contact DailyStak support to cancel this order."

Authorizations:
oauth2ClientCredentials
path Parameters
orderId
required
string
Example: 2vTgd30JFgnwLrgb383PcV9Rken

Responses

Response Schema: application/json
orderId
string

ID of the cancelled order

status
string

Order status

Response samples

Content type
application/json
{
  • "orderId": "2vTYQiGzufR4cn1cloW97DtSOYF",
  • "status": "CANCELLED"
}

Protocols

Create and manage reusable order protocols/templates

Create a New Protocol

Create a reusable order protocol/template with customer information, product line items, and shipping details. Protocols can be used to quickly generate orders with pre-configured settings.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
required
object

Customer information for the protocol

sourceId
required
string

Unique customer identifier in your system

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string <email>

Customer's email address

phone
string

Customer's phone number

daysSupply
required
integer
Enum: 30 60 90

Number of days the protocol is intended to supply

required
Array of objects non-empty

Products included in the protocol

Array (non-empty)
productId
required
integer

Unique identifier of the product

quantity
required
integer >= 1

Quantity of the product

packDescription
string

Description of the product packaging

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

shippingMethod
required
string
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Shipping method for the protocol

orderType
required
string
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type

Responses

Response Schema: application/json
id
string

Unique protocol identifier

object (Customer)

Customer information

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

sourceId
required
string

Unique customer identifier in the partner system

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string or null <email>

Customer's email address

phone
string or null

Customer's phone number

daysSupply
integer or null

Number of days the protocol is intended to supply. Nullable: protocols created via flows where days-supply lives on the subscription (not the protocol) return null here.

orderType
string or null
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type (one-time or subscription). Nullable: protocols created via flows where the order type is decided at checkout time return null here.

shippingMethod
string or null
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Selected shipping method. Nullable: protocols created via flows where shipping is decided on the subscription return null here.

discount
string or null

Discount percentage applied

Array of objects

Products included in the protocol

Array
productId
integer

Unique identifier of the product

name
string

Product name

quantity
integer >= 1

Quantity of the product

packDescription
string

Description of the product packaging

price
string

Per pill price of product

discountedPrice
string

Per pill price with partner discount applied

totalPrice
string

Total price for this line item

external
boolean

Whether this is an external product

imageUrl
string or null <uri>

URL to the product image

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

subtotalPrice
string or null

Protocol subtotal amount. Nullable: pricing is computed at checkout time for protocols created via modern flows.

totalDiscount
string or null

Total discount amount

totalFees
string or null

Total handling fees for external products

totalVolumeDiscount
string or null

Additional volume discount

totalShipping
string or null

Shipping cost

totalPrice
string or null

Total protocol amount

createdAt
string <date-time>

Protocol creation timestamp

updatedAt
string <date-time>

Protocol last update timestamp

Request samples

Content type
application/json
{
  • "customer": {
    },
  • "daysSupply": 30,
  • "lineItems": [
    ],
  • "shippingMethod": "STANDARD",
  • "orderType": "SUBSCRIPTION"
}

Response samples

Content type
application/json
{
  • "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A",
  • "customer": {
    },
  • "daysSupply": 30,
  • "orderType": "SUBSCRIPTION",
  • "shippingMethod": "STANDARD",
  • "discount": "10%",
  • "lineItems": [
    ],
  • "subtotalPrice": "30.00",
  • "totalDiscount": "3.00",
  • "totalFees": "5.00",
  • "totalVolumeDiscount": "0.00",
  • "totalShipping": "9.99",
  • "totalPrice": "41.99",
  • "createdAt": "2023-10-01T12:00:00Z",
  • "updatedAt": "2023-10-01T12:00:00Z"
}

List Protocols

Retrieve a paginated list of protocols with optional search

Authorizations:
oauth2ClientCredentials
query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

Maximum number of results per page

cursor
string

Pagination cursor for retrieving next/previous page

direction
string
Enum: "next" "previous"

Direction for pagination (next or previous)

search
string
Example: search=John Doe

Search protocols by customer name

Responses

Response Schema: application/json
Array of objects (Protocol)
Array
id
string

Unique protocol identifier

object (Customer)

Customer information

daysSupply
integer or null

Number of days the protocol is intended to supply. Nullable: protocols created via flows where days-supply lives on the subscription (not the protocol) return null here.

orderType
string or null
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type (one-time or subscription). Nullable: protocols created via flows where the order type is decided at checkout time return null here.

shippingMethod
string or null
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Selected shipping method. Nullable: protocols created via flows where shipping is decided on the subscription return null here.

discount
string or null

Discount percentage applied

Array of objects

Products included in the protocol

subtotalPrice
string or null

Protocol subtotal amount. Nullable: pricing is computed at checkout time for protocols created via modern flows.

totalDiscount
string or null

Total discount amount

totalFees
string or null

Total handling fees for external products

totalVolumeDiscount
string or null

Additional volume discount

totalShipping
string or null

Shipping cost

totalPrice
string or null

Total protocol amount

createdAt
string <date-time>

Protocol creation timestamp

updatedAt
string <date-time>

Protocol last update timestamp

cursor
string or null (Cursor)

Pagination cursor for retrieving next/previous page. Null when there are no more pages in the requested direction.

Response samples

Content type
application/json
{
  • "protocols": [
    ],
  • "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Get Protocol Details

Retrieve detailed information for a specific protocol

Authorizations:
oauth2ClientCredentials
path Parameters
protocolId
required
string
Example: 2vTgd30JFgnwLrgb383PcV9Rken

Responses

Response Schema: application/json
id
string

Unique protocol identifier

object (Customer)

Customer information

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

sourceId
required
string

Unique customer identifier in the partner system

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string or null <email>

Customer's email address

phone
string or null

Customer's phone number

daysSupply
integer or null

Number of days the protocol is intended to supply. Nullable: protocols created via flows where days-supply lives on the subscription (not the protocol) return null here.

orderType
string or null
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type (one-time or subscription). Nullable: protocols created via flows where the order type is decided at checkout time return null here.

shippingMethod
string or null
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Selected shipping method. Nullable: protocols created via flows where shipping is decided on the subscription return null here.

discount
string or null

Discount percentage applied

Array of objects

Products included in the protocol

Array
productId
integer

Unique identifier of the product

name
string

Product name

quantity
integer >= 1

Quantity of the product

packDescription
string

Description of the product packaging

price
string

Per pill price of product

discountedPrice
string

Per pill price with partner discount applied

totalPrice
string

Total price for this line item

external
boolean

Whether this is an external product

imageUrl
string or null <uri>

URL to the product image

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

subtotalPrice
string or null

Protocol subtotal amount. Nullable: pricing is computed at checkout time for protocols created via modern flows.

totalDiscount
string or null

Total discount amount

totalFees
string or null

Total handling fees for external products

totalVolumeDiscount
string or null

Additional volume discount

totalShipping
string or null

Shipping cost

totalPrice
string or null

Total protocol amount

createdAt
string <date-time>

Protocol creation timestamp

updatedAt
string <date-time>

Protocol last update timestamp

Response samples

Content type
application/json
{
  • "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A",
  • "customer": {
    },
  • "daysSupply": 30,
  • "orderType": "SUBSCRIPTION",
  • "shippingMethod": "STANDARD",
  • "discount": "10%",
  • "lineItems": [
    ],
  • "subtotalPrice": "30.00",
  • "totalDiscount": "3.00",
  • "totalFees": "5.00",
  • "totalVolumeDiscount": "0.00",
  • "totalShipping": "9.99",
  • "totalPrice": "41.99",
  • "createdAt": "2023-10-01T12:00:00Z",
  • "updatedAt": "2023-10-01T12:00:00Z"
}

Update Protocol

Update an existing protocol with new customer, product, or shipping information. While a live subscription (active, past due, paused, failed or awaiting partner) bills the protocol, the update is refused with 409: changes then need the customer's consent, which only the v2 amendment flow can request.

Authorizations:
oauth2ClientCredentials
path Parameters
protocolId
required
string
Example: 2vTgd30JFgnwLrgb383PcV9Rken
Request Body schema: application/json
required
required
object

Customer information for the protocol

sourceId
required
string

Unique customer identifier in your system

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string <email>

Customer's email address

phone
string

Customer's phone number

daysSupply
required
integer
Enum: 30 60 90

Number of days the protocol is intended to supply

required
Array of objects non-empty

Products included in the protocol

Array (non-empty)
productId
required
integer

Unique identifier of the product

quantity
required
integer >= 1

Quantity of the product

packDescription
string

Description of the product packaging

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

shippingMethod
required
string
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Shipping method for the protocol

orderType
required
string
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type

Responses

Response Schema: application/json
id
string

Unique protocol identifier

object (Customer)

Customer information

firstName
required
string

Customer's first name

lastName
required
string

Customer's last name

sourceId
required
string

Unique customer identifier in the partner system

required
object (Address)

Physical address information

line1
required
string <= 100 characters

Primary address line

city
required
string <= 50 characters

City name

state
required
string = 2 characters

State or province code

zipCode
required
string^\d{5}$

Postal/ZIP code (5 digits)

line2
string or null <= 100 characters

Secondary address line (optional)

email
string or null <email>

Customer's email address

phone
string or null

Customer's phone number

daysSupply
integer or null

Number of days the protocol is intended to supply. Nullable: protocols created via flows where days-supply lives on the subscription (not the protocol) return null here.

orderType
string or null
Enum: "ONE_TIME" "SUBSCRIPTION"

Order type (one-time or subscription). Nullable: protocols created via flows where the order type is decided at checkout time return null here.

shippingMethod
string or null
Enum: "STANDARD" "EXPRESS" "OVERNIGHT"

Selected shipping method. Nullable: protocols created via flows where shipping is decided on the subscription return null here.

discount
string or null

Discount percentage applied

Array of objects

Products included in the protocol

Array
productId
integer

Unique identifier of the product

name
string

Product name

quantity
integer >= 1

Quantity of the product

packDescription
string

Description of the product packaging

price
string

Per pill price of product

discountedPrice
string

Per pill price with partner discount applied

totalPrice
string

Total price for this line item

external
boolean

Whether this is an external product

imageUrl
string or null <uri>

URL to the product image

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

subtotalPrice
string or null

Protocol subtotal amount. Nullable: pricing is computed at checkout time for protocols created via modern flows.

totalDiscount
string or null

Total discount amount

totalFees
string or null

Total handling fees for external products

totalVolumeDiscount
string or null

Additional volume discount

totalShipping
string or null

Shipping cost

totalPrice
string or null

Total protocol amount

createdAt
string <date-time>

Protocol creation timestamp

updatedAt
string <date-time>

Protocol last update timestamp

Request samples

Content type
application/json
{
  • "customer": {
    },
  • "daysSupply": 30,
  • "lineItems": [
    ],
  • "shippingMethod": "STANDARD",
  • "orderType": "SUBSCRIPTION"
}

Response samples

Content type
application/json
{
  • "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A",
  • "customer": {
    },
  • "daysSupply": 30,
  • "orderType": "SUBSCRIPTION",
  • "shippingMethod": "STANDARD",
  • "discount": "10%",
  • "lineItems": [
    ],
  • "subtotalPrice": "30.00",
  • "totalDiscount": "3.00",
  • "totalFees": "5.00",
  • "totalVolumeDiscount": "0.00",
  • "totalShipping": "9.99",
  • "totalPrice": "41.99",
  • "createdAt": "2023-10-01T12:00:00Z",
  • "updatedAt": "2023-10-01T12:00:00Z"
}

Delete Protocol

Delete an existing protocol

Authorizations:
oauth2ClientCredentials
path Parameters
protocolId
required
string
Example: 2vTgd30JFgnwLrgb383PcV9Rken

Responses

Response Schema: application/json
protocolId
string

ID of the deleted protocol

message
string

Response samples

Content type
application/json
{
  • "protocolId": "2vTgd30JFgnwLrgb383PcV9Rken",
  • "message": "Protocol deleted successfully"
}

Products

Access product catalog and inventory details

Get Product Catalog

Retrieve paginated list of available products. Products this partner has disabled are excluded unless include_disabled=true. Filters: form and categories match ANY listed value; certifications and allergens (free-from claims) match ALL. Parameters AND together, and with status and the updated range. Unknown values are ignored. A filtered page holds limit products unless the catalog runs out, and cursor is returned only when more products match. Search applies the filters too.

Authorizations:
oauth2ClientCredentials
query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

Maximum number of results per page

cursor
string

Pagination cursor for retrieving next/previous page

direction
string
Enum: "next" "previous"

Direction for pagination (next or previous)

status
string
Enum: "ACTIVE" "DRAFT" "BACKORDERED" "DISCONTINUED"

Filter products by status

updatedAfter
string <date>
Example: updatedAfter=2023-10-01

Filter products updated after this date

updatedBefore
string <date>
Example: updatedBefore=2023-10-01

Filter products updated before this date

form
string
Example: form=Capsule,Veg Capsule

Comma-separated product forms; returns products in ANY of them. A value is the stored form (Capsule, Quick-Dissolve Tablet, Powder, Liquid, Serum, Softgel, Tablet, Veg Capsule) or its name (CAPSULE, QUICK_DISSOLVE_TABLET, POWDER, LIQUID, SERUM, SOFTGEL, TABLET, VEG_CAPSULE), in any case. Unknown values are ignored.

certifications
string
Example: certifications=vegan,kosher

Comma-separated certifications; returns products carrying ALL of them. Values: certified_gmp, organic_certified, halal, kosher, lab_tested, manufactured_in_usa, non_gmo, sustainably_sourced, vegan, vegetarian, or their names (CERTIFIED_ORGANIC means organic_certified), in any case. Unknown values are ignored.

allergens
string
Example: allergens=gluten_free,dairy_free

Comma-separated free-from claims; returns products carrying ALL of them, so gluten_free,dairy_free means both labels are present (a must-match, not an exclusion). Values: animal_free, corn_free, dairy_free, egg_free, fish_free, gluten_free, hexane_free, nut_free, peanut_free, sesame_free, shellfish_free, soy_free, treenut_free, wheat_free, yeast_free, or their names (TREE_NUT_FREE means treenut_free), in any case. Unknown values are ignored.

categories
string
Example: categories=Heart health,Vitamins

Comma-separated shop categories; returns products in ANY of them. Values: Heart health, Metabolic health, Immune support, Inflammation & antioxidants, Brain & mood, Stress & sleep, Gut health, Liver & detox, Energy & performance, Healthy aging, Bones & joints, Hair, skin & nails, Hormones & thyroid, Women's health, Men's health, Eye health, Vitamins, Minerals, Herbs, or their names (HAIR_SKIN_AND_NAILS), in any case. "Hair, skin & nails" contains a comma and is still read as one value; URL-encode the "&". Unknown values are ignored.

search
string
Example: search=omega

Fuzzy search products by name, ingredients, or search terms

include_disabled
boolean
Default: false

Include products this partner has disabled (snake_case parameter name). Disabled products are excluded from this listing by default. Filtering is applied after pagination, so a page containing disabled products returns fewer than limit items; the cursor still advances correctly.

Responses

Response Schema: application/json
Array of objects (Product)
Array
id
integer

Unique product identifier

name
string

Product name

description
string

Detailed product description

packDescription
string

Description of the product packaging

price
string

Base price per pill

discountedPrice
string

Price per pill after partner discount applied

external
boolean

If the product is external to the pill packs. i.e. powder or liquid

image
string <uri>

URL to the product image

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

form
string
Enum: "Capsule" "Veg Capsule" "Tablet" "Quick-Dissolve Tablet" "Powder" "Liquid" "Serum" "Softgel"

Physical form of the supplement

certifications
Array of strings

Product certifications and standards

allergens
Array of strings

Allergy related information

object (SupplementFactsPanel)

Detailed nutritional and ingredient information

status
string
Enum: "ACTIVE" "DRAFT" "BACKORDERED" "DISCONTINUED"

Current product availability status

enabled
boolean
Default: true

False when the calling partner has disabled this product. Disabled products are omitted from GET /products unless include_disabled=true; GET /products/{productId} always returns them.

createdAt
string <date-time>

Product creation timestamp

updatedAt
string <date-time>

Product last update timestamp

cursor
string or null (Cursor)

Pagination cursor for retrieving next/previous page. Null when there are no more pages in the requested direction.

Response samples

Content type
application/json
{
  • "products": [
    ],
  • "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Get Product Details

Retrieve detailed information for a specific product. A product this partner has disabled is still returned with HTTP 200 and enabled: false — disabling never turns this endpoint into a 404, so historical order lines keep rendering.

Authorizations:
oauth2ClientCredentials
path Parameters
productId
required
integer
Example: 77123129891

Responses

Response Schema: application/json
id
integer

Unique product identifier

name
string

Product name

description
string

Detailed product description

packDescription
string

Description of the product packaging

price
string

Base price per pill

discountedPrice
string

Price per pill after partner discount applied

external
boolean

If the product is external to the pill packs. i.e. powder or liquid

image
string <uri>

URL to the product image

object or null (Administration)

Dosage schedule information specifying how many pills to take at each time of day.

Null for external products (powders, liquids, standalone items outside the pill pack). For pack products, the sum of morning + afternoon + evening + sleep must equal the line item quantity.

morning
required
integer >= 0

Morning dosage quantity

afternoon
required
integer >= 0

Afternoon dosage quantity

evening
required
integer >= 0

Evening dosage quantity

sleep
required
integer >= 0

Bedtime dosage quantity

form
string
Enum: "Capsule" "Veg Capsule" "Tablet" "Quick-Dissolve Tablet" "Powder" "Liquid" "Serum" "Softgel"

Physical form of the supplement

certifications
Array of strings

Product certifications and standards

allergens
Array of strings

Allergy related information

object (SupplementFactsPanel)

Detailed nutritional and ingredient information

servingSize
integer >= 1

Recommended serving size

type
string
Enum: "softgel" "tablet" "capsule" "gummy" "scoop"

Physical form of the supplement

otherIngredients
Array of strings

Additional ingredients not listed in the main panel

Array of objects

Active ingredients with nutritional information

Array
name
string

Ingredient name

value
string or null

Amount per serving

unit
string or null

Unit of measurement

dailyValue
string or null

Percentage of recommended daily value

Array of objects

Basic nutritional information

Array
name
string

Nutrient name

value
string or null

Amount per serving

unit
string or null

Unit of measurement

dailyValue
string or null

Percentage of recommended daily value

status
string
Enum: "ACTIVE" "DRAFT" "BACKORDERED" "DISCONTINUED"

Current product availability status

enabled
boolean
Default: true

False when the calling partner has disabled this product. Disabled products are omitted from GET /products unless include_disabled=true; GET /products/{productId} always returns them.

createdAt
string <date-time>

Product creation timestamp

updatedAt
string <date-time>

Product last update timestamp

Response samples

Content type
application/json
{
  • "id": 77123129891,
  • "name": "Elite EPA",
  • "description": "A comprehensive wellness supplement",
  • "packDescription": "Whole Body Wellness",
  • "price": "0.53",
  • "discountedPrice": "0.48",
  • "external": false,
  • "recommendedUsage": {
    },
  • "form": "Softgel",
  • "certifications": [
    ],
  • "allergens": [
    ],
  • "supplementFactsPanel": {
    },
  • "status": "ACTIVE",
  • "enabled": true,
  • "createdAt": "2023-10-01T17:02:56.866619Z",
  • "updatedAt": "2023-10-01T17:02:56.866619Z"
}

Shipping

Retrieve available shipping methods

Get Available Shipping Methods

Retrieve list of available shipping methods with details

Authorizations:
oauth2ClientCredentials

Responses

Response Schema: application/json
required
Array of objects (ShippingMethod)
Array
name
string

Shipping method name

description
string

Shipping method details

price
string

Shipping cost

Response samples

Content type
application/json
{
  • "shippingMethods": [
    ]
}

Partner Settings

Manage partner account settings and branding

Get Partner Settings

Retrieve the authenticated partner's current settings including branding, contact info, and billing address

Authorizations:
oauth2ClientCredentials

Responses

Response Schema: application/json
id
string

Unique partner identifier (read-only)

name
string

Partner name (read-only)

description
string or null

Partner description

discount
string or null

Human readable discount representation

discountValue
number or null

Numeric discount value (0.0 to 1.0)

primaryColor
string or null

Primary brand color (hex code)

secondaryColor
string or null

Secondary brand color (hex code)

logo
string or null

URL or key of partner logo

phone
string or null

Partner phone number

supportEmail
string or null <email>

Support email address

website
string or null <uri>

Partner website URL

webhookUrl
string or null <uri>

Webhook URL for order status notifications

billingAddressLine1
string or null

Billing address line 1

billingAddressLine2
string or null

Billing address line 2

billingCity
string or null

Billing city

billingState
string or null

Billing state/province

billingPostalCode
string or null

Billing postal/zip code

billingCountry
string or null

Billing country

createdAt
string <date-time>

Partner creation timestamp

updatedAt
string <date-time>

Partner last update timestamp

Response samples

Content type
application/json
{
  • "id": "2NxK7vPqYtR5mJnLkH3wZcB",
  • "name": "Acme Health",
  • "description": "Leading telehealth provider",
  • "discount": "10%",
  • "discountValue": 0.1,
  • "primaryColor": "#1a73e8",
  • "secondaryColor": "#ffffff",
  • "phone": "555-123-4567",
  • "supportEmail": "support@partner.com",
  • "website": "https://partner.com",
  • "billingAddressLine1": "123 Main St",
  • "billingAddressLine2": "Suite 100",
  • "billingCity": "San Francisco",
  • "billingState": "CA",
  • "billingPostalCode": "94102",
  • "billingCountry": "US",
  • "createdAt": "2023-10-01T12:00:00Z",
  • "updatedAt": "2023-10-01T12:00:00Z"
}

Update Partner Settings

Update the authenticated partner's settings. All fields are optional - only provided fields will be updated. Partners cannot change their name or ID.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
primaryColor
string

Primary brand color (hex code)

secondaryColor
string

Secondary brand color (hex code)

logo
string

URL or key of partner logo

phone
string

Partner phone number

supportEmail
string <email>

Support email address

website
string <uri>

Partner website URL

webhookUrl
string <uri>

Webhook URL for order status notifications

billingAddressLine1
string

Billing address line 1

billingAddressLine2
string

Billing address line 2

billingCity
string

Billing city

billingState
string

Billing state/province

billingPostalCode
string

Billing postal/zip code

billingCountry
string

Billing country

Responses

Response Schema: application/json
id
string

Unique partner identifier (read-only)

name
string

Partner name (read-only)

description
string or null

Partner description

discount
string or null

Human readable discount representation

discountValue
number or null

Numeric discount value (0.0 to 1.0)

primaryColor
string or null

Primary brand color (hex code)

secondaryColor
string or null

Secondary brand color (hex code)

logo
string or null

URL or key of partner logo

phone
string or null

Partner phone number

supportEmail
string or null <email>

Support email address

website
string or null <uri>

Partner website URL

webhookUrl
string or null <uri>

Webhook URL for order status notifications

billingAddressLine1
string or null

Billing address line 1

billingAddressLine2
string or null

Billing address line 2

billingCity
string or null

Billing city

billingState
string or null

Billing state/province

billingPostalCode
string or null

Billing postal/zip code

billingCountry
string or null

Billing country

createdAt
string <date-time>

Partner creation timestamp

updatedAt
string <date-time>

Partner last update timestamp

Request samples

Content type
application/json
{
  • "primaryColor": "#1a73e8",
  • "secondaryColor": "#ffffff",
  • "phone": "555-123-4567",
  • "supportEmail": "support@partner.com",
  • "website": "https://partner.com",
  • "billingAddressLine1": "123 Main St",
  • "billingAddressLine2": "Suite 100",
  • "billingCity": "San Francisco",
  • "billingState": "CA",
  • "billingPostalCode": "94102",
  • "billingCountry": "US"
}

Response samples

Content type
application/json
{
  • "id": "2NxK7vPqYtR5mJnLkH3wZcB",
  • "name": "Acme Health",
  • "description": "Leading telehealth provider",
  • "discount": "10%",
  • "discountValue": 0.1,
  • "primaryColor": "#1a73e8",
  • "secondaryColor": "#ffffff",
  • "phone": "555-123-4567",
  • "supportEmail": "support@partner.com",
  • "website": "https://partner.com",
  • "billingAddressLine1": "123 Main St",
  • "billingAddressLine2": "Suite 100",
  • "billingCity": "San Francisco",
  • "billingState": "CA",
  • "billingPostalCode": "94102",
  • "billingCountry": "US",
  • "createdAt": "2023-10-01T12:00:00Z",
  • "updatedAt": "2023-10-01T12:00:00Z"
}

Get Webhook Secret

Retrieve your webhook secret for signature verification. The secret is not included in the general settings response for security. You must have a webhookUrl configured to have a secret.

Authorizations:
oauth2ClientCredentials

Responses

Response Schema: application/json
webhookSecret
required
string

The newly generated webhook secret

Response samples

Content type
application/json
{
  • "webhookSecret": "9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e"
}

Rotate Webhook Secret

Generate a new webhook secret. The old secret becomes invalid immediately. Use this endpoint to rotate your secret if it may have been compromised.

Authorizations:
oauth2ClientCredentials

Responses

Response Schema: application/json
webhookSecret
required
string

The newly generated webhook secret

Response samples

Content type
application/json
{
  • "webhookSecret": "9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e"
}