SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Private API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Customer
    Get list of customersCreate a customerGet customer by IDUpdate a customerDelete a customerCredit a customer's store credit balanceCreate a customer noteUpdate a customer noteDelete a customer noteCreate a customer addressUpdate a customer addressDelete a customer addressGet list of customer pickup infoCreate customer pickup infoUpdate customer pickup infoDelete customer pickup infoCreate a customer payment methodDelete a customer payment method
Subscription
    Get list of subscriptionsCreate a subscriptionGet subscription by IDCancel a subscriptionUndo cancellationCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundleApply a discount to a subscriptionRemove a subscription discount
Invoice
    Get list of invoicesGet invoice by IDSchedule the next payment for invoiceVoid an invoiceForgive an invoiceMark an invoice as paid
Order
    Get list of ordersGet order by IDUpdate an orderShip an orderCancel an orderMark an order as pendingArchive an orderMark an order as a future shipmentSync order shipping items
Payment Method
    Get payment method by ID
Transaction
    Get list of transactionsGet transaction by ID
Cancellation
    Get shop cancellation reasons
Product
    Get list of productsGet product by IDGet variant by IDUpdate variantGet plan by IDUpdate planCreate subscription productUpdate subscription productPublish subscription productUnpublish subscription productArchive subscription productSync subscription product metadataCreate one-time productUpdate one-time productPublish one-time productUnpublish one-time productArchive one-time productSync one-time product metadataCreate variantArchive variantBatch create/update/archive variantsCreate planArchive plan
Survey
    Get survey by IDGet list of surveys
Bundle
    Get list of bundlesCreate a new bundleGet bundle by IDUpdate a bundleGet list of bundle itemsCreate a bundle itemBatch create bundle itemsGet bundle item by IDUpdate a bundle itemDelete a bundle itemGet list of bundle groupsPublish a bundleUnpublish a bundleArchive a bundleSync bundle metadataCreate a bundle planGet bundle plan by IDUpdate a bundle planArchive a bundle plan
Tag
    Get list of tags
Metafield
    Get shop's metafieldsCreate a new metadataUpdate the metadata
Funnel
    Get list of funnelsGet funnel by ID
Option
    Get list of options
Country
    Get list of countries
Inventory
    Get list of inventory itemsCreate a new inventory itemGet inventory item by IDUpdate an inventory itemArchive an inventory itemGet list of inventory groupsCreate a new inventory groupGet inventory group by IDUpdate an inventory group
Coupon
    Get list of couponsCreate a couponGet coupon by IDUpdate a couponArchive a coupon
Product Collection
    Get list of product collectionsCreate a product collectionGet product collection by IDUpdate a product collectionPublish a product collectionUnpublish a product collectionArchive a product collectionGet list of collection groups with itemsSync collection items

Order

Private Order API endpoints

Endpoints
  • GET/orders
  • GET/orders/{order_id}
  • PATCH/orders/{order_id}
  • POST/orders/{order_id}/ship
  • POST/orders/{order_id}/cancel
  • POST/orders/{order_id}/mark_as_pending
  • POST/orders/{order_id}/archive
  • POST/orders/{order_id}/mark_as_future_shipment
  • POST/orders/{order_id}/shipping_items

Get list of orders

GET /orders

An API endpoint to get list of orders. Results are scoped to the shop that owns the API key. Archived orders are excluded unless archived=1 is passed.

Query parameters

pageoptionalinteger

Page

Defaults to 1.

per_pageoptionalinteger

Entities per page

Defaults to 50.

customer_idoptionalinteger

Filter by customer ID. Must belong to the shop.

subscription_idoptionalinteger

Filter by subscription ID. Must belong to the shop.

product_idoptionalinteger

Filter to orders that have at least one line item for this exact product ID. The match is on the line item's product, so plans and variants must be passed by their own ID. The parent product ID is not expanded. Must belong to the shop.

statuses[]optionalstring[]

Filter by order status. Values must be distinct.

fulfillment_statuses[]optionalstring[]

