Client integration

API documentation

Public reference for client partners integrating with our 3PL. To obtain an API key, sign in to your client dashboard and generate one from the Clients page. Keys are never displayed on this public page.

Claude Code · Cursor · Other AI tools

AI integration prompts

Copy a prompt into your AI coding tool with your project open. Add your real API key only to your server’s private settings—not to the prompt.

API test scenarios

Safe orders, duplicates, failures and tracking

View prompt
Integrate my existing application with the Biz On Demand client REST API. Inspect my repository first and use its existing framework, server runtime, conventions, and test tools. Do not replace unrelated code.

API base URL: https://bizondemand.ai/api/public/v1
Use this base URL for new integrations. If my existing integration uses another connected API hostname, preserve its working URL, endpoint paths and key; no migration is required. Do not automatically rewrite existing connection settings.
Public reference: https://bizondemand.ai/docs/api
Read the reference before implementing; do not invent endpoints or response fields. If you cannot access it, ask me to paste the relevant reference.

Security: use BIOSYNC_API_BASE_URL and BIOSYNC_API_KEY as server-only environment variables. Send Authorization: Bearer <BIOSYNC_API_KEY>. Real keys start with pl3pl_live_. Create an example environment file with placeholders only, exclude real secrets from version control, and never ask me to paste a key into this chat. Never put keys in browser code, public-prefixed variables, logs, or screenshots. Call the canonical base URL directly; do not follow cross-host redirects with credentials. Keep my application's normal user authorization on any proxy endpoints.

Use mocked API responses for automated tests, plus the documented isolated /test/orders API for scenario checks. The normal /orders endpoint creates real orders; never infer test mode from a reference, and never submit test fields to live /orders. No live order submission, label purchase, cancellation, or other account-changing calls without my explicit approval. Keep test and production paths/configuration explicit and separate. Document the setup and clearly distinguish simulated checks from real read-only checks.

Build and run a server-only integration test suite against the documented test-order endpoints. Do not touch live orders.

Test-order contract:
- Use the same server-only client API key with POST /test/orders, never /orders. Body: { client_order_id: "TEST-1001", scenario: "success", items: [{ sku: "TEST-SKU", quantity: 2 }], shipping: 5, currency: "USD" }. Customer/address fields are not stored; use fictitious data only.
- Simulated prices are $10 per vial, not account prices; stock/balances are not checked. No credits, inventory, real labels, emails, suppliers or webhooks are affected. Every response carries test_mode: true.
- Scenarios: success (201), insufficient_stock (409), insufficient_credits (402), unknown_sku (422), label_error (201 with shipment_error), label_created/shipped/delivered (201 with synthetic tracking).
- A saved client_order_id is unique within the account; retry returns the saved response with idempotent: true (200), including concurrent retries. Error scenarios save nothing. Use distinct references per scenario.
- GET /test/orders lists { test_mode, orders, total, limit, offset }; GET /test/orders/{id} reads { test_mode, scenario, order, items, shipment, tracking, shipment_error }. Use a returned test_<uuid> or your reference.
- POST /test/orders/{id} with { status: "label_created" | "shipped" | "delivered" | "cancelled" } changes only simulated state. Cancel a fresh received order; tracked orders return 409 not_cancellable and cancelled orders return 409 already_cancelled. Read back with GET; no webhooks are sent.
- Also test malformed quantities (422), invalid/revoked authentication (401) and missing test references (404). Require test_mode: true before treating any result as a simulation. Never silently fall back to live writes.

Verify create, repeated/concurrent submission, list/read-back, tracking updates and cancellation. Show simulated results separately from live checks.

COA files

Certificate sync and PDF/image downloads

View prompt
Integrate my existing application with the Biz On Demand client REST API. Inspect my repository first and use its existing framework, server runtime, conventions, and test tools. Do not replace unrelated code.

API base URL: https://bizondemand.ai/api/public/v1
Use this base URL for new integrations. If my existing integration uses another connected API hostname, preserve its working URL, endpoint paths and key; no migration is required. Do not automatically rewrite existing connection settings.
Public reference: https://bizondemand.ai/docs/api
Read the reference before implementing; do not invent endpoints or response fields. If you cannot access it, ask me to paste the relevant reference.

Security: use BIOSYNC_API_BASE_URL and BIOSYNC_API_KEY as server-only environment variables. Send Authorization: Bearer <BIOSYNC_API_KEY>. Real keys start with pl3pl_live_. Create an example environment file with placeholders only, exclude real secrets from version control, and never ask me to paste a key into this chat. Never put keys in browser code, public-prefixed variables, logs, or screenshots. Call the canonical base URL directly; do not follow cross-host redirects with credentials. Keep my application's normal user authorization on any proxy endpoints.

Use mocked API responses for automated tests, plus the documented isolated /test/orders API for scenario checks. The normal /orders endpoint creates real orders; never infer test mode from a reference, and never submit test fields to live /orders. No live order submission, label purchase, cancellation, or other account-changing calls without my explicit approval. Keep test and production paths/configuration explicit and separate. Document the setup and clearly distinguish simulated checks from real read-only checks.

