Product Details
This guide will help developers to retrieve details about an individual product on an Amazon Business marketplace.
Prerequisites
To follow this tutorial, you will need:
- A Storefront installation with a properly configured connection to Amazon Business as described in the Setup guide.
- A process of creating access tokens as described in the Authorization guide.
Retrieving Product Details
Once we have results from a response of the Search API, we can retrieve all details of a product by means of the Product Details API. Technically, it's similar to how we execute a search: It's just a different endpoint and different request and response schema.
Again, we will use an access token (i.e. YOUR_ACCESS_TOKEN).
You will need to pick up the id passed as part of a previous search result (e.g. s_CgpCMDdaUEtONllSEAIaAlVTIgVlbi1VUyjChT0
if you're following the example from the search guide):
...
{
"id": "s_CgpCMDdaUEtONllSEAIaAlVTIgVlbi1VUyjChT0",
"provider": "amazon",
"sku": "B07ZPKN6YR",
"name": "Apple iPhone 11, 64GB, Black - Unlocked (Renewed)",
...
},
...
We'll use YOUR_RESULT_ID as a placeholder in the following code snippets:
- cURL
- JavaScript
- C#
- Java
- Go
curl --request GET \
--header 'authorization: YOUR_ACCESS_TOKEN' \
--url 'https://YOUR_DOMAIN/api/v1/amazon/products/YOUR_PRODUCT_ID'
var axios = require("axios").default;
var options = {
method: 'GET',
url: 'https://YOUR_DOMAIN/api/v1/amazon/products/YOUR_PRODUCT_ID',
headers: {
'content-type': 'application/json',
'authorization': 'bearer YOUR_ACCESS_TOKEN'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
var client = new RestClient("https://YOUR_DOMAIN/api/v1/amazon/products/YOUR_PRODUCT_ID");
var request = new RestRequest(Method.GET);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "bearer YOUR_ACCESS_TOKEN");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://YOUR_DOMAIN/api/v1/amazon/products/YOUR_PRODUCT_ID")
.header("content-type", "application/json")
.header("authorization", "bearer YOUR_ACCESS_TOKEN")
.asString();
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
// Configure your URL
url := "https://YOUR_DOMAIN"
// Prepare HTTP request
req, err := http.NewRequest("GET", baseURL+"/api/v1/amazon/products/YOUR_PRODUCT_ID", http.NoBody)
if err != nil {
panic(err)
}
req.Header.Set("content-type", "application/json")
req.Header.Set("authorization", "bearer "+YOUR_ACCESS_TOKEN)
// Execute the request
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
// The HTTP response body will return JSON accordingly
body, err := io.ReadAll(req.Body)
if err != nil {
panic(err)
}
fmt.Println(resp)
fmt.Println(string(body))
}
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| amount | path | string | true | ID of the product to retrieve from a previous search result |
Response
If everything goes well, you will get a successful HTTP response with status 200 OK and a payload containing the product details.
{
"id": "s_CgpCMDdaUEtONllSEAIaAlVTIgVlbi1VUyjChT0",
"provider": "amazon",
"name": "Apple iPhone 11, 64GB, Black - Unlocked (Renewed)",
"offersCount": 4,
"taxonomies": [
...
],
"images": [
...
],
"offers": [
{
"id": "kBVluNB7",
"productId": "s_CgpCMDdaUEtONllSEAIaAlVTIgVlbi1VUyjChT0",
"provider": "amazon",
"price": {
"amount": 364,
"currency": "USD",
"formatted": "$ 364.00"
},
...
},
...
],
...
}
Response schema
Status Code 200
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | true | An opaque, unique identifier for the product; use it to initiate the punchout process |
| provider | string | true | Always amazon for the Storefront API for Amazon Business |
| name | string | true | Name of the product |
| offersCount | integer(int32) | false | Number of offers for this product |
| offers | array(Offer) | false | Information about the offers from various merchants on Amazon |
| taxonomies | array(Taxonomy) | false | Information about the standard classifications such as UNSPSC or eCl@ss |
| images | array(Image) | false | Images of the product in various sizes and from different angles |
| asin | string | false | Amazon Standard Identification Number (ASIN) of the product, Amazon's unique product identifier |
| features | array(string) | false | List of features in a textual form |
| starRating | number(float64) | false | Rating of the product on Amazon in the form of a numerical value between 0.0 (bad) and 5.0 (good) |
| reviewCount | number(int32) | false | Number of reviews on Amazon |
| productOverview | object | false | An unordered list of characteristics of the product, e.g. its manufacturer, width, or height |
| book | object(Book) | false | If the product is a book, this object has additional information |
Offer
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | true | An opaque, unique identifier for the offer |
| productId | string | true | An opaque, unique identifier for the product |
| provider | string | true | Always amazon for the Storefront API for Amazon Business |
| vendor | string | false | Name of the vendor |
| price | object(Money) | true | Price (per unit) for which the merchant will sell this product. Notice that quantity-based pricing tiers might also apply (see quantityPrice). |
| quantityPrice | array(QuantityPriceTier) | false | A structure that represents the pricing tiers if the order quantity has an effect on the price. |
| quantityDiscountsAvailable | boolean | false | Indicates whether quantity discounts are available for this offer |
| delivery | string | false | Describes delivery details of the offer in textual form, e.g. Free delivery until Friday |
| shippingOptions | array(ShippingOption) | false | The options for shipping a product offer |
| availability | string | false | Availability details in textual form, e.g. In Stock |
| priceUnit | string | false | Price unit in textual form, e.g. per 100 EA |
| priceTaxLabel | string | false | Describes tax-related details of the offer in textual form, e.g. excl. taxes |
| priceInfo | string | false | Further details regarding the price, in textual form, e.g. Quantity discounts available |
| preferred | boolean | false | Indicates whether this is a preferred product according to the buying guidance settings of the purchasing organization |
| blocked | boolean | false | Indicates whether this is blocked according to the buying guidance settings of the purchasing organization. These products should be disabled from adding to the shopping cart. |
| quantityMin | number(int64) | false | Minimum order quantity accepted |
| quantityMax | number(int64) | false | Maximum order quantity accepted |
| condition | string | false | Describes whether the product is new, refurbished etc. One of: new, used, collectible, or refurbished |
| fulfillment | string | false | Textual information about the fulfillment, e.g. whether it's fulfilled by Amazon or a 3rd party |
ShippingOption
| Name | Type | Required | Description |
|---|---|---|---|
| shippingCost | object(shippingCost) | true | The cost related to shipping an item |
| deliveryRange | object(DeliveryDateRange) | true | The delivery window for shipping a product offer |
| deliveryInformation | string | true | String representation of the estimated delivery time and delivery price |
| thresholdCost | object(ThresholdPrice) | true | The threshold for free shipping. When the total cost of the order exceeds this cost, shipping is free |
ShippingDetails
| Name | Type | Required | Description |
|---|---|---|---|
| value | object(Money) | true | The charges related to shipping a product offer |
DeliveryDateRange
| Name | Type | Required | Description |
|---|---|---|---|
| max | string (date-time) | true | The maximum local delivery date and time to ship a product offer |
| min | string (date-time) | true | The minimum local delivery date and time to ship a product offer |
ThresholdPrice
| Name | Type | Required | Description |
|---|---|---|---|
| value | object(Money) | true | The threshold for free shipping. The shipping cost is applicable when the value of the order is below this cost. When the order value exceeds this cost, shipping is free |
Quantity Price Tier
| Name | Type | Required | Description |
|---|---|---|---|
| minQuantity | number(float64) | true | Minimum quantity at which the given price will be applied |
| price | object(Price) | true | Price of the product/offer if the quantity is greater than or equal to minQuantity |
Taxonomy
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | Type of the taxonomy. One of: unspsc or eclass |
| code | string | true | Code in the standard classification specified by type, e.g. 44121903 |
| version | string | false | Version of the standard classification specified by type, e.g. 6.0315 |
| displayName | string | false | Human readable, localized text of the classification code, e.g. Pen refills |
Money
| Name | Type | Required | Description |
|---|---|---|---|
| amount | number | true | Amount of the price. Minimum is 0.0 |
| currency | string | true | Currency code as of ISO 3166 |
| formatted | string | false | A localized, textual form of the monetary value |
Image
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | true | URL to the image |
| width | integer(int32) | false | Width of the image in pixels |
| height | integer(int32) | false | Height of the image in pixels |
| altText | string | false | Alternative text to further describe the image |
| kind | string | false | Describes the size/purpose of the image: thumbnail, small, medium, or large |
Book
| Name | Type | Required | Description |
|---|---|---|---|
| isbn10 | string | false | 10-digit ISBN of the book |
| isbn13 | string | false | 13-digit ISBN of the book |
| publicationDate | string(date) | false | Date when the book has been published |
| publishedLanguage | string | false | Language under which the book is published |
If you want to dig into the details of the response structure, please look into the API reference and/or the Swagger/OpenAPI specification.
Errors
In case of an error, you can use the HTTP status code and the response body to find out what went wrong.
| HTTP Status Code | Description |
|---|---|
400 Bad Request | The server understood your request but is unable to complete it, e.g. because a required parameter is missing. |
401 Unauthorized | You sent invalid or expired credentials. |
500 Internal Server Error | Something went wrong on our side. |
Example:
{
"error": {
"code": 404,
"message": "Product not found."
}
}