Skip to content

White-Label Headless Clinic API (V2)

This guide is for engineering partners who connect a white-label storefront or EHR to BioTide with server-to-server (S2S) calls. There is no Swagger UI — this page is the contract.

Your headless API buyer (a clinic node in a Sales Org hierarchy) can:

  1. Pull a priced catalog at their account wholesale cost
  2. Inject paid orders (shipping + routed payment included)
  3. Poll status and tracking

Portal setup (create API buyers, master wallet funding, vaulted cards, payment preference) is done in the wholesale dashboard under My Network → Team hierarchy. See the Sales Organization Guide.


Create an API buyer (credentials)

A Sales Org manager provisions the headless clinic from the wholesale portal. The clinic does not get a normal dashboard login — only API credentials for Basic Auth.

Steps

  1. Sign in at wholesale.biotideusa.com as a Sales Org (or manager who can manage the team).
  2. Open My Network → Team hierarchy (or use Create API Buyer from the Dashboard).
  3. Click Create API Buyer.
  4. Enter a Username (required). Optionally add Company name and Email.
  5. Read the fee notice ($35 shipping on injected orders, plus card processing fees when routing to a vaulted card), then submit.
  6. On success, BioTide shows Username and an Application Password.

Save credentials immediately — they never display again

One-time credentials

The Application Password is shown only once on the success screen after create.

  • Copy it with the dialog’s copy control (or select and copy manually).
  • Store Username + Application Password in your secrets manager / password vault before you close the dialog.
  • BioTide will never show that application password again in the portal UI.

If you lose it, you cannot look it up later. Your WordPress/BioTide admin must issue a new application password for that user (or you create a new API buyer). Treat a lost password as compromised and rotate.

Use those values as API_BUYER_USERNAME and APPLICATION_PASSWORD in every curl example below.

After create, configure payment for that buyer under Team hierarchy → Billing Settings (master wallet vs vaulted card), and keep the Sales Org master wallet funded as needed.


Base URL

text
https://api.biotideusa.com/wp-json/biotide/v1/headless
MethodPathPurpose
GET/catalogPriced catalog for the authenticated API buyer
POST/ordersCreate and pay an order
GET/orders/{id}Order status + tracking

Replace placeholders in every example:

PlaceholderMeaning
API_BUYER_USERNAMEWordPress username from Create API Buyer
APPLICATION_PASSWORDOne-time application password shown at create time
45678BioTide order id returned as biotide_id

Authentication

All headless routes use HTTP Basic Auth (WordPress Application Password).

bash
# curl -u sends Authorization: Basic …
curl -u "API_BUYER_USERNAME:APPLICATION_PASSWORD" ...

Equivalent header form:

http
Authorization: Basic base64(API_BUYER_USERNAME:APPLICATION_PASSWORD)
Content-Type: application/json
Accept: application/json

Credentials

Treat the application password like an API secret. BioTide shows it once when the Sales Org creates the API buyer. Store it in your secrets manager; rotate in WordPress if it is exposed.

Order reads (GET /orders/{id}) are limited to orders that belong to the authenticated API buyer.


Fees on injected orders

Applied automatically by BioTide on POST /orders (you do not send fee lines):

FeeAmountWhen
Flat shipping$35.00Every injected order
Credit card surcharge11% of (product subtotal + $35 shipping)Only when that buyer’s payment preference is vaulted card

Wallet-paid orders do not get the 11% surcharge. Payment preference is set by the Sales Org in the portal (Billing Settings per buyer), not in the order payload.


1. Get catalog

Returns SKUs with hierarchy-verified wholesale prices for the authenticated API buyer.

Always use these prices on your side. Order injection ignores any client-supplied unit price and re-prices from this matrix (anti-spoofing).

Request

bash
curl -X GET "https://api.biotideusa.com/wp-json/biotide/v1/headless/catalog" \
  -u "API_BUYER_USERNAME:APPLICATION_PASSWORD" \
  -H "Accept: application/json"

Body: none.

Success response (200)

