Explore every REST endpoint exposed by the Core API, including the HTTP method, purpose, and a sample request payload where applicable.
| Endpoint | Method | Purpose | Example Payload |
|---|---|---|---|
/api/auth/login |
POST | Authenticate with an API key and receive a JWT token. | { "api_key": "sk_test_admin_..." } |
/api/auth/validate |
GET | Validate an existing JWT token. | -- |
/api/auth/refresh |
POST | Refresh an existing JWT token. | -- |
/api/auth/logout |
POST | Invalidate the current JWT token. | -- |
/api/inventory/products |
GET | List all products in inventory. | -- |
/api/inventory/products/{id} |
GET | Get details for a specific product. | -- |
/api/inventory/products |
POST | Create a new product. | { "name": "New Product", "sku": "NEW001", "description": "Product description", "price": 99.99, "initial_stock": 10 } |
/api/inventory/products/{id} |
PUT | Update an existing product. | { "name": "Updated Product", "sku": "NEW001", "description": "Updated description", "price": 89.99 } |
/api/inventory/products/{id} |
DELETE | Remove a product from inventory. | -- |
/api/inventory/stock |
GET | List stock levels for all products. | -- |
/api/inventory/stock/{id} |
PUT | Update the stock quantity for a product. | { "quantity": 25 } |
/api/customers |
GET | List all customers. | -- |
/api/customers |
POST | Create a new customer record. | { "name": "Jane Smith", "email": "jane@example.com", "phone": "+1234567890", "address": "456 Oak Ave" } |
/api/customers/{id} |
GET | Get details for a specific customer. | -- |
/api/customers/{id} |
PUT | Update customer information. | { "name": "John Doe Updated", "email": "john.doe@example.com", "phone": "+1234567890", "address": "456 Oak Ave" } |
/api/customers/{id} |
DELETE | Delete a customer record. | -- |
/api/customers/{id}/pricing |
GET | Retrieve customer-specific pricing. | -- |
/api/customers/{id}/pricing |
POST | Set custom pricing for a customer. | { "pricing": [ { "product_id": 1, "price": 899.99 }, { "product_id": 2, "price": 24.99 } ] } |
/api/orders |
GET | List all orders. | -- |
/api/orders/create |
POST | Create a new order. | { "customer_id": 1, "items": [ { "product_id": 1, "quantity": 2 }, { "product_id": 2, "quantity": 1 } ] } |
/api/orders/{id} |
GET | Get details for a specific order. | -- |
/api/orders/{id}/status |
PUT | Update the status of an order. | { "status": "processing" } |