Implement a read-only COA file sync and certificate display in my existing application.

COA contract:
- GET /coas?limit=50&offset=0 returns { count, total, limit, offset, items }; paginate all pages. Optional sku (including retired aliases), exact lot, updated_since (ISO timestamp), url_ttl (60–3600 seconds, default 900).
- GET /coas/{returned-uuid} returns { coa }; missing IDs return 404, invalid filters 422, missing/revoked keys 401. Missing SKUs return an empty list.
- The certificate library includes unlinked files. Linked SKU details and SKU filters are scoped to the account catalog. Fields include id, name, lot_number, file_name, file_type, is_image, file_url, image_url, document_url, url_expires_in_seconds, created_at, updated_at, skus and analysis (nullable).
- Sync all /products pages for the account's sellable catalog separately from the certificate library. Store certificates by id and attach them only using each certificate's explicit skus array and the catalog's returned SKU codes. Multiple SKUs can share a certificate. skus: [] means no visible product association: leave it unattached. Never guess from names, strengths, lots or analysis.product_name; show COA not available when a product has no linked certificate.
- This is a pull API, not a push/webhook sync. Schedule recurring full catalog and COA reads server-side; after all pages succeed, replace product-to-certificate links, including removal of links no longer returned. On partial failure, preserve the last successful snapshot and show it as stale.
- updated_since is inclusive and filters only coas.updated_at. Product reassignment, analysis-only changes and deletions are not reliably represented by that filter. Do not rely on it alone: use recurring full reconciliation. For incremental requests, save the sync-start timestamp, advance it only after all pages succeed and deduplicate by certificate ID.
- Download the actual PDF/image using file_url before expiry, or request a fresh URL. Do not send the API key to the signed file URL. Preserve lot/SKU associations and do not treat extracted analysis as a replacement for the certificate. Add tests for pagination, expired links, empty results and PDFs vs images.

Keep credentials server-side, refresh expiring file links, and show missing certificates honestly. Do not create orders.

Complete integration

Catalog, COAs, checkout, fulfillment and tracking

View prompt
Integrate my existing application with the Biz On Demand client REST API. Inspect my repository first and use its existing framework, server runtime, conventions, and test tools. Do not replace unrelated code.

API base URL: https://bizondemand.ai/api/public/v1
Use this base URL for new integrations. If my existing integration uses another connected API hostname, preserve its working URL, endpoint paths and key; no migration is required. Do not automatically rewrite existing connection settings.
Public reference: https://bizondemand.ai/docs/api
Read the reference before implementing; do not invent endpoints or response fields. If you cannot access it, ask me to paste the relevant reference.

Security: use BIOSYNC_API_BASE_URL and BIOSYNC_API_KEY as server-only environment variables. Send Authorization: Bearer <BIOSYNC_API_KEY>. Real keys start with pl3pl_live_. Create an example environment file with placeholders only, exclude real secrets from version control, and never ask me to paste a key into this chat. Never put keys in browser code, public-prefixed variables, logs, or screenshots. Call the canonical base URL directly; do not follow cross-host redirects with credentials. Keep my application's normal user authorization on any proxy endpoints.

Use mocked API responses for automated tests, plus the documented isolated /test/orders API for scenario checks. The normal /orders endpoint creates real orders; never infer test mode from a reference, and never submit test fields to live /orders. No live order submission, label purchase, cancellation, or other account-changing calls without my explicit approval. Keep test and production paths/configuration explicit and separate. Document the setup and clearly distinguish simulated checks from real read-only checks.

Build the full integration in small stages: a server-only API client, catalog and COA sync, checkout shipping options, paid-order fulfillment, then tracking sync.

Catalog contract:
- GET /products?limit=100&offset=0 returns { products, total, limit, offset }. Products include sku, name, category, origin, in_stock, quantity_available, price, recommended_sell_price.
- Paginate until the reported total is collected or a page is empty; do not silently truncate to the first 100 products. Optional category is an exact-match filter.
- GET /inventory?limit=100&offset=0 returns { client, count, limit, offset, items }; items include sku, name, quantity_available, your_price, msrp. Do not confuse this shape with /products.
- GET /inventory/{sku} returns the single SKU's quantity_available and price. URL-encode the SKU.
- Use returned SKUs; do not synthesize codes or remap existing legacy connections. Stock and prices are scoped to the API key's account. Product price / inventory your_price is the fulfillment price, not the storefront retail price; recommended_sell_price / msrp is only a retail suggestion and may be null. Preserve my existing retail pricing. Do not enable ordering for unavailable or zero-priced products.