json
{
  "status": "success",
  "items": [
    {
      "product_id": 123,
      "sku": "BPC-157-5MG",
      "name": "BPC-157 5mg",
      "category": "Peptides",
      "your_wholesale_cost": 42.5,
      "shipping_window": "2-4 business days",
      "image_url": "https://example.com/image.jpg"
    }
  ]
}
FieldDescription
product_idWooCommerce product id
skuUse this in line_items when creating orders
your_wholesale_costUnit price for this API buyer (USD)
shipping_windowFulfillment guidance string (informational)
image_urlProduct image URL when available

Errors

HTTPMeaning
401Missing or invalid Basic Auth
500Catalog engine unavailable

2. Create order

Creates a WooCommerce order for the authenticated clinic, applies $35 shipping (and 11% CC fee when preference is vaulted card), charges the Sales Org master wallet or vaulted card, then marks the order processing on success.

If payment fails, BioTide returns 402 and does not keep the order.

Request

bash
curl -X POST "https://api.biotideusa.com/wp-json/biotide/v1/headless/orders" \
  -u "API_BUYER_USERNAME:APPLICATION_PASSWORD" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "external_order_id": "PARTNER-9001",
    "line_items": [
      { "sku": "BPC-157-5MG", "qty": 2 },
      { "sku": "TB-500-5MG", "qty": 1 }
    ],
    "shipping_address": {
      "first_name": "Alex",
      "last_name": "Rivera",
      "company": "Example Clinic",
      "address_1": "123 Main St",
      "address_2": "Suite 100",
      "city": "Boise",
      "state": "ID",
      "postcode": "83702",
      "country": "US",
      "phone": "2085550100",
      "email": "ops@example.com"
    }
  }'

Request body fields

json
{
  "external_order_id": "PARTNER-9001",
  "line_items": [
    { "sku": "BPC-157-5MG", "qty": 2 }
  ],
  "shipping_address": {
    "first_name": "Alex",
    "last_name": "Rivera",
    "company": "Example Clinic",
    "address_1": "123 Main St",
    "address_2": "Suite 100",
    "city": "Boise",
    "state": "ID",
    "postcode": "83702",
    "country": "US",
    "phone": "2085550100",
    "email": "ops@example.com"
  }
}
FieldRequiredNotes
line_itemsYesNon-empty array
line_items[].skuYesMust appear in GET /catalog for this buyer
line_items[].qtyYesPositive integer
shipping_addressYesWooCommerce-style address object
shipping_address.first_nameRecommendedShip-to contact
shipping_address.last_nameRecommendedShip-to contact
shipping_address.address_1RecommendedStreet line 1
shipping_address.cityRecommended
shipping_address.stateRecommended2-letter US state when country is US
shipping_address.postcodeRecommended
shipping_address.countryRecommendedISO country code (e.g. US)
shipping_address.companyNo
shipping_address.address_2No
shipping_address.phoneNo
shipping_address.emailNo
external_order_idNoYour id; stored for reconciliation and returned later

Do not send unit prices, shipping amounts, or payment tokens in this body — BioTide calculates pricing and routes payment from the buyer’s configured preference.

Success response (200)

json
{
  "success": true,
  "biotide_id": 45678,
  "external_id": "PARTNER-9001",
  "order_subtotal": 85.0,
  "shipping": 35.0,
  "fees": 0,
  "order_total": 120.0,
  "status": "Paid / Processing",
  "message": "Order captured and pushed to fulfillment. Headless Payment captured via Sales Org Pre-Funded Wallet. Remaining Balance: $1880.00"
}
FieldDescription
biotide_idWooCommerce order id — use this for GET /orders/{id}
external_idEcho of external_order_id (may be empty)
order_subtotalSum of line items at verified wholesale cost
shippingFlat shipping (35)
feesCC surcharge when preference is vaulted card; otherwise 0
order_totalFinal charged total
statusHuman-readable success status
messageIncludes payment route notes

Error responses

HTTPWhenNotes
400Missing line_items / shipping_address, or SKU not allowedMessage names the invalid SKU when applicable
401Bad or missing Basic Auth
402Payment failedInsufficient wallet, card decline, missing vault, etc. Order is deleted

