Update Item Availability
This endpoint allows vendors to update the availability status and stock quantity for multiple items in bulk.
Overview
The item availability endpoint provides a dedicated way to manage the real-time availability and stock levels of your items, separate from updating core item details like name or price. This is useful for reflecting sales, inventory updates, or temporarily making items unavailable.
Endpoint Details
Method: POST
URL: /api/developer/v1/items/availability
Purpose: Update availability status and stock quantities for multiple items
All API calls require a valid authentication token. Invalid or expired tokens will result in a 401 Unauthorized response.
Request Specification
Request Parameters
The request body should be an array of item availability objects.
| Field | Type | Required | Description |
|---|---|---|---|
vendor_reference_id | string / integer | Yes | Your unique identifier for the item to update |
is_available | boolean | Yes | Set to true if the item is available for purchase, false otherwise |
is_active | boolean | Yes | hether the item is generally active in the system. |
stock | object | No | Optional object to manage stock quantity |
stock.manage | boolean | Yes (if stock present) | Must be true if you intend to update the stock quantity |
stock.quantity | integer | Yes (if stock present) | The new stock quantity for the item |
Example Request
[
{
"vendor_reference_id": "2",
"is_available": true,
"is_active": false,
"stock": {
"manage": true,
"quantity": 25
}
},
{
"vendor_reference_id": "18",
"is_available": false,
"is_active": true
}
]
Response Specification
Success Response
204 No ContentA successful response indicates the availability and/or stock was updated for the specified items. No content is returned in the response body.
Error Responses
401 Unauthorized - Authentication issues
{
"status": "error",
"message": "Unauthenticated."
}
400 Bad Request - Validation errors
{
"status": "error",
"message": "Validation failed",
"errors": {
"0.available": ["The available field must be true or false."],
"1.vendor_reference_id": [
"The selected vendor_reference_id is invalid or does not exist."
]
}
}
Implementation Tips
- Update item availability at the beginning of each business day
- Batch multiple item updates in a single request for efficiency
- Configure automated availability updates based on your inventory system
- If you only need to mark an item as available/unavailable without changing stock quantity, omit the
stockobject
Use Cases
- Daily Inventory Updates: Update stock levels at the start of business based on physical inventory count
- Temporary Unavailability: Mark seasonal items as unavailable during off-seasons
- Real-time Stock Management: Update stock levels after each sale in your POS system
- Menu Changes: Disable items that are no longer offered on your menu