# Orders

A store's orders: find and read them, create them, move them through the store's
workflow, and add notes to them.

All paths are relative to the base URL https://api.store.link/v1. Every request
needs your API key; see Overview
[https://store.link/help/developer/article/1165].


ENDPOINTS

EndpointWhat it doesGET /stores/{storeId}/ordersList ordersPOST
/stores/{storeId}/ordersCreate an orderGET /stores/{storeId}/orders/{orderId}Get
an orderPATCH /stores/{storeId}/orders/{orderId}Change an order's statusPOST
/stores/{storeId}/orders/{orderId}/notesAdd a note to an order


LIST ORDERS

GET /stores/{storeId}/orders

Orders, newest first. Orders over the plan's monthly limit are left out and
counted in hidden_by_plan.

Your role in the store needs to read orders.


PATH PARAMETERS

NameTypeDescriptionstoreIdstring
requiredA store id from GET /stores.


QUERY PARAMETERS

NameTypeDescriptionstatusstringOne of: pending, shipped, completed,
cancelled.searchstringCustomer name, email, phone or order
number.pageintegerDefault: 1. At least 1.limitintegerDefault: 25. 1 to 100.


EXAMPLE REQUEST

curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/orders' \
  -H 'Authorization: Bearer YOUR_API_KEY'


RESPONSE

FieldTypeDescriptiondataarray of objectdata[].idstringdata[].numberstring,
nullableThe order number the customer sees, e.g. "1042". Test orders have test_
numbers.data[].statusstringdelivered appears only on older orders. One of:
pending, shipped, completed, cancelled, delivered.data[].payment_statusstring,
nullableOne of: pending, paid,
failed.data[].customerobjectdata[].customer.namestring,
nullabledata[].customer.emailstring, nullabledata[].customer.phonestring,
nullabledata[].currencystring, nullableISO 4217 code.data[].totalnumber,
nullabledata[].item_countintegerdata[].testbooleanPlaced while the store was in
test mode.data[].created_atstring (date-time)data[].updated_atstring
(date-time)pageintegerGreater than 0.limitintegerGreater than
0.totalintegerhas_morebooleanhidden_by_planintegerOrders over the plan's monthly
limit, left out of the list.


EXAMPLE RESPONSE

{
  "data": [
    {
      "id": "6661a0d3c2f1b80013cd56ef",
      "number": "1042",
      "status": "pending",
      "payment_status": "pending",
      "customer": {
        "name": "Jane Doe",
        "email": "jane@example.com",
        "phone": "+14155550123"
      },
      "currency": "USD",
      "total": 50,
      "item_count": 2,
      "test": false,
      "created_at": "2026-11-20T10:15:00.000Z",
      "updated_at": "2026-11-20T10:15:00.000Z"
    }
  ],
  "page": 1,
  "limit": 25,
  "total": 50,
  "has_more": true,
  "hidden_by_plan": 0
}


ERRORS

The common errors: 400 invalid_request, 401 unauthorized, 403
insufficient_permission, 404 store_not_found, 429 rate_limited, 500
internal_error. See Errors in the Overview
[https://store.link/help/developer/article/1165].


CREATE AN ORDER

POST /stores/{storeId}/orders

Creates an order for a customer, as the dashboard's Create order page does.
Storelink prices it from the store's current products, the coupon and the
shipping method, and records payment as cash with no payment status.

Creating it deducts stock, emails the receipt to the customer (when there is an
email) and to the store, counts a use of the coupon, and adds the order to the
Order Sheet.

Send an Idempotency-Key header: a request with a key the store already has an
order for returns that order and does nothing else, so a retry can't create the
order twice.

Your role in the store needs to write orders.


PATH PARAMETERS

NameTypeDescriptionstoreIdstring
requiredA store id from GET /stores.


HEADERS

NameTypeDescriptionIdempotency-Keystring
requiredAny unique string you choose, e.g. a UUID or your own order id. Up to
255 characters.


REQUEST BODY

FieldTypeDescriptionitemsarray of object
requiredAt least 1 item.items[].slugstring
requiredA product slug from GET
/stores/{storeId}/products.items[].variant_keystringA variant key from GET
/stores/{storeId}/products/{slug}; leave out for a product with one
variant.items[].qtyinteger
requiredGreater than 0.customerobject
requiredcustomer.namestring
requiredcustomer.emailstring (email)Gets the
receipt.customer.phonestringshipping_methodstringA shipping method label from
GET /stores/{storeId}; leave out for none.addressstringThe delivery address, or
for pickup one of the method's pickup_locations.zip_codestringcoupon_codestring


EXAMPLE REQUEST

curl -X POST 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/orders' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Idempotency-Key: 3f1c9a7e-2b4d-4e8f-9a6b-1c2d3e4f5a6b' \
  -H 'Content-Type: application/json' \
  -d '{
  "items": [
    {
      "slug": "classic-tee",
      "variant_key": "M-Black",
      "qty": 2
    }
  ],
  "customer": {
    "name": "Jane Doe",
    "email": "jane@example.com",
    "phone": "+14155550123"
  },
  "shipping_method": "Standard delivery",
  "address": "221 Market St, San Francisco, CA",
  "zip_code": "94105",
  "coupon_code": "WELCOME10"
}'


RESPONSE

FieldTypeDescriptionidstringnumberstring, nullableThe order number the customer
sees, e.g. "1042". Test orders have test_ numbers.statusstringdelivered appears
only on older orders. One of: pending, shipped, completed, cancelled,
delivered.payment_statusstring, nullableOne of: pending, paid,
failed.customerobjectcustomer.namestring, nullablecustomer.emailstring,
nullablecustomer.phonestring, nullablecurrencystring, nullableISO 4217
code.totalnumber, nullableitem_countintegertestbooleanPlaced while the store was
in test mode.created_atstring (date-time)updated_atstring (date-time)itemsarray
of objectitems[].namestringitems[].variantstring,
nullableitems[].quantitynumberitems[].pricenumber, nullableitems[].totalnumber,
nullablesubtotalnumber, nullableshipping_feenumber, nullablediscountnumber,
nullablecoupon_codestring, nullableshipping_methodstring, nullableaddressstring,
nullablezip_codestring, nullablepayment_methodstring,
nullablecheckout_fieldsobject (map)The customer's other answers at checkout, by
checkout field id.timelinearray of objectNewest first.timeline[].statusstring,
nullabletimeline[].titlestring, nullabletimeline[].notestring,
nullabletimeline[].datestring (date-time), nullable


EXAMPLE RESPONSE

{
  "id": "6661a0d3c2f1b80013cd56ef",
  "number": "1042",
  "status": "pending",
  "payment_status": "pending",
  "customer": {
    "name": "Jane Doe",
    "email": "jane@example.com",
    "phone": "+14155550123"
  },
  "currency": "USD",
  "total": 50,
  "item_count": 2,
  "test": false,
  "created_at": "2026-11-20T10:15:00.000Z",
  "updated_at": "2026-11-20T10:15:00.000Z",
  "items": [
    {
      "name": "Classic Tee",
      "variant": "M / Black",
      "quantity": 2,
      "price": 25,
      "total": 50
    }
  ],
  "subtotal": 45,
  "shipping_fee": 5,
  "discount": 0,
  "coupon_code": "WELCOME10",
  "shipping_method": "Standard delivery",
  "address": "221 Market St, San Francisco, CA",
  "zip_code": "94105",
  "payment_method": "Cash on delivery",
  "checkout_fields": {
    "gift_note": "Please gift wrap it"
  },
  "timeline": [
    {
      "status": "pending",
      "title": "Order placed",
      "note": null,
      "date": "2026-11-20T10:15:00.000Z"
    }
  ]
}


ERRORS

 * 404 not_found: Nothing with this id in this store, or something the body
   names, such as a product or coupon, is not there.

Plus the common errors: 400 invalid_request, 401 unauthorized, 403
insufficient_permission, 404 store_not_found, 429 rate_limited, 500
internal_error. See Errors in the Overview
[https://store.link/help/developer/article/1165].


GET AN ORDER

GET /stores/{storeId}/orders/{orderId}

One order with its items, totals, customer details and timeline.

Your role in the store needs to read orders.


PATH PARAMETERS

NameTypeDescriptionstoreIdstring
requiredA store id from GET /stores.orderIdstring
requiredAn order id from GET /stores/{storeId}/orders. A 24-character id.


EXAMPLE REQUEST

curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/orders/6661a0d3c2f1b80013cd56ef' \
  -H 'Authorization: Bearer YOUR_API_KEY'


RESPONSE

The order, with the fields listed under Create an order above.


ERRORS

 * 404 not_found: Nothing with this id in this store, or something the body
   names, such as a product or coupon, is not there.

Plus the common errors: 400 invalid_request, 401 unauthorized, 403
insufficient_permission, 404 store_not_found, 429 rate_limited, 500
internal_error. See Errors in the Overview
[https://store.link/help/developer/article/1165].


CHANGE AN ORDER'S STATUS

PATCH /stores/{storeId}/orders/{orderId}

Changes the status, adds it to the order's timeline and emails the customer, as
the dashboard does. Sending the order's current status changes nothing and
emails nobody, so a retry is safe.

Your role in the store needs to write orders.


PATH PARAMETERS

NameTypeDescriptionstoreIdstring
requiredA store id from GET /stores.orderIdstring
requiredAn order id from GET /stores/{storeId}/orders. A 24-character id.


REQUEST BODY

FieldTypeDescriptionstatusstring
requiredDigital and service stores complete orders; every other store ships
them. One of: pending, shipped, completed, cancelled.notestringA tracking number
or message for the customer, shown in the email and timeline.


EXAMPLE REQUEST

curl -X PATCH 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/orders/6661a0d3c2f1b80013cd56ef' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "status": "shipped",
  "note": "Tracking number 1Z999AA10123456784"
}'


RESPONSE

The order, with the fields listed under Create an order above.


ERRORS

 * 400 invalid_status: The status isn't one this store's orders move through.
 * 404 not_found: Nothing with this id in this store, or something the body
   names, such as a product or coupon, is not there.

Plus the common errors: 400 invalid_request, 401 unauthorized, 403
insufficient_permission, 404 store_not_found, 429 rate_limited, 500
internal_error. See Errors in the Overview
[https://store.link/help/developer/article/1165].


ADD A NOTE TO AN ORDER

POST /stores/{storeId}/orders/{orderId}/notes

Adds a note to the order's timeline under its current status, and emails it to
the customer when notify_customer is true and the order has an email. With an
Idempotency-Key header, a repeat of a note already added with that key adds and
emails nothing.

Your role in the store needs to write orders.


PATH PARAMETERS

NameTypeDescriptionstoreIdstring
requiredA store id from GET /stores.orderIdstring
requiredAn order id from GET /stores/{storeId}/orders. A 24-character id.


HEADERS

NameTypeDescriptionIdempotency-KeystringAny unique string you choose, e.g. a
UUID or your own order id. Up to 255 characters.


REQUEST BODY

FieldTypeDescriptionnotestring
requiredtitlestringDefault: "Order update".notify_customerbooleanEmail the note
to the customer. Default: false.


EXAMPLE REQUEST

curl -X POST 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/orders/6661a0d3c2f1b80013cd56ef/notes' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Idempotency-Key: 3f1c9a7e-2b4d-4e8f-9a6b-1c2d3e4f5a6b' \
  -H 'Content-Type: application/json' \
  -d '{
  "note": "Your order is packed and ships tomorrow.",
  "title": "Order update",
  "notify_customer": true
}'


RESPONSE

The order, with the fields listed under Create an order above.


ERRORS

 * 404 not_found: Nothing with this id in this store, or something the body
   names, such as a product or coupon, is not there.

Plus the common errors: 400 invalid_request, 401 unauthorized, 403
insufficient_permission, 404 store_not_found, 429 rate_limited, 500
internal_error. See Errors in the Overview
[https://store.link/help/developer/article/1165].