Storeware Docs
REST

Orders

Orders, their payments, fulfillments, refunds and changes.

List orders

GET /api/v1/stores/{storeId}/orders

A page of orders, newest first unless sort says otherwise. meta.units says, for each order on the page, how many units were ordered and how many have been sent; meta.labelled names the ones with a postage label bought.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
statusquerystringOne of created, confirmed, manual_review, processing, shipped, delivered, canceled.
queuequerystringto_send: paid for and not all sent, and not on hold. on_hold: kept back by the shop. One of to_send, on_hold.
searchquerystringAn order number, with or without the #, matched exactly; or words in the buyer’s email or name.
fromquerystringPlaced on or after this day, YYYY-MM-DD, in the shop’s own time.
toquerystringPlaced on or before this day, YYYY-MM-DD, in the shop’s own time.
paymentquerystringHow it was paid, in the words of the export’s Financial Status column. One of pending, paid, partially_refunded, refunded, voided.
originquerystringWhich door placed it. One of storefront, agent, admin, plugin, imported, subscription.
tagsquerystringCarrying any of these tags, separated by commas.
sortquerystringNewest first (placed_desc) when not given. One of placed_desc, placed_asc, total_desc, total_asc.
limitqueryintegerHow many to return, up to 250. Fifty when not given. From 1 to 250.
offsetqueryintegerHow many to skip, for the next page. At least 0.

Answers 200

FieldTypeDescription
dataarray of Order
metaobject
meta.totalintegerHow many match, across every page.
meta.unitsmap of objectUnits ordered and sent, by order id, for the orders on this page.
meta.labelledarray of stringThe orders on this page with a bought, unvoided label going out.
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders" \
  -H "Authorization: Bearer $TOKEN"

Get an order

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

The order with its lines and its adjustments. With format=acp, the same order in the Agentic Commerce Protocol’s shape instead.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
formatquerystringacp for the Agentic Commerce Protocol’s shape. One of acp.

Answers 200

FieldTypeDescription
dataobject
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID" \
  -H "Authorization: Bearer $TOKEN"

Cancel an order

DELETE /api/v1/stores/{storeId}/orders/{orderId}

Cancels the order and puts back the stock not yet sent. It refunds nothing: refund it separately. Cancelling an order already cancelled changes nothing. Emits order.canceled.v1.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body, which may be left out: it is then read as {}.

FieldTypeRequiredDescription
reasonstringNoWhy, kept on the order’s history.

Answers 200

FieldTypeDescription
dataOrder
curl -X DELETE "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Correct an order’s contact details or address

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

Corrects the buyer’s email, name or phone, or the delivery address. Never moves money: tax stays as charged, and a difference in delivery is settled by editing the order. Refused for an order wholly sent, one with a live label or a supplier, and for a paid order moving to another country. Changing the email does not change whose order it is, and the old address is told.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
buyerEmailstring (email)NoUp to 320 characters.
buyerFirstNamestring or nullNoUp to 120 characters.
buyerLastNamestring or nullNoUp to 120 characters.
buyerPhonestring or nullNoUp to 40 characters.
shippingAddressobjectNo
shippingAddress.namestring or nullNoUp to 200 characters.
shippingAddress.line_onestringYes1 to 200 characters.
shippingAddress.line_twostring or nullNoUp to 200 characters.
shippingAddress.citystringYes1 to 120 characters.
shippingAddress.statestring or nullNoUp to 120 characters.
shippingAddress.countrystringYesMatches ^[A-Z]{2}$.
shippingAddress.postal_codestringYes1 to 32 characters.
acknowledgedstringNo64 to 64 characters.

Answers 200

FieldTypeDescription
dataobject
data.fieldsarray of stringWhich fields would change, by name.
data.noticesarray of object
data.notices[].kindstringOne of tax_stays, delivery_differs, delivery_unquoted.
data.notices[].chargedintegerWhat was charged for delivery, in minor units.
data.notices[].quotedintegerWhat this address would come to, in minor units.
data.digeststringPass this as acknowledged when there are notices.
curl -X PATCH "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

List orders waiting on a card check

GET /api/v1/stores/{storeId}/orders/authentications

Orders whose payment is held for a card issuer’s check (such as 3D Secure) that the buyer has not finished, the link soonest to expire first. The links themselves are never listed.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
limitqueryintegerHow many to return. Fifty when not given. From 1 to 200.

Answers 200

