A Guide to What's New in Product Advertising API 5.0
This guide gives a high level walkthrough of how Product Advertising API 5.0 differs from 4.0 and what all new features it offers.
Features
Following are the new features in PA-API 5.0 on a high level:
- Supports more secure and extensible HTTPS POST/RPC(JSON) over previously supported HTTP(s) GET/REST,SOAP
- Requests are signed with the more secure and recommended signature version 4 signing process over signature version 2.
- The new JSON based response is lighter and slimmer from the previous XML based output.
- SDKs in popular languages offering ease of integration with PA-API 5.0.
- PA-API 5.0 is built from ground-up to offer faster response times and uses Resources over ResponseGroups used earlier.
- PA-API 5.0 brings rich features available in Amazon retail website like price display in preferred currency, multilingual support, prime exclusive, free shipping eligibility, sales rank at browse node (category) etc. to build best customer experience possible.
Operations
This section is an overview of new features in PA-API 5.0 operations:
Operation | What's New? |
---|---|
GetItems GetItems provides the functionality to lookup product information. The GetItems operation in PA-API 5.0 maps to the ItemLookup operation in PA-API 4.0 |
|
SearchItems SearchItems operation provides ability to search and retrieve product information based on a search query. The SearchItems operation in PA-API 5.0 maps to the ItemSearch operation in PA-API 4.0 |
|
GetBrowseNodes GetBrowseNodes operation provides the functionality to lookup browse node information and traverse through the browse tree. The GetBrowseNodes operation in PA-API 5.0 maps to the BrowseNodeLookup operation in PA-API 4.0 |
|
GetVariations - NEW! Given an ASIN, the GetVariations operation returns a set of items that are the same product, but differ according to a consistent theme, for example size and color. The GetVariations operation in PA-API 5.0 is a new API and has no mapping with any of the operations in PA-API 4.0. However, it supports the features supported by the Variations ResponseGroup in PA-API 4.0 |
|
For detailed information on mappings between PA-API 4.0 and PA-API 5.0 and new features for Operations and ResponseGroups, please refer PA-API 4.0 to 5.0 Mappings.
Request Structure
PA-API 5.0 is supports the secure and extensible HTTPS POST/RPC(JSON) compared to HTTP(s) GET/REST(XML) supported by PA-API 4.0 earlier. Refer Sending a Request section for more information on PA-API 5.0 request structure. The following is a high level visual difference between PA-API 4.0 and PA-API 5.0's request structure:
Few pointers on differences in request structure between PA-API 4.0 and PA-API 5.0:
- The request is signed using the more secure signature version 4 signing process.
- Each Operation in PA-API 5.0 has a separate endpoint. For e.g. endpoint for SearchItems in US marketplace is
https://webservices.amazon.com/paapi5/searchitems
. - The API specific request parameters are passed in the request payload in JSON compared to directly being passed as query params in PA-API 4.0.
Response Structure
PA-API 5.0 features output in the lightweight JSON format over XML output used earlier. The following is a high level visual difference between PA-API 4.0 and PA-API 5.0's response structure:
Few pointers on differences in response structure between PA-API 4.0 and PA-API 5.0:
- From the visual comparison above, we can see that PA-API 5.0 uses JSON over XML and the response size of PA-API 5.0 response is much less bloated compared to PA-API 4.0 Response.
- The HTTP Headers, Request Arguments, etc. can be fetched from PA-API 5.0 Response's and Request's HTTP Headers directly which contains all the request/response related information. Following is a list of several Header Keys you can use to fetch useful information about the request/response:
- Request Headers:
- Authorization: It contains the Signing Algorithm, Signature and AccessKey. Refer Signature V4 Signing for more details on the header.
- X-Amz-Date: It contains the timestamp information
- X-Amz-Target: It contains the API, Service and Version information. See Sending a Request for more details.
- User-Agent: It contains the user agent information for the request.
- Response Headers:
- x-amzn-RequestId: Contains the unique Request ID for the PA-API 5.0 Request.
- Request Payload:
- The request payload contains the complete payload which was sent to PA-API 5.0 for the request. It contains your request object.
- Request Headers:
- If the request contains invalid arguments, an error object is returned in the response depicting the error code and message.
Resources
Resources are hierarchical and logical grouping of product information. By logically grouping into hierarchical subunits, Resources allows associates to retrieve necessary data in least possible response time. Product Advertising API when provided with list of resources, will only return the information you need and no more. We recommend that you specify only necessary resources that return only the information your application needs, optimising latency and improve your application response time.
PA-API 5.0 uses Resources over ResponseGroups used earlier in PA-API 4.0.
The following is a visual break-down of resources for the ItemInfo high level resource:
- From the visual break-down above, we can see that the entire ItemInfo response has been logically grouped into resources allowing you to only request the information you desire rather than requesting the entire dump of information.
- With the specific information requested by you through resources, the API response over the wire is light-weight as well as the response times are faster.
Mappings
Refer PA-API 4.0 to 5.0 Mappings for information on how APIs, ResponseGroups and attributes from PA-API 4.0 map to APIs and Resources in PA-API 5.0.