Skip to content

Order Fulfillment API (1.0.1)

API for managing healthcare product orders and inventory within the Juniper Health network.

Download OpenAPI description
Overview
Juniper Health Engineering Team

engineering@juniperhealth.com

Terms of Service

Languages
Servers
Sandbox API Server for testing

https://api.fulfillment.sandbox.juniperhealth.com/v1/

Sandbox Auth Server for testing

https://auth.fulfillment.sandbox.juniperhealth.com/oauth2/token/

Production API Server

https://api.fulfillment.juniperhealth.com/v1/

Production Auth Server

https://auth.fulfillment.juniperhealth.com/oauth2/token/

Authentication

OAuth 2.0 token management

Operations

Orders

Create, retrieve, and manage customer orders

Operations

Request

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

Security
oauth2ClientCredentials
Bodyapplication/jsonrequired

Order details to be created in the system

customerobjectrequired

Customer information for the order

customer.​sourceIdstringrequired

Unique customer identifier in your system

Example: "1234567890"
customer.​firstNamestringrequired

Customer's first name

Example: "John"
customer.​lastNamestringrequired

Customer's last name

Example: "Doe"
customer.​emailstring(email)

Customer's email address

Example: "john.doe@example.com"
customer.​phonestring

Customer's phone number

Example: "1234567890"
customer.​addressobject(Address)required

Physical address information

customer.​address.​line1string<= 100 charactersrequired

Primary address line

Example: "437 Lytton"
customer.​address.​line2string<= 100 characters

Secondary address line (optional)

Example: "Suite 100"
customer.​address.​citystring<= 50 charactersrequired

City name

Example: "Palo Alto"
customer.​address.​statestring= 2 charactersrequired

State or province code

Example: "CA"
customer.​address.​zipstring^\d{5}(-\d{4})?$required

Postal/ZIP code

Example: "94301"
daysSupplyintegerrequired

Number of days the order is intended to supply

Enum306090
lineItemsArray of objectsnon-emptyrequired

Products included in the order

lineItems[].​productIdintegerrequired

Unique identifier of the product

Example: 77123129891
lineItems[].​quantityinteger>= 1required

Quantity of the product

Example: 2
lineItems[].​packDescriptionstringrequired

Description of the product packaging

Example: "Whole Body Wellness"
lineItems[].​administrationobject(Administration)

Dosage schedule information

shippingMethodstringrequired

Shipping method for the order

Enum"STANDARD""EXPRESS""OVERNIGHT"
Example: "STANDARD"
orderTypestringrequired

Type or order (this is currently only used for inventory forecasting by Juniper)

Enum"ONE_TIME""SUBSCRIPTION"
Example: "ONE_TIME"
curl -i -X POST \
  https://api.fulfillment.sandbox.juniperhealth.com/v1/orders \
  -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",
        "zip": "94301"
      }
    },
    "daysSupply": 30,
    "lineItems": [
      {
        "productId": 77123129891,
        "quantity": 2,
        "packDescription": "Whole Body Wellness",
        "administration": {
          "morning": 1,
          "afternoon": 0,
          "evening": 1,
          "sleep": 0
        }
      }
    ],
    "shippingMethod": "STANDARD",
    "orderType": "ONE_TIME"
  }'

Responses

Order successfully created

Bodyapplication/json
idstring

Unique order identifier

Example: "2vSGym0bH8qVEwCIGlyFoRgJq1A"
discountstring

Discount percentage applied to the order

Example: "10%"
daysSupplyinteger

Number of days the order is intended to supply

Example: 30
orderTypestring

Order type (one-time or subscription)

Enum"ONE-TIME""SUBSCRIPTION"
Example: "SUBSCRIPTION"
shippingMethodstring

Selected shipping method

Enum"STANDARD""EXPRESS""OVERNIGHT"
Example: "STANDARD"
statusstring

Current status of the order

Enum"CREATED""CANCELLED""PROCESSING""FULFILLED""AWAITING_SHIPMENT""SHIPPED"
Example: "CREATED"
fulfillmentInfoobject

Details about the order fulfillment process

lineItemsArray of objects

Products included in the order

customerobject(Customer)

Customer information

subtotalPricestring

Order subtotal amount

Example: "30.00"
totalDiscountstring

Order subtotal amount

Example: "27.00"
totalFeesstring

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

Example: "5.00"
totalShippingstring

Shipping cost

Example: "9.99"
totalVolumeDiscountstring

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

