SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Orders API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Order
    Get list of ordersUpdate ordersGet order

Order

An order is one shipment due to a customer. Each order carries the delivery address, the customer, the subscription it came from (if any) and its line items, so one call gives you all you need to ship it.

Endpoints
  • GET/orders
  • PATCH/orders
  • GET/orders/{id}

Get list of orders

GET /orders

An API endpoint to get a page of the orders of your shop. Archived orders are left out. Filter by status and by date range; order by id, due_date or created_on. Dates are in the timezone of your shop.

Query parameters

pageoptionalinteger

Page number

Defaults to 1.

per_pageoptionalinteger

Orders per page

Defaults to 15.

order_byoptionalstring

Field to order by

Possible values: id, due_date, created_on.

Defaults to "id".

directionoptionalstring

Order direction

Possible values: asc, desc.

Defaults to "asc".

statusoptionalOrderStatusName

Only orders with this status

Possible values: awaiting_delivery, shipped, returned, dispute, future_shipment, cancelled, payment_failed.

idoptionalinteger

Only the order with this ID

start_created_onoptionalstring

Only orders created at or after this date and time

Format: Y-m-d\TH:i:s.

end_created_onoptionalstring

Only orders created at or before this date and time

Format: Y-m-d\TH:i:s.

start_due_dateoptionalstring

Only orders due at or after this date and time

Format: Y-m-d\TH:i:s.

end_due_dateoptionalstring

Only orders due at or before this date and time

Format: Y-m-d\TH:i:s.

ReturnsOrderList

A page of orders

Error responses

401Message

The API key is missing or wrong

422ValidationError

The body or the query failed validation

curl https://www.subbly.co/api/v1/orders \ -H 'Authorization: Bearer <access-token>'
Response
{ "data": [ { "id": 808256, "internal_id": "1808256", "customer_order_number": 746, "subscription_order_number": 1, "status": 1, "status_name": null, "survey": null, "metadata": [ {} ], "created_on": "2026-09-04 08:44:23", "due_date": "2026-09-04 08:44:22", "subtotal": 20, "total": 20, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "shipping_cost": 1.5, "updated_on": "2026-09-04 08:44:23", "archived": 0, "is_gift": 0, "gift_message": "gift_message", "tax_amount": 0, "tax_rate": 0, "disputed": 0, "refunded": 0, "refunded_amount": 0, "exchange_rate": 1, "currency_code": "USD", "base_currency_code": "USD", "delivery_address": {}, "customer": {}, "shop": {}, "subscription": {}, "line_items": [ {} ], "tags": [ {} ], "shipping_items": [ {} ], "shipping_info": {} } ], "current_page": 1, "total": 32, "first": 1, "last": 3, "per_page": 15 }

Update orders

PATCH /orders

An API endpoint to update up to 50 orders in one call: set the status, the carrier and the tracking number. Send status: shipped with dispatch_shipped_email: 1 to also email the customer that the order shipped. Every order must belong to your shop, or the whole request fails validation.

Request body

idRequiredinteger[]

IDs of the orders to update, 50 at most

statusoptionalOrderStatusName

Status of an order

Possible values: awaiting_delivery, shipped, returned, dispute, future_shipment, cancelled, payment_failed.

dispatch_shipped_emailoptionalinteger

Send 1 with status: shipped to email the customer that the order shipped. Nothing is sent for other statuses or when the order did not change.

Possible values: 0, 1.

Defaults to 0.

carrieroptionalstring | null

Name of the carrier

carrier_serviceoptionalstring | null

Service of the carrier, e.g. Express

tracking_numberoptionalstring | null

ReturnsMessage

The orders were updated

messagestring

Error responses

401Message

The API key is missing or wrong

422ValidationError

The body or the query failed validation

curl -X PATCH https://www.subbly.co/api/v1/orders \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "id": [ 808256 ], "status": "shipped", "dispatch_shipped_email": 1, "carrier": "DHL", "carrier_service": "Express", "tracking_number": "JD014600003448270123" }'
Response
{ "message": "Successfully updated" }

Get order

GET /orders/{id}

An API endpoint to get one order by ID, with its delivery address, customer, subscription, line items and shipping method.

Path parameters

idRequiredinteger

Order ID

