Amazon Selling Partner - Reports
  • 15 Aug 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Amazon Selling Partner - Reports

  • Dark
    Light
  • PDF

Article summary

Amazon Selling Partner - Reports API

API Documentation Link


Authorization and Authentication

For a walkthrough on what steps are required before starting the configuration of the Amazon Selling Partner - Reports API Flex Connector, please see the Before You Start section of the Amazon Selling Partner home page.


Configuration Parameters

Any instance where an entry in the below configuration has a leading $ represents a parameter that needs to be replaced with a static value.

Parameters in this document:


Connector configuration

  • Base url: https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/documents/{identifier}
  • Method: GET

Destination table naming convention is ultimately up to you as the data owner. We recommend using a naming convention that clearly describes the report being ingested. For example, when collecting the FBA Amazon Fulfilled Inventory Report, using such a table name as amazon_fba_fulfilled_inventory_report.

Variables

  • Variables
Variable nameVariable value
marketplace_ids$marketplace_ids
  • Secured Variables:
Variable nameVariable value
client_id$client_id
client_secret$client_secret
refresh_token$refresh_token

Refresh access token

  • Enable: Checkbox.png
  • URL: https://api.amazon.com/auth/o2/token
  • Method: POST
  • POST data: {"grant_type":"refresh_token", "client_id":"{client_id}", "client_secret":"{client_secret}"}
  • Headers: {"Content-Type":"application/x-www-form-urlencoded"}
  • Refresh token: {refresh_token}
  • Access token response key: access_token
  • Access Token header key: x-amz-access-token
  • Error status codes: 401; 403

Fetch list

  • Enable: Checkbox.png
  • Fetch List From: API
  • Fetch url: https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports
  • Method: GET
  • URL Parameters: reportTypes=$report_type&MarketplaceIds={marketplace_ids}&pageSize=100&createdSince=<<date_format(date_add({incval}, 'days', -1), '%Y-%m-%d')>>
  • Data key: reports
  • Data identifier key: reportDocumentId
  • Use identifiers: As single value

Advanced Settings

  • Downloadable link: Checkbox.png
  • URL key: url
  • Files Encoding: Windows-1252

The Primary Key represents the unique identifier for a given report, plus the field __file_base_name as this will ensure that each file is treated as part of the uniqueness check. For example, when ingesting the FBA Amazon Fulfilled Inventory Report, the Primary Key is {__file_base_name}-{seller-sku}.

  • Incremental Key:
    Column nameColumn value
    lastTimeSucceed$incremental_starting_value
Incremental value format

When entering a column value to the incremental key feature, you will need to use the following format: yyyy-mm-DD


Was this article helpful?