Create, retrieve, and manage customer orders
API Reference//
- Get Protocol Details
Create a New Protocol
List Protocols
Update Protocol
Delete Protocol
Get Protocol Details
Order Fulfillment API (1.0.2)
API for creating/managing supplements orders within the Juniper Health platform.
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_SECRETResponse:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600,
"token_type": "Bearer"
}Include the token in API requests using the Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKENDownload OpenAPI description
Overview
Juniper Health Engineering Team
Languages
Servers
Sandbox API Server for testing
https://api.fulfillment.sandbox.juniperhealth.com
Production API Server
https://api.fulfillment.juniperhealth.com
Bodyapplication/jsonrequired
Customer information for the protocol
Physical address information
Secondary address line (optional)
Example: "Suite 100"
Products included in the protocol
Description of the product packaging
Example: "Whole Body Wellness"
Shipping method for the protocol
Enum"STANDARD""EXPRESS""OVERNIGHT"
Example: "STANDARD"
- Sandbox API Server for testinghttps://api.fulfillment.sandbox.juniperhealth.com/protocols
- Production API Serverhttps://api.fulfillment.juniperhealth.com/protocols
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.fulfillment.sandbox.juniperhealth.com/protocols \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"customer": {
"sourceId": "1234567890",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"address": {
"line1": "437 Lytton",
"line2": "Suite 100",
"city": "Palo Alto",
"state": "CA",
"zipCode": "94301"
}
},
"daysSupply": 30,
"lineItems": [
{
"productId": 77123129891,
"quantity": 2,
"packDescription": "Whole Body Wellness",
"administration": {
"morning": 1,
"afternoon": 0,
"evening": 1,
"sleep": 0
}
}
],
"shippingMethod": "STANDARD",
"orderType": "SUBSCRIPTION"
}'Response
application/json
{ "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A", "customer": { "sourceId": "1234567890", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890", "address": { … } }, "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" }
- Sandbox API Server for testinghttps://api.fulfillment.sandbox.juniperhealth.com/protocols
- Production API Serverhttps://api.fulfillment.juniperhealth.com/protocols
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.fulfillment.sandbox.juniperhealth.com/protocols?limit=10&cursor=string&direction=next&search=John+Doe' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "protocols": [ { … } ], "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
- Sandbox API Server for testinghttps://api.fulfillment.sandbox.juniperhealth.com/protocols/{protocolId}
- Production API Serverhttps://api.fulfillment.juniperhealth.com/protocols/{protocolId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.fulfillment.sandbox.juniperhealth.com/protocols/2vTgd30JFgnwLrgb383PcV9Rken \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A", "customer": { "sourceId": "1234567890", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890", "address": { … } }, "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" }
Bodyapplication/jsonrequired
Customer information for the protocol
Physical address information
Secondary address line (optional)
Example: "Suite 100"
Products included in the protocol
Description of the product packaging
Example: "Whole Body Wellness"
Shipping method for the protocol
Enum"STANDARD""EXPRESS""OVERNIGHT"
Example: "STANDARD"
- Sandbox API Server for testinghttps://api.fulfillment.sandbox.juniperhealth.com/protocols/{protocolId}
- Production API Serverhttps://api.fulfillment.juniperhealth.com/protocols/{protocolId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://api.fulfillment.sandbox.juniperhealth.com/protocols/2vTgd30JFgnwLrgb383PcV9Rken \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"customer": {
"sourceId": "1234567890",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"address": {
"line1": "437 Lytton",
"line2": "Suite 100",
"city": "Palo Alto",
"state": "CA",
"zipCode": "94301"
}
},
"daysSupply": 30,
"lineItems": [
{
"productId": 77123129891,
"quantity": 2,
"packDescription": "Whole Body Wellness",
"administration": {
"morning": 1,
"afternoon": 0,
"evening": 1,
"sleep": 0
}
}
],
"shippingMethod": "STANDARD",
"orderType": "SUBSCRIPTION"
}'Response
application/json
{ "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A", "customer": { "sourceId": "1234567890", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890", "address": { … } }, "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" }
- Sandbox API Server for testinghttps://api.fulfillment.sandbox.juniperhealth.com/protocols/{protocolId}
- Production API Serverhttps://api.fulfillment.juniperhealth.com/protocols/{protocolId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://api.fulfillment.sandbox.juniperhealth.com/protocols/2vTgd30JFgnwLrgb383PcV9Rken \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "protocolId": "2vTgd30JFgnwLrgb383PcV9Rken", "message": "Protocol deleted successfully" }