Skip to main content

Categories and brands

Categories and brands work the same way, each with its own routes.

RouteScopeWhat it does
GET /v1/categories · GET /v1/brandsreadlists
GET /v1/categories/{id} · GET /v1/brands/{id}readshows one
POST /v1/categories · POST /v1/brandswritecreates
PATCH /v1/categories/{id} · PATCH /v1/brands/{id}writeupdates
DELETE /v1/categories/{id} · DELETE /v1/brands/{id}deletedeletes

Fields​

FieldTypeDescription
idUUIDidentifier
nametextname
created_at, updated_atdate-timecreation and last change

List​

ParameterDescription
qsearch in the name (contains the text, case-insensitive)
updated_sinceonly those created or changed since that instant
limit, cursorpagination

Create and update​

FieldRequiredRules
nameyes1 to 100 characters
idno (POST only)UUID you generate
curl -X POST https://api.validades.com/v1/categories \
-H "Authorization: Bearer vld_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Dairy"}'

Delete​

Deleting a category or brand does not delete the products: they are left without a category or brand (the field becomes null, and the product shows up in updated_since).

{
"data": {
"id": "…",
"deleted": { "category": 1 },
"products_unlinked": 12
}
}

For brands, the field is "deleted": { "brand": 1 }. Accepts If-Match.