Cocktails

Cocktail endpoints allow you to manage and search for cocktails. Here, you can retrieve, search, filter, and list cocktails based on different criteria.

GET/v1/cocktails-only

List all cocktails

This endpoint allows you to retrieve a list of all cocktails.

Request

GET
/v1/cocktails-only
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
    }
    // ...
  ]
}

GET/v1/search/cocktail

Search cocktails by name

This endpoint allows you to search for cocktails by name.

Request

GET
/v1/search/cocktail
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
    }
    // ...
  ]
}

GET/v1/search/letter

Search cocktails by first letter

This endpoint allows you to list cocktails that start with a specific letter.

Request

GET
/v1/search/letter
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
    }
    // ...
  ]
}

GET/v1/search/ingredient

Search ingredients by name

This endpoint allows you to search for ingredients by name.

Request

GET
/v1/search/ingredient
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"
    }
    // ...
  ]
}

GET/v1/filter/ingredient

Filter cocktails by ingredient

This endpoint allows you to filter cocktails by ingredient.

Request

GET
/v1/filter/ingredient
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
    }
    // ...
  ]
}

GET/v1/filter/alcoholic

Filter cocktails by alcoholic

This endpoint allows you to filter cocktails based on whether they are alcoholic or non-alcoholic.

Request

GET
/v1/filter/alcoholic
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
    }
    // ...
  ]
}

GET/v1/filter/category

Filter cocktails by category

This endpoint allows you to filter cocktails based on their category.

Request

GET
/v1/filter/category
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
    }
    // ...
  ]
}

GET/v1/filter/glass

Filter cocktails by glass

This endpoint allows you to filter cocktails based on the type of glass used.

Request

GET
/v1/filter/glass
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
    }
    // ...
  ]
}

GET/v1/list/categories

List categories

This endpoint allows you to list all available categories for cocktails.

Request

GET
/v1/list/categories
curl -G https://api.protocol.chat/v1/list/categories \
  -H "Authorization: Bearer {token}"

Response

{
  "data": [
    {
      "id": "category_001",
      "name": "Cocktail"
    },
    // ...
  ]
}

GET/v1/list/glasses

List glasses

This endpoint allows you to list all available glasses for cocktails.

Request

GET
/v1/list/glasses
curl -G https://api.protocol.chat/v1/list/glasses \
  -H "Authorization: Bearer {token}"

Response

{
  "data": [
    {
      "id": "glass_001",
      "name": "Highball"
    },
    // ...
  ]
}

GET/v1/list/ingredients

List ingredients

This endpoint allows you to list all available ingredients.

Request

GET
/v1/list/ingredients
curl -G https://api.protocol.chat/v1/list/ingredients \
  -H "Authorization: Bearer {token}"

Response

{
  "data": [
    {
      "id": "ingredient_001",
      "name": "Mint"
    },
    // ...
  ]
}

GET/v1/list/alcoholic

List alcoholic filters

This endpoint allows you to list all alcoholic filters.

Request

GET
/v1/list/alcoholic
curl -G https://api.protocol.chat/v1/list/alcoholic \
  -H "Authorization: Bearer {token}"

Response

{
  "data": [
    {
      "id": "alcoholic_001",
      "name": "Alcoholic"
    },
    // ...
  ]
}

Was this page helpful?