/ API Reference

Print Areas

Define customizable zones on products

Endpoints

GET /api/v1/products/:product_id/print_areas Requires: read

List print areas

GET /api/v1/products/:product_id/print_areas/:id Requires: read

Get a print area

POST /api/v1/products/:product_id/print_areas Requires: write

Create a print area

PATCH /api/v1/products/:product_id/print_areas/:id Requires: write

Update a print area

DELETE /api/v1/products/:product_id/print_areas/:id Requires: delete

Delete a print area

Fields

Field Type Required Description
id uuid Optional Unique identifier
name string Required Print area name (e.g., 'Front', 'Back')
width_px integer Required Width in pixels
height_px integer Required Height in pixels
bounds object Optional Position bounds {x, y, width, height}
position integer Optional Display order

Examples

List Print Areas

curl -X GET "https://trucustom.net/api/v1/products/:product_id/print_areas" \
  -H "Authorization: Bearer pc_your_api_key" \
  -H "Content-Type: application/json"

Response:

{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "id": {},
      "name": "example",
      "width_px": 100
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 42,
    "total_pages": 3
  }
}

Get Single Print Area

curl -X GET "https://trucustom.net/api/v1/products/product-uuid/print_areas/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer pc_your_api_key" \
  -H "Content-Type: application/json"

Create Print Area

curl -X POST "https://trucustom.net/api/v1/products/product-uuid/print_areas" \
  -H "Authorization: Bearer pc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "value",
    "width_px": 100,
    "height_px": 100
  }'

Query Parameters

Parameter Type Description
page integer Page number (default: 1)
per_page integer Items per page (default: 20, max: 100)
q string Search query (searches name field)