Color Endpoints
GET /api/colors
Returns a list of colors for a shop.
Accepts a page and limit query parameter for pagination.
Returns 10 records at a time.
GET /api/colors/{id}
Returns the color with id={id}.
POST /api/colors
Creates a new color record.
Accepted Parameters:
typescript
{
color: {
name: string,
slug?: string,
description?: string,
position?: number,
code?: string
}
}PUT /api/colors/{id}
Updates the color with id={id}.
Accepted Parameters:
typescript
{
color: {
name: string,
slug?: string,
description?: string,
position?: number,
code?: string
},
rule: {
id: number
},
rule_setting: {
value: string
}
}DELETE /api/colors/{id}
Removes the color and all dependent records.