/ API Reference

Products

Manage customizable products

Endpoints

GET /api/v1/products Requires: read

List all products

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

Get a product

POST /api/v1/products Requires: write

Create a product

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

Update a product

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

Delete a product

Fields

Field Type Required Description
id uuid Optional Unique identifier
name string Required Product name
description text Optional Product description
store_id uuid Required Associated store ID
customizable boolean Optional Whether product can be customized
base_image_url string Optional URL of base product image
variants array Optional Product variants (size, color, etc.)

Examples

List Products

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

Response:

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

Get Single Product

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

Create Product

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

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)