COA contract:
- GET /coas?limit=50&offset=0 returns { count, total, limit, offset, items }; paginate all pages. Optional sku (including retired aliases), exact lot, updated_since (ISO timestamp), url_ttl (60–3600 seconds, default 900).
- GET /coas/{returned-uuid} returns { coa }; missing IDs return 404, invalid filters 422, missing/revoked keys 401. Missing SKUs return an empty list.
- The certificate library includes unlinked files. Linked SKU details and SKU filters are scoped to the account catalog. Fields include id, name, lot_number, file_name, file_type, is_image, file_url, image_url, document_url, url_expires_in_seconds, created_at, updated_at, skus and analysis (nullable).
- Sync all /products pages for the account's sellable catalog separately from the certificate library. Store certificates by id and attach them only using each certificate's explicit skus array and the catalog's returned SKU codes. Multiple SKUs can share a certificate. skus: [] means no visible product association: leave it unattached. Never guess from names, strengths, lots or analysis.product_name; show COA not available when a product has no linked certificate.
- This is a pull API, not a push/webhook sync. Schedule recurring full catalog and COA reads server-side; after all pages succeed, replace product-to-certificate links, including removal of links no longer returned. On partial failure, preserve the last successful snapshot and show it as stale.
- updated_since is inclusive and filters only coas.updated_at. Product reassignment, analysis-only changes and deletions are not reliably represented by that filter. Do not rely on it alone: use recurring full reconciliation. For incremental requests, save the sync-start timestamp, advance it only after all pages succeed and deduplicate by certificate ID.
- Download the actual PDF/image using file_url before expiry, or request a fresh URL. Do not send the API key to the signed file URL. Preserve lot/SKU associations and do not treat extracted analysis as a replacement for the certificate. Add tests for pagination, expired links, empty results and PDFs vs images.

Checkout contract:
- POST /shipping/rates accepts { ship_to: { city, state, postal_code, country }, items: [{ sku, quantity }] } and returns { mocked, package, rates }. Each rate includes carrier_code, service_code, amount, currency and estimated_days. Do not treat mocked rates as production quotes.
- POST /orders accepts { client_order_id, customer: { name, email, phone }, ship_to: { name, line1, line2, city, state, postal_code, country }, items: [{ sku, quantity }], currency: "USD", notes }.
- Quantity is a positive whole number in vials, not kits. Map any kit quantity using a verified configured conversion, never guess. Do not send unit_price: fulfillment pricing is resolved by the API from the account's assigned prices.
- For a selected rate, add shipping_selection: { carrier_code, service_code, amount_charged: selectedRate.amount }. Do not substitute customer retail/free-shipping policy for fulfillment shipping cost. A shipping selection can purchase a label; do not add it without the intended checkout behavior being approved.
- Send only after my application's authoritative paid/approved checkout event. Persist one stable, non-UUID-prefixed client_order_id per storefront order (for example STORE-10245, max 120 characters) and reuse it for every retry. Persist the returned order.id; never generate a new reference to retry an uncertain result.
- Success returns { order, items, shipment, shipment_error }; a non-null shipment_error does not mean the order failed. Save the created order and surface the label problem, rather than creating a duplicate.
- Add timeouts and bounded exponential-backoff retries for transient failures with the same client_order_id. Stop and surface 401 authentication failures and 422 validation/unknown-SKU errors. Inspect other non-success responses instead of retrying blindly.

Tracking contract:
- GET /orders/{id} accepts the returned platform order ID or a non-UUID client_order_id. URL-encode the reference.
- Returns { order, items, tracking }. order includes id, client_order_id, status, shipping_status, cancellable, shipped_at, delivered_at; tracking is null until available, otherwise contains carrier, service_code, tracking_number, label_url.
- shipping_status is not_shipped, label_created, shipped, delivered, or cancelled. A created label is not proof of shipment.
- Poll from a server-side scheduled job using the host's supported scheduler, with configurable interval and bounded retries. Stop regular polling for delivered/cancelled orders. Persist status and tracking on the matching local order and avoid duplicate notifications. Do not fabricate a tracking URL or assume a dedicated tracking endpoint.
- Handle 404 as a missing order, not as an empty successful result. Keep previously saved status on transient failures and expose sync errors to staff.
- If proposing webhooks, first confirm the documented registration and signing-secret setup; do not invent a registration endpoint or claim polling is a webhook. Do not implement cancellation as part of this task.

Add mocked tests for pagination, secret isolation, SKU mapping, whole-number quantities, assigned fulfillment pricing, stable retry references, shipment_error handling, and tracking updates. Show me the changed files, required configuration and test results. List any missing business decisions before enabling live writes.

Catalog & inventory

Products, account prices and stock sync

View prompt
Integrate my existing application with the Biz On Demand client REST API. Inspect my repository first and use its existing framework, server runtime, conventions, and test tools. Do not replace unrelated code.

API base URL: https://bizondemand.ai/api/public/v1
Use this base URL for new integrations. If my existing integration uses another connected API hostname, preserve its working URL, endpoint paths and key; no migration is required. Do not automatically rewrite existing connection settings.
Public reference: https://bizondemand.ai/docs/api
Read the reference before implementing; do not invent endpoints or response fields. If you cannot access it, ask me to paste the relevant reference.

