Cocktails
Cocktail endpoints allow you to manage and search for cocktails. Here, you can retrieve, search, filter, and list cocktails based on different criteria.
List all cocktails
This endpoint allows you to retrieve a list of all cocktails.
Request
curl -G https://api.protocol.chat/v1/cocktails-only \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": "cocktail_001",
"name": "Mojito",
"ingredients": ["Mint", "Lime", "Sugar", "Rum"],
"instructions": "Muddle mint and lime, add sugar and rum, top with soda water.",
"image_url": "https://example.com/images/mojito.jpg",
"created_at": 692233200,
"updated_at": 705103200
}
// ...
]
}
Search cocktails by name
This endpoint allows you to search for cocktails by name.
Request
curl -G https://api.protocol.chat/v1/search/cocktail \
-H "Authorization: Bearer {token}" \
-d name="Mojito"
Response
{
"data": [
{
"id": "cocktail_001",
"name": "Mojito",
"ingredients": ["Mint", "Lime", "Sugar", "Rum"],
"instructions": "Muddle mint and lime, add sugar and rum, top with soda water.",
"image_url": "https://example.com/images/mojito.jpg",
"created_at": 692233200,
"updated_at": 705103200
}
// ...
]
}
Search cocktails by first letter
This endpoint allows you to list cocktails that start with a specific letter.
Request
curl -G https://api.protocol.chat/v1/search/letter \
-H "Authorization: Bearer {token}" \
-d letter="M"
Response
{
"data": [
{
"id": "cocktail_001",
"name": "Mojito",
"ingredients": ["Mint", "Lime", "Sugar", "Rum"],
"instructions": "Muddle mint and lime, add sugar and rum, top with soda water.",
"image_url": "https://example.com/images/mojito.jpg",
"created_at": 692233200,
"updated_at": 705103200
}
// ...
]
}
Search ingredients by name
This endpoint allows you to search for ingredients by name.
Request
curl -G https://api.protocol.chat/v1/search/ingredient \
-H "Authorization: Bearer {token}" \
-d name="Mint"
Response
{
"data": [
{
"id": "ingredient_001",
"name": "Mint",
"description": "A refreshing herb.",
"image_url": "https://example.com/images/mint.jpg"
}
// ...
]
}
Filter cocktails by ingredient
This endpoint allows you to filter cocktails by ingredient.
Request
curl -G https://api.protocol.chat/v1/filter/ingredient \
-H "Authorization: Bearer {token}" \
-d ingredient="Mint"
Response
{
"data": [
{
"id": "cocktail_001",
"name": "Mojito",
"ingredients": ["Mint", "Lime", "Sugar", "Rum"],
"instructions": "Muddle mint and lime, add sugar and rum, top with soda water.",
"image_url": "https://example.com/images/mojito.jpg",
"created_at": 692233200,
"updated_at": 705103200
}
// ...
]
}
Filter cocktails by alcoholic
This endpoint allows you to filter cocktails based on whether they are alcoholic or non-alcoholic.
Request
curl -G https://api.protocol.chat/v1/filter/alcoholic \
-H "Authorization: Bearer {token}" \
-d alcoholic=true
Response
{
"data": [
{
"id": "cocktail_001",
"name": "Mojito",
"ingredients": ["Mint", "Lime", "Sugar", "Rum"],
"instructions": "Muddle mint and lime, add sugar and rum, top with soda water.",
"image_url": "https://example.com/images/mojito.jpg",
"created_at": 692233200,
"updated_at": 705103200
}
// ...
]
}
Filter cocktails by category
This endpoint allows you to filter cocktails based on their category.
Request
curl -G https://api.protocol.chat/v1/filter/category \
-H "Authorization: Bearer {token}" \
-d category="Cocktail"
Response
{
"data": [
{
"id": "cocktail_001",
"name": "Mojito",
"ingredients": ["Mint", "Lime", "Sugar", "Rum"],
"instructions": "Muddle mint and lime, add sugar and rum, top with soda water.",
"image_url": "https://example.com/images/mojito.jpg",
"created_at": 692233200,
"updated_at": 705103200
}
// ...
]
}
Filter cocktails by glass
This endpoint allows you to filter cocktails based on the type of glass used.
Request
curl -G https://api.protocol.chat/v1/filter/glass \
-H "Authorization: Bearer {token}" \
-d glass="Highball"
Response
{
"data": [
{
"id": "cocktail_001",
"name": "Mojito",
"ingredients": ["Mint", "Lime", "Sugar", "Rum"],
"instructions": "Muddle mint and lime, add sugar and rum, top with soda water.",
"image_url": "https://example.com/images/mojito.jpg",
"created_at": 692233200,
"updated_at": 705103200
}
// ...
]
}
List categories
This endpoint allows you to list all available categories for cocktails.
Request
curl -G https://api.protocol.chat/v1/list/categories \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": "category_001",
"name": "Cocktail"
},
// ...
]
}
List glasses
This endpoint allows you to list all available glasses for cocktails.
Request
curl -G https://api.protocol.chat/v1/list/glasses \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": "glass_001",
"name": "Highball"
},
// ...
]
}
List ingredients
This endpoint allows you to list all available ingredients.
Request
curl -G https://api.protocol.chat/v1/list/ingredients \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": "ingredient_001",
"name": "Mint"
},
// ...
]
}
List alcoholic filters
This endpoint allows you to list all alcoholic filters.
Request
curl -G https://api.protocol.chat/v1/list/alcoholic \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": "alcoholic_001",
"name": "Alcoholic"
},
// ...
]
}