Update price and stock

POST /sapigw/suppliers/{supplierId}/products/price-and-inventory — PIM API · Price & Stock

Updates list price, sales price, and stock quantity based on barcode. The request is queued and the result is queried using BatchRequestId.

  • Only prices for barcodes registered in PIM are written; rows with empty Barcode are skipped.
  • Stock is written to the company's default warehouse.
  • If thresholdCheck=false is sent, only price is updated, stock is not written.
  • If price or stock transfer is disabled for the company, the related part is not processed and an error message is returned in the result rows.
  • If SourceFirstPrice is not sent or is 0, the ListPrice value is used.

Parametreler

  • supplierId (path, string, zorunlu): Supplier ID provided by CommerceLab. If not defined in this environment, the request returns 401.
  • thresholdCheck (query, boolean): true (default): price and stock are written with threshold check. false: only price is written without threshold check, stock is not updated.
  • trustedSource (query, boolean): If the company enforces "trusted source" requirement, true must be sent; 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 via Basic Auth. Not required when using Bearer token.

İstek gövdesi

  • items (object[], zorunlu): Barcodes to be updated.
    • items.barcode (string, zorunlu): Barcode registered in PIM.
    • items.quantity (integer): Stock quantity (default warehouse).
    • items.listPrice (number): List price.
    • items.salePrice (number): Sales price.
    • items.catalogName (string): Catalog name where the price will be written; if empty, the company's default price catalog is used.
    • items.sourceFirstPrice (number): Initial (source) price; if not sent or 0, listPrice is used.

Yanıtlar

  • 200: Request received; field meanings are the same as product transfer.
  • 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): Process ID; save to query the result. null if limit exceeded.