Missing fields from REST API call

This topic contains 31 replies, has 4 voices, and was last updated by  Kiran 7 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #227298

    Marc D
    Buyer
    Post count: 15

    This is a follow-up to this post:
    https://wpgeodirectory.com/support/topic/example-rest-api-calls/#post-226155

    The following GET URL returned GeoDirectory entries, however the JSON does not contain all of the fields: /wp-json/posts?type[]=gd_food_beverage

    I can see it is missing address, lat/long, email, website & social media URLs, etc. How do I get these fields? Thank you for your assistance.

    #227413

    Paolo
    Site Admin
    Post count: 31206

    HI,

    I’ve alerted the developers, they will let us know asap.

    Thanks

    #228057

    Kiran
    Moderator
    Post count: 7069

    Hi Marc,

    We have own namespace “geodir” for GeoDirectory api data. So root namespace will be “/wp-json/geodir/v1/”.
    All geodirectory api routes will be found under namespace “/wp-json/geodir/v1/”. For each CPT the api route will be “/wp-json/geodir/v1/CPT_SLUG/”. For ex: “/wp-json/geodir/v1/places/” or /wp-json/geodir/v1/events/ etc…

    Here are some api route examples.
    https://YOUR-SITE.COM/wp-json/ – Root endpoint
    https://YOUR-SITE.COM/wp-json/geodir/v1/ – Root GeoDirectory api namespace
    https://YOUR-SITE.COM/wp-json/geodir/v1/places/ – Places CPT
    https://YOUR-SITE.COM/wp-json/geodir/v1/events/ – Events CPT
    https://YOUR-SITE.COM/wp-json/geodir/v1/reviews/ – Reviews

    Thanks

    #228617

    Marc D
    Buyer
    Post count: 15

    Thank you. I did try some of the geodir namespace but they all end up with:
    [{“code”:”json_no_route”,”message”:”No route was found matching the URL and request method”}]
    The GeoDirectory REST API plugin is enabled. Do I need to upgrade to WP REST API v2?

    #228618

    Marc D
    Buyer
    Post count: 15
    This reply has been marked as private.
    #229097

    Kiran
    Moderator
    Post count: 7069

    Hi Marc,

    Please provide us your site FTP & admin credentials in PRIVATE reply.

    Also please confirm that on your site all GeoDirectory + GeoDirectory plugins are upto date.

    Thanks,
    Kiran

    #229605

    Marc D
    Buyer
    Post count: 15
    This reply has been marked as private.
    #230059

    Paolo
    Site Admin
    Post count: 31206

    Hi Marc,

    Kiran had to take a day off today, he’ll be back tomorrow. He’ll check your website 1st thing and let you know.

    I believe the API we used is V2, but wait for him to confirm, Kiran is the most qualified person to reply about the API add-on.

    Thanks

    #230481

    Kiran
    Moderator
    Post count: 7069

    Hi Marc,
    Actually site is running under deprecated version of WP REST API. The plugin url https://wordpress.org/plugins/json-rest-api/ shows notice on top description says “This is the deprecated Version 1 of the WP REST API. It’s no longer supported beyond security fixes. Please consider WP REST API v2 for your website.”
    So i have deactivated older plugin and activated recent plugin https://wordpress.org/plugins/rest-api/.

    Now all rest api endpoints working fine.

    Let us know.
    Thanks

    #230483

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #230843

    Marc D
    Buyer
    Post count: 15

    Thank you. I had a suspicion that was the issue.
    I appreciate all of your help on this. Feel free to close this issue.

    #230846

    Paolo
    Site Admin
    Post count: 31206

    Thanks for letting us know 🙂

    #231801

    Marc D
    Buyer
    Post count: 15
    This reply has been marked as private.
    #231838

    Paolo
    Site Admin
    Post count: 31206

    hi,

    I’ll make sure Kiran sees it.

    He’ll let usk now asap.

    Thanks

    #231855

    Marc D
    Buyer
    Post count: 15

    Nevermind, I realize that category may have been removed by one of us. Sorry, I should have noticed that sooner.

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

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

Open Support Ticket