Skip to main content

API Reference

The Case AI API provides programmatic access to browse wine products, place orders, and manage your account.

Base URL

https://api.trycase.ai/api/v1

Endpoints

Products

MethodEndpointDescription
GET/productsList all products with filtering
GET/products/{id}Get a specific product

Suppliers

MethodEndpointDescription
GET/suppliersList all verified suppliers
GET/suppliers/{id}Get supplier details
GET/suppliers/{id}/productsGet supplier’s products

Orders

MethodEndpointDescription
POST/ordersCreate a new order
GET/ordersList your orders
GET/orders/{id}Get order details
POST/orders/{id}/cancelCancel an order

Webhooks

MethodEndpointDescription
POST/webhooksRegister a webhook
GET/webhooksList your webhooks
DELETE/webhooks/{id}Delete a webhook

Account

MethodEndpointDescription
GET/accountGet your account info

Request Format

All requests should include:
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

Response Format

All responses are JSON with this structure: Success (single resource):
{
  "id": "prod_abc123",
  "name": "2021 Reserve Cabernet",
  ...
}
Success (list):
{
  "data": [...],
  "meta": {
    "total": 248,
    "page": 1,
    "per_page": 50,
    "total_pages": 5
  }
}
Error:
{
  "error": {
    "code": "error_code",
    "message": "Human readable message"
  }
}