FieldTypeDescription
dataarray of object
data[].sessionIdstring (uuid)The checkout session. Renew its link with this id.
data[].orderIdstring (uuid)
data[].orderNumberstring
data[].buyerEmailstring
data[].totalAmountintegerMinor units.
data[].currencystring
data[].originstringWhich door placed the order.
data[].expiresAtstring (date-time) or nullWhen the link stops working. Null once it is opened.
data[].statestringoutstanding: nobody has opened the link. expired: nobody opened it in time. opened: the buyer is answering the challenge now. One of outstanding, expired, opened.
data[].createdAtstring (date-time)
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/authentications" \
  -H "Authorization: Bearer $TOKEN"

POST /api/v1/stores/{storeId}/orders/authentications/{sessionId}

Makes a new link for a buyer to finish their card check, and answers with it. The new link replaces the old one, which stops working. Whoever holds the link can pay for and then read the order, so send it only to the buyer and do not store it. Refused for a checkout that is not waiting on a check.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
sessionIdpathstringThe session.

Answers 200

FieldTypeDescription
dataobject
data.urlstringThe link, shown this once.
data.expiresAtstring (date-time)
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/authentications/$SESSION_ID" \
  -H "Authorization: Bearer $TOKEN"

Approve or reject a held order

POST /api/v1/stores/{storeId}/orders/{orderId}/approval

Answers an order an AI agent placed above the shop’s approval limit, which waits in manual_review. Approving takes the payment, which is the first time money moves, so it can fail as any payment can; it answers the order and anything the payment still needs. Rejecting cancels the order, puts its stock back and emits order.canceled.v1; it answers the order.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
decisionstringYesOne of approve, reject.
reasonstringNoWhy it was rejected. Read only when rejecting.

Answers 200

FieldTypeDescription
dataobject or Order
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/approval" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

List an order’s changes

GET /api/v1/stores/{storeId}/orders/{orderId}/changes

Every change proposed or made to the order since it was placed, oldest first.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataarray of OrderChange
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/changes" \
  -H "Authorization: Bearer $TOKEN"

Open an order change

POST /api/v1/stores/{storeId}/orders/{orderId}/changes

Opens an empty change to an order, to edit what it holds. Add lines to it, then confirm it. Nothing moves until it is confirmed.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body, which may be left out: it is then read as {}.

FieldTypeRequiredDescription
kindstringNoOne of edit, return, exchange, claim. Default edit.
reasonstringNoUp to 500 characters.
notestringNoUp to 2,000 characters.

Answers 201

FieldTypeDescription
dataOrderChange
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/changes" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Get an order change

GET /api/v1/stores/{storeId}/orders/{orderId}/changes/{changeId}

The change, its lines, and in delta what it would cost if confirmed now.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
changeIdpathstringThe change.

Answers 200

FieldTypeDescription
dataobject
data.changeobject
data.change.idstring (uuid)
data.change.storeIdstring (uuid)
data.change.orderIdstring (uuid)
data.change.kindstringOne of edit, return, exchange, claim.
data.change.statusstringOne of pending, confirmed, declined, canceled.
data.change.reasonstring or null
data.change.notestring or null
data.change.deltaSubtotalAmountnumber
data.change.deltaDiscountAmountnumber
data.change.deltaFulfillmentAmountnumber
data.change.deltaTaxAmountnumber
data.change.deltaTotalAmountnumberWhat the change came to, signed and in minor units: positive means the customer owes more. Zero until it is confirmed, as are the other deltas.
data.change.currencystring
data.change.adjustmentIdstring (uuid) or nullThe refund it made, when it gave money back.
data.change.paymentIdstring (uuid) or null
data.change.actorTypestring or nullOne of staff, customer, plugin, agent, system.
data.change.actorIdstring or null
data.change.createdAtstring (date-time)
data.change.updatedAtstring (date-time)
data.change.confirmedAtstring (date-time) or null
data.change.declinedAtstring (date-time) or null
data.change.canceledAtstring (date-time) or null
data.actionsarray of object
data.actions[].idstring (uuid)
data.actions[].storeIdstring (uuid)
data.actions[].changeIdstring (uuid)
data.actions[].actionstringOne of item_add, item_quantity, item_remove, shipping_add, shipping_remove.
data.actions[].lineItemIdstring (uuid) or null
data.actions[].variantIdstring (uuid) or null
data.actions[].quantityDeltanumberSigned. Negative takes units off the line.
data.actions[].unitAmountnumberMinor units.
data.actions[].amountnumberMinor units.
data.actions[].detailsany
data.actions[].createdAtstring (date-time)
data.deltaobjectWhat the change would cost if confirmed now, priced against the catalogue as it stands. Signed and in minor units: positive means the customer owes more.
data.delta.subtotalAmountinteger
data.delta.discountAmountinteger
data.delta.fulfillmentAmountinteger
data.delta.taxAmountinteger
data.delta.totalAmountinteger
data.delta.currencystring
data.delta.linesarray of object
data.delta.lines[].actionIdstring (uuid)
data.delta.lines[].lineItemIdstring (uuid) or null
data.delta.lines[].titlestring
data.delta.lines[].quantityDeltainteger
data.delta.lines[].unitAmountinteger
data.delta.lines[].amountinteger
data.delta.lines[].taxAmountinteger
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/changes/$CHANGE_ID" \
  -H "Authorization: Bearer $TOKEN"

