Store Action
PUT
{{api_url}}/shop/amazontoday/store/actionThis call controls executing actions against a store.
Zero Inventory Action
This action can be used to temporarily close a store and then re-open that store. When zero inventory active is enabled, all inventory for a specified store will be set to 0 which will then stop any order from being placed at the store. When zero inventory active is disabled, regular inventory levels are sent so orders can resume as normal.
The JSON body parameter info is the following:
- "action_type" should be "set_zero_inventory_active"
- "zero_inventory_active" should be either "yes" (send inventory level of 0 for all products) or "no" (regular inventory levels)
- Store Identifer (one of the following three must be sent)
- "infiplex_warehouse_id" which is the ID of the warehouse/store in InfiPlex
- "warehouse_identifier" which is your unique store identifier provided to InfiPlex
- "amazon_today_supply_source_id" which is the Amazon Today Supply Source ID provided by Amazon
Authorization
Bearer token, sent in the Authorization header. Inherited from the collection.
Body
{
"action_type": "set_zero_inventory_active",
"zero_inventory_active": "no",
"infiplex_warehouse_id": "3",
"warehouse_identifier": "main"
}Example Request
curl --location --request PUT '{{api_url}}/shop/amazontoday/store/action' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
"action_type": "set_zero_inventory_active",
"zero_inventory_active": "no",
"infiplex_warehouse_id": "3",
"warehouse_identifier": "main"
}'Example Responses
Store Enable Zero Inventory
Request
curl --location --request PUT 'https://example.com/api/admin/shop/amazontoday/store/action' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"action_type": "set_zero_inventory_active",
"zero_inventory_active": "yes",
"warehouse_identifier": "main"
}'Response
{
"success": true,
"message": "Supply source set to zero inventory active."
}Store Disable Zero Inventory
Request
curl --location --request PUT 'https://example.com/api/admin/shop/amazontoday/store/action' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"action_type": "set_zero_inventory_active",
"zero_inventory_active": "no",
"amazon_today_supply_source_id": "aaaaaaaa-1111-1111-1111-aaaaaaaaaaaa"
}'Response
{
"success": true,
"message": "Supply source set to zero inventory not active. Regular inventory levels will be used."
}
