Article suggestions
  1. Home
  2. Section: Developer Hub
  3. Post Types API - How to Edit Post Types Data with API Calls

Post Types API - How to Edit Post Types Data with API Calls

Post Types API - How to Edit Post Types Data with API Calls
  • avatar
Written by Chan Nier
Updated on February 19, 2025

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

Using the API there are 5 Post Type actions that can be achieved:

  1. GET - /api/v2/data_categories/get/{data_id} 
  2. POST - /api/v2/data_categories/create
  3. POST - /api/v2/data_categories/custom_fields
  4. PUT - /api/v2/data_categories/update 
  5. DELETE - /api/v2/data_categories/delete 

We will break down these actions and explain how to achieve an end results with each one. The examples shown in this article are completed using https://www.postman.com/

For all actions, add the API Key to the Headers:

1. GET - /api/v2/data_categories/get/{data_id}

Read the data of a single Post Type based on the Data ID.

  • Choose GET as the method
  • Replace the {{api_url}} for the website url
  • Replace the {id} with the actual post type ID

Using this action is simple, add the url above but replace {id} with the actual post type ID. This will fetch the post types information from the website.

2. POST - /api/v2/data_categories/create
Add a Post Type to the database.

  • Choose POST as the method
  • In the Body select x-www-form-urlencoded
  • Enter data

3. POST - /api/v2/data_categories/custom_fields

Get all fields available for the Post Type.

  • Choose POST as the method.
  • In the Body select x-www-form-urlencoded
  • Then add the data_id of the Post Type

4. PUT - /api/v2/data_categories/update

Update a Post Type record and their related data from the database.

  • Choose PUT as the method
  • In the Body select x-www-form-urlencoded
  • Then add the new data for the Post Type

5. DELETE - /api/v2/data_categories/delete

Use this action URL to delete a Post Type, replace {id} with the Post Type ID that will be removed from the website.

  • Choose DELETE as the method
  • Replace the {id} with the data_id that will be deleted
  • In the Params add the data_id to delete


Thank you for leaving a rating!
Did you find this article helpful?
0 out of 0 people found this article helpful so far
Can't find what you're looking for? Get in touch
How can we help?
Send your question below and we'll get back to you as soon as possible.
Cancel
translation missing: en.kb.default.contact_form_error
×
Thanks for your message!
Thanks for your message!
×