Security: use BIOSYNC_API_BASE_URL and BIOSYNC_API_KEY as server-only environment variables. Send Authorization: Bearer <BIOSYNC_API_KEY>. Real keys start with pl3pl_live_. Create an example environment file with placeholders only, exclude real secrets from version control, and never ask me to paste a key into this chat. Never put keys in browser code, public-prefixed variables, logs, or screenshots. Call the canonical base URL directly; do not follow cross-host redirects with credentials. Keep my application's normal user authorization on any proxy endpoints.

Use mocked API responses for automated tests, plus the documented isolated /test/orders API for scenario checks. The normal /orders endpoint creates real orders; never infer test mode from a reference, and never submit test fields to live /orders. No live order submission, label purchase, cancellation, or other account-changing calls without my explicit approval. Keep test and production paths/configuration explicit and separate. Document the setup and clearly distinguish simulated checks from real read-only checks.

Implement only a read-only product catalog and inventory integration. Do not create orders or purchase labels.

Catalog contract:
- GET /products?limit=100&offset=0 returns { products, total, limit, offset }. Products include sku, name, category, origin, in_stock, quantity_available, price, recommended_sell_price.
- Paginate until the reported total is collected or a page is empty; do not silently truncate to the first 100 products. Optional category is an exact-match filter.
- GET /inventory?limit=100&offset=0 returns { client, count, limit, offset, items }; items include sku, name, quantity_available, your_price, msrp. Do not confuse this shape with /products.
- GET /inventory/{sku} returns the single SKU's quantity_available and price. URL-encode the SKU.
- Use returned SKUs; do not synthesize codes or remap existing legacy connections. Stock and prices are scoped to the API key's account. Product price / inventory your_price is the fulfillment price, not the storefront retail price; recommended_sell_price / msrp is only a retail suggestion and may be null. Preserve my existing retail pricing. Do not enable ordering for unavailable or zero-priced products.

Add configurable server-side caching and refresh, with a last-successful-sync timestamp. Preserve existing product associations and display sync failures without silently reporting stale stock as live. Add mocked tests for multiple pages, empty catalogs, missing retail suggestions, unavailable/zero-priced products, and authentication errors. Provide setup and read-only verification steps.

Checkout & orders

Shipping quotes and duplicate-safe submission

View prompt
Integrate my existing application with the Biz On Demand client REST API. Inspect my repository first and use its existing framework, server runtime, conventions, and test tools. Do not replace unrelated code.

API base URL: https://bizondemand.ai/api/public/v1
Use this base URL for new integrations. If my existing integration uses another connected API hostname, preserve its working URL, endpoint paths and key; no migration is required. Do not automatically rewrite existing connection settings.
Public reference: https://bizondemand.ai/docs/api
Read the reference before implementing; do not invent endpoints or response fields. If you cannot access it, ask me to paste the relevant reference.

Security: use BIOSYNC_API_BASE_URL and BIOSYNC_API_KEY as server-only environment variables. Send Authorization: Bearer <BIOSYNC_API_KEY>. Real keys start with pl3pl_live_. Create an example environment file with placeholders only, exclude real secrets from version control, and never ask me to paste a key into this chat. Never put keys in browser code, public-prefixed variables, logs, or screenshots. Call the canonical base URL directly; do not follow cross-host redirects with credentials. Keep my application's normal user authorization on any proxy endpoints.

Use mocked API responses for automated tests, plus the documented isolated /test/orders API for scenario checks. The normal /orders endpoint creates real orders; never infer test mode from a reference, and never submit test fields to live /orders. No live order submission, label purchase, cancellation, or other account-changing calls without my explicit approval. Keep test and production paths/configuration explicit and separate. Document the setup and clearly distinguish simulated checks from real read-only checks.

Implement shipping quotes and fulfillment submission within my existing checkout. Inspect my payment completion flow and product SKU mapping first. Do not build a new payment gateway.

Catalog contract:
- GET /products?limit=100&offset=0 returns { products, total, limit, offset }. Products include sku, name, category, origin, in_stock, quantity_available, price, recommended_sell_price.
- Paginate until the reported total is collected or a page is empty; do not silently truncate to the first 100 products. Optional category is an exact-match filter.
- GET /inventory?limit=100&offset=0 returns { client, count, limit, offset, items }; items include sku, name, quantity_available, your_price, msrp. Do not confuse this shape with /products.
- GET /inventory/{sku} returns the single SKU's quantity_available and price. URL-encode the SKU.
- Use returned SKUs; do not synthesize codes or remap existing legacy connections. Stock and prices are scoped to the API key's account. Product price / inventory your_price is the fulfillment price, not the storefront retail price; recommended_sell_price / msrp is only a retail suggestion and may be null. Preserve my existing retail pricing. Do not enable ordering for unavailable or zero-priced products.

