Using the Product Advertising API Scratchpad

Once you've signed up for Associates Program and Product Advertising API, you can start playing around with the API using Product Advertising API Scratchpad. Use the tool to submit requests to the Product Advertising API and get response. The Scratchpad tool returns sample code in several languages to help you understand how the Product Advertising API works and helps you integrate with ease.

You won't be able to use Scratchpad without valid credentials. If you don't have valid associate credentials, please refer Sign up as an Amazon Associate and Sign up for Product Advertising API in order.

This section is a brief user guide of Product Advertising API 5.0 Scratchpad. You'll find the current version of scratchpad here. Scratchpad is hosted at all the supported locales separately. Using the following Locale Reference Table, choose the Product Advertising API 5.0 Scratchpad URL for the locale that you want.

Take the Tour

You can get a quick tour of scratchpad by heading over to the tool and clicking on Start Tour on top right section of the navigation header. Use the Locale Reference Table below to choose the Scratchpad URL for the target locale.

Submitting a Request

  1. Go to Product Advertising API 5.0 Scratchpad. Use the Locale Reference Table below to choose the Scratchpad URL for the target locale.

  2. Choose an operation from the left panel (for example, SearchItems).

  3. Under Common parameters, enter the following information (For information on common parameters, refer Common Request Parameters):

    1. Marketplace

    2. Partner Type

    3. Partner Tag

    4. Access Key

    5. Secret Key

  4. Create a request by entering details under Request Parameters.

    • Popular parameters corresponding to an operation are already displayed in this panel.

    • However, an operation may have more parameters which can be added using Add a new Parameter and hitting the + icon. For list of valid parameters for an operation, refer Operations under API Reference.

    • Resources determine what information will be returned in the API response. Add resources by selecting from valid list of resources for the operation. For more information on resources, refer Resources.

  5. Choose Run request.

  6. If your request is successful, you'll see the raw API response in JSON Response tab under the Response Section.

  7. To start over, choose Reset form.

Viewing Response

  • On a successful request, the scratchpad displays following information as response:
    • Rendered Response: The way response appears on a webpage. This is created using a HTML/CSS template and focuses on displaying some popular elements from the API response.
    • JSON Response: The raw API response in JSON format.
    • HTML Response: The HTML+CSS code for the rendered response. You can copy this using the Copy button situated at top-right of the section.
  • To save the response, click on Save response and the response will be saved in a text file containing request and response information.
  • Scratchpad also returns cooked-up code snippets in JAVA, PHP and cURL based on the request. You can directly consume these code snippets to ease your integration with Product Advertising API. For example, copy the curl snippet to clipboard and paste it in the terminal to see API response.
    • To download a copy of any code snippet, click on Save code.
    • You can also copy the code snippets onto clipboard by clicking the Copy button.

Modifying a Request

You can modify a request in two ways:

  1. Under the Request parameters section, choose the + icon to add parameters or the x icon to remove them. Once you've modified the request, choose Run request.
  2. Under the JSON Payload section inside the Request Details panel, type your changes to the JSON payload by modifying/adding/removing parameters. Once you've made changes to the JSON payload, choose Extract parameters and run request. Your new response appears below. The Request parameters and Request details sections are updated to match your new request.

History

Scratchpad will save your 10 most recent requests. The history displays each operation, locale, and the parameters you chose. Use the history to switch between previous requests and compare the different inputs. To work with history feature, follow the steps mentioned below:

  1. From the right corner, choose History.
  2. Choose the request you want.
  3. Scratchpad will refresh and return the request for you.
  4. To clear your history, choose Clear History.

Tips

  • If you get a response error, try inferring the response error message and take action by changing your parameters and values if need be. For reference, see Troubleshooting.
  • The tool features front-end validation on request parameters, helping you fire request with valid parameter values. Whenever an invalid value is entered into a request parameter, the tool flags it as red. For instance, the SearchItems parameter BrowseNodeId accepts only positive integers as input, hence, supplying alphabets to it will flag the parameter as red. For reference, see the image below: Correcting its value with numbers will make it green again:
  • Copy to clipboard button is provided throughout the tool for users to be able to copy content to clipboard easily.
  • In the response section, a full-screen viewing option next to Copy button is also provided for better readability of large responses.
  • Choose Support on top right of the navigation bar to report an issue or locate links to the API documentation and discussion forum.

Locale Reference

Locale Scratchpad URL
Australia https://webservices.amazon.com.au/paapi5/scratchpad/index.html
Brazil https://webservices.amazon.com.br/paapi5/scratchpad/index.html
Canada https://webservices.amazon.ca/paapi5/scratchpad/index.html
France https://webservices.amazon.fr/paapi5/scratchpad/index.html
Germany https://webservices.amazon.de/paapi5/scratchpad/index.html
India https://webservices.amazon.in/paapi5/scratchpad/index.html
Japan https://webservices.amazon.co.jp/paapi5/scratchpad/index.html
Mexico https://webservices.amazon.com.mx/paapi5/scratchpad/index.html
Italy https://webservices.amazon.it/paapi5/scratchpad/index.html
Spain https://webservices.amazon.es/paapi5/scratchpad/index.html
Turkey https://webservices.amazon.com.tr/paapi5/scratchpad/index.html
United Arab Emirates https://webservices.amazon.ae/paapi5/scratchpad/index.html
United Kingdom https://webservices.amazon.co.uk/paapi5/scratchpad/index.html
United States https://webservices.amazon.com/paapi5/scratchpad/index.html

results matching ""

    No results matching ""