API reference · Orders
List substitutes for an order line
/orders/{orderId}/substitute-candidatesRead the SKUs a fulfillment report can substitute for one order line: the seller's live listings of other SKUs of the line's catalog product, with stock for the whole remaining line, that are not already on the order. Send one as substituteSkuId to POST /orders/{orderId}/change-requests. available is provisional: nothing is held for a substitute until the buyer accepts the report, and the accept checks stock again.
Example
These examples send requests to the sandbox.
Replace the example orderId in the URL with your own.
curl --request GET \
--url 'https://api-sandbox.snapcaster.ca/api/v1/marketplace/orders/ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VW/substitute-candidates?lineRef=oln_1f0c8a4d7e2b45c9a1d6f3b8e07c9241' \
--header "Authorization: Bearer $MARKETPLACE_API_KEY"{
"success": true,
"data": {
"items": [
{
"sku_id": 363348,
"product_id": 86,
"external_ref": "platform-listing-1043",
"available": 1,
"unit_price": 2699,
"name": "Abyssal Nightstalker",
"set": "Portal Second Age",
"condition": "LP",
"language": "EN",
"finish": "Normal"
}
]
}
}Endpoint
| Environment | URL |
|---|---|
| Sandbox | https://api-sandbox.snapcaster.ca/api/v1/marketplace |
| Production | https://api.snapcaster.ca/api/v1/marketplace |
marketplaceApiKey-http bearer. Send the seller's marketplace API key asAuthorization: Bearer mp_{sellerCode}_{hex}. Themp_{sellerCode}_prefix identifies the seller; the trailing hex is the secret. The seller generates the key and supplies it to your platform.
Request
Path parameters
orderIdstring requiredThe opaque public order id (the webhook/poll
order_id).Constraints: minimum length: 1 Example
ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VW
Query parameters
lineRefstringThe
line_refof the order line to substitute.Constraints: pattern:
^oln_[0-9a-f]{32}$Exampleoln_1f0c8a4d7e2b45c9a1d6f3b8e07c9241skuIdintegerThe SKU of the order line to substitute, when that SKU is on one line only. Otherwise the read answers
ORDER_LINE_AMBIGUOUSwith the candidatelineRefs indetails. Send exactly one oflineRefandskuId.Constraints: exclusive minimum: 0
Headers
X-Snapcaster-Api-VersionstringOverride the platform pin for this request only. Webhook versions and the platform pin do not change.
Constraints: allowed values:
2026-10Example2026-10
Response
200
The substitutes, cheapest first.
Response body: Change
successboolean requiredWhether the operation completed as requested.
Constraints: allowed values:
trueExampletruedataobject requiredThe operation or event payload.
Show child fieldsHide child fields
data.items ChangerequiredRequest Substitute Candidate[] The SKUs the line can be substituted with, cheapest first; empty when none qualify.
Show child fieldsHide child fields
data.integer requireditems[]. sku_id The SKU to send as
substituteSkuId(STABLE).Example
363348data.integer requireditems[]. product_id The catalog product of that SKU, the same one the line's SKU belongs to (STABLE).
Example
86data.string or null requireditems[]. external_ref Your platform's reference on the seller's listing for that SKU; null when none was sent (STABLE).
Example
platform-listing-1043data.integer requireditems[]. available Units of that SKU available now: the listing's quantity less the units other orders hold. Provisional: nothing is held for the substitute until the buyer accepts, and the accept checks stock again (STABLE).
Example
1data.integer requireditems[]. unit_price The listing's price per unit in cents. For reference only: the buyer still pays the line's own
unit_price, less yourcreditCents(STABLE).Example
2699data.string or null requireditems[]. name The card title; null when the catalog has none (STABLE).
Example
Abyssal Nightstalkerdata.string or null requireditems[]. set The set the printing belongs to; null when the catalog has none (STABLE).
Example
Portal Second Agedata.string or null requireditems[]. condition The condition grade; null when the catalog has none (STABLE).
Example
LPdata.string or null requireditems[]. language The printing language; null when the catalog has none (STABLE).
Example
ENdata.string or null requireditems[]. finish The printing or finish, such as
Foil; null when the catalog has none (STABLE).Example
Normal
Errors
Errors return a Marketplace body, except HTTP 500 (Api). Error codes explains both error bodies and lists every code.
400
INVALID_REQUESTORDER_LINE_AMBIGUOUSUNSUPPORTED_API_VERSIONInvalid query, a line the order does not have, or a
skuIdon more than one line (ORDER_LINE_AMBIGUOUS, with the candidatelineRefsindetails). Unknown or retired API-version override (UNSUPPORTED_API_VERSION).Do this: Name exactly one line. For ORDER_LINE_AMBIGUOUS, name it by one of the
lineRefvalues indetails. For UNSUPPORTED_API_VERSION, choose a supported version from the API versioning guide.401
UNAUTHORIZEDMissing or invalid marketplace API key (
UNAUTHORIZED).Do this: Send the marketplace API key for this seller as a Bearer token, then retry.
403
SUBSCRIPTION_EXCLUDES_ORDERSThe platform's subscription is
inventory, which does not include orders (SUBSCRIPTION_EXCLUDES_ORDERS). Onlyordersandbothsubscriptions read and act on orders.Do this: Do not retry. Ask Snapcaster to change the platform subscription to
ordersorbothif the platform should handle orders.404
ORDER_NOT_FOUNDNo order matches this id for the authenticated seller (
ORDER_NOT_FOUND). Another seller's order also returns 404, so the response does not reveal whether it exists.Do this: Check the order_id against GET /orders for the authenticated seller, then retry with that id.
500
INTERNAL_ERRORAn unexpected failure (
INTERNAL_ERROR).Do this: Retry with bounded retries and jitter. If the failure persists, contact Snapcaster with the X-Correlation-ID response header.