Checkout contract:
- POST /shipping/rates accepts { ship_to: { city, state, postal_code, country }, items: [{ sku, quantity }] } and returns { mocked, package, rates }. Each rate includes carrier_code, service_code, amount, currency and estimated_days. Do not treat mocked rates as production quotes.
- POST /orders accepts { client_order_id, customer: { name, email, phone }, ship_to: { name, line1, line2, city, state, postal_code, country }, items: [{ sku, quantity }], currency: "USD", notes }.
- Quantity is a positive whole number in vials, not kits. Map any kit quantity using a verified configured conversion, never guess. Do not send unit_price: fulfillment pricing is resolved by the API from the account's assigned prices.
- For a selected rate, add shipping_selection: { carrier_code, service_code, amount_charged: selectedRate.amount }. Do not substitute customer retail/free-shipping policy for fulfillment shipping cost. A shipping selection can purchase a label; do not add it without the intended checkout behavior being approved.
- Send only after my application's authoritative paid/approved checkout event. Persist one stable, non-UUID-prefixed client_order_id per storefront order (for example STORE-10245, max 120 characters) and reuse it for every retry. Persist the returned order.id; never generate a new reference to retry an uncertain result.
- Success returns { order, items, shipment, shipment_error }; a non-null shipment_error does not mean the order failed. Save the created order and surface the label problem, rather than creating a duplicate.
- Add timeouts and bounded exponential-backoff retries for transient failures with the same client_order_id. Stop and surface 401 authentication failures and 422 validation/unknown-SKU errors. Inspect other non-success responses instead of retrying blindly.

Add mocked tests for the exact request shape, whole-number vial quantities, stable client_order_id across retries, repeated payment events, validation failures, transient failures, and an order created with shipment_error. Use a durable local submission record so a page refresh or repeated payment event cannot lose the fulfillment reference. Provide a checklist for my approval before enabling live writes.

Order tracking

Status updates for existing fulfillment orders

View prompt
Integrate my existing application with the Biz On Demand client REST API. Inspect my repository first and use its existing framework, server runtime, conventions, and test tools. Do not replace unrelated code.

API base URL: https://bizondemand.ai/api/public/v1
Use this base URL for new integrations. If my existing integration uses another connected API hostname, preserve its working URL, endpoint paths and key; no migration is required. Do not automatically rewrite existing connection settings.
Public reference: https://bizondemand.ai/docs/api
Read the reference before implementing; do not invent endpoints or response fields. If you cannot access it, ask me to paste the relevant reference.

Security: use BIOSYNC_API_BASE_URL and BIOSYNC_API_KEY as server-only environment variables. Send Authorization: Bearer <BIOSYNC_API_KEY>. Real keys start with pl3pl_live_. Create an example environment file with placeholders only, exclude real secrets from version control, and never ask me to paste a key into this chat. Never put keys in browser code, public-prefixed variables, logs, or screenshots. Call the canonical base URL directly; do not follow cross-host redirects with credentials. Keep my application's normal user authorization on any proxy endpoints.

Use mocked API responses for automated tests, plus the documented isolated /test/orders API for scenario checks. The normal /orders endpoint creates real orders; never infer test mode from a reference, and never submit test fields to live /orders. No live order submission, label purchase, cancellation, or other account-changing calls without my explicit approval. Keep test and production paths/configuration explicit and separate. Document the setup and clearly distinguish simulated checks from real read-only checks.

Implement only status and tracking synchronization for orders my application already submitted. Do not submit new orders, buy labels, or cancel orders.

Tracking contract:
- GET /orders/{id} accepts the returned platform order ID or a non-UUID client_order_id. URL-encode the reference.
- Returns { order, items, tracking }. order includes id, client_order_id, status, shipping_status, cancellable, shipped_at, delivered_at; tracking is null until available, otherwise contains carrier, service_code, tracking_number, label_url.
- shipping_status is not_shipped, label_created, shipped, delivered, or cancelled. A created label is not proof of shipment.
- Poll from a server-side scheduled job using the host's supported scheduler, with configurable interval and bounded retries. Stop regular polling for delivered/cancelled orders. Persist status and tracking on the matching local order and avoid duplicate notifications. Do not fabricate a tracking URL or assume a dedicated tracking endpoint.
- Handle 404 as a missing order, not as an empty successful result. Keep previously saved status on transient failures and expose sync errors to staff.
- If proposing webhooks, first confirm the documented registration and signing-secret setup; do not invent a registration endpoint or claim polling is a webhook. Do not implement cancellation as part of this task.

Add mocked tests for tracking=null, label_created vs shipped, delivered/cancelled stopping polling, 404, transient failure, and repeated identical status responses without duplicate notifications. Show the scheduler configuration, status mapping, test results and read-only verification steps.

Prompts use placeholders and mocked tests; live orders require your approval.

Test orders · isolated scenarios

Use your existing client API key, but send test orders only to /test/orders. Tests never charge either wallet, reserve inventory, purchase labels, send emails, contact suppliers, or dispatch webhooks. They stay out of your real Orders screen.