ReturnsOrder

The order

Error responses

401Message

The API key is missing or wrong

404Message

No order with this ID in your shop

curl https://www.subbly.co/api/v1/orders/{id} \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 808256, "internal_id": "1808256", "customer_order_number": 746, "subscription_order_number": 1, "status": 1, "status_name": "awaiting_delivery", "survey": null, "metadata": [ { "id": 1, "name": "name", "slug": "slug", "description": "description", "unit": "unit", "data_type": "data_type", "preset": true, "multiple": true, "access_level": "access_level", "save_behavior": "save_behavior", "editable": true, "values": [ { "id": 1, "value": null } ] } ], "created_on": "2026-09-04 08:44:23", "due_date": "2026-09-04 08:44:22", "subtotal": 20, "total": 20, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "shipping_cost": 1.5, "updated_on": "2026-09-04 08:44:23", "archived": 0, "is_gift": 0, "gift_message": "gift_message", "tax_amount": 0, "tax_rate": 0, "disputed": 0, "refunded": 0, "refunded_amount": 0, "exchange_rate": 1, "currency_code": "USD", "base_currency_code": "USD", "delivery_address": { "id": 54837, "first_name": "Jane", "last_name": "Doe", "phone": "+12125551234", "company_name": "company_name", "address_1": "1 Main St", "address_2": "address_2", "city": "New York", "state": "New York", "region_code": "NY", "zip": "10001", "country": "United States", "country_code": "US", "default": 0 }, "customer": { "id": 54213, "notes": "notes", "created_on": "2025-02-04 14:23:54", "marketing_consent": 1, "user": {}, "tags": [ {} ] }, "shop": { "country": {} }, "subscription": { "id": 1200000755, "active": 1, "past_due": "0", "created_on": "2026-09-04 08:44:21", "cancelled_on": "", "gift": 0, "gift_message": "gift_message", "status": "active", "next_payment_date": "2026-10-04 00:00:00", "currency_code": "USD", "base_currency_code": "USD", "items": [ {} ] }, "line_items": [ { "id": 207901, "order_id": 808256, "subscription_item_id": 542, "item_price": "10.00", "item_name": "Monthly box", "active": 1, "origin": "origin", "created_on": "2026-09-04 08:44:23", "updated_on": "2026-09-04 08:44:23", "quantity": 1, "survey": null, "product": {} } ], "tags": [ { "id": 1, "name": "name", "created_on": "created_on", "updated_on": "updated_on" } ], "shipping_items": [ { "id": 1, "order_id": 1, "inventory_item_id": 1, "quantity": 1, "created_on": "created_on", "updated_on": "updated_on", "deleted_on": "deleted_on", "item": {} } ], "shipping_info": { "id": 9, "type": "shipping_option", "method": {} } }
dataOrder[]
current_pageinteger
totalinteger

Number of orders that match, over every page

firstinteger

Number of the first page

lastinteger

Number of the last page

per_pageinteger
idinteger
internal_idstring
customer_order_numberinteger

Number of this order among the orders of the customer

subscription_order_numberinteger | null

Number of this order among the orders of the subscription; null for a one-time order

statusinteger

Status ID: 1 awaiting_delivery, 2 shipped, 3 returned, 4 dispute, 5 future_shipment, 6 cancelled, 7 payment_failed

status_nameOrderStatusName

Status of an order

Possible values: awaiting_delivery, shipped, returned, dispute, future_shipment, cancelled, payment_failed.

surveyany | null

Survey answers attached to the order, if any

metadataAttribute[]

Order-level attributes

created_onstring
due_datestring
subtotalnumber
totalnumber
carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
shipping_costnumber | null
updated_onstring
archivedinteger
is_giftinteger
gift_messagestring | null
tax_amountnumber
tax_ratenumber
disputedinteger
refundedinteger
refunded_amountnumber
exchange_ratenumber
currency_codestring
base_currency_codestring
delivery_addressDeliveryAddress
customerCustomer
shopShop
subscriptionSubscription | null

The subscription the order came from; null for a one-time order

line_itemsLineItem[]
tagsTag[]
shipping_itemsShippingItem[]

Inventory items to ship with the order

shipping_infoShippingInfo | null

The shipping method the customer chose; null when none