Bulk update products

PUT /sapigw/suppliers/{supplierId}/v2/products — PIM API · Products

Performs the same operation as Bulk import products; intended for clients wishing to send the same body with PUT. Existing products are updated by SKU/barcode, non-existing ones are created. The result is tracked with BatchRequestId.

Parametreler

  • supplierId (path, string, zorunlu): Supplier ID provided to you by CommerceLab. If not defined in this environment, the request receives 401.
  • trustedSource (query, boolean): If the "trusted source" requirement is enabled for the company, send true; if not sent, the request is rejected without processing. If the requirement is disabled, this has no effect.
  • Tenant (header, string): Company code for users accessing multiple companies with Basic Auth. Not required if using Bearer token.

İstek gövdesi

  • items (object[], zorunlu): SKUs to be imported; 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; by default, sale status is determined by salePrice > 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 than 0, 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 named Model Kodu defines the product's model code.
      • items.attributes.attributeId (integer<int64>): Attribute ID; used as key if attributeName is absent.
      • items.attributes.attributeName (string): Attribute name (e.g., Color, Size). If the name contains /, it is replaced with -.
      • items.attributes.attributeValue (string): Attribute value (text).
      • items.attributes.attributeValueId (integer<int64>): Value ID; used if attributeValue and customAttributeValue are absent.
      • items.attributes.customAttributeValue (string): Free text value; used if attributeValue is absent.
    • items.categoryId (integer): Category ID; written as the CategoryId attribute of the product.
    • items.description (string): Product description (can be HTML).
    • items.currencyType (string): Currency code (e.g., TRY).
    • items.productMainId (string, zorunlu): Option (color) code; must be the same for sizes of the same color.
    • items.cargoCompanyId (integer<int64>): Shipping company ID.
    • items.sourceFirstPrice (number): Initial (source) price; if not sent, listPrice is used.
    • items.dimensionalWeight (integer<int64>): Volume (desi).

Yanıtlar

  • 200: Request received; field meanings are the same as with POST.
  • 400: Request body is not valid JSON or field types are incompatible.
  • 401: Authentication failed or supplierId is not defined in this environment. Body is empty.
  • 500: Unexpected server-side error.

200 yanıt alanları

  • Message (string): Reason if the request could not be queued (e.g., request limit exceeded); null if successful.
  • IsSuccess (boolean): true if the request was queued.
  • BatchRequestId (string): Operation ID; keep to query the result. null if limit exceeded.