Filter by fulfillment status. Values must be distinct.

tags[]optionalinteger[]

Filter to orders carrying at least one of these tag IDs. Values must be distinct and must be existing tag IDs of the shop.

archivedoptionalboolean

Filter by the archived flag. Accepts 1/0 (or true/false). Defaults to false, which excludes archived orders; pass 1 to return only archived orders.

Defaults to false.

created_at[gte]optionalstring

Filter to include only orders created on or after this date. Format Y-m-d\TH:i:s, interpreted as UTC. Inclusive.

Format: date-time.

created_at[lte]optionalstring

Filter to include only orders created on or before this date. Format Y-m-d\TH:i:s, interpreted as UTC. Inclusive.

Format: date-time.

created_at_startoptionalstringDeprecated

Deprecated alias of created_at[gte]. When both arrive, created_at[gte] wins.

Format: date-time.

created_at_endoptionalstringDeprecated

Deprecated alias of created_at[lte]. When both arrive, created_at[lte] wins.

Format: date-time.

due_date[gte]optionalstring

Filter to include only orders due on or after this date. Format Y-m-d\TH:i:s, interpreted as UTC. Inclusive.

Format: date-time.

due_date[lte]optionalstring

Filter to include only orders due on or before this date. Format Y-m-d\TH:i:s, interpreted as UTC. Inclusive.

Format: date-time.

due_date_startoptionalstringDeprecated

Deprecated alias of due_date[gte]. When both arrive, due_date[gte] wins.

Format: date-time.

due_date_endoptionalstringDeprecated

Deprecated alias of due_date[lte]. When both arrive, due_date[lte] wins.

Format: date-time.

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

Returnsobject

Orders list response

Error responses

401object

Missing or invalid API key.

422object

One or more query parameters failed validation, e.g. an unknown status, a tag ID that does not belong to the shop, or a malformed date.

curl https://api.subbly.co/private/v1/orders \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ] }

Get order by ID

GET /orders/{order_id}

A detailed description of the order. The order must belong to the shop that owns the API key.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

ReturnsOrder

Order object response

Error responses

400object

The order exists but belongs to another shop.

401object

Missing or invalid API key.

404object

No order exists with this ID.

422object

The expand[] parameter failed validation.

curl https://api.subbly.co/private/v1/orders/{order_id} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update an order

PATCH /orders/{order_id}

Partially update an order. Every field is optional and any field left out of the body is untouched. Only the keys present in the request are applied. gift.message and gift.recipient_email are always persisted, but they are echoed back only inside the gift block, which is null unless the order is a gift.

items, tags, metadata and shipping_items are always included in the response; customer, shipping_address and items.product have to be requested through expand.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

Request body

due_dateoptionalstring

Due date in Y-m-d\TH:i:s format. Must be after yesterday. Cannot be null. Send no key at all to leave it unchanged.

giftoptionalobject

Gift details, mirroring the gift block of the order response. Omit the key to leave both fields unchanged.

tagsoptionalobject

Attach and detach order tags. Deletions are applied before creations. Omit the key to leave the order's tags unchanged.

ReturnsOrder

Order object response

Error responses

404object

The order does not exist or belongs to another shop.

422object

Validation failed, for example due_date is not in Y-m-d\TH:i:s format or is not after yesterday, a tags.create value is duplicated, or a tags.delete ID is not a tag of this shop.

curl -X PATCH https://api.subbly.co/private/v1/orders/{order_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "due_date": "2026-09-01T00:00:00", "gift": { "message": "Happy birthday! Enjoy the box.", "recipient_email": "recipient@example.com" }, "tags": { "create": [ { "value": "priority" }, { "value": "vip" } ], "delete": [ { "id": 42 } ] } }'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Ship an order

POST /orders/{order_id}/ship

Marks the order as shipped. Only orders in awaiting_delivery or future_shipment can be shipped. Any other status responds with 400. Shipping the order sends the customer the order shipped email and increments the successful shipment number of the linked subscription.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

ReturnsOrder

Order object response

Error responses