These are simulated responses, not a live price, stock, or balance check. Any nonempty SKU is accepted; each test vial costs a synthetic $10. Use fictitious customer details only; customer/address fields are not stored.

curl -X POST https://bizondemand.ai/api/public/v1/test/orders \
  -H "Authorization: Bearer $BIOSYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"client_order_id":"TEST-1001","scenario":"success","items":[{"sku":"TEST-SKU","quantity":2}],"shipping":5,"currency":"USD"}'

201: { "test_mode": true, "scenario": "success", "order": { "id": "test_<uuid>", "client_order_id": "TEST-1001", "status": "received", "subtotal": 20, "shipping": 5, "total": 25, ... }, "items": [...], "shipment": null, "tracking": null, "shipment_error": null }
  • success (default): 201 received order.
  • insufficient_stock: 409; insufficient_credits: 402; unknown_sku: 422. These are forced test errors, not assertions about live API policies.
  • label_error: 201 order with non-null shipment_error.
  • label_created, shipped, delivered: 201 with synthetic tracking; no usable shipping label.
  • Quantities must be positive whole-number vials. client_order_id is required. Repeat a saved reference to receive 200 with idempotent: true—even if you change the body. Error scenarios create no record. Use a new reference for each scenario.
  • GET /test/orders?limit=50&offset=0 lists your tests; optional client_order_id filters a reference.
  • GET /test/orders/TEST-1001 or the returned test ID reads back the same order.
curl -X POST https://bizondemand.ai/api/public/v1/test/orders/TEST-1001 \
  -H "Authorization: Bearer $BIOSYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"shipped"}'

# Allowed simulated updates: label_created, shipped, delivered, cancelled.
# To test cancellation, use a fresh received order. Once tracked, cancellation returns 409 not_cancellable.
# Repeating cancellation returns 409 already_cancelled; no real credits are refunded.
# Read the update using GET /test/orders/TEST-1001.

The normal /orders endpoint still creates real orders. A test-looking reference alone does not make it safe. Test fields sent to that endpoint are rejected; always configure the separate /test/orders path.

COA files · product linking & sync

GET /coas returns the certificate library, including files not yet linked to products, with signed PDF/image links and available lab analysis. Authenticate with your normal client API key. Internal notes are excluded; linked SKU details and SKU filters use your visible catalog.

A certificate in the library does not mean every product has a COA. We explicitly link verified certificates to products; uncertain matches remain unlinked. Your site can automatically pull those verified links, but this API does not push updates to your website or guess matches from names, strengths, or lot numbers.

Connect certificates to your products

  1. Sync every page of /products for your account’s current catalog, prices and availability. Use the returned SKU codes; the COA library is not a list of products available to sell.
  2. Fetch every page of /coas without filters. Store each certificate by its id, then attach it only to the products explicitly returned in that certificate’s skus array. One certificate can have multiple linked products.
  3. skus: [] means no linked product is visible to your account. Keep that file unattached; do not infer a product from the file name or extracted analysis.product_name. A product with no matching certificate should show “COA not available,” not another product’s file.
  4. To check one product, call /coas?sku= with its URL-encoded SKU. Current codes and recognized retired aliases are supported. An empty result means no certificate is linked for that visible SKU, not that the API is broken.

Keep the links current

Run a scheduled, server-side full catalog and COA sync at your chosen interval and before launch. After all pages succeed, replace your saved product-to-certificate associations with the returned links, removing associations no longer present. Keep the last successful data on a failed or incomplete sync and flag it as stale.

updated_since is an inclusive filter on the certificate record’s updated_at, not a complete change feed. Changing a product’s COA assignment or extracted analysis may not update that timestamp; deletions are not returned. Use incremental requests only alongside recurring full syncs. Save a sync-start timestamp and advance your incremental checkpoint only after every page succeeds; deduplicate by certificate ID.

curl "https://bizondemand.ai/api/public/v1/coas?limit=50&offset=0" \
  -H "Authorization: Bearer $BIOSYNC_API_KEY"

# Filter by current or retired SKU (URL-encode the value):
curl "https://bizondemand.ai/api/public/v1/coas?sku=BPC-157-5" -H "Authorization: Bearer $BIOSYNC_API_KEY"

# Fetch one returned certificate ID:
curl "https://bizondemand.ai/api/public/v1/coas/<coa-uuid>" -H "Authorization: Bearer $BIOSYNC_API_KEY"

