YOM Docs

Bulk stock upload


PUT {{URL_BASE_V3}}/admin/catalog/stock/bulk

Creates or updates stock records. The update key is the combination of product and distribution center: if a record already exists for that pair, it is updated; if not, it is created.

What to send


Field Type Requirement Description Examples
data ๐Ÿ”ก List of Objects โ†’ Stock ๐ŸŸข Required Between 1 and 500 stock records. See details below.
syncId ๐Ÿ“ Text โšช Optional Upload identifier. It is stored on every record. "20260810-carga-manana"

No other fields are allowed at the top level of the request body.

Stock

Each data record.

Field Type Requirement Description Examples
sku ๐Ÿ“ Text ๐ŸŸข Required Product code in the customer's system. "ABC-1"
quantity ๐Ÿ”ข Number ๐ŸŸข Required Stock quantity. 120
distributionCenterExternalId ๐Ÿ“ Text ๐ŸŸก Conditional Distribution center code in the customer's system.
*\*Required in the absence of *distributionCenterId. "CD-SANTIAGO"
distributionCenterId ๐Ÿ†” ObjectId ๐ŸŸก Conditional Distribution center identifier in YOM.
*\*Required in the absence of *distributionCenterExternalId. "650a1b2c3d4e5f6a7b8c9d99"
productId ๐Ÿ†” ObjectId โšช Optional Product identifier in YOM.
*\*If omitted, YOM resolves it from the *sku. "650a1b2c3d4e5f6a7b8c9d01"
formatKey ๐Ÿ“ Text โšช Optional Product format. "caja"

Example

PUT {{URL_BASE_V3}}/admin/catalog/stock/bulk

{
  "syncId": "20260810-carga-manana",
  "data": [
    {
      "sku": "ABC-1",
      "distributionCenterExternalId": "CD-SANTIAGO",
      "quantity": 120
    },
    {
      "sku": "ABC-2",
      "distributionCenterExternalId": "CD-SANTIAGO",
      "quantity": 0
    },
    {
      "sku": "ABC-3",
      "distributionCenterId": "650a1b2c3d4e5f6a7b8c9d99",
      "quantity": 45,
      "formatKey": "caja"
    }
  ]
}

What it returns


207 โ€” an array with one result per record sent, in the same order.

[
  { "status": 201, "recordId": "650a1b2c3d4e5f6a7b8c9d11", "result": "created" },
  { "status": 204, "recordId": null, "result": "updated" },
  { "status": 422, "recordId": null, "result": "invalid", "error": "ValidationError" }
]
Field Type Requirement Description Examples
result ๐Ÿ“ Text ๐ŸŸข Required Record result.
"created" โ†’ a new record was created
"updated" โ†’ an existing one was updated
"invalid" โ†’ could not be processed "created"
status ๐Ÿ”ข Number ๐ŸŸข Required Code associated with the result.
201 created ยท 204 updated ยท 422 invalid 201
recordId ๐Ÿ†” ObjectId โšช Optional Identifier of the created record. Only present with "created"; null otherwise. "650a1b2c3d4e5f6a7b8c9d11"
error ๐Ÿ“ Text โšช Optional Reason for rejection. Only present with "invalid". "ValidationError"

Errors for the whole call:

| --- | --- |