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