Confirm, decline or cancel an order change

POST /api/v1/stores/{storeId}/orders/{orderId}/changes/{changeId}

Settles a pending change. Confirming moves the stock and the money and emits order.changed.v1: a change that gives money back refunds it to the card, and one that leaves the customer owing more is recorded as owed, not charged. A change that would refund an order paid in stablecoins, imported from another platform, or not yet paid for is refused. Declining or cancelling closes it with nothing moved.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
changeIdpathstringThe change.

Body

FieldTypeRequiredDescription
decisionstringYesOne of confirm, decline, cancel.
reasonstringNoWhy. Read only when declining or cancelling.

Answers 200

FieldTypeDescription
dataOrderChange
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/changes/$CHANGE_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Add a line to an order change

POST /api/v1/stores/{storeId}/orders/{orderId}/changes/{changeId}/actions

Adds one action to a pending change: add a variant, change a line’s quantity, remove a line, or add or take off delivery. Checked against the order as it stands now. Amounts are in minor units.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
changeIdpathstringThe change.

Body

Any JSON.

Answers 201

FieldTypeDescription
dataOrderChange
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/changes/$CHANGE_ID/actions" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Remove a line from an order change

DELETE /api/v1/stores/{storeId}/orders/{orderId}/changes/{changeId}/actions/{actionId}

Takes an action off a change nobody has confirmed yet.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
changeIdpathstringThe change.
actionIdpathstringThe action.

Answers 200

FieldTypeDescription
dataOrderChange
curl -X DELETE "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/changes/$CHANGE_ID/actions/$ACTION_ID" \
  -H "Authorization: Bearer $TOKEN"

List an order’s downloads

GET /api/v1/stores/{storeId}/orders/{orderId}/downloads

Every file the order bought, with how many times it has been downloaded and how many more it may be. An unpaid, cancelled or refunded order is listed too, with available false and the reason.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataarray of DownloadGrant
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/downloads" \
  -H "Authorization: Bearer $TOKEN"

Set a download allowance

PATCH /api/v1/stores/{storeId}/orders/{orderId}/downloads

Sets how many times one line of the order may download one file. It cannot be set below the downloads already taken; set it to that count to stop further downloads.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
lineItemIdstring (uuid)Yes
assetIdstring (uuid)YesThe file.
downloadLimitinteger or nullYesHow many downloads in all. Null for unlimited. From 1 to 1,000.

Answers 200

FieldTypeDescription
dataDownloadGrant
curl -X PATCH "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/downloads" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

List an order’s fulfillments

GET /api/v1/stores/{storeId}/orders/{orderId}/fulfillments

Every despatch of the order, with its tracking events and the lines it carries.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataarray of Fulfillment
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/fulfillments" \
  -H "Authorization: Bearer $TOKEN"

Create a fulfillment

POST /api/v1/stores/{storeId}/orders/{orderId}/fulfillments

Records a despatch of some or all of an order’s lines, and takes the stock off the shelf. A line cannot be sent more times than is left of it. Emits fulfillment.created.v1. Send an Idempotency-Key header to make a retry safe: a second request with the same key answers what the first did.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
typestringYesOne of shipping, pickup, digital.
lineItemsarray of objectYesAt least 1 item.
lineItems[].lineItemIdstring (uuid)Yes
lineItems[].quantityintegerYes
locationIdstring (uuid)No
carrierstringNoUp to 120 characters.
trackingNumberstringNoUp to 120 characters.
trackingUrlstring (uri)NoUp to 2,000 characters.
estimatedDeliveryEarlieststring (date-time)NoThe earliest it should arrive.
estimatedDeliveryLateststring (date-time)NoThe latest it should arrive.
digitalAccessUrlstring (uri)No
digitalLicenseKeystringNoUp to 500 characters.
notifyBuyerbooleanNoDefault true.

