Missing fields from REST API call
This topic contains 31 replies, has 4 voices, and was last updated by Kiran 9 years, 2 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
July 14, 2016 at 3:54 pm #227298
This is a follow-up to this post:
https://wpgeodirectory.com/support/topic/example-rest-api-calls/#post-226155The 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.
July 14, 2016 at 7:16 pm #227413HI,
I’ve alerted the developers, they will let us know asap.
Thanks
July 15, 2016 at 1:24 pm #228057Hi 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/ – ReviewsThanks
July 16, 2016 at 8:43 pm #228617Thank 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?July 16, 2016 at 8:43 pm #228618This reply has been marked as private.July 18, 2016 at 6:11 am #229097Hi 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,
KiranJuly 18, 2016 at 11:55 pm #229605This reply has been marked as private.July 19, 2016 at 3:38 pm #230059Hi 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
July 20, 2016 at 9:29 am #230481Hi 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.
ThanksJuly 20, 2016 at 9:30 am #230483This reply has been marked as private.July 20, 2016 at 4:49 pm #230843Thank you. I had a suspicion that was the issue.
I appreciate all of your help on this. Feel free to close this issue.July 20, 2016 at 4:50 pm #230846Thanks for letting us know 🙂
July 22, 2016 at 2:21 pm #231801This reply has been marked as private.July 22, 2016 at 2:51 pm #231838hi,
I’ll make sure Kiran sees it.
He’ll let usk now asap.
Thanks
July 22, 2016 at 3:05 pm #231855Nevermind, I realize that category may have been removed by one of us. Sorry, I should have noticed that sooner.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket