ProductSync
Type: schema
Description
One sync of a seller's product change to the marketplace store's catalog: what was sent, the marketplace's answer, and the outcome.
TypeScript Definition
typescript
ProductSync: {{
/** @description The seller's product the change came from; `seller_variant_id` and `seller_store_id` likewise. */
seller_product_id: string;
seller_variant_id: string | null;
seller_store_id: string;
marketplace_id: string;
marketplace_slug: string;
/** @description The marketplace store's copy of the product; `marketplace_variant_id` and `marketplace_item_id` likewise. */
marketplace_product_id: string | null;
marketplace_variant_id: string | null;
marketplace_item_id: string | null;
/** @description The seller's change that was synced, e.g. `product.marketplace-listing.created`, `inventory.updated`, `product.marketplace-sync.queued`. */
event: string;
/** @description Where the change was sent. */
endpoint: string | null;
/** @description Headers sent, without credentials (`x-api-key`, `authorization`). */
request_headers: {
[key: string]: string;
} | null;
/** @description What was sent: the seller's change, with the marketplace's product, variant and item ids and the listing's marketplace pricing, attributes and category. */
request_body: Record<string, never> | null;
/** @description The marketplace's answer; `response_headers` and `response_body` likewise. */
response_code: number | null;
response_headers: {
[key: string]: string;
} | null;
response_body: null | string;
/** @description Not currently measured. */
duration_ms: number | null;
/**
* @description `success`; `failed` when the marketplace refused the change or the listing failed validation; `error` when the sync couldn't complete.
* @enum {string}
*/
status: "success" | "failed" | "error";
/**
* @description `schema_validation_error` (the listing lacks its category's required attributes) or `exception_error` (the sync couldn't complete).
* @enum {string|null}
*/
error_code: "schema_validation_error" | "exception_error" | null;
/** @description The missing attributes, or what went wrong. */
error_message: null | string;
/** @description A fingerprint of the seller's listing when it was synced, to tell whether the marketplace's copy is current. */
marketplace_item_hash: string;
};
/** Promotion */
}OpenAPI Schema
json
{
"title": "ProductSync",
"description": "One sync of a seller's product change to the marketplace store's catalog: what was sent, the marketplace's answer, and the outcome.",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/ProductSync",
"description": "API reference for the ProductSync schema"
},
"required": [
"duration_ms",
"endpoint",
"error_code",
"error_message",
"event",
"marketplace_id",
"marketplace_item_hash",
"marketplace_item_id",
"marketplace_product_id",
"marketplace_slug",
"marketplace_variant_id",
"request_body",
"request_headers",
"response_body",
"response_code",
"response_headers",
"seller_product_id",
"seller_store_id",
"seller_variant_id",
"status"
],
"properties": {
"seller_product_id": {
"description": "The seller's product the change came from; `seller_variant_id` and `seller_store_id` likewise.",
"type": "string"
},
"seller_variant_id": {
"type": [
"string",
"null"
]
},
"seller_store_id": {
"type": "string"
},
"marketplace_id": {
"type": "string"
},
"marketplace_slug": {
"type": "string"
},
"marketplace_product_id": {
"description": "The marketplace store's copy of the product; `marketplace_variant_id` and `marketplace_item_id` likewise.",
"type": [
"string",
"null"
]
},
"marketplace_variant_id": {
"type": [
"string",
"null"
]
},
"marketplace_item_id": {
"type": [
"string",
"null"
]
},
"event": {
"description": "The seller's change that was synced, e.g. `product.marketplace-listing.created`, `inventory.updated`, `product.marketplace-sync.queued`.",
"type": "string"
},
"endpoint": {
"description": "Where the change was sent.",
"type": [
"string",
"null"
]
},
"request_headers": {
"description": "Headers sent, without credentials (`x-api-key`, `authorization`).",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"request_body": {
"description": "What was sent: the seller's change, with the marketplace's product, variant and item ids and the listing's marketplace pricing, attributes and category.",
"type": [
"object",
"null"
]
},
"response_code": {
"description": "The marketplace's answer; `response_headers` and `response_body` likewise.",
"type": [
"integer",
"null"
]
},
"response_headers": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"response_body": {
"type": [
"null",
"string"
]
},
"duration_ms": {
"description": "Not currently measured.",
"type": [
"integer",
"null"
]
},
"status": {
"description": "`success`; `failed` when the marketplace refused the change or the listing failed validation; `error` when the sync couldn't complete.",
"type": "string",
"enum": [
"success",
"failed",
"error"
]
},
"error_code": {
"description": "`schema_validation_error` (the listing lacks its category's required attributes) or `exception_error` (the sync couldn't complete).",
"type": [
"string",
"null"
],
"enum": [
"schema_validation_error",
"exception_error",
null
]
},
"error_message": {
"description": "The missing attributes, or what went wrong.",
"type": [
"null",
"string"
]
},
"marketplace_item_hash": {
"description": "A fingerprint of the seller's listing when it was synced, to tell whether the marketplace's copy is current.",
"type": "string"
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions