Download OpenAPI specification:Download
The Brew Ha Ha API allows third-party applications to access our extensive line of coffee and snack products. As a developer, you can access various endpoints to get a single product, get a collection of products, or place orders. Our API enables seamless integration with popular e-commerce platforms such as Shopify, Wix, and Square.
Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials.
username required | string |
password required | string |
{- "username": "string",
- "password": "string"
}
{- "access": "string",
- "refresh": "string"
}
Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.
refresh required | string |
{- "refresh": "string"
}
{- "access": "string",
- "refresh": "string"
}
Order available products from the database
payment_method required | string The payment method used |
required | Array of objects (OrderItem) The items in the customer's order. Provide the |
Example of a request to create an order
{- "payment_method": "Credit",
- "order_items": [
- {
- "product_id": 2,
- "quantity": 1
}
]
}
[- {
- "id": 13,
- "payment_method": "Credit",
- "order_date": "2025-01-11T03:17:47.746025Z",
- "status": "in progress",
- "order_items": [
- {
- "product_id": 2,
- "quantity": 1
}
]
}
]
Returns a single order from the database
id required | integer A unique integer value identifying this order. |
[- {
- "id": "13",
- "payment_method": "Credit",
- "order_date": "2025-01-11T03:17:47.746025Z",
- "status": "in progress",
- "order_items": [
- {
- "product_id": 2,
- "quantity": 1
}
]
}
]
[- [
- {
- "id": 1,
- "product_name": "mocha",
- "temperature": "hot",
- "caffeine_amount": 105,
- "price": 3.75,
- "description": "A rich, decadent blend of espresso and chocolate",
- "quantity": 8
}, - {
- "id": 2,
- "product_name": "muffin",
- "price": 2.5,
- "description": "A fluffy, warm blueberry muffin",
- "quantity": 5
}, - {
- "id": 3,
- "product_name": "cortado",
- "temperature": "hot",
- "caffeine_amount": 130,
- "price": 4,
- "description": "Made with beans picked from the coast of Spain",
- "quantity": 5
}
]
]
Returns a single product from the database
id required | integer A unique integer value identifying this product. |
[- {
- "id": 1,
- "product_name": "mocha",
- "temperature": "hot",
- "caffeine_amount": 105,
- "price": 3.75,
- "description": "A rich, decadent blend of espresso and chocolate",
- "quantity": 8
}
]