API · Target
GET /target/categories
Target categories and their subcategories.
| Request | GET /v1/target/categories |
| Operation id | target.categories.get |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Target categories and their subcategories.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
category_id | string | no | Category id (default root). |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The category and its children. | TargetCategories |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The item, category or place does not exist. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Target is temporarily unavailable. Retryable; nothing was charged. | Error |
TargetCategories fields
| Field | Type | Description |
|---|---|---|
category_id | string | |
category | object | null | |
children | object[] |
Errors use one shape everywhere; see Errors for every code and what to do.