Stocks API Overview

The Stocks API can be used to set the available stock of an article. All stock updates in a single batch must have a unique combination of sales_channel_id and ean. A batch request can contain up to 1000 stock updates.

Stocks API Scopes

Updating stock levels with the Stocks API requires the products/stock/write scope.

Many zDirect APIs require clients to have specific permissions or scopes for read or write access. For more information on how to assign and configure app scopes, see the Applications section of our zDirect Portal guide.

Rate limiting

The Stocks API enforces two rate limiting constraints that both apply simultaneously. Whichever limit is reached first will prevent additional requests until the next minute begins.

Environment Requests / minute Stock updates / minute
Production 60 2000
Sandbox 60 2000

Each individual request can contain up to 1000 stock updates. You must stay within both the request limit (60 requests/minute) and the stock updates limit (2000 updates/minute).

Examples: - Sending 2 requests with 1000 stock updates each will reach the 2000 stock updates limit. Even though you have 58 requests remaining, you cannot send more stock updates until the next minute. - Sending 60 requests with 33 stock updates each will reach the 60 requests limit after using approximately 2000 stock updates. You cannot send more requests until the next minute. - Sending 50 requests with 40 stock updates each uses 2000 stock updates and 50 requests. You have 10 requests remaining but cannot send more stock updates until the next minute.

For more information, see Rate Limiting.

Sandbox behaviour

Stock updates made in the sandbox environment are given the same validation upon submission, but submitted data is not persisted or propagated.

For more information, see Sandbox Testing in our Getting Started Guide.

Additional resources

Contact Support