Skip to main content

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

Authentication Required

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.

FieldTypeRequiredDescription
vendor_reference_idstring / integerYesYour unique identifier for the item to update
is_availablebooleanYesSet to true if the item is available for purchase, false otherwise
is_activebooleanYeshether the item is generally active in the system.
stockobjectNoOptional object to manage stock quantity
stock.managebooleanYes (if stock present)Must be true if you intend to update the stock quantity
stock.quantityintegerYes (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 Content

A 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

Best Practices
  • 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 stock object

Use Cases

  1. Daily Inventory Updates: Update stock levels at the start of business based on physical inventory count
  2. Temporary Unavailability: Mark seasonal items as unavailable during off-seasons
  3. Real-time Stock Management: Update stock levels after each sale in your POS system
  4. Menu Changes: Disable items that are no longer offered on your menu