Set Stock Levels

POST /v1/warehouses/{externalWarehouseID}/stock

Set stock levels to a specific warehouse using externalWarehouseID.

Path parameters

Body Required

  • availableQuantity integer Required

    Available Quantity in stock

  • date string

    Date is the event time for the given entry. If unset, the event time will be assumed to be now

  • ean string

    EAN of variant

  • The externalID of the warehouse

  • key string Required

    Key is reference between Products, Transactions & Stock levels

  • Physical Quantity in stock

  • sku string

    SKU of variant. Should be unique per size/variant

  • supplier string

    Name of the supplier

Responses

POST /v1/warehouses/{externalWarehouseID}/stock
curl \
 -X POST https://ma-api.maddenanalytics.com/v1/warehouses/{externalWarehouseID}/stock \
 -H "Authorization: $API_KEY" \
 -d '[{"availableQuantity":21,"date":"2021-07-19T14:05:22.257Z","ean":"7340192703345","externalWarehouseID":"warehouse1","key":"7340192703345","physicalQuantity":30,"sku":"123456-001-43","supplier":"Acme Enterprises AB"}]'
Request example
[
  {
    "availableQuantity": 21,
    "date": "2021-07-19T14:05:22.257Z",
    "ean": "7340192703345",
    "externalWarehouseID": "warehouse1",
    "key": "7340192703345",
    "physicalQuantity": 30,
    "sku": "123456-001-43",
    "supplier": "Acme Enterprises AB"
  }
]
Response examples (201)
[
  {
    "error": "Error Type (if any)",
    "message": "Message describing the error",
    "statusCode": 400
  }
]
Response examples (default)
{
  "error": "Error Type (if any)",
  "message": "Message describing the error",
  "statusCode": 400
}