Skip to content
snapcasterDevelopers

Look up cart lines

POST/lines/lookup

Informational read showing how Listings surface to Buyers; a Platform does not implement this operation. Public buyer-facing batch line lookup: given up to 500 `(sellerId, skuId)` pairs (the cart’s max line count), return everything a cart needs to describe each line plus its live state. Catalog-first: a pair whose Listing sold out or vanished still returns its canonical Product/SKU display data, with `currentPrice: null` and `available: 0`. Unknown Sellers or skus yield nulls, never an error; the response always has exactly one element per requested pair, in request order.

When to use

Use this operation to look up cart lines.

Informational: a Platform does not implement this buyer-facing operation.

Endpoint

POST /lines/lookup

EnvironmentBase URL
Sandboxhttps://api-sandbox.snapcaster.ca/api/v1/marketplace
Productionhttps://api.snapcaster.ca/api/v1/marketplace
Authentication

None.

Request

No parameters.

Request body (application/json)

FieldTypeConstraintsMeaningExample
linesrequiredarray of objectmaximum items: 500The individual records carried by this request, response, or event.[ { "sellerId": 1, "skuId": 1 } ] (generated)
lines[].sellerIdrequiredintegerexclusive minimum: 0Seller Id for the surrounding lines item record.1 (generated)
lines[].skuIdrequiredintegerexclusive minimum: 0Sku Id for the surrounding lines item record.1 (generated)

Example

Sandbox is the default. These requests use the contract's canonical field examples.

Generated cURL request - Sandbox: Generated request
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
}
]
}'

Response

200

The hydrated cart lines, one per requested pair.

