Product Details

get complete details of a product

Get Product Details

get
get product details

https://<domain>/commerce/product/product-details/
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access token
Query Parameters
bundle_id
required
number
bundle id(unique id)
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"displaydata": [
<data>
],
"rating": {
<rating>
},
"media_path": "<media path>",
"reserve": true,
"similar_products": [
<smilar products>
]
}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'GET',
'url': '<domain>/commerce/product/product-details/?bundle_id=<bundle_id>',
'headers': {
'apikey': '<apikey>',
'Cookie': 'defult_store_slug=admin_store; store_user=admin_store'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

PHP

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('<domain>/commerce/product/product-details/?bundle_id=<bundle_id>');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apikey' => '<api_key>',
'Cookie' => 'defult_store_slug=admin_store; store_user=admin_store'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}

Error Responses

Status Code

Error Type

Field

Description

400

Validation Error

bundle_id

this field is required