Bulk transfer products
POST /sapigw/suppliers/{supplierId}/v2/products — PIM API · Products
Transfers products in ERP/supplier format to PIM in bulk (creates or updates).
The request is queued and immediately returns a BatchRequestId; the result
is tracked with Query bulk operation result.
Product hierarchy: Model → Option (color) → SKU (size/variant, sellable unit).
| Field | PIM equivalent |
|---|---|
ProductMainId |
Option code |
StockCode |
SKU (unique) |
Barcode |
Default barcode (unique) |
Model Code inside Attributes |
Model code (if missing, ProductMainId) |
Title |
Product name |
CategoryId |
Written as CategoryId attribute |
Rules:
- Rows with empty
StockCodeorBarcodeare not processed. - All rows with duplicate
StockCodeorBarcodein the same request are rejected. ListPrice,SalePrice, andQuantitysent with the product are also written as price/stock.- Field mapping may be company-specific; the above table is the default mapping.
- If "trusted source" requirement is enabled for the company, requests without
trustedSource=trueare not processed (IsSuccess: falseis returned; rejection record can still be queried withBatchRequestId).
Companies using the marketplace model may expect a different body format for the same address; follow the integration notes provided to you.
Parametreler
supplierId(path, string, zorunlu): Supplier ID provided by CommerceLab. If not defined in this environment, the request receives401.trustedSource(query, boolean): If the company has "trusted source" requirement enabled,truemust be sent; otherwise, the request is rejected without processing. If disabled, this is ignored.Tenant(header, string): Company code for users accessing multiple companies with Basic Auth. Not required when using Bearer token.
İstek gövdesi
items(object[], zorunlu): SKUs to be transferred; each element represents a single sellable product (barcode).items.title(string): Product name (written as name, short description, and SEO description).items.images(object[]): Product images; order is preserved.items.images.url(string): Public full URL of the image.items.images.updatedOn(string<date-time>): Last update time of the image.
items.onSale(boolean): Sale status field; in default mapping, sale status is determined bysalePrice > 0.items.barcode(string, zorunlu): Default barcode of the product; must be unique.items.brandId(integer<int64>): Brand ID.items.vatRate(number): VAT rate (e.g.,20).items.quantity(number): Stock quantity; written to the default warehouse.items.brandName(string): Brand name.items.listPrice(number): List price.items.salePrice(number): Sale price; if greater than0, the product is considered on sale.items.stockCode(string, zorunlu): SKU code; must be unique.items.attributes(object[]): Product attributes. Sent by attribute name (attributeName) or ID (attributeId). The attribute namedModel Codedefines the product's model code.items.attributes.attributeId(integer<int64>): Attribute ID; used as key ifattributeNameis missing.items.attributes.attributeName(string): Attribute name (e.g.,Color,Size). If/is in the name, it is replaced with-.items.attributes.attributeValue(string): Attribute value (text).items.attributes.attributeValueId(integer<int64>): Value ID; used ifattributeValueandcustomAttributeValueare missing.items.attributes.customAttributeValue(string): Free text value; used ifattributeValueis missing.
items.categoryId(integer): Category ID; written asCategoryIdattribute on the product.items.description(string): Product description (may be HTML).items.currencyType(string): Currency code (e.g.,TRY).items.productMainId(string, zorunlu): Option (color) code; must be the same for sizes in the same color.items.cargoCompanyId(integer<int64>): Shipping company ID.items.sourceFirstPrice(number): Original (source) price; if not sent,listPriceis used.items.dimensionalWeight(integer<int64>): Volume (desi).
Yanıtlar
- 200: Request received. If
IsSuccess: true, it has been queued. IfIsSuccess: falseand emptyBatchRequestId, the request limit was exceeded; ifBatchRequestIdis present, it indicates rejection due to untrusted source. - 400: Request body is not valid JSON or field types are incompatible.
- 401: Authentication failed or
supplierIdis not defined in this environment. Body is empty. - 500: Unexpected server-side error.
200 yanıt alanları
Message(string): Reason if the request was not queued (e.g., request limit exceeded);nullif successful.IsSuccess(boolean):trueif the request was queued.BatchRequestId(string): Operation ID; keep to query the result.nullif limit exceeded.