enter image description here

I am newbie in wordpres Rest Api and json. I am using WP REST API to retrieve data from my website, for example, from this http://localhost/mywebsite/wp-json/wp/v2/posts/. I want to use this response for the android app

It gives me response for this.

I am developing e-commerce website using food bakery Theme and using wordpress 4.7. I want to get the product details in that website which are on the page http://localhost/mywebsite/restaurants/life-powers/ how do I get response from that page? this is the ID of that page and I have all the ID of product on that page

when I tried to http://localhost/mywebsite/wp-json/wp/v2/posts/1823 it gives this response

{"code":"rest_post_invalid_id","message":"Invalid post ID.","data":{"status":404}}

Why is this happening?

Read more here: WP Rest Api: getting json response for android app


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: