1. Items - Admin
3enab
πŸ‘¨β€πŸ’Ό Admin Application
  • πŸ‘€ User Application
  • πŸͺ Vendor Application
  • πŸ‘¨β€πŸ’Ό Admin Application
  • 🚚 Delivery Application
  • Auth - Admin
    • Register a new admin
      POST
    • Login admin
      POST
    • Logout admin
      POST
    • Refresh access token
      POST
    • Send phone OTP
      POST
    • Verify phone OTP
      POST
    • Send password reset OTP
      POST
    • Verify password reset OTP
      POST
    • Reset password
      POST
  • Ads - Admin
    • Create a new advertisement
    • Update an advertisement
    • Delete an advertisement
    • Upload advertisement image
    • Activate an advertisement
    • Deactivate an advertisement
    • Get all ads for admin
  • Coupons - Admin
    • Create a new coupon
    • Get all coupons
    • Get coupon by ID
    • Update coupon
    • Delete coupon
    • Update coupon active status
  • Delivery Areas - Admin
    • Create a new delivery area
    • Get all delivery areas
    • Get delivery area by ID
    • Update delivery area
    • Delete delivery area
  • Items - Admin
    • Get all items for admin
      GET
    • Create a new item
      POST
    • Get a single item by ID
      GET
    • Update an item
      PUT
    • Delete an item
      DELETE
    • Upload item image
      POST
    • Update item availability
      PATCH
    • Update item group availability
      PATCH
    • Update item active status
      PATCH
    • Update item discount
      PATCH
    • Remove item discount
      DELETE
    • Apply discount to all vendor items
      PATCH
    • Remove discount from all vendor items
      DELETE
    • Update items order
      PATCH
    • Create a variant for an item
      POST
    • Get all variants of an item
      GET
    • Get all items (Direct Access - Public)
      GET
    • Get all items for a specific vendor (Direct Access - Public)
      GET
    • Get item by ID (Direct Access - Public)
      GET
  • Menu Categories - Admin
    • Get all menu categories for admin
    • Create menu category (Admin)
    • Get menu category by ID (Admin)
    • Update menu category (Admin)
    • Delete menu category (Admin)
    • Update menu category active status (Admin)
    • Update menu category order (Admin)
  • Rates - Admin
    • Get all ratings for a vendor (Admin)
    • Get a specific rating by ID (Admin)
    • Delete a rating (Admin)
  • Users - Admin
    • Get current admin user profile
    • Update current admin user profile
    • Delete current admin user account
    • Change admin user password
    • Get all users with pagination
    • Create user (Admin)
    • Reset user password (Admin)
    • Mark user phone as verified (Admin)
    • Get user by ID
    • Update user by ID
    • Delete user by ID
  • Vendor Categories - Admin
    • Create a new vendor category
    • Get all vendor categories
    • Get a vendor category by ID
    • Update a vendor category
    • Delete a vendor category
    • Upload vendor category image
    • Update vendor category active status
    • Reorder vendor categories
  • Vendors - Admin
    • Get all vendors for admin
    • Create vendor
    • Get vendor by ID
    • Update vendor
    • Delete vendor
    • Upload vendor logo
    • Update vendor active status
    • Update vendor availability status (Admin)
    • Update vendor free delivery status
    • Reorder vendors
    • Create or update vendor notice
    • Upload vendor cover image
    • Delete vendor notice
    • Delete vendor cover image
    • Upload notice image
    • Update vendor preparation time (Admin)
    • Delete notice image
  • Notifications - Admin
    • Send broadcast notification to users
    • Send notification to specific users
  • Versions - Admin
    • Create a new version
    • Get all versions
    • Get the latest version
    • Update a version
    • Delete a version
  • Orders - Admin
    • Get all orders (Admin)
    • Get order by ID (Admin)
    • Delete order permanently (Admin)
    • Cancel order by admin
  • App Notices - Admin
    • Create a new app notice
    • Get all app notices (paginated)
    • Get notice by ID
    • Update notice
    • Delete notice
    • Upload notice image
    • Delete notice image
  1. Items - Admin

Create a variant for an item

POST
/api/v1/admin/vendors/{vendorId}/categories/{menuCategoryId}/items/{itemId}/variants
Admin-only endpoint to create a variant under a parent item.
The variant will inherit name, description, and prepTime from the parent.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Path Params

Header Params

Body Params application/jsonRequired

Examples
{
    "basePrice": 50,
    "optionName": "Small"
}

Responses

🟒201Created
application/json
Variant created successfully
Body

Example
{
    "status": "success",
    "message": "Operation completed successfully",
    "data": {
        "variant": {
            "_id": "507f1f77bcf86cd799439011",
            "name": "Delicious Pizza",
            "description": "Fresh pizza with premium ingredients",
            "basePrice": 25.99,
            "optionName": "Size",
            "parentItem": null,
            "isVariant": false,
            "prepTime": "15 minutes",
            "discount": {
                "type": "percentage",
                "value": 20,
                "startDate": "2019-08-24T14:15:22.123Z",
                "endDate": "2019-08-24T14:15:22.123Z",
                "isActive": true
            },
            "isActive": true,
            "isAvailable": true,
            "isGroupAvailable": true,
            "order": 1,
            "category": "507f1f77bcf86cd799439012",
            "vendor": "507f1f77bcf86cd799439013",
            "imagePath": "/uploads/items/image.jpg",
            "createdAt": "2019-08-24T14:15:22.123Z",
            "updatedAt": "2019-08-24T14:15:22.123Z"
        }
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
Modified atΒ 2026-04-08 13:49:39
Previous
Update items order
Next
Get all variants of an item
Built with