Generated Response 200: Generated response 200
{
"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
}
]
}
}
FieldTypeConstraintsMeaningExample
successrequiredbooleanallowed values: trueWhether the operation completed as requested.true (generated)
datarequiredobjectNoneThe operation or event payload.{ "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 } ] } (generated)
data.linesrequiredarray of objectNoneOne element per requested pair, in request order.[ { "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 } ] (generated)
data.lines[].sellerIdrequiredintegerNoneEcho of the requested cart-line key (with `skuId`).0 (generated)
data.lines[].skuIdrequiredintegerNoneEcho of the requested cart-line key (with `sellerId`).0 (generated)
data.lines[].sellerrequiredobject or nullNoneNull when the Seller is unknown.{ "name": "string" } (generated)
data.lines[].seller.namerequiredstringNoneSeller display name; not a handle/slug.string (generated)
data.lines[].productrequiredobject or nullNoneCanonical Catalog display data; null when the sku is unknown.{ "productId": 0, "name": "string", "set": "string", "image": "string" } (generated)
data.lines[].product.productIdrequiredintegerNoneProduct Id for the surrounding product record.0 (generated)
data.lines[].product.namerequiredstring or nullNoneThe human-readable name of the resource.string (generated)
data.lines[].product.setrequiredstring or nullNoneThe card set or expansion.string (generated)
data.lines[].product.imagerequiredstring or nullNoneThe product image URL shown to the buyer.string (generated)
data.lines[].skurequiredobject or nullNoneCanonical printing descriptors; null when the sku is unknown.{ "condition": "string", "language": "string", "finish": "string" } (generated)
data.lines[].sku.conditionrequiredstring or nullNoneThe normalized condition assigned to the card.string (generated)
data.lines[].sku.languagerequiredstring or nullNoneThe language of the card printing.string (generated)
data.lines[].sku.finishrequiredstring or nullNoneThe physical finish or foil treatment of the card.string (generated)
data.lines[].currentPricerequiredinteger or nullNoneLive Listing price in integer minor units (cents); null when no live Listing backs the pair.0 (generated)
data.lines[].availablerequiredintegerNoneAvailable stock (on-hand minus committed units); 0 when no live Listing backs the pair.0 (generated)
data.lines[].sellerUnavailableobjectNonePresent ONLY when this line’s store fails Checkout readiness; its ABSENCE is the ready signal. The line is never pruned, repriced or reduced because of it - `currentPrice` and `available` stay the Listing’s real live state, and the client decides what the Cart shows. The same store failing across several lines carries the same block on each.{ "sellerId": 0, "reason": "SELLER_ON_VACATION" } (generated)
data.lines[].sellerUnavailable.sellerIdrequiredintegerNoneThe store that cannot take the money, echoing the line key.0 (generated)
data.lines[].sellerUnavailable.reasonrequiredstringallowed values: SELLER_ON_VACATION, SELLER_UNAVAILABLEBuyer-safe category. `SELLER_ON_VACATION` means the store paused itself and is otherwise ready; `SELLER_UNAVAILABLE` is every other cause, deliberately indistinguishable so a store’s private account standing is never published.SELLER_ON_VACATION (generated)
data.lines[].policyobjectNoneThe eligibility and buyer-protection decision for this line.{ "status": "eligible", "error": { "code": "string", "message": "string", "action": "string" } } (generated)
data.lines[].policy.statusrequiredstringallowed values: eligible, blockedThe current lifecycle or policy state of the resource.eligible (generated)
data.lines[].policy.errorrequiredobject or nullNoneStructured error information returned when the request cannot be completed.{ "code": "string", "message": "string", "action": "string" } (generated)
data.lines[].policy.error.coderequiredstringNoneThe stable machine-readable code for this result.string (generated)
data.lines[].policy.error.messagerequiredstringNoneA human-readable explanation of the result.string (generated)
data.lines[].policy.error.actionrequiredstringNoneThe corrective action available for this condition.string (generated)
data.lines[].disclosuresobject or nullNoneProvenance, grading, and authenticity statements shown to the buyer.{ "imageSource": "catalog", "conditionSource": "seller_declared", "authenticitySource": "seller_attestation", "snapcasterInspected": false, "snapcasterGraded": false, "snapcasterAuthenticated": false, "gradingStandard": "snapcaster-magic-v1", "declaredGrade": "string", "buyerProtection": "magic-grade-and-authenticity" } (generated)
data.lines[].disclosures.imageSourcerequiredstringallowed values: catalogImage Source for the surrounding disclosures record.catalog (generated)
data.lines[].disclosures.conditionSourcerequiredstringallowed values: seller_declaredCondition Source for the surrounding disclosures record.seller_declared (generated)
data.lines[].disclosures.authenticitySourcerequiredstringallowed values: seller_attestationAuthenticity Source for the surrounding disclosures record.seller_attestation (generated)
data.lines[].disclosures.snapcasterInspectedrequiredbooleanallowed values: falseSnapcaster Inspected for the surrounding disclosures record.false (generated)
data.lines[].disclosures.snapcasterGradedrequiredbooleanallowed values: falseSnapcaster Graded for the surrounding disclosures record.false (generated)
data.lines[].disclosures.snapcasterAuthenticatedrequiredbooleanallowed values: falseSnapcaster Authenticated for the surrounding disclosures record.false (generated)
data.lines[].disclosures.gradingStandardrequiredstringallowed values: snapcaster-magic-v1, seller-declared-no-specialist-promiseGrading Standard for the surrounding disclosures record.snapcaster-magic-v1 (generated)
data.lines[].disclosures.declaredGraderequiredstring or nullNoneDeclared Grade for the surrounding disclosures record.string (generated)
data.lines[].disclosures.buyerProtectionrequiredstringallowed values: magic-grade-and-authenticity, genuine-and-as-describedBuyer Protection for the surrounding disclosures record.magic-grade-and-authenticity (generated)
data.lines[].fulfillmentObligationobject or nullNoneFulfillment Obligation for the surrounding lines item record.{ "sku": "exact", "printing": "exact", "language": "exact", "finish": "exact", "condition": "declared-or-better" } (generated)
data.lines[].fulfillmentObligation.skurequiredstringallowed values: exactThe stock-keeping identity for the exact card offering.exact (generated)
data.lines[].fulfillmentObligation.printingrequiredstringallowed values: exactThe exact card printing the Seller is obligated to supply.exact (generated)
data.lines[].fulfillmentObligation.languagerequiredstringallowed values: exactThe language of the card printing.exact (generated)
data.lines[].fulfillmentObligation.finishrequiredstringallowed values: exactThe physical finish or foil treatment of the card.exact (generated)
data.lines[].fulfillmentObligation.conditionrequiredstringallowed values: declared-or-betterThe normalized condition assigned to the card.declared-or-better (generated)

Errors

StatusCodeMeaningDo this
400INVALID_REQUESTThe request failed validation (`INVALID_REQUEST`).Correct the fields named in the error details, then retry the request.

Operations

Concepts

Changelog

None.

Schema

Full schema details (51 fields)

Parameters

None.

Request

FieldTypeConstraintsMeaningExample
linesrequiredarray of objectmaximum items: 500The individual records carried by this request, response, or event.[ { "sellerId": 1, "skuId": 1 } ] (generated)
lines[].sellerIdrequiredintegerexclusive minimum: 0Seller Id for the surrounding lines item record.1 (generated)
lines[].skuIdrequiredintegerexclusive minimum: 0Sku Id for the surrounding lines item record.1 (generated)

Response 200 (application/json)

FieldTypeConstraintsMeaningExample
successrequiredbooleanallowed values: trueWhether the operation completed as requested.true (generated)
datarequiredobjectNoneThe operation or event payload.{ "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 } ] } (generated)
data.linesrequiredarray of objectNoneOne element per requested pair, in request order.[ { "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 } ] (generated)
data.lines[].sellerIdrequiredintegerNoneEcho of the requested cart-line key (with `skuId`).0 (generated)
data.lines[].skuIdrequiredintegerNoneEcho of the requested cart-line key (with `sellerId`).0 (generated)
data.lines[].sellerrequiredobject or nullNoneNull when the Seller is unknown.{ "name": "string" } (generated)
data.lines[].seller.namerequiredstringNoneSeller display name; not a handle/slug.string (generated)
data.lines[].productrequiredobject or nullNoneCanonical Catalog display data; null when the sku is unknown.{ "productId": 0, "name": "string", "set": "string", "image": "string" } (generated)
data.lines[].product.productIdrequiredintegerNoneProduct Id for the surrounding product record.0 (generated)
data.lines[].product.namerequiredstring or nullNoneThe human-readable name of the resource.string (generated)
data.lines[].product.setrequiredstring or nullNoneThe card set or expansion.string (generated)
data.lines[].product.imagerequiredstring or nullNoneThe product image URL shown to the buyer.string (generated)
data.lines[].skurequiredobject or nullNoneCanonical printing descriptors; null when the sku is unknown.{ "condition": "string", "language": "string", "finish": "string" } (generated)
data.lines[].sku.conditionrequiredstring or nullNoneThe normalized condition assigned to the card.string (generated)
data.lines[].sku.languagerequiredstring or nullNoneThe language of the card printing.string (generated)
data.lines[].sku.finishrequiredstring or nullNoneThe physical finish or foil treatment of the card.string (generated)
data.lines[].currentPricerequiredinteger or nullNoneLive Listing price in integer minor units (cents); null when no live Listing backs the pair.0 (generated)
data.lines[].availablerequiredintegerNoneAvailable stock (on-hand minus committed units); 0 when no live Listing backs the pair.0 (generated)
data.lines[].sellerUnavailableobjectNonePresent ONLY when this line’s store fails Checkout readiness; its ABSENCE is the ready signal. The line is never pruned, repriced or reduced because of it - `currentPrice` and `available` stay the Listing’s real live state, and the client decides what the Cart shows. The same store failing across several lines carries the same block on each.{ "sellerId": 0, "reason": "SELLER_ON_VACATION" } (generated)
data.lines[].sellerUnavailable.sellerIdrequiredintegerNoneThe store that cannot take the money, echoing the line key.0 (generated)
data.lines[].sellerUnavailable.reasonrequiredstringallowed values: SELLER_ON_VACATION, SELLER_UNAVAILABLEBuyer-safe category. `SELLER_ON_VACATION` means the store paused itself and is otherwise ready; `SELLER_UNAVAILABLE` is every other cause, deliberately indistinguishable so a store’s private account standing is never published.SELLER_ON_VACATION (generated)
data.lines[].policyobjectNoneThe eligibility and buyer-protection decision for this line.{ "status": "eligible", "error": { "code": "string", "message": "string", "action": "string" } } (generated)
data.lines[].policy.statusrequiredstringallowed values: eligible, blockedThe current lifecycle or policy state of the resource.eligible (generated)
data.lines[].policy.errorrequiredobject or nullNoneStructured error information returned when the request cannot be completed.{ "code": "string", "message": "string", "action": "string" } (generated)
data.lines[].policy.error.coderequiredstringNoneThe stable machine-readable code for this result.string (generated)
data.lines[].policy.error.messagerequiredstringNoneA human-readable explanation of the result.string (generated)
data.lines[].policy.error.actionrequiredstringNoneThe corrective action available for this condition.string (generated)
data.lines[].disclosuresobject or nullNoneProvenance, grading, and authenticity statements shown to the buyer.{ "imageSource": "catalog", "conditionSource": "seller_declared", "authenticitySource": "seller_attestation", "snapcasterInspected": false, "snapcasterGraded": false, "snapcasterAuthenticated": false, "gradingStandard": "snapcaster-magic-v1", "declaredGrade": "string", "buyerProtection": "magic-grade-and-authenticity" } (generated)
data.lines[].disclosures.imageSourcerequiredstringallowed values: catalogImage Source for the surrounding disclosures record.catalog (generated)
data.lines[].disclosures.conditionSourcerequiredstringallowed values: seller_declaredCondition Source for the surrounding disclosures record.seller_declared (generated)
data.lines[].disclosures.authenticitySourcerequiredstringallowed values: seller_attestationAuthenticity Source for the surrounding disclosures record.seller_attestation (generated)
data.lines[].disclosures.snapcasterInspectedrequiredbooleanallowed values: falseSnapcaster Inspected for the surrounding disclosures record.false (generated)
data.lines[].disclosures.snapcasterGradedrequiredbooleanallowed values: falseSnapcaster Graded for the surrounding disclosures record.false (generated)
data.lines[].disclosures.snapcasterAuthenticatedrequiredbooleanallowed values: falseSnapcaster Authenticated for the surrounding disclosures record.false (generated)
data.lines[].disclosures.gradingStandardrequiredstringallowed values: snapcaster-magic-v1, seller-declared-no-specialist-promiseGrading Standard for the surrounding disclosures record.snapcaster-magic-v1 (generated)
data.lines[].disclosures.declaredGraderequiredstring or nullNoneDeclared Grade for the surrounding disclosures record.string (generated)
data.lines[].disclosures.buyerProtectionrequiredstringallowed values: magic-grade-and-authenticity, genuine-and-as-describedBuyer Protection for the surrounding disclosures record.magic-grade-and-authenticity (generated)
data.lines[].fulfillmentObligationobject or nullNoneFulfillment Obligation for the surrounding lines item record.{ "sku": "exact", "printing": "exact", "language": "exact", "finish": "exact", "condition": "declared-or-better" } (generated)
data.lines[].fulfillmentObligation.skurequiredstringallowed values: exactThe stock-keeping identity for the exact card offering.exact (generated)
data.lines[].fulfillmentObligation.printingrequiredstringallowed values: exactThe exact card printing the Seller is obligated to supply.exact (generated)
data.lines[].fulfillmentObligation.languagerequiredstringallowed values: exactThe language of the card printing.exact (generated)
data.lines[].fulfillmentObligation.finishrequiredstringallowed values: exactThe physical finish or foil treatment of the card.exact (generated)
data.lines[].fulfillmentObligation.conditionrequiredstringallowed values: declared-or-betterThe normalized condition assigned to the card.declared-or-better (generated)

Error 400 (application/json)

FieldTypeConstraintsMeaningExample
successrequiredbooleanallowed values: falseWhether the operation completed as requested.false (generated)
errorrequiredobjectNoneStructured error information returned when the request cannot be completed.{ "code": "UNAUTHORIZED", "message": "string" } (generated)
error.coderequiredstringallowed values: UNAUTHORIZED, INVALID_REQUEST, UNSUPPORTED_API_VERSION, SELLER_SOURCE_EXCLUSIVE, BATCH_TOO_LARGE, RATE_LIMITED, ORDER_NOT_FOUND, SELLER_NOT_FOUND, INVALID_TRANSITION, CHECKOUT_IDEMPOTENCY_KEY_REUSED, CHECKOUT_MANUAL_SELLER_UNSUPPORTED, CHECKOUT_SELF_PURCHASE_NOT_ALLOWED, CHECKOUT_SELLER_UNAVAILABLE, CHECKOUT_NOT_FOUND, FEATURE_DISABLEDStable public error code the Platform can branch on.UNAUTHORIZED (generated)
error.messagerequiredstringNoneA human-readable explanation of the result.string (generated)
error.detailsunknownNoneAdditional structured context for diagnosing the result.{} (generated)