API Reference - Post Types

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108054

← Back to API Reference | Getting Started

Post Types

Post types define the different categories of content that members can publish — listings, blog posts, events, jobs, products, and any custom type configured on your site. Each post type has its own form, display settings, and URL structure.

Model name in URL: data_categories — DB table: data_categories

The Post Type Object

FieldTypeDescription
data_idintegerUnique post type ID (primary key, read-only)
system_namestringUnique system identifier for this post type
data_namestringDisplay name shown on the website required on create
data_typestringData type classification
form_namestringName of the form used to create/edit posts of this type
data_filenamestringURL-friendly slug
data_activeinteger1 if active, 0 if disabled
display_orderintegerDisplay order on the website category page
profile_display_orderintegerDisplay order on member profiles
per_pageintegerDefault number of posts shown per page
category_tabstringTab label on the category page
profile_tabstringTab label on member profiles
h1stringH1 heading text for the category page
h2stringH2 heading text for the category page
iconstringIcon class for this post type
post_typestringDefault post type label applied to new posts
always_oninteger1 to always display this post type
distance_searchinteger1 to enable location/distance search for this type
caption_lengthintegerMax caption length (characters) in search results
revision_timestamptimestampLast modified timestamp (auto-updated)
commentstextComments section HTML or configuration
comments_headerstringHeader text for the comments section
comments_codetextCustom code for the comments section (e.g. Disqus embed)
search_results_divtextCustom HTML wrapper for search results
search_resultstextCustom search results template HTML
footer_contenttextFooter content displayed below post listings
search_results_layouttextLayout template for category search results
profile_results_layouttextLayout template for profile-level results
post_datestringDefault post date format or setting
category_sidebarstringSidebar widget name for the category page (default: Default Sidebar)
profile_sidebarstringSidebar widget name for the profile page (default: Default Single Sidebar)
sidebar_search_modulestringSearch module widget used in the sidebar
category_order_bystringDefault sort order for category page listings
profile_order_bystringDefault sort order for profile page listings
profile_headertextCustom header HTML for the profile post section
profile_footertextCustom footer HTML for the profile post section
category_sqlstringCustom SQL clause for category page queries
profile_per_pageintegerNumber of posts shown per page on member profiles (default: 1000)
category_headertextCustom header HTML for the category page
category_footertextCustom footer HTML for the category page
category_groupintegerCategory group ID for organizing post types
software_versionintegerSoftware version number for this post type configuration
feature_categoriesstringComma-separated category IDs featured for this post type
is_event_featureintegerWhether this post type has event features enabled
search_priority_flagintegerFlag for search priority behavior
type_of_featurestringFeature type classification for this post type
enable_price_sliderintegerWhether to enable a price slider filter in search
is_digital_productintegerWhether posts of this type represent digital products
enable_mapintegerWhether to show a map on the detail page
enable_search_results_mapintegerWhether to show a map on search results pages
enable_global_search_results_post_settingintegerWhether to include this post type in global search results
keyword_search_filterstringKeyword search filter configuration
enableLazyLoadintegerWhether lazy loading is enabled for search results
post_approvalintegerWhether posts require admin approval before publishing
photo_gallery_videosintegerWhether video support is enabled in photo galleries
search_results_photo_sliderintegerWhether to show a photo slider in search results
search_results_start_viewstringDefault view mode for search results (EG grid, list)
delete_same_contentintegerWhether to prevent duplicate content submissions
enable_recurring_events_addonintegerWhether the recurring events addon is enabled for this type
sidebar_position_mobilestringSidebar position on mobile devices
allow_post_linksintegerWhether to allow external links in posts
show_expire_postintegerWhether to show post expiration dates
review_admin_notification_emailstringEmail template for admin review notifications
review_member_notification_emailstringEmail template for member review notifications
review_submitter_notification_emailstringEmail template for review submitter notifications
review_approved_submitter_notification_emailstringEmail template sent to submitter when review is approved
review_member_pending_notification_emailstringEmail template for pending review member notifications
category_ignore_search_priorityintegerWhether to ignore search priority on category pages
post_comment_settingsstringComment settings configuration for this post type
post_type_cache_systemintegerCache system setting for this post type
webhook_run_statusintegerWebhook execution status flag
referral_creditsintegerNumber of referral credits awarded for this post type

List Post Types

GET /api/v2/data_categories/get
Copy
curl -X GET "https://www.yourdomain.com/api/v2/data_categories/get?property=data_active&property_value=1" \
  -H "X-Api-Key: your-api-key-here"

Retrieve a Post Type

GET /api/v2/data_categories/get/{data_id}
Copy
curl -X GET "https://www.yourdomain.com/api/v2/data_categories/get/3" \
  -H "X-Api-Key: your-api-key-here"

Create a Post Type

POST /api/v2/data_categories/create
Copy
curl -X POST "https://www.yourdomain.com/api/v2/data_categories/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "data_name=Projects" \
  -d "data_active=1" \
  -d "category_tab=Projects" \
  -d "profile_tab=Projects"

Retrieve Custom Fields for a Post Type

POST /api/v2/data_categories/custom_fields

Returns the custom fields configured for a specific post type form.

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/data_categories/custom_fields" \
  -H "X-Api-Key: your-api-key-here" \
  -d "data_id=3"

Update a Post Type

PUT /api/v2/data_categories/update
Copy
curl -X PUT "https://www.yourdomain.com/api/v2/data_categories/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "data_id=3" \
  -d "category_tab=Our+Projects" \
  -d "per_page=20"

Delete a Post Type

DELETE /api/v2/data_categories/delete
Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/data_categories/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "data_id=3"