# List response:
{ "count": 1, "total": 1, "limit": 50, "offset": 0, "items": [
  { "id": "<coa-uuid>", "name": "BPC-157 COA", "lot_number": "BATCH-001",
    "file_name": "certificate.pdf", "file_type": "application/pdf", "is_image": false,
    "file_url": "<signed download URL>", "document_url": "<same signed URL>", "image_url": null,
    "url_expires_in_seconds": 900, "created_at": "...", "updated_at": "...",
    "skus": [{ "id": "...", "sku": "BPC-157-5", "name": "BPC-157 5mg", "size": "5mg", "origin": "US" }],
    "analysis": null }
] }
# Detail response: { "coa": { ...same item fields... } }
  • limit: 1–200 (default 50); offset: nonnegative. Paginate until total is reached or a page is empty.
  • Optional filters: sku, exact lot (case-insensitive), updated_since (ISO timestamp), url_ttl (60–3600 seconds, default 900).
  • file_url works for either PDF or image; document_url is for documents and image_url is for images. Download promptly or request a fresh link after expiration via GET /coas/{id}. Signed URLs are temporary, not permanent product links; a null file_url means no usable link was returned. Never send your API key to the file URL.
  • analysis is null when not available; otherwise includes product_name, lot_number, purity, test_date, lab_name, method, verdict, tests and other extracted lab fields. Do not substitute extracted analysis for the actual certificate.
  • A missing or unlinked SKU returns an empty list; a missing certificate ID returns 404. Malformed filters return 422; missing/revoked keys return 401.

Base URL

https://bizondemand.ai/api/public/v1

Use this canonical API hostname exactly. It does not redirect, so authorization headers are preserved.

Use bizondemand.ai for new integrations. Existing software can keep its current API hostname, endpoint paths and API key; no migration is required.

Authentication

Every request must include an Authorization header with your client's API key. Keys start with pl3pl_live_.

Authorization: Bearer pl3pl_live_YOUR_KEY_HERE

Treat the key like a password. If it's compromised, revoke it from your client dashboard and issue a new one. Keys are not shown on this public documentation page.

GET /inventory

Returns the full product catalog with live quantities and your tier pricing.

Request
curl https://bizondemand.ai/api/public/v1/inventory \
  -H "Authorization: Bearer pl3pl_live_YOUR_KEY_HERE"
Query params
  • limit — max items (default 100, max 500)
  • offset — pagination offset
  • category — exact-match filter
Response
{
  "client": {
    "id": "…",
    "name": "Acme Peptides",
    "slug": "acme-peptides",
    "pricing_tier_id": "…",
    "pricing_tier_name": "Gold"
  },
  "count": 2,
  "limit": 100,
  "offset": 0,
  "items": [
    {
      "id": "…",
      "sku": "BPC-157-5",
      "name": "BPC-157 5mg",
      "category": "Healing",
      "lot_number": "L240612-A",
      "quantity_available": 25,
      "your_price": 42.00,
      "wholesale_price": 42.00,
      "list_price": 49.00,
      "msrp": 79.00,
      "price_source": "tier",
      "currency": "USD",
      "has_coa": true
    }
  ]
}

your_price reflects your negotiated wholesale tier and is the price your account will be charged at order time. price_source is "tier" when a tier price applies, or "list" when no tier override exists for that product.

GET /inventory/{sku}

Look up a single product's live stock and your price. {sku} must match a SKU returned by /inventory.

curl https://bizondemand.ai/api/public/v1/inventory/BPC-157-5 \
  -H "Authorization: Bearer pl3pl_live_YOUR_KEY_HERE"

{
  "sku": "BPC-157-5",
  "name": "BPC-157 5mg",
  "category": "Healing",
  "origin": "US",
  "in_stock": true,
  "quantity_available": 25,
  "price": 42.00
}

Returns 404 not_found if the SKU (or an old SKU code that maps to it) does not exist in your catalog.

GET /products

Full product catalog with live quantities and your tier pricing.

Request
curl https://bizondemand.ai/api/public/v1/products \
  -H "Authorization: Bearer pl3pl_live_YOUR_KEY_HERE"
Query params
  • limit — max items (default 100, max 500)
  • offset — pagination offset
  • category — exact-match filter
Response
{
  "products": [
    {
      "sku": "BPC-157-5",
      "name": "BPC-157 5mg",
      "category": "Healing",
      "origin": "US",
      "in_stock": true,
      "quantity_available": 25,
      "price": 42.00,
      "recommended_sell_price": 79.00
    }
  ],
  "total": 48,
  "limit": 100,
  "offset": 0
}

price is your tier price when one is set, otherwise the catalog sell price. recommended_sell_price is the suggested retail you may resell at, and may be null.

POST /shipping/rates

Live shipping rates from our warehouse to your customer. Use this at checkout to show options.

Request
curl -X POST https://bizondemand.ai/api/public/v1/shipping/rates \
  -H "Authorization: Bearer pl3pl_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "ship_to": {
      "city": "Austin",
      "state": "TX",
      "postal_code": "78701",
      "country": "US"
    },
    "items": [
      { "sku": "BPC-157-5", "quantity": 2 }
    ]
  }'
