API reference · Browse
Look up cart lines
/lines/lookupLook up up to 500 (sellerId, skuId) pairs, the maximum number of cart lines. This public buyer-facing endpoint returns display details and current state for each line; Snapcaster implements it. If a listing has sold out or been removed, the response still includes catalog product and SKU details, with currentPrice: null and available: 0. Unknown sellers or SKUs produce null values instead of errors. The response contains one element per requested pair, in request order.
Snapcaster implements this buyer-facing operation. Use the reference to see how your listings appear to buyers.
Example
These examples send requests to the sandbox.
curl --request POST \
--url 'https://api-sandbox.snapcaster.ca/api/v1/marketplace/lines/lookup' \
--header 'Content-Type: application/json' \
--data '{
"lines": [
{
"sellerId": 1,
"skuId": 1
}
]
}'{
"success": true,
"data": {
"lines": [
{
"sellerId": 0,
"skuId": 0,
"seller": {
"name": "string"
},
"product": {
"productId": 0,
"name": "string",
"set": "string",
"image": "string"
},
"sku": {
"condition": "string",
"language": "string",
"finish": "string"
},
"currentPrice": 0,
"available": 0
}
]
}
}Endpoint
| Environment | URL |
|---|---|
| Sandbox | https://api-sandbox.snapcaster.ca/api/v1/marketplace |
| Production | https://api.snapcaster.ca/api/v1/marketplace |
None.
Request
Request body
linesarray of object requiredThe line items in this request, response, or event.
Constraints: maximum items: 500
Show child fieldsHide child fields
lines[].integer requiredsellerId Constraints: exclusive minimum: 0
lines[].integer requiredskuId See Canonical catalog in Core concepts.
Constraints: exclusive minimum: 0
Response
200
Cart line details, one per requested pair.
Response body: Line
successboolean requiredWhether the operation completed as requested.
Constraints: allowed values:
truedataobject requiredThe operation or event payload.
Show child fieldsHide child fields
data.lines LinerequiredLookup Line[] One element per requested pair, in request order.
Show child fieldsHide child fields
data.integer requiredlines[]. sellerId The requested seller id. Together with
skuId, identifies the cart line.data.integer requiredlines[]. skuId The requested SKU id. Together with
sellerId, identifies the cart line.data.object or null requiredlines[]. seller Null when the seller is unknown.
Show child fieldsHide child fields
data.string requiredlines[]. seller. name Seller display name; not a handle/slug.
data.object or null requiredlines[]. product Canonical catalog display data; null when the SKU is unknown.
Show child fieldsHide child fields
data.integer requiredlines[]. product. productId See Canonical catalog in Core concepts.
data.string or null requiredlines[]. product. name data.string or null requiredlines[]. product. set The card set or expansion.
data.string or null requiredlines[]. product. image The product image URL shown to the buyer.
data.object or null requiredlines[]. sku The catalog condition, language, and finish. Null when the SKU is unknown.
Show child fieldsHide child fields
data.string or null requiredlines[]. sku. condition The normalized condition assigned to the card.
data.string or null requiredlines[]. sku. language The language of the card printing.
data.string or null requiredlines[]. sku. finish The physical finish or foil treatment of the card.
data.integer or null requiredlines[]. currentPrice The current listing price in integer cents. Null when there is no live listing for this pair.
data.integer requiredlines[]. available On-hand minus committed units. Zero when there is no live listing for this pair.
data.objectlines[]. sellerUnavailable Present when the store cannot accept checkout; absent when it is ready. The response keeps the line and its current
currentPriceandavailablevalues. Use this field to decide how to display the line in the cart. If several lines belong to the same unavailable store, each includes the same block.Show child fieldsHide child fields
data.integer requiredlines[]. sellerUnavailable. sellerId The unavailable store id, matching the cart line.
data.string requiredlines[]. sellerUnavailable. reason SELLER_ON_VACATIONmeans the store has enabled vacation mode and is otherwise ready.SELLER_UNAVAILABLEcovers all other causes without exposing the store's private account status.Constraints: allowed values:
SELLER_ON_VACATION,SELLER_UNAVAILABLE
data.objectlines[]. policy The eligibility and buyer-protection decision for this line.
Show child fieldsHide child fields
data.string requiredlines[]. policy. status Constraints: allowed values:
eligible,blockeddata.object or null requiredlines[]. policy. error Error details for a failed request.
Show child fieldsHide child fields
data.string requiredlines[]. policy. error. code The stable machine-readable code for this result.
data.string requiredlines[]. policy. error. message A human-readable explanation of the result.
data.string requiredlines[]. policy. error. action How to resolve this issue.
data.lines[]. disclosures Listingor nullDisclosures Provenance, grading, and authenticity statements shown to the buyer.
Show child fieldsHide child fields
data.string requiredlines[]. disclosures. imageSource Constraints: allowed values:
catalogdata.string requiredlines[]. disclosures. conditionSource Constraints: allowed values:
seller_declareddata.string requiredlines[]. disclosures. authenticitySource Constraints: allowed values:
seller_attestationdata.boolean requiredlines[]. disclosures. snapcasterInspected Constraints: allowed values:
falsedata.boolean requiredlines[]. disclosures. snapcasterGraded Constraints: allowed values:
falsedata.boolean requiredlines[]. disclosures. snapcasterAuthenticated Constraints: allowed values:
falsedata.string requiredlines[]. disclosures. gradingStandard Constraints: allowed values:
snapcaster-magic-v1,seller-declared-no-specialist-promisedata.string or null requiredlines[]. disclosures. declaredGrade data.string requiredlines[]. disclosures. buyerProtection Constraints: allowed values:
magic-grade-and-authenticity,genuine-and-as-described
data.lines[]. fulfillmentObligation Listingor nullFulfillment Obligation Show child fieldsHide child fields
data.string requiredlines[]. fulfillmentObligation. sku The SKU that identifies the card variant.
Constraints: allowed values:
exactdata.string requiredlines[]. fulfillmentObligation. printing The card printing the seller must supply.
Constraints: allowed values:
exactdata.string requiredlines[]. fulfillmentObligation. language The language of the card printing.
Constraints: allowed values:
exactdata.string requiredlines[]. fulfillmentObligation. finish The physical finish or foil treatment of the card.
Constraints: allowed values:
exactdata.string requiredlines[]. fulfillmentObligation. condition The normalized condition assigned to the card.
Constraints: allowed values:
declared-or-better
Errors
Errors return a Api body, except HTTP 400 (Marketplace). Error codes explains both error bodies and lists every code.
400
INVALID_REQUESTThe request failed validation (
INVALID_REQUEST).Do this: Correct the fields named in the error details, then retry the request.
413
PAYLOAD_TOO_LARGEThe body is larger than this route accepts (
PAYLOAD_TOO_LARGE).Do this: Send a smaller body and retry.
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.