# Amazon Selling Partner API job configuration ## AmazonSPApiInput ```json "input": { "use": "amazon_selling_partner_api.io#AmazonSPApiInput" } ``` ### Credentials Could be a string and represent on of Mitto's named credentials or explicitly pointed object of values ```json "credentials": { "region": "", "role_arn": "", "aws_access_key_id": "", "aws_secret_access_key": "", "client_id": "", "client_secret": "", "refresh_token": "" } ``` ### Endpoint Different regions has they own ASP API endpoint. ```json "endpoint": "https://sellingpartnerapi-na.amazon.com" ``` Check [ASP API Endpoint documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-endpoints) ### Path URL path of API to be requested. For example to hit Orders API with requests the `path` value will be next according to [documentation](https://developer-docs.amazon.com/sp-api/docs/orders-api-v0-reference#get-ordersv0orders) ```json "path": "/orders/v0/orders" ``` Check [ASP API documentation](https://developer-docs.amazon.com/sp-api) for more details. ### Params Request parameters specific for each API endpoint ```json "params": { "LastUpdatedAfter": "2022-02-22", "MarketplaceIds": "ATVPDKIKX0DER", "MaxResultsPerPage": "100" } ``` Check specific API endpoint documentation page ### Results key Helps to specify location within response to retrieve data ```json "results_key": "Orders" ``` Check response schema ### Updated at param Defines property name to be set in request `params` with last run timestamp ```json "updated_at_param": "LastUpdatedAfter" ``` ### Record config Allows to point property names to be used as record's ID and last modified value ```json "record_config": { "id_field": "AmazonOrderId", "last_modified_field": "LastUpdateDate", } ``` ### Extend resources Allows to specify additional requests with using data from the main request ```json "extend_resources": [ { "new_field_name": "OrderItems", "path": "/orders/v0/orders/{}/orderItems", "path_variable_name": "AmazonOrderId", "results_key": "OrderItems" } ] ``` Check [examples page](job_configuration_examples.md) to get see example of usage. ## AmazonSPApiReportInput Request and use report data as input for job. ```json "input": { "use": "amazon_selling_partner_api.io#AmazonSPApiReportInput" } ``` ### Credentials Could be a string and represent on of Mitto's named credentials or explicitly pointed object of values ```json "credentials": { "region": "", "role_arn": "", "aws_access_key_id": "", "aws_secret_access_key": "", "client_id": "", "client_secret": "", "refresh_token": "" } ``` ### Endpoint Different regions has they own ASP API endpoint. ```json "endpoint": "https://sellingpartnerapi-na.amazon.com" ``` Check [ASP API Endpoint documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-endpoints) ### Report spec Each report has own report type and additional parameters that might be added here ```json "report_spec": { "reportType": "GET_SALES_AND_TRAFFIC_REPORT", "dataStartTime": "2022-01-01", "dataEndTime": "2022-04-30", "marketplaceIds": ["ATVPDKIKX0DER"] } ``` Check [ASP API Endpoint documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-endpoints) ### File Format File format of requested report ```json "file_format": "CSV" ``` ### Version Amazon Selling Partner reports API version ```json "version": "2021-06-30" ``` Check documentations: * [v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-reference) * [v2020-09-01](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2020-09-01-reference) ## Asp_ReportJobType Job of `asp_report` type request and download report as a file. ### Credentials Could be a string and represent on of Mitto's named credentials or explicitly pointed object of values ```json "credentials": { "region": "", "role_arn": "", "aws_access_key_id": "", "aws_secret_access_key": "", "client_id": "", "client_secret": "", "refresh_token": "" } ``` ### Endpoint Different regions has they own ASP API endpoint. ```json "endpoint": "https://sellingpartnerapi-na.amazon.com" ``` Check [ASP API Endpoint documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-endpoints) ### Report spec Each report has own report type and additional parameters that might be added here ```json "report_spec": { "reportType": "GET_SALES_AND_TRAFFIC_REPORT", "dataStartTime": "2022-01-01", "dataEndTime": "2022-04-30", "marketplaceIds": ["ATVPDKIKX0DER"] } ``` Check [ASP API Endpoint documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-endpoints) ### File Format File format of requested report ```json "file_format": "JSON" ``` ### Output Report will be saved in a file under this name or path ```json "file_format": "JSON" ``` ### Version Amazon Selling Partner reports API version ```json "version": "2021-06-30" ``` Check documentations: * [v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-reference) * [v2020-09-01](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2020-09-01-reference)