Skip to content

Order Fulfillment API (1.0.2)

API for creating/managing supplements orders within the Juniper Health 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
Download OpenAPI description
Overview
Juniper Health Engineering Team
Languages
Servers
Sandbox API Server for testing
https://api.fulfillment.sandbox.juniperhealth.com/v1
Production API Server
https://api.fulfillment.juniperhealth.com/v1

Create, retrieve, and manage customer orders

Operations

Create and manage reusable order protocols/templates

Operations

Access product catalog and inventory details

Operations

Retrieve available shipping methods

Operations

Manage partner account settings and branding

Operations

Request

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

Security
oauth2ClientCredentials
curl -i -X GET \
  https://api.fulfillment.sandbox.juniperhealth.com/v1/partners/settings \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successfully retrieved partner settings

Bodyapplication/json
idstring

Unique partner identifier (read-only)

Example: "2NxK7vPqYtR5mJnLkH3wZcB"
namestring

Partner name (read-only)

Example: "Acme Health"
descriptionstring

Partner description

Example: "Leading telehealth provider"
discountstring

Human readable discount representation

Example: "10%"
discountValuenumber

Numeric discount value (0.0 to 1.0)

Example: 0.1
primaryColorstring

Primary brand color (hex code)

Example: "#1a73e8"
secondaryColorstring

Secondary brand color (hex code)

Example: "#ffffff"
logostring

URL or key of partner logo

Example: "https://example.com/logo.png"
phonestring

Partner phone number

Example: "555-123-4567"
supportEmailstring(email)

Support email address

Example: "support@partner.com"
websitestring(uri)

Partner website URL

Example: "https://partner.com"
webhookUrlstring(uri)

Webhook URL for order status notifications

Example: "https://partner.com/webhooks/orders"
billingAddressLine1string

Billing address line 1

Example: "123 Main St"
billingAddressLine2string

Billing address line 2

Example: "Suite 100"
billingCitystring

Billing city

Example: "San Francisco"
billingStatestring

Billing state/province

Example: "CA"
billingPostalCodestring

Billing postal/zip code

Example: "94102"
billingCountrystring

Billing country

Example: "US"
createdAtstring(date-time)

Partner creation timestamp

Example: "2023-10-01T12:00:00Z"
updatedAtstring(date-time)

Partner last update timestamp

Example: "2023-10-01T12:00:00Z"
Response
application/json
{ "id": "2NxK7vPqYtR5mJnLkH3wZcB", "name": "Acme Health", "description": "Leading telehealth provider", "discount": "10%", "discountValue": 0.1, "primaryColor": "#1a73e8", "secondaryColor": "#ffffff", "logo": "https://example.com/logo.png", "phone": "555-123-4567", "supportEmail": "support@partner.com", "website": "https://partner.com", "webhookUrl": "https://partner.com/webhooks/orders", "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" }

Request

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

Security
oauth2ClientCredentials
Bodyapplication/jsonrequired
primaryColorstring

Primary brand color (hex code)

Example: "#1a73e8"
secondaryColorstring

Secondary brand color (hex code)

Example: "#ffffff"
logostring

URL or key of partner logo

Example: "https://example.com/logo.png"
phonestring

Partner phone number

Example: "555-123-4567"
supportEmailstring(email)

Support email address

Example: "support@partner.com"
websitestring(uri)

Partner website URL

Example: "https://partner.com"
webhookUrlstring(uri)

Webhook URL for order status notifications

Example: "https://partner.com/webhooks/orders"
billingAddressLine1string

Billing address line 1

Example: "123 Main St"
billingAddressLine2string

Billing address line 2

Example: "Suite 100"
billingCitystring

Billing city

Example: "San Francisco"
billingStatestring

Billing state/province

Example: "CA"
billingPostalCodestring

Billing postal/zip code

Example: "94102"
billingCountrystring

Billing country

Example: "US"
curl -i -X PATCH \
  https://api.fulfillment.sandbox.juniperhealth.com/v1/partners/settings \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "primaryColor": "#1a73e8",
    "secondaryColor": "#ffffff",
    "logo": "https://example.com/logo.png",
    "phone": "555-123-4567",
    "supportEmail": "support@partner.com",
    "website": "https://partner.com",
    "webhookUrl": "https://partner.com/webhooks/orders",
    "billingAddressLine1": "123 Main St",
    "billingAddressLine2": "Suite 100",
    "billingCity": "San Francisco",
    "billingState": "CA",
    "billingPostalCode": "94102",
    "billingCountry": "US"
  }'

Responses

Partner settings updated successfully

Bodyapplication/json
idstring

Unique partner identifier (read-only)

Example: "2NxK7vPqYtR5mJnLkH3wZcB"
namestring

Partner name (read-only)

Example: "Acme Health"
descriptionstring

Partner description

Example: "Leading telehealth provider"
discountstring

Human readable discount representation

Example: "10%"
discountValuenumber

Numeric discount value (0.0 to 1.0)

Example: 0.1
primaryColorstring

Primary brand color (hex code)

Example: "#1a73e8"
secondaryColorstring

Secondary brand color (hex code)

Example: "#ffffff"
logostring

URL or key of partner logo

Example: "https://example.com/logo.png"
phonestring

Partner phone number

Example: "555-123-4567"
supportEmailstring(email)

Support email address

Example: "support@partner.com"
websitestring(uri)

Partner website URL

Example: "https://partner.com"
webhookUrlstring(uri)

Webhook URL for order status notifications

Example: "https://partner.com/webhooks/orders"
billingAddressLine1string

Billing address line 1

Example: "123 Main St"
billingAddressLine2string

Billing address line 2

Example: "Suite 100"
billingCitystring

Billing city

Example: "San Francisco"
billingStatestring

Billing state/province

Example: "CA"
billingPostalCodestring

Billing postal/zip code

Example: "94102"
billingCountrystring

Billing country

Example: "US"
createdAtstring(date-time)

Partner creation timestamp

Example: "2023-10-01T12:00:00Z"
updatedAtstring(date-time)

Partner last update timestamp

Example: "2023-10-01T12:00:00Z"
Response
application/json
{ "id": "2NxK7vPqYtR5mJnLkH3wZcB", "name": "Acme Health", "description": "Leading telehealth provider", "discount": "10%", "discountValue": 0.1, "primaryColor": "#1a73e8", "secondaryColor": "#ffffff", "logo": "https://example.com/logo.png", "phone": "555-123-4567", "supportEmail": "support@partner.com", "website": "https://partner.com", "webhookUrl": "https://partner.com/webhooks/orders", "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" }

Request

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.

Security
oauth2ClientCredentials
curl -i -X GET \
  https://api.fulfillment.sandbox.juniperhealth.com/v1/partners/settings/webhook-secret \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successfully retrieved webhook secret

Bodyapplication/json
webhookSecretstringrequired

The newly generated webhook secret

Example: "9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e"
Response
application/json
{ "webhookSecret": "9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e" }

Request

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

Security
oauth2ClientCredentials
curl -i -X POST \
  https://api.fulfillment.sandbox.juniperhealth.com/v1/partners/settings/rotate-webhook-secret \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successfully rotated webhook secret

Bodyapplication/json
webhookSecretstringrequired

The newly generated webhook secret

Example: "9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e"
Response
application/json
{ "webhookSecret": "9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e" }