Skip to main content
PUT
/
api
/
v1
/
orders
/
{order_id}
Update an order
curl --request PUT \
  --url https://api.byblend.com/api/v1/orders/{order_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": {
    "address_1": "140 Lindgren Streets",
    "city": "North Consueloburgh",
    "state": "CA",
    "zip_code": "02108",
    "address_2": "Apt 227",
    "country": "US"
  },
  "custom_shipping": {
    "label_url": "https://example.com/label.pdf",
    "tracking_number": "TEST123456",
    "tracking_url": "https://example.com/track/TEST123456",
    "carrier": "UPS"
  },
  "external_id": "my-system-128318AA2",
  "shipping": {
    "carrier": "usps",
    "service_level": "usps_ground_advantage"
  }
}
'
{
  "id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
  "created_at": "2025-03-15T12:00:00Z",
  "updated_at": "2025-03-15T12:00:00Z",
  "address": {
    "id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
    "address_1": "140 Lindgren Streets",
    "address_2": "Apt 227",
    "city": "North Consueloburgh",
    "state": "CA",
    "country": "US",
    "type": "shipping",
    "zip_code": "02108"
  },
  "custom_shipping": {
    "label_url": "https://example.com/label.pdf",
    "tracking_number": "TEST123456",
    "tracking_url": "https://example.com/track/TEST123456",
    "carrier": "UPS"
  },
  "customer_id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
  "external_id": "my-system-128318AA2",
  "is_replacement": false,
  "order_number": "ORD250312003548IAU4",
  "original_order_id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
  "patient": {
    "id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
    "created_at": "2025-03-15T12:00:00Z",
    "updated_at": "2025-03-15T12:00:00Z",
    "first_name": "Willard",
    "middle_name": "Moises",
    "last_name": "Donnelly",
    "gender": "male",
    "email": "[email protected]",
    "phone": "6417383445",
    "date_of_birth": "1990-01-01",
    "driver_license_number": "B49188319",
    "driver_license_state": "CA",
    "ssn": "123456789",
    "primary_language": "en",
    "guardian_name": "John Guardian",
    "guardian_phone": "6417383445",
    "guardian_email": "[email protected]",
    "guardian_relationship": "parent",
    "height_inches": 72,
    "weight_pounds": 180,
    "external_id": "1234567890",
    "is_smoker": false,
    "is_diabetic": false,
    "is_pregnant": false,
    "receive_sms": true,
    "receive_email": true,
    "address": {
      "address_1": "140 Lindgren Streets",
      "city": "North Consueloburgh",
      "state": "CA",
      "zip_code": "02108",
      "address_2": "Apt 227",
      "country": "US"
    }
  },
  "prescription_count": 1,
  "priority_requested": false,
  "replacement_order_ids": [
    "0227d1e5-ba9a-42b5-8fe2-38882aa65708"
  ],
  "replacement_reason": "Product arrived damaged",
  "replacement_requested": false,
  "replacement_request_status": "pending",
  "replacement_requested_at": "2025-01-01T00:00:00Z",
  "replacement_requested_reason": "Product arrived damaged",
  "shipments": [
    {
      "carrier": "USPS",
      "id": "0239CA06-9A71-4FFE-8A8D-5403540A19E7",
      "service_level": "Ground Advantage",
      "shipped_at": "2025-01-01T00:00:00Z",
      "tracking_number": "9200190347375200467807",
      "tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9200190347375200467807"
    }
  ],
  "shipping": {
    "carrier": "usps",
    "service_level": "usps_ground_advantage"
  },
  "status": "received",
  "products": {
    "prescription": [
      {
        "id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
        "created_at": "2025-03-15T12:00:00Z",
        "updated_at": "2025-03-15T12:00:00Z",
        "sku": "1234567890",
        "name": "Mupirocin",
        "description": "A topical cream that is used to treat skin infections.",
        "product_code": "SUPERSPRAY15",
        "category": "topicals",
        "form": "cream",
        "is_active": true,
        "label_orientation": "portrait",
        "strength": "1%",
        "has_prescription": true,
        "quantity": 2,
        "reasons": [
          {
            "id": "00000000-0000-0000-0000-000000000201",
            "name": "Palatability",
            "description": "Commercial formulation has an unpleasant taste, texture, or odor."
          }
        ]
      }
    ],
    "non_prescription": [
      {
        "id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
        "created_at": "2025-03-15T12:00:00Z",
        "updated_at": "2025-03-15T12:00:00Z",
        "sku": "1234567890",
        "name": "Krill Farms Fish Oil",
        "description": "A fish oil supplement complementary to prescribed products.",
        "category": "nutrition",
        "form": "liquid",
        "is_active": true,
        "quantity": 1
      }
    ],
    "order_material": [
      {
        "id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
        "created_at": "2025-03-15T12:00:00Z",
        "updated_at": "2025-03-15T12:00:00Z",
        "sku": "1234567890",
        "name": "Referral Brochure",
        "description": "Customer brochure included in every shipment.",
        "category": "marketing",
        "current_stock": 927,
        "reorder_threshold": 100,
        "has_inventory": true,
        "is_global": false,
        "quantity": 1
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

order_id
string
required

Unique identifier for the order, either UUID, order number (e.g. ORD250312003548IAU4), or external ID (e.g. my-system-128318AA2) if you have provided one during order creation or a prior update.

Query Parameters

update_patient
boolean

Whether to update the patient's address. Default is false.

Example:

true

Body

application/json
address
object
custom_shipping
object

Custom shipping details for the order. Your account must have custom shipping enabled to use this field.

external_id
string

External (your own system's) ID to associate with the order.

Example:

"my-system-128318AA2"

shipping
object

Shipping preferences for the order. Please ensure you have established the ability to use this feature with Blend administrators before using.

You may provide one or both fields. If you provide a "generic" service_level only, we will use the most appropriate carrier to match the service level. If you provide both, your service_level prefix ("usps_") must match your carrier.

Available carriers and service levels can be found in the Shipping Options endpoint.

Response

200 - application/json

Order updated successfully

id
string<uuid>

Unique identifier

Example:

"0227d1e5-ba9a-42b5-8fe2-38882aa65708"

created_at
string<date-time>

Date and time of creation

Example:

"2025-03-15T12:00:00Z"

updated_at
string<date-time>

Date and time of last update

Example:

"2025-03-15T12:00:00Z"

address
object
custom_shipping
object

Custom shipping details for the order if your account has custom shipping enabled, and you have provided prepaid label details.

customer_id
string<uuid>
Example:

"b658f16f-819c-4503-aede-bd555fc4ebfb"

external_id
string

External (your own system's) ID associated with the order.

Example:

"my-system-128318AA2"

is_replacement
boolean

Whether the order is a replacement order

Example:

false

order_number
string

Friendlier identifier for the order. Auto-generated.

Example:

"ORD250312003548IAU4"

original_order_id
string<uuid>

ID of the original order, if this is a replacement order

Example:

"0227d1e5-ba9a-42b5-8fe2-38882aa65708"

patient
object
prescription_count
integer

Number of prescriptions associated with the order (expected to be the same as the number of prescription products in the products object)

Example:

1

priority_requested
boolean

Whether the order has a priority request

Example:

false

replacement_order_ids
string<uuid>[]

IDs of any replacement orders, if they have been created from this order

replacement_reason
string

If this is a replacement order, reason for the replacement

Example:

"Product arrived damaged"

replacement_requested
boolean

Whether the order has a replacement request. This field is deprecated and will be removed in a future version. Please use replacement_request_status instead.

Example:

false

replacement_request_status
enum<string>

Status of the replacement request

Available options:
pending,
fulfilled,
declined,
cancelled
Example:

"pending"

replacement_requested_at
string

Date and time a replacement request was made

Example:

"2025-01-01T00:00:00Z"

replacement_requested_reason
string

Reason for the replacement request

Example:

"Product arrived damaged"

shipments
object[]
shipping
object
status
string
Example:

"received"

products
object