Skip to content

Vendor stock API — update stock and/or prices of the calling vendor's articles​

POST
/vendor-api/stock

dryRun defaults to TRUE (JSON boolean): the answer lists what would change and nothing is written; send "dryRun": false to apply. ≤ 2,000 items per call, body ≤ 2 MB, one write at a time per vendor (409).

Each item names ONE article of the vendor — sku (article SKU, or the product SKU of a product without sizes), else ean, else reference + size (+ color) — and carries stock and/or price (+ salePrice: below price; null ends the promotion; absent keeps a running promotion that is still below the new price). Unknown, ambiguous, duplicated or ERP-fed articles come back in notFound with their index — never guessed, never created (this API cannot create products, nor change designations / photos).

Same write path as a file import (stock_price): Wildkard copies follow, connected stores get the stock, search is reindexed; price and stock need no Wildkard re-approval. A strict-ERP vendor's stock is never written (stockBlockedBy: strict_erp).

Authorizations​

vendorStockKey

Clé API vendeur avec la portée stock (Authorization: Bearer vk_… ou X-Api-Key: vk_…). Créée par le vendeur dans Sources › Réglages communs › Clés API. Valable uniquement sur /vendor-api/stock.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"dryRun": true,
  
"items": [
  
  
{
  
  
  
"sku": "string",
  
  
  
"ean": "string",
  
  
  
"reference": "string",
  
  
  
"size": "string",
  
  
  
"color": "string",
  
  
  
"stock": 0,
  
  
  
"price": 0,
  
  
  
"salePrice": 0
  
  
}
  
]
}

Responses​

What changed (or would change)

application/json
JSON
{
  
"ok": true,
  
"data": {
  
  
"dryRun": true,
  
  
"received": 0,
  
  
"matched": 0,
  
  
"stockChanged": 0,
  
  
"priceChanged": 0,
  
  
"stockBlockedBy": "strict_erp",
  
  
"notFound": [
  
  
  
{
  
  
  
  
"index": 0,
  
  
  
  
"sku": "string",
  
  
  
  
"ean": "string",
  
  
  
  
"reference": "string",
  
  
  
  
"size": "string",
  
  
  
  
"reason": "introuvable"
  
  
  
}
  
  
],
  
  
"changes": [
  
  
  
{
  
  
  
  
"reference": "string",
  
  
  
  
"sku": "string",
  
  
  
  
"title": "string",
  
  
  
  
"variation": "string",
  
  
  
  
"stockBefore": 0,
  
  
  
  
"stockAfter": 0,
  
  
  
  
"priceBefore": 0,
  
  
  
  
"priceAfter": 0,
  
  
  
  
"reason": "source"
  
  
  
}
  
  
],
  
  
"errors": [
  
  
  
{
  
  
  
  
"externalId": "string",
  
  
  
  
"error": "string"
  
  
  
}
  
  
]
  
}
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI

Tarifs : contactez-nous — contact@marketkit.ai