Skip to content
snapcasterDevelopers

Upsert listings

POST/listings

Push a single Listing or an array of them (desired-state upsert). Each item is reported independently in the multi-status response; one malformed item does not fail the batch.

When to use

Use this operation to upsert listings.

Endpoint

POST /listings

EnvironmentBase URL
Sandboxhttps://api-sandbox.snapcaster.ca/api/v1/marketplace
Productionhttps://api.snapcaster.ca/api/v1/marketplace
Authentication
  • marketplaceApiKey - http bearer. Seller-scoped Marketplace API key, presented as `Authorization: Bearer mp_{sellerCode}_{hex}`. The `mp_{sellerCode}_` prefix identifies the Seller; the trailing hex is the secret. Generated by the Seller and pasted into its Platform.

Request

No parameters.

Request body (application/json)

FieldTypeConstraintsMeaningExample
skuIdconditionalintegerexclusive minimum: 0Sku Id supplied to or returned by this operation.427286
productIdconditionalintegerexclusive minimum: 0Product Id supplied to or returned by this operation.24692
priceconditionalintegerminimum: 0The unit price in minor currency units.2499
quantityconditionalintegerNoneThe number of inventory units represented by this record.3
externalRefstringmaximum length: 255External Ref supplied to or returned by this operation.platform-listing-1042
asOfstringformat: date-timeAs Of supplied to or returned by this operation.2026-09-04T18:30:00.000Z
[].skuIdrequiredintegerexclusive minimum: 0Sku Id for the surrounding item record.1 (generated)
[].productIdrequiredintegerexclusive minimum: 0Product Id for the surrounding item record.1 (generated)
[].pricerequiredintegerminimum: 0The unit price in minor currency units.0 (generated)
[].quantityrequiredintegerNoneThe number of inventory units represented by this record.0 (generated)
[].externalRefstringmaximum length: 255External Ref for the surrounding item record.string (generated)
[].asOfstringformat: date-timeAs Of for the surrounding item record.2026-01-01T00:00:00.000Z (generated)

Example

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

cURL request - Sandbox: One Listing
curl --request POST \
--url 'https://api-sandbox.snapcaster.ca/api/v1/marketplace/listings' \
--header "Authorization: Bearer $MARKETPLACE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"skuId": 427286,
"productId": 24692,
"price": 2499,
"quantity": 3,
"externalRef": "platform-listing-1042",
"asOf": "2026-09-04T18:30:00.000Z"
}'
cURL request - Sandbox: Multiple Listings
curl --request POST \
--url 'https://api-sandbox.snapcaster.ca/api/v1/marketplace/listings' \
--header "Authorization: Bearer $MARKETPLACE_API_KEY" \
--header 'Content-Type: application/json' \
--data '[
{
"skuId": 427286,
"productId": 24692,
"price": 2499,
"quantity": 3,
"externalRef": "platform-listing-1042",
"asOf": "2026-09-04T18:30:00.000Z"
},
{
"skuId": 427287,
"productId": 24692,
"price": 2699,
"quantity": 1,
"externalRef": "platform-listing-1043",
"asOf": "2026-09-04T18:30:00.000Z"
}
]'

Response

200

Per-item multi-status results.

Response 200: Applied Listing
{
"success": true,
"data": {
"results": [
{
"skuId": 427286,
"op": "upsert",
"status": "applied",
"externalRef": "platform-listing-1042"
}
]
}
}
FieldTypeConstraintsMeaningExample
successrequiredbooleanallowed values: trueWhether the operation completed as requested.true
datarequiredobjectNoneThe operation or event payload.{ "results": [ { "skuId": 427286, "op": "upsert", "status": "applied", "externalRef": "platform-listing-1042" } ] }
data.resultsrequiredarray of objectNoneThe outcome recorded for each submitted item.[ { "skuId": 427286, "op": "upsert", "status": "applied", "externalRef": "platform-listing-1042" } ]
data.results[].skuIdrequiredintegerNoneSku Id for the surrounding results item record.427286
data.results[].oprequiredstringallowed values: upsert, deleteThe write operation to apply to this item.upsert
data.results[].statusrequiredstringallowed values: applied, unmatched, rejectedPer-item outcome. `unmatched` corresponds to the public per-item code `UNMATCHED` (persisted but not in the Canonical Catalog); `rejected` corresponds to `REJECTED` (failed validation, not persisted; see `reason`).applied
data.results[].reasonstringNoneWhy the item was rejected; present only when status is "rejected".string (generated)
data.results[].externalRefstringNoneEcho of the pushed external_ref, when one was supplied.platform-listing-1042

