Member Posts API - Create, Update, Delete and Get Member Posts

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000093239-member-posts-api-create-update-delete-and-get-member-posts

It is possible to update, create, delete and get member posts information using the API.


There are 4 actions:


Single-Image Posts

  1. api/v2/data_posts/get/{id}
  2. api/v2/data_posts/create
  3. api/v2/data_posts/update
  4. api/v2/data_posts/delete/


Note: Single-Image posts have a data_type of 20.  Video posts are also considered single-image posts and have a data_type of 9.


Multi-Photo Posts (data_type 4)

  1. api/v2/users_portfolio_groups/get/{id}
  2. api/v2/users_portfolio_groups/create
  3. api/v2/users_portfolio_groups/update
  4. api/v2/users_portfolio_groups/delete/


Note: Multi-Image posts have a data_type of 4.


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/



Multi-Photo Post Endpoints


  • api/v2/users_portfolio_groups/get/{id}

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



  • api/v2/users_portfolio_groups/create


    To find the data_id go to My Content >> Edit Post Settings, look for the ID of the Post type.

    Use this variable to automatically import the post image: auto_image_import value =1 


Use this variable to synchronize the location of the post 1 is active 0 is inactive:


auto_geocode:
geocode the post location


In order for the system to auto-geocode the post, this Advanced Setting needs to be set up following the instructions in this article:


google_maps_server_side_api_key





  • api/v2/users_portafolio_groups/update

    With this action, to update a post make sure to include the group_id.



  • api/v2/users_portfolio_groups/delete/

    Use this action URL to delete a post, add the group_id variable of the post to be deleted.



Single Post Types Endpoints



  • api/v2/data_posts/get/{id}

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

  • api/v2/data_posts/create
     
    To use this action it should have the same variables found in the forms of the post types. See the variables of each in Toolbox >> Form Manager.


    To find the data_id go to My Content >> Edit Post Settings, look for the ID of the Post type.

  • Use this variable to automatically import the post image: auto_image_import value =1
  • Use this variable to syncronize the location of the post 1 is active 0 is inactive auto_geocode:
  • In order for the system to auto-geocode the post, this Advanced Setting needs to be set up following the instructions in this article:  google_maps_server_side_api_key



  • api/v2/data_posts/update


    To update a post make sure to include the post_id.




  • api/v2/data_posts/delete/

    Use this action URL to delete a post, add the post_id variable of the post to be deleted.