Answers 201

FieldTypeDescription
dataFulfillment
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/fulfillments" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Record a tracking event

POST /api/v1/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}/events

Says where a despatch has got to, and moves its status and the order’s with it. failed_attempt leaves the status as it is; returned marks the despatch failed. Emits fulfillment.updated.v1, and delivered writes to the buyer. Send an Idempotency-Key header to make a retry safe: a second request with the same key answers what the first did.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
fulfillmentIdpathstringThe fulfillment.

Body

FieldTypeRequiredDescription
typestringYesOne of processing, shipped, in_transit, out_for_delivery, ready_for_pickup, delivered, failed_attempt, returned.
occurredAtstring (date-time)NoWhen it happened. Now when not given.
descriptionstringNoUp to 500 characters.
locationstringNoUp to 200 characters.

Answers 201

FieldTypeDescription
dataFulfillment
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID/events" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Get what a shipping label needs

GET /api/v1/stores/{storeId}/orders/{orderId}/label-quotes

What a label for this order would start from: what is left to send and what it weighs, the shop’s boxes, and whether a card and a ship from address are in place. Asks no carrier.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataobject
data.unavailablestring or nullWhy no label can be bought for this shop. Null when one can. One of unconfigured, mode_mismatch, not_offered.
data.modestring or nullOne of test, live.
data.linesarray of object
data.lines[].lineItemIdstring (uuid)
data.lines[].titlestring
data.lines[].variantTitlestring or null
data.lines[].freeintegerUnits not sent yet and not held by a label still being bought.
data.lines[].weightGramsinteger or nullOne unit. Null when the product has no weight.
data.packagesarray of objectThe boxes the shop keeps.
data.packages[].idstring (uuid)
data.packages[].storeIdstring (uuid)
data.packages[].namestring
data.packages[].lengthMmnumber
data.packages[].widthMmnumber
data.packages[].heightMmnumber
data.packages[].emptyWeightGramsnumber
data.packages[].isDefaultboolean
data.packages[].createdAtstring (date-time)
data.packages[].updatedAtstring (date-time)
data.hasShipFrombooleanWhether the shop has said where parcels leave from.
data.cardobject or nullThe card postage is charged to. Null when there is none.
data.card.brandstring or null
data.card.last4string or null
data.blockedstring or nullWhy label buying is paused on the account, if it is. One of postage_owed, dispute, review.
data.internationalbooleanWhether the parcel crosses a border and needs customs.
data.chosenobject or nullThe delivery the shopper paid for, when they chose one.
data.chosen.titlestring
data.chosen.amountintegerMinor units.
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/label-quotes" \
  -H "Authorization: Bearer $TOKEN"

Quote a shipping label

POST /api/v1/stores/{storeId}/orders/{orderId}/label-quotes

Asks the carrier what it would cost to send a parcel for this order, by every service it offers, and checks the address. Name one of: the lines the parcel carries, a despatch with no label yet, or a return to bring back. Buys nothing.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
linesarray of objectNoUp to 250 items. At least 1 item.
lines[].lineItemIdstring (uuid)Yes
lines[].quantityintegerYes
fulfillmentIdstring (uuid)No
returnIdstring (uuid)No
parcelobjectYes
parcel.packageIdstring (uuid)No
parcel.packageNamestringNoUp to 120 characters.
parcel.lengthMmintegerYesFrom 1 to 5,000.
parcel.widthMmintegerYesFrom 1 to 5,000.
parcel.heightMmintegerYesFrom 1 to 5,000.
parcel.weightGramsintegerYesFrom 1 to 1,000,000.
optionsobjectNoDefault {}.
options.insuranceAmountintegerNoAt most 100,000,000.
options.signaturestringNoOne of standard, adult.

Answers 200

