REST API¶
This document covers the main API endpoints.
Interactive Documentation
For the complete API reference with request/response examples, use the Swagger UI.
Products¶
List Products¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
category |
int | Filter by category ID |
is_featured |
bool | Filter featured products |
search |
string | Search by name |
page |
int | Page number |
Response:
{
"count": 50,
"next": "/api/products/?page=2",
"results": [
{
"id": 1,
"name": "Classic T-Shirt",
"slug": "classic-t-shirt",
"base_price": "24.95",
"color_variants": [...]
}
]
}
Get Product Detail¶
Cart¶
Get Cart¶
Returns the current user's shopping cart.
Add to Cart¶
Request Body:
Update Cart Item¶
Remove from Cart¶
Orders¶
Create Order¶
Request Body:
{
"email": "customer@example.com",
"phone": "+31612345678",
"shipping_name": "John Doe",
"shipping_address_line1": "Main Street 1",
"shipping_postal_code": "1234 AB",
"shipping_city": "Amsterdam",
"shipping_country": "NL"
}
Get Order¶
Designs¶
Create Design¶
Update Design¶
Upload Image¶
Error Responses¶
All errors follow this format:
Status Codes¶
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limited |
| 500 | Server Error |