Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 65051

Getting Wrong JSON Format in API Calls

$
0
0

Replies: 0

Hi,

We are developing a mobile application with the help of your API documentation.

When I try to get product_reviews by API call, The API documentation JSON output format and the Realtime Output format are totally different.

Our output format is,

{
“product_reviews”:[{
“id”: 9,
“created_at”: “2015-05-07T13:01:25”,
“review”: “This will go great with my Hoodie that I ordered a few weeks ago.”,
“rating”: 5,
“reviewer_name”: “Stuart”,
“reviewer_email”: “stuart@example.com”,
“verified”: false,
“_links”: {
“self”: [
{
“href”: “https://example.com/wp-json/wc/v1/products/162/reviews/9”
}
],
“collection”: [
{
“href”: “https://example.com/wp-json/wc/v1/products/162/reviews”
}
],
“up”: [
{
“href”: “https://example.com/wp-json/wc/v1/products/162”
}
]
}
}]
}

Let us know why this happens. How can we get the exact JSON return Object?


Viewing all articles
Browse latest Browse all 65051