API - Overview

API - Orders

Retrieve customer orders, update statuses and quantities, and delete orders.

Endpoint overview

MethodEndpointDescriptionAccess
GET/public-api/v1/customer-ordersReturns a paginated and filterable list of customer orders.orders:read
GET/public-api/v1/customer-orders/:idReturns a single customer order with configured product items.orders:read
POST/public-api/v1/customer-orders/batchReturns up to 100 orders by ID.orders:read
PATCH/public-api/v1/customer-orders/:id/statusUpdates the order status.orders:write
PATCH/public-api/v1/customer-orders/:orderId/quantityUpdates selected order detail quantities.orders:write
PATCH/public-api/v1/customer-orders/:orderId/quantity/allSets one quantity for every item in an order.orders:write
DELETE/public-api/v1/customer-orders/:idDeletes a customer order owned by the storefront owner.orders:write

Customer orders

Customer order endpoints let an external store read configured line items, update quantities, move an order through fulfillment statuses and remove abandoned orders.

ParameterRequiredDetails
namenoSearches design name and numeric order ID.
category_idnoFilters by product category ID.
order_statusnoOne of the allowed order statuses.
offsetnoDefault 0. Must be >= 0.
limitnoDefault 9 for this controller, maximum 50.
order_bynoid, created_at or design_name.
directionnoASC or DESC.

Example request (fetch)

const params = new URLSearchParams({
  limit: '20',
  offset: '0',
  order_status: 'shopping_cart',
  order_by: 'created_at',
  direction: 'DESC'
});

const orders = await alterFetch(`/customer-orders?${params.toString()}`);

const order = await alterFetch('/customer-orders/123');

const batch = await alterFetch('/customer-orders/batch', {
  method: 'POST',
  body: JSON.stringify({
    customerOrderIds: [123, 124, 125]
  })
});

Allowed values

StatusDescription
shopping_cartCart flow; customer can still edit the configuration.
editableOrder remains editable by the customer.
paidOrder is paid and ready for fulfillment.
processingOrder is in fulfillment.
completedOrder has been fulfilled.
cancelledOrder was cancelled.

Example request (fetch)

await alterFetch('/customer-orders/123/status', {
  method: 'PATCH',
  body: JSON.stringify({
    status: 'processing'
  })
});

await alterFetch('/customer-orders/123/quantity', {
  method: 'PATCH',
  body: JSON.stringify({
    items: [
      { orderDetailId: 987, quantity: 3 }
    ]
  })
});

await alterFetch('/customer-orders/123/quantity/all', {
  method: 'PATCH',
  body: JSON.stringify({
    quantity: 2
  })
});

await alterFetch('/customer-orders/123', {
  method: 'DELETE'
});

Example response

{
  "order": {
    "id": 123,
    "customizerId": 381,
    "orderStatus": "shopping_cart",
    "createdAt": "2026-05-28T10:15:00.000Z",
    "customizerOrderURL": "https://alterproduct.com/app/customizer/381/123",
    "productItems": [
      {
        "id": 987,
        "model3d": { "id": 381 },
        "size": {
          "id": 395,
          "name": { "pl": "M", "en": "M" },
          "measureSize": null
        },
        "material": {
          "id": 2,
          "name": { "pl": "Bawełna", "en": "Cotton" }
        },
        "printType": {
          "id": 1,
          "name": { "pl": "DTG", "en": "DTG" }
        },
        "color": {
          "id": 418,
          "name": { "pl": "Domyślny", "en": "Default" },
          "hex": "#ffffff"
        },
        "variant": {
          "id": 531,
          "metadata": null,
          "stockQuantity": 25
        },
        "unitPrice": { "value": 12.5, "currency": "EUR" },
        "totalPrice": { "value": 37.5, "currency": "EUR" },
        "quantity": 3
      }
    ],
    "customizerName": "Men's T-Shirt",
    "productGroup": {
      "id": 4,
      "name": { "pl": "Koszulka", "en": "T-Shirt" }
    },
    "totalPrice": { "value": 37.5, "currency": "EUR" }
  }
}