Link: https://support.brilliantdirectories.com/support/solutions/articles/12000093239
The API allows retrieving, creating, updating, searching and deleting member posts on the website. However, only one post can be updated at a time.
To enable automatic geocoding of the post's location and to search for a post by location, the Enable All Location Features for "Pretty URL" Search Results Pages (Additional Google Maps API Cost) setting must be configured in the site's Advanced Settings.
For detailed instructions, please refer to the guide here: Set Up Pretty URLs with Google Maps.
Available API Endpoints
Below is a complete list of API endpoints, organized by content type, which enable developers to retrieve, create, update, delete, or search various types of posts.
Single Image Post Endpoints
(Videos, Articles, Jobs, Events, Coupons, Audios, Discussions)
- https://example.com/api/v2/data_posts/get/{id}
- https://example.com/api/v2/data_posts/create
- https://example.com/api/v2/data_posts/update
- https://example.com/api/v2/data_posts/delete
- https://example.com/api/v2/data_posts/search
Multi-Photo Post Endpoints
(Photo Albums, Products, Digital Products, Properties, Classifieds)
- https://example.com/api/v2/users_portfolio_groups/get/{id}
- https://example.com/api/v2/users_portfolio_groups/create
- https://example.com/api/v2/users_portfolio_groups/update
- https://example.com/api/v2/users_portfolio_groups/delete
- https://example.com/api/v2/users_portfolio_groups/search
Single-Image Posts
Model Notes: For the data_type parameter, use "20" for post types that include images and "9" for videos.
Get a Single Image Post
Read the data of a Single Image Post based on the post_id.
Endpoint:
Example Request:
Query Parameters:
property | The property key (eg., post_id). |
property_value | The value associated with the property. |
Example Response:
Create a Single Image Post
Add a new Single Image Post to the database.
Parameter Notes: data_id, user_id, data_type are required.
Endpoint:
Example Request:
Query Parameters:
post_id | The unique identifier assigned to the post by the system. |
post_title | The title of the post. |
post_content | The main content of the post. |
post_category | The category under which the post is classified. |
post_image | The file path of the image associated with the post. |
post_type | The type of post. 20 for images, 9 for videos |
data_type | The data type identifier for the post. |
post_tags | A list of tags associated with the post. |
post_status | Post status: '1' or 'true' for published, '0' or 'false' for unpublished. |
post_live_date | The date and time when the post was published. |
post_author | The name of the user who authored the post. |
user_id | The User ID. |
post_expire_date | The date and time when the post expires, if applicable. |
post_start_date | The date and time when the post becomes active. |
data_id | The unique identifier related to the post data type. |
sticky_post | Indicates whether the post is marked as sticky or featured. |
sticky_post_expiration_date | The expiration date for a sticky post. |
post_image | The URL of the post image. |
auto_image_import | Set value to "1" or "true" to import the image. |
Example Response:
Update a Single Image Post
Update a post record and its related data in the database.
Parameter Notes: data_id, data_type and post_id are required.
Endpoint:
Example Request:
Example Response:
Delete a Single Image Post
Delete a Single Image Post and their related data from the database.
Parameter Notes: post_id is required.
Endpoint:
Example Request:
Example Response:
Search a Single Image Post
Search Single Image Posts and their related data from the database.
Parameter Notes: post_id is required.
Endpoint:
Example Request:
Query Parameters:
q | Enter a keyword to search for in post data. |
category | Enter a category to search for in post data. |
daterange | Enter a category to search for in post data. (11/09/2024 - 11/09/2024) |
search_priority_flag | Set to 1 to first be ordered by the search priority defined in membership plan settings, and then by the Order Results By setting above. |
show_expire_post | Set to 1 to have expired prior to the time of the search or the searched date range will show in search results. |
post_type_cache_system | Set to 1 (recommended) to cache search results and load subsequent matching search results more quickly. Set to NO to always query the database for all searches. This cannot be enabled if Order Results By is set to Random. |
address | Enter the location to search for. EG Los Angeles, California, United States |
output_type | Enter the type of response to receive. Valid options html, array. |
limit | Enter the maximum number of posts results to return per page of results. |
category_order_by | Set the order the data would be displayed. |
page | Enter the page number of results to return. For example, enter 2 to return the second page of results. |
Example Response:
Multi-Image Posts
Model Notes: For the data_type parameter use "4".
Get a Multi Image Post
Read the data of a Multi Image Post based on the group_id.
Endpoint:
Example Request:
Query Parameters:
property | The property key (eg., group_id). |
property_value | The value associated with the property. |
Example Response:
Create a Multi Image Post
Add a new Multi Image Post to the database.
Endpoint:
Example Request:
Query Parameters:
group_id | The ID of the multi-image post. |
user_id | The ID of the user. |
group_name | The Title of the post. |
group_desc | Description of the post. |
group_location | Location of the post. |
auto_geocode | The system will geocode the location with the Google Maps API integration. |
auto_image_import | Set value to "1" or "true" to import the image. |
post_image | URLs of images related to the review. Separate multiple URLs with commas. |
group_status | Post status: '1' or 'true' for published, '0' or 'false' for unpublished. |
data_type | Integer representing the type of data for the group. '4' for Multi-image posts. |
data_id | Identifier for the specific data related to the group. |
group_category | The category under which the group is classified. |
post_tags | Tags associated with the group for categorization and search. |
property_status | Status of the group property, such as available or not. |
property_type | Type of the property associated with the group. |
property_price | Price of the property related to the group. |
property_beds | Number of beds in the property associated with the group. |
property_baths | Number of bathrooms in the property related to the group. |
property_sqr_foot | Size of the property in square feet. |
sticky_post | Indicates whether the group is marked as sticky or featured. |
sticky_post_expiration_date | Expiration date for the sticky post, in 'YYYY-MM-DD HH:MM:SS' format. |
Example Response:
Update a Multi-Image Post
Update an existing multi-image post in the database.
Parameter Notes: group_id and data_id are required.
Endpoint:
Example Request:
Example Response:
Delete a Multi-Image Post
Delete a Multi Image Post and their related data from the database.
Parameter Notes: Use group_id to delete a Multi Image Post.
Endpoint:
Example Request:
Example Response:
Search for Multi-Image Posts
Search Multi Image Posts and their related data from the database.
Parameter Notes: Use data_id or filename.
Endpoint:
Example Request:
Query Parameters:
q | Enter a keyword to search for in post data. |
category | Enter a category to search for in post data. |
property_status | Enter a status to search for in post data. |
bedrooms | Enter a bedroom to search for in post data. |
bathrooms | Enter a bathroom to search for in post data. |
price | Enter a price to search for in post data. |
search_results_photo_slider | Set to 1 to search results for this feature will have a carousel displaying the posts photos. |
enable_search_results_map | Set to 1 display a map icon at the top of search results pages. Clicking on this icon will display the search results as pins on a Google Map. |
search_priority_flag | Set to 1 to first be ordered by the search priority defined in membership plan settings, and then by the Order Results By setting above. |
show_expire_post | Set to 1 to have expired prior to the time of the search or the searched date range will show in search results. |
post_type_cache_system | Set to 1 (recommended) to cache search results and load subsequent matching search results more quickly. Set to NO to always query the database for all searches. This cannot be enabled if Order Results By is set to Random. |
address | Enter the location to search for. EG Los Angeles, California, United States |
output_type | Enter the type of response to receive. Valid options html, array. |
limit | Enter the maximum number of posts results to return per page of results. |
category_order_by | Set the order the data would be displayed. |
page | Enter the page number of results to return. For example, enter 2 to return the second page of results. |
Example Response: