API Documentation

Build powerful integrations with the CCSwag platform

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
Keep your API keys secure and never expose them in client-side code.

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 placed
  • order.paid - Order payment confirmed
  • order.shipped - Order shipped
  • order.delivered - Order delivered
  • design.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 Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found
  • 429 - Rate Limited
  • 500 - 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
Rate limit headers are included in all responses to help you track your usage.

Need Help?

Our developer support team is here to help you integrate successfully

Contact Developer Support