Skip to content

Order Management

This section contains all APIs related to order management, including sending prescription orders to pharmacy portals and receiving real-time status updates via webhooks.


Overview

The Order Management APIs enable telehealth companies to seamlessly integrate with Bridge Health's pharmacy portal system. These APIs facilitate the electronic exchange of prescription order identifiers and provide real-time visibility into the fulfillment process, while maintaining security by avoiding the transmission of Protected Health Information (PHI) through the API.

The Order Management system uses a hybrid approach that combines API-based order tracking with secure fax/eRx transmission:

  1. Sending Orders to Pharmacy Portal - Telehealth companies submit order identifiers electronically to the pharmacy portal via API (CBO, Pharmacy, Order ID, Rx Number, THCo Patient ID, Order Type - no PHI). Simultaneously, patient profile, insurance, and encounter information are sent via fax and eRx to the pharmacy. Pharmacy staff use the Order ID and Rx Number from the API call to match the order in the portal with the prescription order information received via fax/eRx, completing the fulfillment process.

  2. Receiving Order Status Updates - Telehealth companies receive real-time status updates via webhooks as orders progress through the pharmacy's standardized fulfillment workflow. This provides complete transparency into order processing, from initial receipt through shipment.

This system supports Bridge Health's strategic objectives of standardizing pharmacy fulfillment workflows, scaling to additional CBO pharmacies, and meeting the expectations of enterprise telehealth partners who require reliable visibility into downstream fulfillment processes.


API Integration Points & Workflow

The Order Management workflow follows a standardized process that ensures consistent execution across all CBO pharmacies:

Workflow Overview

The order fulfillment process consists of two main flows:

1. Order Submission Flow

When a telehealth company sends an order:

  1. Telehealth Company → Sends POST /order to Bridge Health API with order identifiers (CBO, Pharmacy, Rx Number, THCo Patient ID, Order Type - no PHI)
  2. Telehealth Company → Simultaneously sends patient profile, insurance, and encounter information via fax and eRx to the CBO Pharmacy
  3. Bridge Health API → Validates the order and forwards it to the Pharmacy Portal
  4. Pharmacy Portal → Places the order in the pharmacy's work queue
  5. Bridge Health API → Returns 200 OK to the Telehealth Company with status "Order Placed"
  6. CBO Pharmacy Staff → Uses the Order ID and Rx Number from the portal to match the API order with the prescription order information received via fax/eRx to complete fulfillment

2. Status Update Flow

As the pharmacy processes the order, status updates are sent via webhooks:

  1. CBO Pharmacy → Processes the order through the Pharmacy Portal (verification, preparation, etc.)
  2. Pharmacy Portal → Updates order status and notifies Bridge Health API
  3. Bridge Health API → Sends HTTP POST webhook to Telehealth Company's Webhook Endpoint with updated status
  4. Telehealth Company → Receives status update and processes it (returns 200 OK to acknowledge)

This process repeats for each status change: Order PlacedReady to ShipShipped (or Cancelled if applicable).

Order Status Lifecycle

Orders progress through the following statuses as they move through the pharmacy fulfillment workflow:

  1. Order Placed - The order has been successfully sent to the pharmacy and is processing. Initial validation has been completed.

  2. Ready to Ship - The order has been fully processed by the pharmacy (including benefits verification, payment collection if applicable, and medication preparation) and is ready for shipment.

  3. Shipped - The order has been picked up by the carrier and a tracking number is available. This status includes tracking information for the telehealth company to provide to patients.

  4. Cancelled - The order has been cancelled and will not be fulfilled. This status includes a cancellation reason when available.

Integration Requirements

  • Authentication: All API requests require a valid Bearer token obtained through the Authentication API (see Authentication).
  • Webhook Configuration: Telehealth companies may provide a webhook URL endpoint that can receive HTTP POST requests with order status updates.
  • Data Security: Orders are submitted without PHI through the API. Patient profile, insurance, and encounter information are transmitted separately via fax and eRx. Pharmacy staff match the API order (using Order ID and Rx Number) with the fax/eRx information to complete fulfillment, maintaining security while enabling order status transparency.

POST /order

  • Purpose: Send a prescription order to the pharmacy portal for fulfillment
  • Auth: Authorization: Bearer <access_token>
  • Content-Type: application/json
  • Base URL: https://sandbox-api.bridgehealthhub.com

