Stock Update
Any Partner application responsible for handling stock data must be permitted to interact with the Stock Update endpoint, which requires a valid bearer token in the request headers. This token is obtained by authenticating through the Authentication service.
Overview
The Stock Update API allows Brand Partners to update the available quantity of one or more proposals in near real-time, without sending the full product payload.
This API is designed for high-frequency inventory updates from RMS or WMS systems, where only stock levels change and the rest of the product data remains unmodified.
Each update targets a specific proposal, identified by the combination of productId, colorId, sku, and storeId. The update is applied exclusively to availableQuantity; all other fields of the proposal remain unchanged.
- Stock update
- No change (empty proposals)
A single request can contain multiple products, color variants, and SKUs. Each proposal is processed independently.
[
{
"productId": "O11010351-W01GQ-",
"colorVariants": [
{
"colorId": "PLUM",
"sizeVariants": [
{
"sku": "O11010351-W01GQ-_PLUM_6",
"sizeId": "6",
"proposals": [
{
"storeId": "500",
"availableQuantity": 3
}
]
},
{
"sku": "O11010351-W01GQ-_PLUM_8",
"sizeId": "8",
"proposals": [
{
"storeId": "500",
"availableQuantity": 0
}
]
}
]
}
]
}
]Sending an empty proposals array for a SKU has no effect. Existing proposals are not removed or invalidated. This differs from the full product onboarding, where an empty array invalidates all existing proposals.
[
{
"productId": "O11010351-W01GQ-",
"colorVariants": [
{
"colorId": "PLUM",
"sizeVariants": [
{
"sku": "O11010351-W01GQ-_PLUM_6",
"sizeId": "6",
"proposals": []
}
]
}
]
}
]Business Rules
| Rule | Behaviour |
|---|---|
availableQuantity > 0 | Updates the quantity on the proposal |
availableQuantity == 0 | Updates the quantity and sets showable = false |
availableQuantity < 0 | Request rejected — proposal marked as invalid |
Proposal with showable = false | Update not permitted — proposal marked as invalid |
| Proposal not found in production | Proposal marked as invalid |
| Store not authorised for the brand | Proposal marked as invalid |
Empty proposals array for a SKU | No change — existing proposals are preserved |
If a proposal is currently set as showable = false (e.g. because stock previously reached zero), it cannot be updated via this API. To reactivate the proposal, a full product onboarding request must be submitted.
Each proposal is processed independently. A validation failure on one proposal does not block the others in the same request.
Response
201 Created
The request has been accepted and the stock update process has been initiated asynchronously.
Error codes
| Code | Description |
|---|---|
400 Bad Request | Malformed request or missing required fields |
401 Unauthorized | Missing or invalid bearer token |
403 Forbidden | Token does not have permission to update stock for this brand |
Example
curl -X PATCH https://api.manna.com/api/stock \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '[
{
"productId": "O11010351-W01GQ-",
"colorVariants": [
{
"colorId": "PLUM",
"sizeVariants": [
{
"sku": "O11010351-W01GQ-_PLUM_6",
"sizeId": "6",
"proposals": [
{
"storeId": "500",
"availableQuantity": 3
}
]
}
]
}
]
}
]'
Rate Limiting
| Environment | Requests / min | Entities / min |
|---|---|---|
| Dev/Quality | ∞ | ∞ |