Save ERP code to approved product

POST /PIM/SaveExternalSku — PIM API · Supplier Products

Links the company's own ERP codes (external code, external barcode, external option/model code) to the product sent for approval by the supplier. The product is found by CommerceLab SKU (Sku) or supplier SKU + supplier ID (MerchantSku + SupplierId).

  • Only SKU, unique and bundle type products are accepted.
  • Codes are normalized before saving.
  • If the product was previously approved, the approved record is also updated and ProgressPosition returns Approved.

Returns separate results for each item; an error in one item does not stop others.

Parametreler

  • Tenant (header, string): Company code for users accessing multiple companies with Basic Auth. Not required if using Bearer token.

İstek gövdesi

  • Sku (string): CommerceLab SKU of the product.
  • SupplierId (integer): Supplier ID (together with MerchantSku).
  • VendorCode (string): Seller code.
  • MerchantSku (string): Supplier's SKU of the product (instead of Sku).
  • ExternalCode (string): ERP product code.
  • ExternalModel (string): ERP model code.
  • ExternalBarcode (string): ERP barcode.
  • ExternalOptionCode (string): ERP option code.

Yanıtlar

  • 200: List of results per item.
  • 400: Request body is not valid JSON or field types mismatch.
  • 401: Authentication failed (missing header, incorrect Basic info or invalid token). Body is empty.
  • 500: Unexpected server-side error.

200 yanıt alanları

  • IsSuccess (boolean): true if save succeeded.
  • ResultMessage (string): Error message (e.g. Product not found, Invalid product type).
  • LeadProductSku (string): Request Sku.
  • ProgressPosition (integer): Approval process step: -99 approval revoked, -1 rejected, 0 waiting for verification, 1 waiting for external info, 2 waiting for approval, 100 approved.
  • ApprovedProductId (integer): Approved product ID (if approved).
  • ProgressPositionValue (string): Name of ProgressPosition (e.g. Approved, WaitingForApproval).
  • LeadProductMerchantSku (string): Request MerchantSku.