List all categories
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Categories are thought of as the major classification for an object. They also have an associated colour which can be used for marking or tagging their associated objects in some way.
The API can list, read and delete categories, but not create or edit them directly. To create a category, assign a new category name to a record (for example a contact's category).
Attributes
| Attribute | Type | Description | Attributes |
|---|---|---|---|
self | reference | URL of the category | Read-only Non-null |
name | string | The category name (max 512 characters) | Read-only Non-null |
hex_colour | colour | The category colour, as #rrggbbaa, e.g. #064fbaff | Read-only Nullable |
is_active | boolean | true if the category can be assigned to records | Read-only Non-null |
Filtering Results
This endpoint returns the full list of categories, sorted by ID, by default. However, you may include an entity query parameter to only fetch categories which are enabled for the entity.
An example request that only wanted categories for notes would like this:
GET /v1/categories?entity=noteAll entities which support categories are valid values for the entity filter:
| Major Entity | Query String |
|---|---|
| Contact | contact |
| Company | company |
| Project | project |
| Opportunity | opportunity |
| Task | task |
| Appointment | appointment |
| Group | group |
| Note | note |
email |
Auto-created CategoriesA category created by assigning a new name to a record is enabled only for that type of record. Whenever a category is assigned to a record, it is made active and enabled for that record's type, if it wasn't already.
You can toggle which categories are enabled for a particular entity in the Daylite app preferences.
You can also add is_active=true or is_active=false to return only active or only inactive categories, e.g. GET /v1/categories?entity=note&is_active=true.