FieldTypeDescription
dataobject
data.shipmentIdstringSend it back, with a rateId, to buy.
data.ratesarray of object
data.rates[].rateIdstringWhat a label is bought with.
data.rates[].carrierstring
data.rates[].carrierNamestring
data.rates[].serviceTokenstring
data.rates[].serviceNamestring
data.rates[].amountintegerThe carrier’s price, in minor units.
data.rates[].currencystring
data.rates[].estimatedDaysinteger
data.rates[].attributesarray of stringThe carrier’s own words: CHEAPEST, FASTEST, BESTVALUE.
data.rates[].priceobjectWhat the card would be charged.
data.rates[].price.postageintegerThe carrier’s price, in minor units.
data.rates[].price.feeintegerCard processing on the whole charge, in minor units.
data.rates[].price.totalinteger
data.rates[].payOnUsebooleanA return label charged only when a carrier first scans it.
data.refusalstring or nullWhy the carrier offered nothing, when it did not.
data.chosenServiceTokenstring or nullThe service the shopper paid for, when it is among the rates.
data.recipientobject
data.recipient.namestring
data.recipient.line_onestring
data.recipient.line_twostring
data.recipient.citystring
data.recipient.statestring
data.recipient.countrystring
data.recipient.postal_codestring
data.recipient.phonestring
data.recipient.emailstring
data.addressCheckobject
data.addressCheck.checkedbooleanFalse when nobody was asked. That is not a verdict.
data.addressCheck.validboolean or null
data.addressCheck.messagesarray of stringThe carrier’s own sentences about the address.
data.addressCheck.suggestionobjectThe address as the carrier writes it.
data.addressCheck.suggestion.namestring
data.addressCheck.suggestion.line_onestring
data.addressCheck.suggestion.line_twostring
data.addressCheck.suggestion.citystring
data.addressCheck.suggestion.statestring
data.addressCheck.suggestion.countrystring
data.addressCheck.suggestion.postal_codestring
data.addressCheck.suggestion.phonestring
data.addressCheck.suggestion.emailstring
data.shipFromobject
data.shipFrom.locationNamestring
data.shipFrom.addressobject
data.shipFrom.address.namestring
data.shipFrom.address.companystring
data.shipFrom.address.line_onestring
data.shipFrom.address.line_twostring
data.shipFrom.address.citystring
data.shipFrom.address.statestring
data.shipFrom.address.countrystring
data.shipFrom.address.postal_codestring
data.shipFrom.address.phonestring
data.shipFrom.address.emailstring
data.parcelobject
data.parcel.packageIdstring (uuid)
data.parcel.packageNamestring
data.parcel.lengthMminteger
data.parcel.widthMminteger
data.parcel.heightMminteger
data.parcel.weightGramsinteger
data.customsobject or nullWhat the parcel declares to customs. Null when it crosses no border.
data.customs.contentsTypestringOne of MERCHANDISE, GIFT, SAMPLE, RETURN_MERCHANDISE.
data.customs.nonDeliveryOptionstringOne of RETURN, ABANDON.
data.customs.certifySignerstring
data.customs.incotermstringOne of DDU, DDP.
data.customs.itemsarray of object
data.customs.items[].descriptionstring
data.customs.items[].quantityinteger
data.customs.items[].netWeightGramsinteger
data.customs.items[].valueAmountintegerMinor units.
data.customs.items[].valueCurrencystring
data.customs.items[].originCountrystring
data.customs.items[].tariffNumberstring
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/label-quotes" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

List an order’s shipping labels

GET /api/v1/stores/{storeId}/orders/{orderId}/labels

Every label the order has had, bought or not, newest first. At most fifty.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataarray of ShippingLabel
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/labels" \
  -H "Authorization: Bearer $TOKEN"

Buy a shipping label

POST /api/v1/stores/{storeId}/orders/{orderId}/labels

Buys a label at a rate from a quote and charges the account’s postage card. For lines, it also records the despatch with its tracking number. Answers 201 once the label is bought, and 202 while it is not yet: the bank wants the cardholder (clientSecret is set), or the carrier has not answered. Send the same purchaseKey again, or resume the label, to carry on; it never buys twice.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
linesarray of objectNoUp to 250 items. At least 1 item.
lines[].lineItemIdstring (uuid)Yes
lines[].quantityintegerYes
fulfillmentIdstring (uuid)No
returnIdstring (uuid)No
parcelobjectYes
parcel.packageIdstring (uuid)No
parcel.packageNamestringNoUp to 120 characters.
parcel.lengthMmintegerYesFrom 1 to 5,000.
parcel.widthMmintegerYesFrom 1 to 5,000.
parcel.heightMmintegerYesFrom 1 to 5,000.
parcel.weightGramsintegerYesFrom 1 to 1,000,000.
optionsobjectNoDefault {}.
options.insuranceAmountintegerNoAt most 100,000,000.
options.signaturestringNoOne of standard, adult.
purchaseKeystringYes8 to 200 characters.
shipmentIdstringYes1 to 100 characters.
rateIdstringYes1 to 100 characters.
notifyBuyerbooleanNoDefault true.

Answers 201

FieldTypeDescription
dataShippingLabel
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/labels" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Resume a shipping label purchase

POST /api/v1/stores/{storeId}/orders/{orderId}/labels/{labelId}/resume

Carries an unfinished purchase on, once the bank’s check has been answered. Does nothing to a finished label, so it is safe to call any number of times. Answers 202 while the label is still not bought.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
labelIdpathstringThe label.

Answers 200

FieldTypeDescription
dataShippingLabel
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/labels/$LABEL_ID/resume" \
  -H "Authorization: Bearer $TOKEN"

Void a shipping label

POST /api/v1/stores/{storeId}/orders/{orderId}/labels/{labelId}/void

Asks the carrier to refund a label that has not been used. Usually answers 202 with the label void_pending: a carrier takes days to agree, and the postage goes back to the card when it does. The card processing is not returned. The despatch stays, with its tracking number cleared, so a new label can be bought for it. Asking twice is safe.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
labelIdpathstringThe label.

Answers 200

FieldTypeDescription
dataShippingLabel
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/labels/$LABEL_ID/void" \
  -H "Authorization: Bearer $TOKEN"

List an order’s metafields

GET /api/v1/stores/{storeId}/orders/{orderId}/metafields

Every metafield value set on an order, each with its definition.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataarray of object
data[].definitionIdstring (uuid)
data[].namespacestring
data[].keystring
data[].labelstringThe merchant’s name for the field.
data[].typestringsingle_line_text, multi_line_text, integer, decimal, boolean, date, url and the other definition types.
data[].isListboolean
data[].storefrontVisibleboolean
data[].searchFacetboolean
data[].positioninteger
data[].valueanyThe value, or a list of values when isList.
data[].displayValuestringThe value as one line of text, lists joined.
data[].sourcestringWho set it: the merchant, an import, or an app’s slug.
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/metafields" \
  -H "Authorization: Bearer $TOKEN"

Set an order’s metafields

PUT /api/v1/stores/{storeId}/orders/{orderId}/metafields

Sets up to 25 values in one call. A null value clears its field; keys not named are left alone. An app may set only the fields its manifest declares.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
metafieldsarray of objectYesUp to 25 items. At least 1 item.
metafields[].namespacestringNoDefault custom.
metafields[].keystringYes
metafields[].valueanyNo

Answers 200

FieldTypeDescription
dataarray of object
data[].definitionIdstring (uuid)
data[].namespacestring
data[].keystring
data[].labelstringThe merchant’s name for the field.
data[].typestringsingle_line_text, multi_line_text, integer, decimal, boolean, date, url and the other definition types.
data[].isListboolean
data[].storefrontVisibleboolean
data[].searchFacetboolean
data[].positioninteger
data[].valueanyThe value, or a list of values when isList.
data[].displayValuestringThe value as one line of text, lists joined.
data[].sourcestringWho set it: the merchant, an import, or an app’s slug.
curl -X PUT "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/metafields" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Add a return reason

POST /api/v1/stores/{storeId}/return-reasons

A reason of the shop’s own, in its own words. It goes last and is offered from the next return. code is one of the platform’s, because review rules read that and not the words.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.

Body

FieldTypeRequiredDescription
codestringYesOne of wrong_size, wrong_item_sent, damaged_in_transit, defective, not_as_described, looks_different_to_photo, quality_below_expectation, arrived_late, changed_mind, other.
labelstringYes1 to 80 characters.
refundsShippingbooleanNo
waivesRestockingFeebooleanNo
requiresReturnbooleanNo

Answers 201

FieldTypeDescription
dataobject
data.idstring (uuid)
data.storeIdstring (uuid)
data.codestringOne of wrong_size, wrong_item_sent, damaged_in_transit, defective, not_as_described, looks_different_to_photo, quality_below_expectation, arrived_late, changed_mind, other.
data.labelstring
data.refundsShippingboolean
data.waivesRestockingFeeboolean
data.requiresReturnboolean
data.defaultDispositionstringOne of restock, damaged, discard, quarantine, return_to_vendor.
data.positionnumber
data.shopAddedboolean
data.archivedAtstring (date-time) or null
data.createdAtstring (date-time)
data.updatedAtstring (date-time)
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/return-reasons" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Take back a despatch

DELETE /api/v1/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}

For a parcel recorded and never really sent. Units go back to the shelves they came from, held for the order again, and the order steps back. Refused once a carrier has it, for a supplier’s or a digital despatch, for units refunded or returned, and while a label is live. The buyer is not emailed.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
fulfillmentIdpathstringThe fulfillment.

