https://api.nexscope.ai/api/skill-api/v1/skills/amazon-ads-reporting/runRun this API
Send a JSON request to execute this API and receive the documented response payload.
Endpoint
| Method | POST |
| Path | https://api.nexscope.ai/api/skill-api/v1/skills/amazon-ads-reporting/run |
| Auth | Bearer API key |
| Content-Type | application/json |
Amazon Ads operation guide
This endpoint supports three report stages with an owned connectionId: omit reportId and documentToken to create a report, provide reportId to poll it, or provide a backend-issued documentToken to download a completed report. Creation needs startDate and endDate, plus a complete configuration or the documented report type, ad product, grouping, and columns.
Poll an existing report instead of creating another request while it is pending. Download tokens are opaque; provider URLs and credentials are not returned.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
connectionId | integer | required | Owned Amazon Ads connection ID. Example: 123 |
reportId | string | optional | Existing report ID; when present the API polls that report. Example: report-id |
reportTypeId | string | optional | Report type required by a new report unless configuration supplies it. Example: spCampaigns |
adProduct | string | optional | Ad product required by a new report unless configuration supplies it. Example: SPONSORED_PRODUCTS |
groupBy | array | optional | Report grouping fields. Example: [
"campaign"
] |
columns | array | optional | Requested report columns. Example: [
"campaignId",
"impressions",
"clicks"
] |
name | string | optional | Optional report name. Example: Campaign report |
startDate | string | optional | Inclusive report start date for a new report. Example: 2026-07-01 |
endDate | string | optional | Inclusive report end date for a new report. Example: 2026-07-31 |
timeUnit | string | optional | Optional report time unit. Example: DAILY |
format | string | optional | Optional report format. Example: GZIP_JSON |
filters | array | optional | Optional report filters. Example: [] |
configuration | object | optional | Complete Amazon Ads reporting configuration; may replace reportTypeId/adProduct/groupBy/columns. Example: {} |
documentToken | string | optional | Backend-issued token for downloading a completed report. Example: opaque-document-token |
Code example
{
"adProduct": "SPONSORED_PRODUCTS",
"columns": [
"campaignId",
"impressions"
],
"connectionId": 123,
"endDate": "2026-07-31",
"groupBy": [
"campaign"
],
"reportTypeId": "spCampaigns",
"startDate": "2026-07-01"
}Response example
Platform response envelope. code 0 indicates success or acceptance; data contains the business result.
{
"code": 0,
"cost": "-1",
"data": {
"content": {},
"contentType": "application/json",
"documentToken": "opaque-document-token",
"reportId": "report-id",
"status": "PENDING"
},
"msg": null,
"time": "2026-01-01 00:00:00",
"traceId": null,
"ts": "0"
}Response fields
| Name | Type | Required | Description |
|---|---|---|---|
code | integer | required | 0 means accepted or successful; nonzero is a platform error. |
cost | string | required | Elapsed milliseconds, never credits; -1 outside web requests. |
data | any | required | Data value used by this API operation. |
msg | string | null | required | Msg value used by this API operation. |
time | string | required | Server local time: yyyy-MM-dd HH:mm:ss. |
traceId | string | null | required | Trace id value used by this API operation. |
ts | string | required | Epoch milliseconds. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Data value used by this API operation. |
data.content | any | optional | Content value used by this API operation. |
data.contentType | any | optional | Content type value used by this API operation. |
data.costTime | any | optional | Cost time value used by this API operation. |
data.costToken | any | optional | Cost token value used by this API operation. |
data.dataSnapshotMonth | any | optional | Data snapshot month value used by this API operation. |
data.documentToken | any | optional | Document token value used by this API operation. |
data.page | any | optional | Page value used by this API operation. |
data.pageItemCount | any | optional | Page item count value used by this API operation. |
data.pageSize | any | optional | Page size value used by this API operation. |
data.reportId | any | optional | Report id value used by this API operation. |
data.sourceTool | any | optional | Source tool value used by this API operation. |
data.sourceType | any | optional | Source type value used by this API operation. |
data.status | any | optional | Status value used by this API operation. |
data.title | any | optional | Title value used by this API operation. |
data.totalPage | any | optional | Total page value used by this API operation. |
data.type | any | optional | Type value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.content | object | array | string | optional | Downloaded report content when available. Example: {} |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.content | null | optional | Content value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.contentType | string | optional | Downloaded report content type. Example: application/json |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.contentType | null | optional | Content type value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.costTime | integer | optional | Execution time reported by the upstream provider. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.costTime | null | optional | Cost time value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.costToken | integer | optional | Token cost reported by the upstream provider. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.costToken | null | optional | Cost token value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.dataSnapshotMonth | string | optional | Data snapshot month returned by the upstream provider. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.dataSnapshotMonth | null | optional | Data snapshot month value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.documentToken | string | optional | Safe opaque token used for download. Example: opaque-document-token |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.documentToken | null | optional | Document token value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.page | integer | optional | Current page returned by the upstream provider. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.page | null | optional | Page value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.pageItemCount | integer | optional | Item count on the current page returned by the upstream provider. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.pageItemCount | null | optional | Page item count value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.pageSize | integer | optional | Page size returned by the upstream provider. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.pageSize | null | optional | Page size value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.reportId | string | optional | Provider report ID. Example: report-id |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.reportId | null | optional | Report id value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.sourceTool | string | optional | Provider-specific source tool name. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.sourceTool | null | optional | Source tool value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.sourceType | string | optional | Provider-specific source platform type. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.sourceType | null | optional | Source type value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.status | string | optional | Report status. Example: PENDING |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.status | null | optional | Status value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.title | string | optional | Provider-specific response title. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.title | null | optional | Title value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.totalPage | integer | optional | Total page count returned by the upstream provider. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.totalPage | null | optional | Total page value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.type | string | optional | Provider-specific render or payload type. Example: null |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.type | null | optional | Type value used by this API operation. |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data | null | required | Data value used by this API operation. |
Responses
| Code | Description |
|---|---|
| 200 | HTTP request completed. Check JSON code; only 0 indicates business success or acceptance. |
| 400 | Request JSON or required API parameters are invalid. |
| 401 | API key is missing, invalid, or cannot be matched to a user. |
| 5xx | API execution or upstream service failed. |
Data source, freshness, and limitations
Source, freshness, coverage, rate limits, and estimation notes are not specified in this API definition unless they appear in the request or response field documentation above. Do not assume official marketplace data or real-time freshness when it is not explicitly documented.