Marketplaces / Zalando Direct connection / Zalando Stock Update

Zalando Stock Update

Version Created / Updated by Date Notes
1.0 Danail Deltchev
1.1 Danail Deltchev 16.11.2022 Clarifications on the flow expectations
1.2 Danail Deltchev 30.11.2022 Limit handling addition

The purpose of this document is to define the requirements of updating quantity to Zalando with all details on the how's and why's of doing it

API Docs: https://developers.merchants.zalando.com/docs/offers-stocks.html

API Call: POST /merchants/{merchant_id}/stocks

The stock update is fairly straight forward as operation. This is the final step when listing a new product and also has consecutive stock updates. Both cases are triggered in the exact same way as the flow up to the stock update (if successful) should’ve set the product in Hemi with the right statuses that we always view this as already published product that simply needs to receive a stock update. So please refer to the Stock Update abstraction for all necessary flags and blockers (Stock Update general requirements) but jus to highlight - Stock Update for Zalando is expected to work only for products that are already published (Product Account > Product Status = Product published)

Also, as per the abstraction, we are to track the Listing Status and update it accordingly based on what we are sending to the marketplace (activate on positive quantity and deactivate on zero)

A stock update can be sent every second with up to 1000 products for the minute. We want to incorporate this in the whole workflow with multiple Hemi accounts together so basically we need to group all accounts with the same Account Zalando > Merchant ID and then we can track the limit together for them. This means that for account 1 we can send 400 (which will leave the total per minute limit at 600) then the next second fire a stock update for 600 for account 2 and if there are more products waiting update for account 2 they will need to wait 1 minute before we can hit the second batch of up to 1000 for the minute again.

Example call:

{
  "items": [
    {
      "sales_channel_id": "091dcbdd-7839-4f39-aa05-324eb4599df0",
      "ean": "4063614512884",
      "quantity": 5
    }
  ]
}

Mapping:

Zalando field WAP Mapping WAP Notes
sales_channel_id Account Zalando > Zalando Channel
ean Item Account > Marketplace EAN

ОR Item > EAN | | | quantity | Item Account > Quantity | |

All standard validations and restrictions are to follow as per the abstraction - same goes for flows (end_item, closed, etc.)

Upon successful response we will receive a 207 status with a section for each update we’ve requested with its relevant status (ACCEPTED / REJECTED) and relevant description

Example Response:

{
  "items": [
    {
      "item": {
        "sales_channel_id": "091dcbdd-7839-4f39-aa05-324eb4599df0",
        "ean": "4063614512884",
        "quantity": 5
      },
      "result": {
        "status": "ACCEPTED",
        "code": "0"
      }
    }
  ]
}

OR

{
  "items": [
    {
      "item": {
        "sales_channel_id": "091dcbdd-7839-4f39-aa05-324eb4599df0",
        "ean": "4063614512884",
        "quantity": -2
      },
      "result": {
        "status": "REJECTED",
        "code": "101",
        "description": "Quantity is negative: -2."
      }
    }
  ]
}

The status and description are the fields in question we need to track and use for updating the item in Hemisphere correspondingly

Is this article helpful?
0 0 0