Errors

StatusCodeMeaningDo this
400INVALID_REQUESTThe request failed validation (`INVALID_REQUEST`).Correct the fields named in the error details, then retry the request.
401UNAUTHORIZEDMissing or invalid Marketplace API key (`UNAUTHORIZED`).Send the Marketplace API key for this Seller as a Bearer token, then retry.
409SELLER_SOURCE_EXCLUSIVEThe authenticated Seller’s declared inventory source is not `platform` (`SELLER_SOURCE_EXCLUSIVE`). Listing writes through the integration API are reserved for platform-source Sellers; sources are exclusive and never mixed.Use the Seller’s declared inventory source, or ask Snapcaster to move the Seller to the platform source.
413BATCH_TOO_LARGEThe request carried more than the 1,000-item per-request cap (`BATCH_TOO_LARGE`).Split the write into batches of at most 1,000 items and retry each batch.

Operations

Concepts

Changelog

Schema

Full schema details (40 fields)

Parameters

None.

Request

FieldTypeConstraintsMeaningExample
skuIdconditionalintegerexclusive minimum: 0Sku Id supplied to or returned by this operation.427286
productIdconditionalintegerexclusive minimum: 0Product Id supplied to or returned by this operation.24692
priceconditionalintegerminimum: 0The unit price in minor currency units.2499
quantityconditionalintegerNoneThe number of inventory units represented by this record.3
externalRefstringmaximum length: 255External Ref supplied to or returned by this operation.platform-listing-1042
asOfstringformat: date-timeAs Of supplied to or returned by this operation.2026-09-04T18:30:00.000Z
[].skuIdrequiredintegerexclusive minimum: 0Sku Id for the surrounding item record.1 (generated)
[].productIdrequiredintegerexclusive minimum: 0Product Id for the surrounding item record.1 (generated)
[].pricerequiredintegerminimum: 0The unit price in minor currency units.0 (generated)
[].quantityrequiredintegerNoneThe number of inventory units represented by this record.0 (generated)
[].externalRefstringmaximum length: 255External Ref for the surrounding item record.string (generated)
[].asOfstringformat: date-timeAs Of for the surrounding item record.2026-01-01T00:00:00.000Z (generated)

Response 200 (application/json)

FieldTypeConstraintsMeaningExample
successrequiredbooleanallowed values: trueWhether the operation completed as requested.true
datarequiredobjectNoneThe operation or event payload.{ "results": [ { "skuId": 427286, "op": "upsert", "status": "applied", "externalRef": "platform-listing-1042" } ] }
data.resultsrequiredarray of objectNoneThe outcome recorded for each submitted item.[ { "skuId": 427286, "op": "upsert", "status": "applied", "externalRef": "platform-listing-1042" } ]
data.results[].skuIdrequiredintegerNoneSku Id for the surrounding results item record.427286
data.results[].oprequiredstringallowed values: upsert, deleteThe write operation to apply to this item.upsert
data.results[].statusrequiredstringallowed values: applied, unmatched, rejectedPer-item outcome. `unmatched` corresponds to the public per-item code `UNMATCHED` (persisted but not in the Canonical Catalog); `rejected` corresponds to `REJECTED` (failed validation, not persisted; see `reason`).applied
data.results[].reasonstringNoneWhy the item was rejected; present only when status is "rejected".string (generated)
data.results[].externalRefstringNoneEcho of the pushed external_ref, when one was supplied.platform-listing-1042

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)

Error 401 (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)

Error 409 (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)

Error 413 (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)