400object

The order cannot be shipped from its current status (for example it is already shipped or cancelled).

404object

Order not found, or it belongs to another shop.

curl -X POST https://api.subbly.co/private/v1/orders/{order_id}/ship \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Cancel an order

POST /orders/{order_id}/cancel

Marks the order as cancelled. Orders that are already shipped or cancelled respond with 400. Cancelling removes the order shipping items and returns their quantities to the inventory item stock, and sends the customer the order cancelled email.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

ReturnsOrder

Order object response

Error responses

400object

The order is already shipped or already cancelled.

404object

Order not found, or it belongs to another shop.

curl -X POST https://api.subbly.co/private/v1/orders/{order_id}/cancel \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Mark an order as pending

POST /orders/{order_id}/mark_as_pending

Moves the order back to awaiting_delivery. Only orders in shipped or future_shipment that are not archived can be moved. Anything else responds with 400. When the order comes from future_shipment its shipping items are re-created from the product and survey configuration.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

ReturnsOrder

Order object response

Error responses

400object

The order is archived, or its current status is neither shipped nor future_shipment.

404object

Order not found, or it belongs to another shop.

curl -X POST https://api.subbly.co/private/v1/orders/{order_id}/mark_as_pending \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Archive an order

POST /orders/{order_id}/archive

Archives the order. Archived orders are excluded from the order list unless it is requested with archived=true. An order that is already archived responds with 400. Archiving cannot be undone through the API. There is no unarchive endpoint.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

ReturnsOrder

Order object response

Error responses

400object

The order is already archived.

404object

Order not found, or it belongs to another shop.

curl -X POST https://api.subbly.co/private/v1/orders/{order_id}/archive \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Mark an order as a future shipment

POST /orders/{order_id}/mark_as_future_shipment

Moves the order to future_shipment and sets the given due date. Only orders in awaiting_delivery can be moved. Anything else responds with 400. The order shipping items are removed and their quantities are returned to the inventory item stock, in the same way as cancelling.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

Request body

Future shipment due date body

due_dateRequiredstring

The new due date of the order, in Y-m-d\TH:i:s format. Must be later than the current date and time.

Format: date-time.

ReturnsOrder

Order object response

Error responses

400object

The order status is not awaiting_delivery.

404object

Order not found, or it belongs to another shop.

422object

due_date is missing, is not in Y-m-d\TH:i:s format, or is not after the current date and time.

curl -X POST https://api.subbly.co/private/v1/orders/{order_id}/mark_as_future_shipment \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "due_date": "2026-09-24T04:00:00" }'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Sync order shipping items

POST /orders/{order_id}/shipping_items

Add, change and remove the shipping items of an order in a single call. The payload is validated as a whole before anything is applied, so a failure in any entry leaves the order untouched. Operations are applied in the order delete, update, create, and each one adjusts the linked inventory item's stock: added quantity is taken out of stock, removed quantity is returned to it.

A shipped order cannot be synced. The request responds with 400 (error code bad_request).

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand. items, tags, metadata and shipping_items are always present and do not need to be requested. Available keys: customer, shipping_address, shipping_method, local_pickup, items.product, items.bundle.items.product, items.bundle.items.variant.

Request body

shipping_itemsRequiredobject

ReturnsOrder

Order object response, with the synced shipping_items.

Error responses

400object

The order has already been shipped and its shipping items can no longer be changed.

404object

The order does not exist or belongs to another shop.

422object

Validation failed, for example an unknown or archived inventory_id, a shipping item ID that is not on this order, a duplicate entry, a quantity below 1, or an update entry on a manual item or above its current quantity.