Answers 200

FieldTypeDescription
dataobject
data.fulfillmentFulfillment
data.restockedintegerUnits that went back on a shelf.
data.estimatedbooleanTrue when no shelf record exists and the despatch’s one location was used.
curl -X DELETE "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID" \
  -H "Authorization: Bearer $TOKEN"

Correct a despatch’s tracking

PATCH /api/v1/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}

Corrects a carrier or tracking number somebody typed. Refused for a label bought here, whose number belongs to the label, and for a cancelled despatch. No email is sent.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.
fulfillmentIdpathstringThe fulfillment.

Body

FieldTypeRequiredDescription
carrierstringYes1 to 120 characters.
trackingNumberstringYes1 to 120 characters.
trackingUrlstring (uri) or nullNoUp to 2,000 characters.

Answers 200

FieldTypeDescription
dataFulfillment
curl -X PATCH "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/fulfillments/$FULFILLMENT_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

See what correcting an order’s details would mean

POST /api/v1/stores/{storeId}/orders/{orderId}/details/preview

Says which fields would change, and whether tax or delivery is affected. Changes nothing. When it has notices, hand its digest to updateOrderDetails as acknowledged.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
buyerEmailstring (email)NoUp to 320 characters.
buyerFirstNamestring or nullNoUp to 120 characters.
buyerLastNamestring or nullNoUp to 120 characters.
buyerPhonestring or nullNoUp to 40 characters.
shippingAddressobjectNo
shippingAddress.namestring or nullNoUp to 200 characters.
shippingAddress.line_onestringYes1 to 200 characters.
shippingAddress.line_twostring or nullNoUp to 200 characters.
shippingAddress.citystringYes1 to 120 characters.
shippingAddress.statestring or nullNoUp to 120 characters.
shippingAddress.countrystringYesMatches ^[A-Z]{2}$.
shippingAddress.postal_codestringYes1 to 32 characters.
acknowledgedstringNo64 to 64 characters.

Answers 200

FieldTypeDescription
dataobject
data.fieldsarray of stringWhich fields would change, by name.
data.noticesarray of object
data.notices[].kindstringOne of tax_stays, delivery_differs, delivery_unquoted.
data.notices[].chargedintegerWhat was charged for delivery, in minor units.
data.notices[].quotedintegerWhat this address would come to, in minor units.
data.digeststringPass this as acknowledged when there are notices.
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/details/preview" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Keep an order back from being sent

POST /api/v1/stores/{storeId}/orders/{orderId}/hold

Stops a paid order being sent until it is released. Nothing else about it changes and the shopper is not told. An order already on hold keeps the reason it was first held for.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
reasonstringYes1 to 500 characters.

Answers 200

FieldTypeDescription
dataobject
data.heldboolean
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/hold" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Release an order kept back

DELETE /api/v1/stores/{storeId}/orders/{orderId}/hold

Lets the order be sent again. An order that was not held is left as it is.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataobject
data.heldboolean
curl -X DELETE "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/hold" \
  -H "Authorization: Bearer $TOKEN"

List the tags a shop’s orders carry

GET /api/v1/stores/{storeId}/orders/facets

For the controls that narrow the list. The commonest first, at most a hundred.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.

Answers 200

FieldTypeDescription
dataobject
data.tagsarray of string
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/facets" \
  -H "Authorization: Bearer $TOKEN"

Change an order’s tags

PATCH /api/v1/stores/{storeId}/orders/{orderId}/tags

Puts tags on and takes them off by name, so two people labelling one order do not lose each other’s work. Sending the same change twice leaves the order as the first left it. Tags are the shop’s own and are never shown to a shopper.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
addarray of stringNoUp to 50 items. Default [].
removearray of stringNoUp to 50 items. Default [].

Answers 200

FieldTypeDescription
dataobject
data.tagsarray of string
curl -X PATCH "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/tags" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

List an order’s notes

GET /api/v1/stores/{storeId}/orders/{orderId}/notes

What the shop has written about the order, oldest first.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataarray of OrderNote
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/notes" \
  -H "Authorization: Bearer $TOKEN"

Add a note to an order

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

Adds a note for the shop’s staff. Notes cannot be edited or deleted; a correction is another note.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body

FieldTypeRequiredDescription
bodystringYesTrimmed of spaces before it is measured. 1 to 5,000 characters.

Answers 201