Response
{
  "mocked": false,
  "package": { "weight_oz": 10, "length": 6, "width": 4, "height": 2 },
  "rates": [
    {
      "carrier_code": "stamps_com",
      "carrier_name": "USPS",
      "service_code": "usps_priority_mail_express",
      "service_name": "USPS Priority Mail Express",
      "amount": 42.19,
      "base_cost": 33.75,
      "currency": "USD",
      "estimated_days": 2
    }
  ]
}

amount is the marked-up price you can charge your customer at checkout. Pass the chosen carrier_code, service_code, and amount back into POST /orders as shipping_selection.

POST /orders

Submit an order for fulfillment. Idempotent on client_order_id.

Request
curl -X POST https://bizondemand.ai/api/public/v1/orders \
  -H "Authorization: Bearer pl3pl_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "client_order_id": "SO-10245",
    "customer": {
      "name": "Jane Doe",
      "email": "jane@example.com",
      "phone": "+15555550101"
    },
    "ship_to": {
      "name": "Jane Doe",
      "line1": "123 Main St",
      "city": "Austin",
      "state": "TX",
      "postal_code": "78701",
      "country": "US"
    },
    "items": [
      { "sku": "BPC-157-5", "quantity": 2 },
      { "sku": "TB-500-5", "quantity": 1 }
    ],
    "shipping": 9.95,
    "currency": "USD",
    "notes": "Gift wrap please"
  }'
Field rules
  • items[].sku must match a SKU returned by /inventory.
  • Pricing is always set server-side from your client's wholesale tier — unit_price is not accepted on order items and will be ignored.
  • client_order_id makes the call idempotent: re-sending with the same id returns the existing order.
  • On success we deduct the ordered quantities from BioSync inventory and debit the order total from your credit balance.
  • Include shipping_selection to purchase the label immediately. The sender on the label + packing slip uses your Return Address (configure it in your client dashboard). If it's blank, we fall back to our warehouse.
With a chosen shipping option
{
  "client_order_id": "SO-10245",
  "customer": { "name": "Jane Doe", "email": "jane@example.com" },
  "ship_to": {
    "name": "Jane Doe",
    "line1": "123 Main St",
    "city": "Austin", "state": "TX",
    "postal_code": "78701", "country": "US"
  },
  "items": [{ "sku": "BPC-157-5", "quantity": 2 }],
  "shipping_selection": {
    "carrier_code": "stamps_com",
    "service_code": "usps_priority_mail_express",
    "amount_charged": 42.19
  }
}
Response (201)
{
  "order": {
    "id": "…",
    "status": "label_created",
    "subtotal": 153.00,
    "shipping": 42.19,
    "total": 195.19,
    "currency": "USD",
    "created_at": "2026-06-19T..."
  },
  "items": [
    { "sku": "BPC-157-5", "name": "BPC-157 5mg", "quantity": 2, "unit_price": 49.00, "line_total": 98.00 },
    { "sku": "TB-500-5",  "name": "TB-500 5mg",  "quantity": 1, "unit_price": 55.00, "line_total": 55.00 }
  ],
  "shipment": {
    "carrier": "stamps_com",
    "service_code": "usps_priority_mail_express",
    "tracking_number": "9400...",
    "label_url": "data:application/pdf;base64,...",
    "ship_from_source": "brand",
    "mocked": false
  },
  "shipment_error": null
}

If shipment_error is non-null, the order was still created and you can retry the label from your dashboard. ship_from_source is "brand" when your Return Address was used, or "warehouse_fallback" when it wasn't set.

GET /orders/{id}

Look up an order and its shipping status. {id} is our order id or your client_order_id.

curl https://bizondemand.ai/api/public/v1/orders/SO-10245 \
  -H "Authorization: Bearer pl3pl_live_YOUR_KEY_HERE"

{
  "order": {
    "id": "…",
    "client_order_id": "SO-10245",
    "status": "received",
    "shipping_status": "not_shipped",
    "cancellable": true,
    "shipped_at": null,
    "delivered_at": null,
    ...
  },
  "items": [...],
  "tracking": null
}

shipping_status is one of not_shipped, label_created, shipped, delivered or cancelled. Check cancellable before offering a cancel button.

POST /orders/{id}/cancel

Cancel an order that hasn't shipped yet.

curl -X POST https://bizondemand.ai/api/public/v1/orders/SO-10245/cancel \
  -H "Authorization: Bearer pl3pl_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Customer changed their mind" }'

200 { "ok": true, "order_id": "…", "status": "cancelled", "credit_refunded": 195.19 }
409 { "error": "not_cancellable", "message": "...", "status": "shipped" }
409 { "error": "already_cancelled", "status": "cancelled" }
  • Only orders that have not had a label created, shipped, or been sent to fulfillment can be cancelled.
  • On success, inventory is returned to stock and the charged amount is refunded to your credit balance.
  • An order.cancelled webhook is sent if you have webhooks configured.

Errors

401 unauthorized       — missing/invalid/revoked API key
422 validation_error   — body failed schema validation (see "issues")
422 unknown_sku        — one or more SKUs are not in our catalog
500 server_error       — unexpected error (safe to retry with backoff)