Create Inventory
Product Experience Manager (EP PXM) Only
This endpoint works only with products that are created with the EP PXM Products API.
POST
Create Inventory
https://api.moltin.com/v2/inventories/:productId
Sets the inventory quantity for the specified product. When you take this action, you are choosing to manage the inventory for this product in Elastic Path Commerce Cloud.
Parameters
Path parameters
Name | Required | Type | Description |
---|---|---|---|
productId | Required | string | The unique identifier of the product. |
Headers
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token to grant access to the API. |
Body
Name | Required | Type | Description |
---|---|---|---|
quantity | Required | integer | The amount of inventory available. |
Request Example
curl -X POST https://api.moltin.com/v2/inventories/f5bd4e59-a95f-4bda-bfe6-0f34f47ac94b \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"quantity": 1000
}
}
}'
Response Example
200 OK
{
"data": {
"quantity": 1000
}
}
}