Categories
Use this endpoint to manipulate and obtain details on Salesbox’s Categories.
Base Endpoint
https://segmentai.salesbox.com.br/api/categories
Get Category
GET /api/categories/{id}
Get an individual Category by ID.
HTTP Request
GET /api/categories/ID
Response
Expected Response Code: 200
{
"category": {
"id": 1,
"title": "Marketing Materials",
"alias": "marketing-materials",
"description": "Marketing related documents and assets",
"color": "#4CAF50",
"bundle": "asset",
"createdAt": "2024-01-15T10:00:00+00:00",
"modifiedAt": "2024-01-15T10:00:00+00:00",
"createdBy": 1,
"createdByUser": "John Smith",
"modifiedBy": 1,
"modifiedByUser": "John Smith"
}
}
Category Properties
Name |
Type |
Description |
|---|---|---|
|
int |
ID of the Category |
|
string |
Name of the Category |
|
string |
URL-friendly version of the name |
|
string/null |
Description of the Category |
|
string/null |
Color code for the Category |
|
string |
Type of items in the category (asset, campaign, etc) |
|
datetime |
Category creation date/time |
|
datetime/null |
Category last modified date/time |
|
int |
ID of the User that created the Category |
|
string |
Name of the User that created the Category |
|
int |
ID of the User that last modified the Category |
|
string |
Name of the User that last modified the Category |
List Categories
GET /api/categories
Get a list of categories.
Query Parameters
Name |
Type |
Description |
|---|---|---|
|
string |
Text to search categories by |
|
int |
Which page to display |
|
int |
How many records to return |
|
string |
Column to sort by |
|
string |
Sort direction: asc or desc |
|
string |
Filter by bundle type |
Create Category
POST /api/categories/new
Create a new category.
Request Body
Name |
Type |
Description |
|---|---|---|
|
string |
Category name |
|
string |
Category description |
|
string |
Bundle type (asset, campaign, etc) |
|
string |
Color code for the category |
|
string |
URL-friendly version of the name (optional) |
Edit Category
PATCH /api/categories/{id}/edit
Edit an existing category.
Request Body
Same fields as Create Category.
Delete Category
DELETE /api/categories/{id}/delete
Delete an existing category.