FieldTypeDescription
dataOrderNote
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/notes" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

Record an invoice payment

POST /api/v1/stores/{storeId}/orders/{orderId}/payments

Records that an order placed on account has been paid, by bank transfer, cheque or any other way outside the shop. Only for an order on payment terms, and only once. Emits order.paid.v1, so what follows a card payment follows this too.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body, which may be left out: it is then read as {}.

FieldTypeRequiredDescription
amountintegerNoAt least 0.
methodstringNoUp to 80 characters.
referencestringNoUp to 200 characters.

Answers 200

FieldTypeDescription
dataOrder
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/payments" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

List an order’s refunds

GET /api/v1/stores/{storeId}/orders/{orderId}/refunds

Every adjustment to the order’s money, newest first: refunds, and store credit, returns, exchanges, cancellations and disputes.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataarray of OrderAdjustment
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/refunds" \
  -H "Authorization: Bearer $TOKEN"

Refund an order

POST /api/v1/stores/{storeId}/orders/{orderId}/refunds

Refunds all or part of an order, everything still refundable when amount is left out. A card payment is refunded to the card; an order on account or paid with credit is recorded as refunded with nothing sent. Refused for an order imported from another platform, one paid in stablecoins, one whose payment has not completed, and an amount past what is left. Emits order.refunded.v1. Send an Idempotency-Key header to make a retry safe: a second request with the same key answers what the first did.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body, which may be left out: it is then read as {}.

FieldTypeRequiredDescription
amountintegerNo
reasonstringNoOne of duplicate, fraudulent, requested_by_customer, other.
descriptionstringNoUp to 500 characters.
lineItemsarray of objectNo
lineItems[].lineItemIdstring (uuid)Yes
lineItems[].quantityintegerYes
restockbooleanNoDefault false.
valueOfLinesbooleanNo

Answers 201

FieldTypeDescription
dataobject
data.adjustmentOrderAdjustment
data.refundedAmountintegerRefunded on the order so far, this included.
data.refundableAmountintegerThe total less what has been refunded.
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/refunds" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

List an order’s returns

GET /api/v1/stores/{storeId}/orders/{orderId}/returns

The returns asked for on this order, and in returnable each line with what could still come back and why not. Also open to returns:read, a permission for the shop front.

Needs orders:read.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Answers 200

FieldTypeDescription
dataobject
data.returnsarray of Return
data.returnablearray of object
data.returnable[].lineItemIdstring (uuid)
data.returnable[].variantIdstring (uuid) or null
data.returnable[].productIdstring (uuid) or null
data.returnable[].titlestring
data.returnable[].variantTitlestring or null
data.returnable[].skustring or null
data.returnable[].imageUrlstring or null
data.returnable[].quantityOrderedinteger
data.returnable[].quantityShippedinteger
data.returnable[].quantityReturnedinteger
data.returnable[].returnableintegerWhat could be asked to come back now.
data.returnable[].unitAmountintegerMinor units.
data.returnable[].refundValueintegerWhat those units are worth back, tax included, in minor units.
data.returnable[].taxValueintegerThe tax in refundValue.
data.returnable[].deliveredAtstring (date-time) or null
data.returnable[].windowClosesAtstring (date-time) or null
data.returnable[].eligibleboolean
data.returnable[].ineligibleReasonstring or nullOne of window_closed, nothing_shipped, fully_returned.
curl "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/returns" \
  -H "Authorization: Bearer $TOKEN"

Open a return

POST /api/v1/stores/{storeId}/orders/{orderId}/returns

Opens a return of some of an order’s sent lines. With orders:write a closed return window can be overridden. Approved at once when the shop’s policy approves returns on its own. Emits return.requested.v1. Also open to returns:write, a permission for the shop front.

Needs orders:write.

Parameters

ParameterInTypeDescription
storeIdpathstringThe shop.
orderIdpathstringThe order.

Body, which may be left out: it is then read as {}.

FieldTypeRequiredDescription
linesarray of objectYesAt least 1 item.
lines[].lineItemIdstring (uuid)Yes
lines[].quantityintegerYes
lines[].reasonIdstring (uuid)No
lines[].notestringNoUp to 500 characters.
overrideWindowbooleanNoDefault false.
originstringNoOne of storefront, agent, admin, plugin.
merchantNotestringNoUp to 2,000 characters.

Answers 201

FieldTypeDescription
dataReturn
curl -X POST "https://api.storeware.ai/api/v1/stores/$STORE_ID/orders/$ORDER_ID/returns" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json

On this page