API Reference - Data Types
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108105
← Back to API Reference | Getting Started
Data Types
Data Types define the categories of post content available on your directory site. Each Data Type represents a content model (EG single-image posts, video posts, multi-photo posts) and controls whether members can create entries of that type based on their membership plan.
Model name in URL:
data_types — DB table: data_typesThe Data Type Object
| Field | Type | Description |
|---|---|---|
data_id | integer | Unique data type ID (primary key, read-only) |
category_name | string | Display name for this post/content type (EG Single Image Post, Video Post) required on create |
category_active | integer | Whether this data type is active and available for use: 1 active, 0 inactive required on create |
revision_timestamp | timestamp | Timestamp of the last modification to this record (auto-managed) |
limit_available | integer | Whether membership plan posting limits apply to this data type: 1 yes, 0 no (unlimited) |
List Data Types
GET /api/v2/data_types/get
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/data_types/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"data_id": "4",
"category_name": "Multi-Photo Post",
"category_active": "1",
"revision_timestamp": "2015-06-06 07:40:57",
"limit_available": "1"
},
{
"data_id": "9",
"category_name": "YouTube/Vimeo Video Post",
"category_active": "1",
"revision_timestamp": "2015-06-06 07:41:12",
"limit_available": "1"
}
],
"total": "8",
"current_page": 1,
"total_pages": 4,
"next_page": "MipfKjI="
}Retrieve a Data Type
GET /api/v2/data_types/get/{data_id}
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/data_types/get/4" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"data_id": "4",
"category_name": "Multi-Photo Post",
"category_active": "1",
"revision_timestamp": "2015-06-06 07:40:57",
"limit_available": "1"
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Data Type
POST /api/v2/data_types/create
Example Request
Copy
curl -X POST "https://www.yourdomain.com/api/v2/data_types/create" \ -H "X-Api-Key: your-api-key-here" \ -d "category_name=Document+Post" \ -d "category_active=1" \ -d "limit_available=1"
Example Response
Copy
{
"status": "success",
"message": {
"data_id": "12",
"category_name": "Document Post",
"category_active": "1",
"revision_timestamp": null,
"limit_available": "1"
}
}Update a Data Type
PUT /api/v2/data_types/update
Example Request
Copy
curl -X PUT "https://www.yourdomain.com/api/v2/data_types/update" \ -H "X-Api-Key: your-api-key-here" \ -d "data_id=12" \ -d "category_name=PDF+Document+Post" \ -d "limit_available=0"
Example Response
Copy
{
"status": "success",
"message": {
"data_id": "12",
"category_name": "PDF Document Post",
"category_active": "1",
"revision_timestamp": "2026-04-03 10:00:00",
"limit_available": "0"
}
}Delete a Data Type
DELETE /api/v2/data_types/delete
Example Request
Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/data_types/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "data_id=12"
Example Response
Copy
{
"status": "success",
"message": "data_types record was deleted"
}