Search Documentation
Search for a documentation page...
Orders API
REST API endpoints for browsing and managing orders.
List Orders
Returns a paginated list of orders, sorted by creation date (newest first).
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Orders per page (1-100) |
offset | number | 0 | Orders to skip |
Response
Get Order
Returns the full order with line items, customer info, shipping address, and payment details.
Response
Update Order
Updates an order's fulfillment status and/or tracking information.
Request Body
| Field | Type | Description |
|---|---|---|
status | string | processing, shipped, delivered, or canceled |
trackingNumber | string | Shipping carrier tracking number. Only for orders fulfilled outside the platform — orders whose shipping method links a carrier addon (gls, inpost) are rejected with 409. Use the Shipment API for carrier-managed orders. |
Customer Notifications
When a status change results in a real transition (e.g. processing → shipped), the endpoint automatically sends the matching customer notification email — the same one the admin dashboard triggers. This only fires when the store has the relevant email template enabled at /manage/emails. Retrying the same status update does not re-send the notification.
Order Statuses
| API Status | Internal Status | Description |
|---|---|---|
processing | processing | Being prepared |
shipped | shipped | In transit |
delivered | completed | Delivered to customer |
canceled | cancelled | Cancelled |
Create Shipment
Creates a carrier shipment for the order. The carrier is resolved from the order's shipping method (its linked shipping addon) — you don't specify the carrier in the request. The store's environment (live/test) determines whether the carrier's sandbox or production API is used.
Request Body
All fields are optional. The request body can be empty — every field has a server-side default or returns a 422 explaining what's missing.
InPost Fields
| Field | Type | Description |
|---|---|---|
template | string | Locker size: small, medium, or large (maps to gabaryt A/B/C). Omit to use dimension-based suggestion, then the store's fallbackTemplate. Fails with 422 if neither is available. |
targetPoint | string | InPost locker code (e.g. KRA012). Defaults to the buyer's checkout selection. |
sendingMethod | string | How the parcel is handed to InPost: parcel_locker (drop-off, default) or dispatch_order (courier pickup). |
GLS Fields
| Field | Type | Description |
|---|---|---|
weightKg | number | Parcel weight in kg (0.01–50). Defaults to the sum of the order's shippable variant weights. |
date | string | Pickup/drop date (YYYY-MM-DD). Defaults to the next working day. |
pointId | string | GLS parcel-shop id (e.g. GLS_PL-12345). Defaults to the buyer's checkout selection; required for parcel-shop rates. |
Passing fields that belong to the other carrier returns 400 — e.g. sending weightKg for an InPost order is rejected.
Response (201)
InPost:
GLS:
Error Responses
| Status | Description |
|---|---|
400 | Invalid request data or carrier-mismatched fields |
404 | Order not found |
409 | Order already has a shipment, or shipping method has no supported carrier |
422 | Missing required carrier data (e.g. no locker code or template for InPost) |
502 | Carrier API error |
Get Shipment
Returns the current shipment status for an order.
Response (200)
InPost:
GLS:
Error Responses
| Status | Description |
|---|---|
404 | Order not found or order has no shipment |
409 | Shipping method has no supported carrier |
502 | Carrier API error (InPost only — GLS uses locally persisted state) |
Delete Shipment
Deletes the shipment for an order. Only supported for GLS — InPost shipments must be cancelled in the InPost Parcel Manager.
Response (200)
Error Responses
| Status | Description |
|---|---|
404 | Order not found or order has no shipment |
409 | InPost shipments cannot be deleted through this API, or the GLS shipment is no longer deletable |
502 | GLS API error |
Get Shipment Label
Downloads the shipping label as a file. Returns the raw file (PDF, ZPL, or EPL) with appropriate Content-Type and Content-Disposition headers.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
format | string | pdf | InPost only: pdf, zpl, or epl. GLS uses the store-wide labelMode setting (change via PUT /api/v1/addons/gls). Passing format for a GLS order returns 400. |
Error Responses
| Status | Description |
|---|---|
400 | Invalid query parameters, or format used with GLS |
404 | Order not found or order has no shipment |
409 | InPost label not ready yet (poll GET .../shipment until labelReady is true), or shipping method has no supported carrier |
502 | Carrier API error |
Customer Orders
Returns orders for a specific customer, paginated.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Orders per page (1-100) |
offset | number | 0 | Orders to skip |
Response
List Refunds
Returns the refunds recorded against an order, newest first.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Refunds per page (1-100) |
offset | number | 0 | Refunds to skip |
Response
Create Refund
Issues a refund through Stripe against the order's original payment.
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Refund amount in cents (smallest currency unit) |
reason | string | Yes | One of requested_by_customer, damaged_or_defective, duplicate, fraudulent, order_error, other |
reasonNote | string | No | Additional detail about the reason |
refundType | string | Yes | full or partial |
refundApplicationFee | boolean | No | Refund the Stripe application fee. Defaults to false. |
restockItems | boolean | No | Return refunded items to stock. Defaults to true. |
lineItems | array | No | Per-item breakdown for partial refunds with item tracking |
Each lineItems entry takes lineItemIndex (position in the order), productVariantId, quantity, and amount in cents.
Errors
| Status | Meaning |
|---|---|
400 | Order status can't be refunded, no Stripe payment found, or the amount exceeds what's still refundable |
404 | Order not found |
Only orders with status paid, processing, shipped, completed, or partially_refunded can be refunded. The sum of all refunds may not exceed the order total.
Get Refund
Returns a single refund belonging to the order.