Skip to main content

Stock Update

Authentication

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.

Proposal-level granularity

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.


Multiple SKUs in one request

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
              }
            ]
          }
        ]
      }
    ]
  }
]

Business Rules​

RuleBehaviour
availableQuantity > 0Updates the quantity on the proposal
availableQuantity == 0Updates the quantity and sets showable = false
availableQuantity < 0Request rejected — proposal marked as invalid
Proposal with showable = falseUpdate not permitted — proposal marked as invalid
Proposal not found in productionProposal marked as invalid
Store not authorised for the brandProposal marked as invalid
Empty proposals array for a SKUNo change — existing proposals are preserved
Proposal blocked

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.

Isolated processing

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​

CodeDescription
400 Bad RequestMalformed request or missing required fields
401 UnauthorizedMissing or invalid bearer token
403 ForbiddenToken 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​

EnvironmentRequests / minEntities / min
Dev/Quality∞∞