Request body schema

Field Type Required Example Notes
cbo integer Yes 1 CBO identifier
pharmacy integer Yes 1 Pharmacy identifier
rxNumber string Yes "RX123456" Prescription number
thcoPatientId string Yes "THCO-12345" Telehealth company's patient identifier
orderType string Yes "New Patient" Enum: "New Patient" | "Renewal Rx" | "Refill"

Important: This API does not include Protected Health Information (PHI) in the payload. Patient profile, insurance, and encounter information are sent separately via fax and eRx to the pharmacy. Pharmacy staff use the Order ID and Rx Number provided in this API call to match the order in the portal with the prescription order information received via fax/eRx, enabling fulfillment while maintaining security and order status transparency.

Request example

{
  "cbo": 1,
  "pharmacy": 1,
  "rxNumber": "RX123456",
  "thcoPatientId": "THCO-12345",
  "orderType": "New Patient"
}

Success response 200 OK

{
    "data": {
        "createdDate": "2026-01-01T10:30:00Z",
        "orderId": "1",
        "status": "Placed"
    },
    "message": "Order successfully placed",
    "success": true
}
Field Type Notes
data.orderId string The order ID that was submitted
data.status string Initial status: "Order Placed"
data.timestamp string ISO 8601 timestamp of order placement
data.cbo integer CBO identifier
data.pharmacy integer Pharmacy identifier
data.rxNumber string Prescription number

Error responses

400 Bad Request

This error occurs when required fields are missing or invalid (e.g., invalid orderType value).

{
    "error": {
        "code": "BAD_REQUEST",
        "details": "Invalid orderType. Must be one of: New Patient, Renewal Rx, Refill"
    },
    "message": "Bad request",
    "success": false
}

401 Unauthorized

This error occurs when there is a missing or invalid bearer token (see Authentication).

{
    "error": {
        "code": "UNAUTHORIZED",
        "details": "Invalid or expired token"
    },
    "message": "Unauthorized",
    "success": false
}

409 Conflict

This error occurs when an order with the same orderId has already been submitted.

{
    "error": {
        "code": "CONFLICT",
        "details": "Order with orderId 'ORD-2024-001' already exists"
    },
    "message": "Conflict",
    "success": false
}

Code examples

curl

curl --location 'https://sandbox-api.bridgehealthhub.com/order' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
    "cbo": 1,
    "pharmacy": 1,
    "rxNumber": "RX123456",
    "thcoPatientId": "THCO-12345",
    "orderType": "New Patient"
}'

Webhooks

Order status updates are delivered to telehealth companies via webhooks. When an order's status changes in the pharmacy portal, Bridge Health will send an HTTP POST request to the configured webhook URL with reference to the updated order.

Configuration

To utilize the webhook systems, you must have:

  • Publicly accessible HTTPS endpoint
  • Server capable of receiving POST requests
  • The ability to verify HMAC-SHA256 signatures (if you intend to verify messages)

Supported events

Status Description
order.placed The order has been sent to the pharmacy and is processing. Initial validation has been completed.
order.ready_to_ship The order has been fully processed and is ready to ship. All fulfillment steps have been completed.
order.shipped The order has been picked up by the carrier and a tracking number is available.
order.cancelled The order has been cancelled and will not be fulfilled.

Note: All events are sent to the same webhook endpoint. Use the event type in the payload to determine which action to take.

Response schema

Webhook payloads follow a consistent structure:

Field Type Description
event string Event type (see Supported events below)
timestamp string ISO 8601 timestamp of the event
data object Event-specific data. Currently contains order_id; additional fields may be added in the future.

Note: Use the order_id from the webhook payload to query the API for additional order details if needed.

Example response

{
  "event": "order.shipped",
  "timestamp": "2026-01-01T12:00:00Z",
  "data": {
    "order_id": "12345"
  }
}

Optional message verification

Since webhook endpoints are publicly accessible and do not have authentication, Bridge can provide you with a secret that we will use to generate a secure signature for each request body. We'll include that signature in a header for you to verify. To verify the signature, you will:

  1. Extract the signature from the X-Webhook-Signature header
  2. Compute HMAC-SHA256 of the request body using your webhook secret
  3. Compare the computed signature with the header value
  4. Only process the webhook if signatures match

See your SDK documentation for signature verification examples in your preferred language.