API Documentation
Build powerful integrations with the CCSwag platform
Navigation
Getting Started
The CCSwag API is a REST API that allows you to programmatically manage designs, products, and orders. All API endpoints return JSON responses.
Base URL
https://api.ccswag.com/v1/
Requirements
- CCSwag account with Creator plan or higher
- API key generated from your dashboard
- HTTPS required for all requests
Authentication
The CCSwag API uses API keys for authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Designs
Create Design
POST /designs
{
"name": "My Awesome Design",
"description": "A cool design for my merch",
"image_url": "https://example.com/design.png",
"tags": ["gaming", "streaming"]
}
List Designs
GET /designs
Get Design
GET /designs/{id}
Update Design
PUT /designs/{id}
Delete Design
DELETE /designs/{id}
Products
List Available Products
GET /products
{
"products": [
{
"id": "tshirt-basic",
"name": "Basic T-Shirt",
"base_price": 8.99,
"sizes": ["XS", "S", "M", "L", "XL", "XXL"],
"colors": ["black", "white", "navy", "red"]
}
]
}
Create Product Listing
POST /listings
{
"design_id": "design_123",
"product_id": "tshirt-basic",
"price": 24.99,
"title": "My Cool T-Shirt",
"description": "A fantastic t-shirt with my design"
}
Orders
List Orders
GET /orders
Get Order Details
GET /orders/{id}
{
"id": "order_456",
"status": "shipped",
"customer": {
"name": "John Doe",
"email": "john@example.com"
},
"items": [
{
"listing_id": "listing_789",
"quantity": 1,
"price": 24.99
}
],
"total": 24.99,
"created_at": "2024-01-15T10:30:00Z"
}
Webhooks
Webhooks allow you to receive real-time notifications about events in your account.
Supported Events
order.created- New order placedorder.paid- Order payment confirmedorder.shipped- Order shippedorder.delivered- Order delivereddesign.approved- Design approved
Create Webhook
POST /webhooks
{
"url": "https://your-app.com/webhook",
"events": ["order.created", "order.shipped"],
"secret": "your-webhook-secret"
}
Error Handling
The API uses standard HTTP status codes and returns detailed error messages in JSON format.
Error Response Format
{
"error": {
"code": "INVALID_REQUEST",
"message": "The request is missing required fields",
"details": {
"missing_fields": ["name", "image_url"]
}
}
}
Common Error Codes
400- Bad Request401- Unauthorized403- Forbidden404- Not Found429- Rate Limited500- Internal Server Error
Rate Limits
API requests are rate limited to ensure fair usage and system stability.
| Plan | Requests per minute | Requests per hour |
|---|---|---|
| Creator | 60 | 1,000 |
| Enterprise | 300 | 10,000 |
Need Help?
Our developer support team is here to help you integrate successfully
Contact Developer Support