curl -X POST https://api.subbly.co/private/v1/orders/{order_id}/shipping_items \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "shipping_items": { "create": [ { "inventory_id": 8821, "quantity": 2 } ], "update": [ { "id": 47110, "quantity": 1 } ], "delete": [ { "id": 47115 } ] } }'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "customer": { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": {}, "payment_methods": [ {} ], "subscriptions": [ {} ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ {} ], "notes": [ {} ], "addresses": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00" }, "product_id": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": {}, "local_pickup_id": 1, "local_pickup": {}, "transaction_id": 1, "due_date": "2022-04-01T00:00:00.000000Z", "currency_code": "USD", "base_currency_code": "USD", "status": "awaiting_delivery", "fulfillment_status": "unfulfilled", "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "package_id": 1, "carrier": "carrier", "carrier_service": "carrier_service", "tracking_number": "tracking_number", "unpaid": true, "exchange_rate": 1.5, "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "tax_rate": 1.5, "application_fee": 1, "customs_fee": 1, "adjustment": 1, "disputed": true, "refunded": true, "refunded_amount": 1, "test": true, "archived": true, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "setup", "amount": 1, "quantity": 1, "active": true, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "preferences": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1.5, "tax_id": 1, "tax_group_id": 1, "bundle": {}, "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "tags": [ { "id": 1, "value": "VIP" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "origin": "system", "price_origin": "charge", "item_price": 1, "order_line_item_id": 1, "order_bundle_item_id": 1, "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "amount": 1, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }
paginationobject
dataOrder[]
idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.

messageoptionalstring | null

Gift message. Shown in the gift block only on gift orders.

recipient_emailoptionalstring | null

Gift recipient email. Shown in the gift block only on gift orders.

Format: email.

createoptionalobject[]

Tags to attach by name. A shop tag with that name is reused when one exists and created otherwise. Attaching a tag the order already has is a no-op, so the call is idempotent.

deleteoptionalobject[]

Tags to detach from the order.

idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.

idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.

idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.

idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.

idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.

idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.

createoptionalobject[] | null

Manual shipping items to put on the order. When the order already carries a manual shipping item for the same inventory item, its quantity is set to quantity. The value is absolute, not added to the current one. Otherwise a new manual item is created, priced from the inventory item's MSRP converted into the order's currency.

updateoptionalobject[] | null

Quantity changes for shipping items linked to an order line item. The quantity can only be decreased. A value above the item's current quantity is rejected. Manual items have no line item and cannot be updated here; change them through create instead.

deleteoptionalobject[] | null

Shipping items to remove. The item is soft-deleted and its quantity is returned to the inventory item's stock.

idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

product_idinteger | null
shipping_address_idinteger | null
shipping_addressAddress | null

Expandable link to the shipping address. null unless expand[]=shipping_address. Soft-deleted addresses are still returned.

shipping_method_idinteger | null
shipping_methodobject | null

Shipping method payload with id, type (shipping_option, local_delivery or local_pickup) and a type-specific method object. Only returned when requested through expand[]=shipping_method; null otherwise.

local_pickup_idinteger | null
local_pickupobject | null

Local pickup point details (name, address, working hours). Only returned when requested through expand[]=local_pickup; null otherwise.

transaction_idinteger | null
due_datestring | null

Format: date-time.

currency_codestring | null
base_currency_codestring | null
statusstring

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

fulfillment_statusstring

Possible values: unfulfilled, partially_fulfilled, fulfilled.

shipping_carrier_idinteger | null
shipping_carrier_servicestring | null
package_idinteger | null

Package the order is shipped in, if any.

carrierstring | null
carrier_servicestring | null
tracking_numberstring | null
unpaidboolean
exchange_ratenumber | null
giftobject | null

Gift details. null unless the order is a gift.

totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
application_feeinteger
customs_feeinteger
adjustmentinteger

Amount of the order's adjustment line item, or 0 when there is none.

disputedboolean
refundedboolean
refunded_amountinteger

Amount refunded in cents. 0 when nothing was refunded.

testboolean
archivedboolean
itemsOrderItem[]

Order line items. Tax, adjustment and discount lines are excluded. See adjustment and discounts.

tagsOrderTag[]
metadataEntityMetadata[] | null
shipping_itemsOrderShippingItem[]
discountsOrderDiscount[]

Discount line items of the order.

created_atstring

Format: date-time.

updated_atstring | null

Format: date-time.