Skip to main content

Amazon Ads API

The Amazon Ads API is a REST interface for programmatically managing Amazon advertising, including Sponsored Products, Sponsored Brands, and Sponsored Display campaigns, Amazon DSP advertisers and reporting, budget rules, Amazon Marketing Cloud (AMC) workflows, and Amazon Marketing Stream subscriptions. It lets you automate campaign management and pull performance data for analytics and reporting. Access is authorized with Login with Amazon (LWA) using the OAuth2 authorization code flow.

Amazon Ads API icon

Power end-to-end data operations for your Amazon Ads API API with Nexla. Our bi-directional Amazon Ads API connector is purpose-built for Amazon Ads API, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Amazon Ads API or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Amazon Ads API workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating an Amazon Ads API credential, you need an Amazon Ads account with API access enabled and a Login with Amazon (LWA) application from which you can obtain a Client ID, Client Secret, and a refresh token. The Amazon Ads API uses the OAuth2 authorization code flow: the Client ID is also sent as the Amazon-Advertising-API-ClientId header on every request, and requests scoped to a specific advertising account also send the profile ID in the Amazon-Advertising-API-Scope header.

To obtain your Amazon Ads API credentials, follow these steps:

  1. Complete Amazon Ads API onboarding to gain API access. Follow the steps in the Amazon Ads API onboarding overview to request access for your Amazon Ads account and associate it with a Login with Amazon application.

  2. Sign in to the Amazon Developer Console with your Amazon account, and select Login with Amazon from the top navigation.

  3. Click Create a New Security Profile, and enter a name, description, and consent privacy notice URL for your application. This security profile represents the LWA application that will call the Amazon Ads API.

  4. Locate your security profile in the list, and click Show Client ID and Client Secret to reveal the Client ID and Client Secret. Copy both values and store them securely.

  5. Confirm that Amazon Ads API access is assigned to your Login with Amazon application as part of onboarding, so the security profile is authorized to call the Amazon Ads API.

  6. Complete the OAuth2 authorization code flow to obtain a Refresh Token. Using the Client ID and Client Secret, generate an authorization grant by consenting to the profile and advertising::campaign_management scopes for the Amazon Ads account, then exchange the returned authorization code at https://api.amazon.com/auth/o2/token for an access token and refresh token. See Retrieve an access token and refresh token for details.

  7. Store the Refresh Token securely. Amazon may issue a new refresh token when you exchange one for a fresh access token, so always persist the most recent refresh token.

  8. Retrieve your Profile ID by calling GET https://advertising-api.amazon.com/v2/profiles with a valid access token and the Amazon-Advertising-API-ClientId header. Each profile represents an advertising account in a specific marketplace; use the profile ID for the account whose data you want to access.

For complete details about authorization, token exchange, and refresh tokens, see the Amazon Ads API authorization overview.

Authenticate

Credentials required

FieldRequiredSecretDescription
Client IDYesNoLWA Client ID for the Amazon Ads API app (from the Security Profile at developer.amazon.com). Also sent as the Amazon-Advertising-API-ClientId header on every request.
Client SecretYesYesLWA Client Secret paired with the Client ID, used during the authorization_code token exchange at api.amazon.com/auth/o2/token.
Refresh TokenYesYesOAuth2 refresh token obtained after completing the LWA authorization_code flow (profile and advertising::campaign_management scopes), used to mint new access tokens.
Profile IDNoNoAdvertising profile ID to scope requests to (sent as Amazon-Advertising-API-Scope). Obtain via GET /v2/profiles; not required for the profiles-list call itself.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Enter the Client ID for your Login with Amazon application. This value authenticates your app and is also sent as the Amazon-Advertising-API-ClientId header on every Amazon Ads API request.

  4. Enter the Client Secret paired with your Client ID. This value is used during the OAuth2 token exchange and should be kept confidential.

  5. Enter the Refresh Token obtained from the LWA authorization code flow. Nexla uses this token to mint new access tokens as needed.

  6. Optionally, enter the Profile ID for the advertising account you want to access. This value is sent as the Amazon-Advertising-API-Scope header for profile-scoped endpoints. It is not required for the profiles-list call.

    If your Client Secret or Refresh Token is compromised, revoke access and generate new credentials from your Login with Amazon security profile. For detailed information about authorization and token management, see the Amazon Ads API authorization overview.

  7. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Amazon Ads API connector tile, then select the credential that will be used to connect to Amazon Ads, and click Next; or, create a new Amazon Ads API credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Amazon Ads API endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

[Rest API] List SP campaigns

This endpoint template retrieves the list of Sponsored Products (SP) campaigns for the advertising profile. Use this template to access SP campaign configurations for analysis, reporting, or synchronization with other systems.

[Rest API] List SB campaigns

This endpoint template retrieves the list of Sponsored Brands (SB) campaigns for the advertising profile. Use this template to access SB campaign configurations for analysis, reporting, or synchronization with other systems.

[Rest API] List SD campaigns

This endpoint template retrieves the list of Sponsored Display (SD) campaigns for the advertising profile. Use this template to access SD campaign configurations for analysis, reporting, or synchronization with other systems.

[Rest API] Create report

This endpoint template creates an asynchronous Sponsored Ads (v3) report for the specified configuration and date range. Use this template to generate performance reports across Sponsored Products, Sponsored Brands, and Sponsored Display campaigns.

[Rest API] Request DSP report