Example: "12.10"
totalPricestring

Total order amount (subtotal + shipping)

Example: "36.99"
createdAtstring(date-time)

Order creation timestamp

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

Order last update timestamp

Example: "2023-10-01T12:00:00Z"
Response
application/json
{ "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A", "discount": "10%", "daysSupply": 30, "orderType": "SUBSCRIPTION", "shippingMethod": "STANDARD", "status": "CREATED", "fulfillmentInfo": { "carrier": "UPS", "trackingNumber": "1Z9999999999999999" }, "lineItems": [ {} ], "customer": { "sourceId": "1234567890", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890", "address": {} }, "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" }

Request

Retrieve a list of orders with optional filtering

Security
oauth2ClientCredentials
Query
limitinteger[ 1 .. 100 ]

Maximum number of results per page

Default 10
cursorstring

Pagination cursor for retrieving next/previous page

directionstring

Direction for pagination (next or previous)

Enum"next""previous"
statusstring

Filter orders by status

Enum"CREATED""CANCELLED""PROCESSING""FULFILLED""AWAITING_SHIPMENT""SHIPPED"
curl -i -X GET \
  'https://api.fulfillment.sandbox.juniperhealth.com/v1/orders?limit=10&cursor=string&direction=next&status=CREATED' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successfully retrieved orders

Bodyapplication/json
ordersArray of objects(Order)
cursorstring(Cursor)

Pagination cursor for retrieving next/previous page

Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Response
application/json
{ "orders": [ {} ], "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }

Request

Get detailed information for a specific order

Security
oauth2ClientCredentials
Path
orderIdstringrequired
Example: 77123129891
curl -i -X GET \
  https://api.fulfillment.sandbox.juniperhealth.com/v1/orders/77123129891 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successfully retrieved order details

Bodyapplication/json
idstring

Unique order identifier

Example: "2vSGym0bH8qVEwCIGlyFoRgJq1A"
discountstring

Discount percentage applied to the order

Example: "10%"
daysSupplyinteger

Number of days the order is intended to supply

Example: 30
orderTypestring

Order type (one-time or subscription)

Enum"ONE-TIME""SUBSCRIPTION"
Example: "SUBSCRIPTION"
shippingMethodstring

Selected shipping method

Enum"STANDARD""EXPRESS""OVERNIGHT"
Example: "STANDARD"
statusstring

Current status of the order

Enum"CREATED""CANCELLED""PROCESSING""FULFILLED""AWAITING_SHIPMENT""SHIPPED"
Example: "CREATED"
fulfillmentInfoobject

Details about the order fulfillment process

lineItemsArray of objects

Products included in the order

customerobject(Customer)

Customer information

subtotalPricestring

Order subtotal amount

Example: "30.00"
totalDiscountstring

Order subtotal amount

Example: "27.00"
totalFeesstring

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

Example: "5.00"
totalShippingstring

Shipping cost

Example: "9.99"
totalVolumeDiscountstring

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

Example: "12.10"
totalPricestring

Total order amount (subtotal + shipping)

Example: "36.99"
createdAtstring(date-time)

Order creation timestamp

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

Order last update timestamp

Example: "2023-10-01T12:00:00Z"
Response
application/json
{ "id": "2vSGym0bH8qVEwCIGlyFoRgJq1A", "discount": "10%", "daysSupply": 30, "orderType": "SUBSCRIPTION", "shippingMethod": "STANDARD", "status": "CREATED", "fulfillmentInfo": { "carrier": "UPS", "trackingNumber": "1Z9999999999999999" }, "lineItems": [ {} ], "customer": { "sourceId": "1234567890", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890", "address": {} }, "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" }

Request

Cancel an order that has not yet entered processing

Security
oauth2ClientCredentials
Path
orderIdstringrequired
Example: 2vTgd30JFgnwLrgb383PcV9Rken
curl -i -X GET \
  https://api.fulfillment.sandbox.juniperhealth.com/v1/orders/2vTgd30JFgnwLrgb383PcV9Rken/cancel \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Order successfully cancelled

Bodyapplication/json
order_idstring

ID of the cancelled order

Example: "2vTYQiGzufR4cn1cloW97DtSOYF"
statusstring

order status

Example: "Cancelled"
Response
application/json
{ "order_id": "2vTYQiGzufR4cn1cloW97DtSOYF", "status": "Cancelled" }

Products

Access product catalog and inventory details

Operations

Shipping

Retrieve available shipping methods

Operations