Creates a new buffet item for a gym.
| Permission | Description |
|---|---|
buffet_items.create | Create buffet items for your own gym |
buffet_items.create_any | Create buffet items for any gym (admin only) |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| gym-id | int | Yes | ID of the gym | 123 |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| title | string | Yes | Title of the item (max 255 characters) | "Protein Bar" |
| description | string | No | Description for the item (max 2000 chars) | "Tasty bar" |
| price | int | Yes | Price of the item | 100 |
| discount | float | No | Discount percentage (default 0) | 10.5 |
{
"title": "Protein Bar",
"description": "Tasty bar",
"price": 100,
"discount": 10.5
}
Returns the created gym buffet item resource.
{
"id": 1,
"gym_id": 123,
"title": "Protein Bar",
"description": "Tasty bar",
"price": 100,
"discount": 10.5,
"discounted_price": 89.5,
"media": []
}
For a full schema, see Gym Buffet Item Resource.
| Status | Description | Reference |
|---|---|---|
| 422 | Validation error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden (no permission) | Permission error |