SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Storefront API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Bootstrap
    Get shop info and settings
Product
    Get list of productsGet product by IDGet variant or pricing by IDGet plan by ID
Bundle
    Get list of bundlesGet bundle by IDQuote bundleGet list of bundle group itemsGet list of bundle itemsGet the list of bundle items associated with multiple bundles
Survey
    Get survey by ID
Cart
    Init cartGet cart by IDUpdate cart by IDGet cart gifting datesGet cart start datesGet shipping methodsGet local pickupsValidate the cartAttach the customer to the cart
Cart Item
    Add cart itemUpdate cart itemDelete cart item
Checkout
    Make purchase from the cart
Auth
    LoginOtp LoginOtp GenerateSocial LoginRegisteredRegister
Customer
    Get the current customerGet the current customer referral infoUpdate customer
Address
    Get list of addressStore addressUpdate addressDelete address
Pickup Info
    Get list of pickup infosStore pickup infoUpdate pickup infoDelete pickup info
Wallet
    Store payment methodGet list of payment methodsStore payment methodDelete payment methodSet default payment method
Subscription
    Get list of subscriptionsShow subscriptionUpdate subscriptionUpdate subscription survey preferences by Subscription IDUpdate subscription bundle data by Subscription IDCancel a subscriptionUndo cancellationUpdate subscription payment methodGet shipping methodsGet local pickupsCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundle
Order
    Get list of ordersGet order by ID
Invoice
    Get list of invoicesGet invoice by ID
Payment Intent
    Confirm payment intentGet payment intent by ID
Funnels
    Get the current pre purchase funnel step by IDRefresh the funnel progressAccept the pre purchase funnel stepReject the pre purchase funnel stepGet the current mid purchase funnel step by IDRefresh the funnel progressAccept the mid purchase funnel stepReject the mid purchase funnel step
Countries
    Get list of countries
Out Of Stock
    Subscribe to the out of stock
Cancellation
    Get shop cancellation reasons
Metafield
    Get shop's metafields
Product Collection
    Get list of product collectionsGet product collection by IDGet list of collection groups with items
Lead
    Store the shop lead

Order

Storefront Order API endpoints

Endpoints
  • GET/orders
  • GET/orders/{order_id}

Get list of orders

GET /orders

An API endpoint to get list of orders for the authenticated customer.

Query parameters

pageoptionalinteger

Page

per_pageoptionalinteger

Entities per page

subscription_idoptionalinteger

Filter by subscription ID

product_idoptionalinteger

Filter by product ID

statusesoptionalstring[]

Filter by order status

fulfillment_statusesoptionalstring[]

Filter by fulfillment status

created_at[gte]optionalstring

Filter to include only orders with a creation date on or after the given date.

Format: date-time.

created_at[lte]optionalstring

Filter to include only orders with a creation date on or before the given date.

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.

expandoptionalstring[]

Expandable relations

Returnsobject

Orders list response

curl https://api.subbly.co/storefront/v1/orders \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
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, "shipping_address_id": 1, "shipping_method_id": 1, "due_date": "2022-04-01 00:00:00", "currency_code": "USD", "status": "Awaiting Delivery", "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "adjustment": 1, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": "subscription_id", "description": "description", "type": "setup", "subscription_item_id": 1, "amount": 1, "quantity": 1, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "bundle": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Get order by ID

GET /orders/{order_id}

An API endpoint to get order by ID for the authenticated customer.

Path parameters

order_idRequiredinteger

Order ID

Format: integer.

Query parameters

expandoptionalstring[]

Expandable relations

ReturnsOrder

Order object response

curl https://api.subbly.co/storefront/v1/orders/{order_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "subscription_id": 1, "invoice_id": 1, "customer_id": 1, "shipping_address_id": 1, "shipping_method_id": 1, "due_date": "2022-04-01 00:00:00", "currency_code": "USD", "status": "Awaiting Delivery", "gift": { "message": "message", "recipient_email": "recipient_email" }, "total": 1, "sub_total": 1, "tax_amount": 1, "adjustment": 1, "items": [ { "id": 1, "product_id": 1, "product": {}, "subscription_id": "subscription_id", "description": "description", "type": "setup", "subscription_item_id": 1, "amount": 1, "quantity": 1, "survey": { "survey_id": 1, "version": 2, "data": [ {} ] }, "bundle": {}, "discount_amount": 1, "tax_amount": 1, "tax_rate": 1, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "shipping_items": [ { "id": 1, "order_id": 1, "quantity": 1, "note": "note", "inventory_id": 1, "inventory": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "discounts": [ { "id": 1, "product_id": 1, "subscription_id": 1, "subscription_item_id": 1, "description": "description", "type": "balance", "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }
paginationobject
dataOrder[]
idinteger
subscription_idinteger | null
invoice_idinteger | null
customer_idinteger
shipping_address_idinteger
shipping_method_idinteger
due_datestring

Format: date-time.

currency_codestring
statusstring

Possible values: Awaiting Delivery, Shipped, Returned, Dispute, Future Shipment, Cancelled, Payment Failed.

giftobject | null
totalinteger
sub_totalinteger
tax_amountinteger
adjustmentinteger
itemsOrderItem[]
shipping_itemsShippingItem[]
discountsOrderDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.