Catalog
- GETRetrieve all products
- POSTCreate product
- GETRetrieve skus
- GETRetrieve product details
- PUTUpdate product details
- DELDelete product
- GETRetrieve product variants
- POSTCreate variant
- POSTUpdate variants in bulk
- GETRetrieve a variant details
- PUTUpdate a variant
- DELDelete a variant
- GETRetrieve product inventory
- POSTUpdate product inventory
- GETRetrieve product inventory activities
- PUTUpdate product inventory activities
- POSTCreate product inventory activities
- GETRetrieve product reviews
- GETRetrieve product review
- PUTUpdate product review
- DELDelete product review
- GETRetrieve all categories
- POSTCreate category
- GETRetrieve category
- PUTUpdate category
- DELDelete category
- GETRetrieve all attributes
- POSTCreate attribute
- GETRetrieve attribute
- PUTUpdate attribute
- DELDelete attribute
- POSTAdd product pricing
- PUTUpdate product pricing
- DELDelete product pricing
- POSTAdd product image
- PUTUpdate product image
- DELDelete product image
- GETRetrive sku detail
Auth
- PUTActivate user account
- PUTDeactivate user account
- GETCheck domain availability
- GETRetrieve all roles
- POSTCreate new role
- PUTUpdate role
- DELDelete role
- GETRetrieve all permissions of a role
- POSTAdd permission to role
- DELRemove permission from role
- GETRetrieve all members
- POSTCreate new member
- GETRetrieve member detail
- PUTUpdate member details
- DELDelete member
- GETRetrieve all roles of a member
- POSTAssigne role to member
- DELRemove role from member
Coupons & promotions API
- GETList all coupons
- POSTCreate coupon
- GETRetrieve coupon details
- PUTUpdate coupon
- DELDelete coupon
- GETList all coupon codes
- POSTAdd coupon code
- GETList all coupon customers
- GETRetrieve coupon usage
- GETList all promotions
- POSTCreate promotion
- GETRetrieve promotion details
- PUTUpdate promotion
- DELDelete promotion
- GETList all promotion usage
- GETList all promotion customers
Warehouse
Orders API
Shipping API
Customers API
Segments API
Payments API
Media Gallery API
Catalog
Update product inventory
POST
/
catalog
/
products
/
{id}
/
inventory
curl --request POST \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/admin/catalog/products/{id}/inventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"variant_id": "<string>",
"update_other_variants": true,
"track_quantity": true,
"allow_backorder": true,
"stock": [
{
"warehouse_id": "<string>",
"stock_quantity": 123
}
]
}
]'
{
"message": "<string>",
"success": true,
"content": {
"inventory": [
{
"variant_id": "<string>",
"track_quantity": true,
"allow_backorder": true,
"stock": [
{
"sku": "<string>",
"warehouse_id": "<string>",
"warehouse_name": "<string>",
"received_quantity": 123,
"reserved_quantity": 123,
"sold_quantity": 123,
"adjusted_quantity": 123,
"stock_quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
]
}
]
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
product id
Body
application/json · object[]
if true, same inventry details will be updated to other variants which are not mentioned in request body.
Response
200 - application/json
OK
curl --request POST \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/admin/catalog/products/{id}/inventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"variant_id": "<string>",
"update_other_variants": true,
"track_quantity": true,
"allow_backorder": true,
"stock": [
{
"warehouse_id": "<string>",
"stock_quantity": 123
}
]
}
]'
{
"message": "<string>",
"success": true,
"content": {
"inventory": [
{
"variant_id": "<string>",
"track_quantity": true,
"allow_backorder": true,
"stock": [
{
"sku": "<string>",
"warehouse_id": "<string>",
"warehouse_name": "<string>",
"received_quantity": 123,
"reserved_quantity": 123,
"sold_quantity": 123,
"adjusted_quantity": 123,
"stock_quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
]
}
]
}
}