This endpoint template requests an Amazon DSP report for the specified account, date range, dimensions, and metrics. Use this template to generate DSP performance reports for downstream analysis.

[Rest API] DSP report status

This endpoint template retrieves the status and download location of a previously requested DSP report. Use this template to poll a DSP report request until the report is ready to download.

[Rest API] Get budget rules

This endpoint template retrieves the configured budget rules. Use this template to review budget rule definitions applied to your campaigns.

[Rest API] Create budget rules (Sponsored Products Budget Rules)

This endpoint template creates budget rules for Sponsored Products campaigns. Use this template to define rule-based budget adjustments for your SP campaigns.

[Rest API] Create budget rules (Budget Rules Sp)

This endpoint template creates Sponsored Products budget rules. Use this template to define rule-based budget adjustments for your SP campaigns.

[Rest API] All budget rules (Budget Rules Sp)

This endpoint template retrieves all Sponsored Products budget rules. Use this template to list the SP budget rules configured for the advertising profile.

[Rest API] Create budget rules (Budget Rules Sd)

This endpoint template creates Sponsored Display budget rules. Use this template to define rule-based budget adjustments for your SD campaigns.

[Rest API] All budget rules (Budget Rules Sd)

This endpoint template retrieves all Sponsored Display budget rules. Use this template to list the SD budget rules configured for the advertising profile.

[Rest API] Create budget rules (Budget Rules Sb)

This endpoint template creates Sponsored Brands budget rules. Use this template to define rule-based budget adjustments for your SB campaigns.

[Rest API] All budget rules (Budget Rules Sb)

This endpoint template retrieves all Sponsored Brands budget rules. Use this template to list the SB budget rules configured for the advertising profile.

[Rest API] Sponsored Products

This endpoint template retrieves Sponsored Products data for the advertising profile. Use this template to ingest Sponsored Products records for analysis or reporting.

[Rest API] Sponsored Brands

This endpoint template retrieves Sponsored Brands data for the advertising profile. Use this template to ingest Sponsored Brands records for analysis or reporting.

[Rest API] Sponsored Display

This endpoint template retrieves Sponsored Display data for the advertising profile. Use this template to ingest Sponsored Display records for analysis or reporting.

[Rest API] List all AMC accounts

This endpoint template retrieves the list of Amazon Marketing Cloud (AMC) accounts. Use this template to enumerate the AMC accounts available to your credential.

[Rest API] List advertisers in instance

This endpoint template lists the advertisers associated with an Amazon Marketing Cloud instance. Use this template to review the advertisers linked to a specific AMC instance.

[Rest API] Create a workflow

This endpoint template creates a new Amazon Marketing Cloud workflow. Workflows are defined as a set of operations that take previously defined data sources as input and use them to generate reports.

[Rest API] Create a workflow with custom parameters

This endpoint template creates a new Amazon Marketing Cloud workflow that accepts custom parameters in its definition. Use this template when your workflow needs runtime parameters supplied at execution.

[Rest API] List all workflows in a specific instance

This endpoint template returns the list of Amazon Marketing Cloud workflows in a specific instance. Use this template to review the workflows defined for an AMC instance.

[Rest API] Create a new schedule

This endpoint template creates a new schedule that specifies the periodic execution of an Amazon Marketing Cloud workflow, on either a daily or weekly cadence. Use this template to automate recurring workflow runs.

[Rest API] List all schedules

This endpoint template retrieves the Amazon Marketing Cloud workflow schedules configured for the instance. Use this template to review the daily or weekly schedules applied to your workflows.

[Rest API] Creates a new workflow execution

This endpoint template creates a new, ad-hoc execution of an existing Amazon Marketing Cloud workflow. Workflow executions are asynchronous and typically take at least 15 minutes to complete.

[Rest API] Returns a list of workflow executions

This endpoint template returns the list of Amazon Marketing Cloud workflow executions along with their status information, including the time windows of data on which each workflow is executing. Use this template to monitor workflow execution progress.

[Rest API] List Stream subscriptions

This endpoint template lists the Amazon Marketing Stream subscriptions for the advertising profile. Use this template to review the streaming subscriptions configured for your account.

[Rest API] Get Stream subscription by ID

This endpoint template retrieves a single Amazon Marketing Stream subscription by its ID. Use this template to inspect the configuration of a specific stream subscription.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Amazon Ads API data sources can also be manually configured to ingest data from any valid Amazon Ads API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Amazon Ads API data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the Amazon Ads API destination, and select the Send to Destination option from the menu. Select the Amazon Ads API connector from the list of available destination connectors, then select the credential that will be used to connect to Amazon Ads, and click Next; or, create a new Amazon Ads API credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Amazon Ads API endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

[Rest API] Create Stream subscription

This endpoint template creates an Amazon Marketing Stream subscription using records from a Nexset. Use this template to automatically create stream subscriptions based on data from your Nexla flows.

[Rest API] Update Stream subscription

This endpoint template updates an existing Amazon Marketing Stream subscription using records from a Nexset. Use this template to automatically modify stream subscriptions based on data from your Nexla flows.

Manual configuration

Amazon Ads API destinations can also be manually configured to send data to any valid Amazon Ads API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

Amazon Ads API endpoints typically expect JSON in the request body. Many endpoints also require version-specific Accept and Content-Type headers and the Amazon-Advertising-API-Scope header for profile-scoped operations.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured Amazon Ads API endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the Amazon Ads API endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.