Example payment failure:

json
{
  "code": "payment_failed",
  "message": "Order rejected. Billing error: Insufficient Master Wallet funds. Order Total: $120.00. Wallet Balance: $10.00.",
  "data": { "status": 402 }
}

3. Get order status & tracking

Returns status and shipment tracking for an order owned by the authenticated API buyer.

{id} is the BioTide / WooCommerce order id from create (biotide_id).

Request

bash
curl -X GET "https://api.biotideusa.com/wp-json/biotide/v1/headless/orders/45678" \
  -u "API_BUYER_USERNAME:APPLICATION_PASSWORD" \
  -H "Accept: application/json"

Body: none.

Success response (200)

json
{
  "success": true,
  "biotide_id": 45678,
  "external_id": "PARTNER-9001",
  "status": "processing",
  "date_created": "2026-07-23 18:04:11",
  "tracking": {
    "provider": "UPS",
    "number": "1Z999AA10123456784",
    "link": "https://www.ups.com/track?tracknum=1Z999AA10123456784"
  }
}
FieldDescription
statusWooCommerce status slug (e.g. processing, completed)
date_createdOrder created timestamp (Y-m-d H:i:s) or null
tracking.providerCarrier name when available; else ""
tracking.numberTracking number when available; else ""
tracking.linkCarrier tracking URL when available; else ""

Empty tracking strings usually mean the order is not shipped yet.

Errors

HTTPMeaning
401Missing or invalid Basic Auth
403Order exists but belongs to a different customer
404Order id not found

How payment is chosen

Configured by the Sales Org in the portal (Team hierarchy → Billing Settings for that API buyer). Your POST /orders call does not pick the method.

PreferenceWhat happens on POST /orders
wallet (default)Debit the Sales Org master wallet for order_total
vaulted_cardCharge the org’s vaulted card; add 11% fee on (subtotal + shipping)

Wallet funding and card vaulting are portal / BioTide operations — not part of this headless clinic API.


Suggested integration flow

mermaid
sequenceDiagram
  participant Partner as Partner backend
  participant BT as BioTide headless API
  participant AuthNet as Authorize.Net

  Partner->>BT: GET /catalog (Basic Auth)
  BT-->>Partner: SKUs + wholesale costs
  Partner->>BT: POST /orders (items + ship-to)
  alt preference wallet
    BT->>BT: Debit Sales Org master wallet
  else preference vaulted_card
    BT->>AuthNet: CIM charge
  end
  BT-->>Partner: biotide_id + totals
  Partner->>BT: GET /orders/{biotide_id}
  BT-->>Partner: status + tracking
  1. Sales Org creates an API buyer and stores username + application password.
  2. Sales Org funds the master wallet and/or vaults a card; sets payment preference.
  3. Your backend: GET /catalogPOST /orders → store biotide_id.
  4. Poll GET /orders/{biotide_id} for fulfillment and tracking.

Quick copy-paste checklist

bash
# 1) Catalog
curl -X GET "https://api.biotideusa.com/wp-json/biotide/v1/headless/catalog" \
  -u "API_BUYER_USERNAME:APPLICATION_PASSWORD" \
  -H "Accept: application/json"

# 2) Create order
curl -X POST "https://api.biotideusa.com/wp-json/biotide/v1/headless/orders" \
  -u "API_BUYER_USERNAME:APPLICATION_PASSWORD" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "external_order_id": "PARTNER-9001",
    "line_items": [{ "sku": "BPC-157-5MG", "qty": 2 }],
    "shipping_address": {
      "first_name": "Alex",
      "last_name": "Rivera",
      "address_1": "123 Main St",
      "city": "Boise",
      "state": "ID",
      "postcode": "83702",
      "country": "US",
      "phone": "2085550100",
      "email": "ops@example.com"
    }
  }'

# 3) Status / tracking (use biotide_id from step 2)
curl -X GET "https://api.biotideusa.com/wp-json/biotide/v1/headless/orders/45678" \
  -u "API_BUYER_USERNAME:APPLICATION_PASSWORD" \
  -H "Accept: application/json"

Support