GEO API Post

This topic contains 26 replies, has 3 voices, and was last updated by  Kiran 7 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #339183

    Ray Zuchowski
    Expired Member
    Post count: 16

    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

    #339510

    Ray Zuchowski
    Expired Member
    Post count: 16

    https://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

    #339698

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

    #340134

    Ray Zuchowski
    Expired Member
    Post count: 16

    Could you provide me an example. The field i need to edit would be under gr_data/geodir_beermenu .

    Thanks

    #340344

    Paolo
    Site Admin
    Post count: 31206

    He’ll let you know asap.

    Thanks

    #340345

    Paolo
    Site Admin
    Post count: 31206

    He’ll let you know asap.

    Thanks

    #340438

    Ray Zuchowski
    Expired Member
    Post count: 16

    Awesome, i appreciate your help.

    #340710

    Kiran
    Moderator
    Post count: 7069

    Hi 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 -> Args

    Please 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,
    Kiran

    #341023

    Ray Zuchowski
    Expired Member
    Post count: 16

    Kiran,

    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

    #341024

    Ray Zuchowski
    Expired Member
    Post count: 16

    Right now it looks like this.

    Bud lite Budweiser Corona

    Need to be

    Bud Lite
    Budweiser
    Corona

    #341034

    Ray Zuchowski
    Expired Member
    Post count: 16

    nvm i got it reg <br> tag works.

    #341118

    Ray Zuchowski
    Expired Member
    Post count: 16

    Kiran,

    where does the ?oauth= go in the string ?

    #341379

    Kiran
    Moderator
    Post count: 7069

    Hi Ray,

    Please check this documentation on authentication – http://v2.wp-api.org/guide/authentication/

    Kiran

    #341419

    Ray Zuchowski
    Expired Member
    Post count: 16

    Karin,

    I understand how to generate a token, but i dont see in the documentation how to process a post with the token .

    #341443

    Ray Zuchowski
    Expired Member
    Post count: 16

    According 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.

Viewing 15 posts - 1 through 15 (of 27 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount