GEO API Post
This topic contains 26 replies, has 3 voices, and was last updated by Kiran 8 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: api
-
AuthorPosts
-
January 9, 2017 at 2:04 am #339183
Hey guys,
I’m new to this api and im trying to figure out how to just edit a field through the API. Basically i have a text field called beer menu in each listing, every user who has a listing has a secure token to pass through to securely connect to their listing through the wp-rest api, however how would the http post string be written for this ? Thanks for your help.
Ray
January 9, 2017 at 1:46 pm #339510https://mywebsite.com/wp-json/geodir/v1/places/299
I figured out the string to get to a particular place on the get portion of the API but what would be the rest to do a post to geo_dir beermenu with the verified token in the string ?
I know the API is fairly new, is there any documentation for it yet ? Thanks guys, i really appreciate your help.
Ray
January 9, 2017 at 6:43 pm #339698Hi,
Please see: https://wpgeo.directory/rest-api/cpt/#update-a-post
Let us know if that is enough or if you need an example.I asked to the API developer to follow up too.
Thanks
January 10, 2017 at 2:32 am #340134Could you provide me an example. The field i need to edit would be under gr_data/geodir_beermenu .
Thanks
January 10, 2017 at 3:02 pm #340344He’ll let you know asap.
Thanks
January 10, 2017 at 3:02 pm #340345He’ll let you know asap.
Thanks
January 10, 2017 at 4:48 pm #340438Awesome, i appreciate your help.
January 11, 2017 at 4:25 am #340710Hi Ray,
Every custom field will be added in listing post schema.
All listings fields will be displayed in POST method schema under wp-json/geodir/v1/ -> routes -> /geodir/v1/places -> endpoints -> methods POST -> ArgsPlease check my example how to update listing – https://wpgeodirectory.com/support/topic/update-listing-location-via-wp-api/#post-332863
FYI
All GeoDirectory Rest API Endpoints – https://wpgeo.directory/rest-api/geodirectory-rest-api-endpoints/
GeoDirectory CPT Endpoint Basic Schema – https://wpgeo.directory/rest-api/cpt/Let us know.
Thanks,
KiranJanuary 11, 2017 at 4:46 pm #341023Kiran,
I got it working but one last question . For my geodir_beermenu=
This is a text field . How do i go about doing line breaks ? Cause right now its putting everything on one line.
Thanks
January 11, 2017 at 4:47 pm #341024Right now it looks like this.
Bud lite Budweiser Corona
Need to be
Bud Lite
Budweiser
CoronaJanuary 11, 2017 at 4:54 pm #341034nvm i got it reg <br> tag works.
January 11, 2017 at 7:26 pm #341118Kiran,
where does the ?oauth= go in the string ?
January 12, 2017 at 12:02 pm #341379Hi Ray,
Please check this documentation on authentication – http://v2.wp-api.org/guide/authentication/
Kiran
January 12, 2017 at 2:13 pm #341419Karin,
I understand how to generate a token, but i dont see in the documentation how to process a post with the token .
January 12, 2017 at 3:08 pm #341443According to the documentation. This should work.
https://eample.com.com/wp-json/geodir/v1/places/299/?title=My Place&content=Content goes here&gd_place_tags[]=1&gd_placecategory[]=7&geodir_beermenu=Bud?access_token=token .
I cant figure it out.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket