Brands API
Look up, create, and read the enrichment history of brands. Use these before starting a brand enrichment job to avoid creating a duplicate brand, and after one to read what the job produced.
Brand matching is case-insensitive throughout. ACME, Acme, and acme are the same brand.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /brands/check |
Test whether a brand name already exists |
| POST | /brands/create |
Create a brand, or return the existing one |
| POST | /brands/enrichment-history |
Read enrichment results for a brand name |
Check a brand
Returns whether a brand with this name exists in the organization. Cheaper than a create call when you only need the answer.
Endpoint: POST /api/{organization}/brands/check
Request
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Brand name to test |
curl -X POST https://catalog-ai.tdcapps.com/api/your-org/brands/check \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Tools" }'
Response
{
"success": true,
"data": {
"exists": true
}
}
Create a brand
Creates the brand and returns it. When a brand with that name already exists, the existing record comes back with created: false rather than an error, so this endpoint is safe to call repeatedly.
Endpoint: POST /api/{organization}/brands/create
Request
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Brand name |
slug |
string | No | Derived from the name when omitted |
The generated slug lowercases the name and replaces each run of non-alphanumeric characters with a hyphen. If that slug is already taken by another brand, a timestamp is appended to keep it unique, so the slug you get back is not always the slug you would predict. Read it from the response rather than recomputing it.
curl -X POST https://catalog-ai.tdcapps.com/api/your-org/brands/create \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Tools" }'
Response
{
"success": true,
"data": {
"brand": {
"id": "brand_abc123",
"name": "Acme Tools",
"slug": "acme-tools"
},
"created": true
}
}
| Field | Type | Description |
|---|---|---|
created |
boolean | true when the brand was inserted, false when it already existed |
Brand enrichment history
Returns every enrichment result recorded against a brand name, newest first. Results are ordered by completion time, falling back to creation time for items that never completed.
Endpoint: POST /api/{organization}/brands/enrichment-history
Request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string | Yes | Brand name | |
page |
integer | No | 1 | Page number, minimum 1 |
limit |
integer | No | 10 | Items per page, 1 to 50 |
curl -X POST https://catalog-ai.tdcapps.com/api/your-org/brands/enrichment-history \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Tools", "page": 1, "limit": 10 }'
Response
{
"success": true,
"data": {
"history": [
{
"id": "beji_abc123",
"brandName": "Acme Tools",
"enrichedAttributes": { "founded": "1974" },
"referenceData": { "sources": ["https://example.com/about"] },
"completedAt": "2024-01-15T14:30:00Z",
"createdAt": "2024-01-15T14:28:00Z",
"modelType": "pro-v1",
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 3,
"totalPages": 1
}
}
}
| Field | Type | Description |
|---|---|---|
enrichedAttributes |
object | The attribute values the job produced |
referenceData |
object | The sources the values were read from |
modelType |
string | Model tier the job ran on |
status |
string | Item status, including failed |
errorMessage |
string | null | Populated when the item failed |
A name with no history returns an empty history array and a total of 0, not a 404.
Errors
| Status | Meaning |
|---|---|
| 400 | name missing or not a string, or pagination outside its bounds |
| 401 | No API key on the request |
| 403 | The key cannot reach this organization |
| 500 | Server error |
Next steps
- Brand Enrichment API - Run a job against these brands
- Brand Enrichment - What the job produces