MerchJar Public API (v5)
Download OpenAPI specification:
The contract for the customer-facing MerchJar Public API. All paths in this document are relative to the server URL.
Base URL
All requests use https://app.merchjar.com/api/v5.
Authentication
Send a provisioned MerchJar API key with every request:
curl https://app.merchjar.com/api/v5/profiles \
-H 'Authorization: Bearer mj_live_…'
Create and manage API keys in Settings > API Keys. The full key is shown only once when you create it. Start with GET /profiles to discover the profile IDs available to the key.
Scopes
API keys are limited by scopes. Every operation lists its required scope in x-merchjar-required-scope; a key without that scope receives 403 Forbidden.
profiles:read: List accessible Amazon Advertising profiles.segments:read: List and retrieve segments and their schedules.segments:write: Create, update, and delete segments and schedules.segments:preview: Preview segment results.segments:validate: Validate a segment definition.audit_logs:read: List audit logs and audit-log items.history:read: Retrieve entity change history.targets:read: Read Sponsored Products targets.campaigns:write: Create and update Sponsored Products campaigns.campaigns:archive: Archive Sponsored Products campaigns.ad_groups:write: Create and update Sponsored Products ad groups.ad_groups:archive: Archive Sponsored Products ad groups.ads:write: Create and update Sponsored Products product ads.ads:archive: Archive Sponsored Products product ads.targets:write: Create and update Sponsored Products targets.targets:archive: Archive Sponsored Products targets.negative-targets:write: Create Sponsored Products negative product targets.negative-targets:archive: Archive Sponsored Products negative targets.bulk_actions:read: Retrieve submitted bulk actions.custom_fields:read: Read custom-field catalogs, values, and CSV exports.custom_fields:write: Manage custom-field definitions, values, and CSV imports.
Rate limits and retries
Use the response headers to make retry decisions; limits are enforced before the operation runs.
| Request type | Limit | Identity | On exhaustion |
|---|---|---|---|
| Standard API operations | 1,200 requests per minute by default; an API key may have a configured override | API key | 429 with Retry-After; standard rate limit headers appear on successful and rate limited responses |
POST /segments/preview |
In addition to the standard limit: a 3-request burst that refills one request every 2 seconds by default | Account, shared across its API keys | 429 with Retry-After; the rate limit headers report the preview-admission bucket |
| Campaign, ad-group, product-ad, and target creation | No standard rate limit middleware currently | Not applicable | These endpoints do not emit the standard rate limit headers or standard 429/503 rate limit responses |
Retry a 429 after the supplied Retry-After value. Retry a 503 only when that response includes Retry-After; otherwise investigate before retrying.
Compatibility
MerchJar makes additive, backward-compatible changes within v5. A breaking change uses a new API version and is documented in the reference before release. Deprecated operations remain documented with migration guidance and a removal date.
Errors
Handled API errors use a JSON envelope with error.code and error.message. Use the HTTP status to choose the next action: correct 400 requests, replace invalid or revoked 401 keys, request the required scope after 403, retry 429 after Retry-After, and retry only 503 responses that include Retry-After.
Segment frequencies and clock schedules
Segments return one of six frequencies. Five are writable; scheduled is server-managed.
| Returned value | Writable | Contract |
|---|---|---|
after_every_data_sync |
Yes | Runs after each data sync. |
daily |
Yes | Runs daily. |
weekly |
Yes | Runs weekly. |
monthly |
Yes | Runs monthly. |
manual |
Yes | Never runs automatically and never has a schedule. |
scheduled |
No | Set by PUT /segments/{id}/schedule. Create rejects it with schedule_required; PATCH rejects it unless a schedule exists, when it is a no-op. |
PATCH from scheduled to another frequency removes the schedule and skips future runs. DELETE /segments/{id}/schedule switches the segment to manual.
List profiles
Returns profiles owned by the API key's user. This operation does not require a profileid header; it is the operation used to discover profile IDs for later profile-scoped requests.
Authorizations:
Responses
Production
Response samples
- 200
- 401
- 403
- 429
- 503
{- "data": [
- {
- "profile_id": "9007199254740993",
- "name": "string",
- "nickname": "string",
- "country_code": "string",
- "currency_code": "string",
- "marketplace_id": "string",
- "timezone": "string",
- "type": "string",
- "managed": true,
- "ad_spend_30d": 0,
- "ad_spend_30d_usd": 0
}
]
}Validate a segment trigger
Compiles a Segment DSL trigger without executing it. profile_id is optional unless the trigger references custom fields; when supplied, the API key must own that profile.
Authorizations:
Request Body schema: application/jsonrequired
| trigger required | string non-empty Segment DSL expression to compile. |
| ad_type required | string non-empty Segment entity type. Input is case- and separator-insensitive; see the endpoint description for supported values. |
| profile_id | string (NumericString) ^[1-9][0-9]*$ Required when validating a trigger that references custom fields. |
Responses
Production
Request samples
- Payload
{- "trigger": "string",
- "ad_type": "string",
- "profile_id": "9007199254740993"
}Response samples
- 200
- 400
- 401
- 403
- 422
- 429
- 503
{- "valid": true,
- "variables": { }
}Preview segment matches
Evaluates a Segment DSL trigger for a profile without persisting a segment. Preview rows depend on ad_type; every returned field whose name ends in _id is serialized as a decimal string. In addition to the API-key per-minute limiter, preview uses an account-level burst-admission limiter.
Authorizations:
Request Body schema: application/jsonrequired
| profile_id required | string (NumericString) ^[1-9][0-9]*$ A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| trigger required | string non-empty Segment DSL expression. |
| ad_type required | string non-empty One of campaigns, ad_groups, ads (or accepted alias product_ads), keywords, targets, keywords_and_targets, search_terms, placements, or a negative type. Input is case- and separator-insensitive. Negative types are preview-only. |
| action required | string non-empty One of set_state, set_budget, set_default_bid, set_bid, or create_negatives. Input is case- and separator-insensitive. |
| action_params required | object Action parameters. For set_state, |
| page | integer >= 1 Default: 1 |
| per_page | integer [ 1 .. 100 ] Default: 25 |
Responses
Production
Request samples
- Payload
{- "profile_id": "9007199254740993",
- "trigger": "string",
- "ad_type": "string",
- "action": "string",
- "action_params": { },
- "page": 1,
- "per_page": 25
}Response samples
- 200
- 400
- 401
- 403
- 409
- 422
- 429
- 500
- 503
{- "data": [
- {
- "campaign_settings": {
- "bid_strategy": "string",
- "placement_adjustments": {
- "top_of_search": 0,
- "rest_of_search": 0,
- "product_page": 0,
- "home_page": 0
}
}
}
], - "pagination": {
- "page": 1,
- "per_page": 1,
- "total": 0,
- "last_page": 0
}, - "totals": {
- "property1": 0,
- "property2": 0
}, - "meta": {
- "time_periods": [
- "string"
], - "variables": {
- "property1": "string",
- "property2": "string"
}
}
}List segments
Authorizations:
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Amazon Advertising profile ID owned by the API key. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
- 503
{- "data": [ ]
}Create a segment
Creates a v2 segment for the body profile_id; it must belong to the API key. Run POST /segments/validate and POST /segments/preview first to check the trigger and matching entities. Negative segment types can be previewed but cannot be persisted.
Authorizations:
Request Body schema: application/jsonrequired
| profile_id required | string (NumericString) ^[1-9][0-9]*$ A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| name required | string [ 1 .. 255 ] characters |
| trigger required | string non-empty |
| ad_type required | string non-empty A writable ad type: campaigns, ad_groups, ads (or accepted alias product_ads), keywords, targets, keywords_and_targets, search_terms, or placements. Input is case- and separator-insensitive. |
| action required | string non-empty set_state, set_budget, set_default_bid, set_bid, or create_negatives. Input is case- and separator-insensitive. |
| action_params | object Default: {} See preview action_params semantics. Unknown properties are ignored by the request parser. |
| frequency | string Default: "daily" Writable values are |
| enabled | boolean Default: true |
Responses
Production
Request samples
- Payload
{- "profile_id": "9007199254740993",
- "name": "string",
- "trigger": "string",
- "ad_type": "string",
- "action": "string",
- "action_params": { },
- "frequency": "daily",
- "enabled": true
}Response samples
- 201
- 400
- 401
- 403
- 422
- 429
- 500
- 503
{- "data": {
- "id": "9007199254740997",
- "profile_id": "9007199254740993",
- "name": "Pause low-performing targets",
- "enabled": true,
- "ad_type": "targets",
- "trigger": "clicks > 20",
- "action": "set_state",
- "action_params": {
- "value": 2
}, - "frequency": "daily",
- "last_run": null,
- "created_at": "2026-08-29T12:00:00Z",
- "updated_at": "2026-08-29T12:00:00Z"
}
}Create segment run
Runs the segment synchronously and returns its completed result. It works for disabled segments and does not enable the segment or change its schedule. A 202 response means the existing executor is still processing the run.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740997 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 503
{- "uuid": "11111111-1111-4111-8111-111111111111",
- "result": {
- "message": "Completed"
}
}Retrieve segment
Authorizations:
path Parameters
| id required | string^[+-]?[0-9]+$ Segment ID. The implementation parses a signed base-10 bigint; successful segment IDs are positive decimal strings. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Amazon Advertising profile ID owned by the API key. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "data": {
- "id": "9007199254740997",
- "profile_id": "9007199254740993",
- "name": "Pause low-performing targets",
- "enabled": true,
- "ad_type": "targets",
- "trigger": "clicks > 20",
- "action": "set_state",
- "action_params": {
- "value": 2
}, - "frequency": "daily",
- "last_run": null,
- "created_at": "2026-08-29T12:00:00Z",
- "updated_at": "2026-08-29T12:00:00Z"
}
}Update a segment
Updates only supplied fields. PATCH away from scheduled atomically removes its clock schedule and supersedes future open runs. Negative segment types cannot be persisted.
Authorizations:
path Parameters
| id required | string^[+-]?[0-9]+$ Segment ID. The implementation parses a signed base-10 bigint; successful segment IDs are positive decimal strings. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Amazon Advertising profile ID owned by the API key. |
Request Body schema: application/jsonrequired
| name | string [ 1 .. 255 ] characters |
| trigger | string non-empty |
| ad_type | string non-empty Writable segment ad type; input is case- and separator-insensitive. |
| action | string non-empty set_state, set_budget, set_default_bid, set_bid, or create_negatives; input is case- and separator-insensitive. |
| action_params | object See preview action_params semantics. |
| frequency | string Writable values are |
| enabled | boolean |
| paused | boolean Sets or clears the segment pause timestamp. |
Responses
Production
Request samples
- Payload
{- "name": "string",
- "trigger": "string",
- "ad_type": "string",
- "action": "string",
- "action_params": { },
- "frequency": "string",
- "enabled": true,
- "paused": true
}Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 429
- 500
- 503
{- "data": {
- "id": "9007199254740997",
- "profile_id": "9007199254740993",
- "name": "Pause low-performing targets",
- "enabled": false,
- "ad_type": "targets",
- "trigger": "clicks > 20",
- "action": "set_state",
- "action_params": {
- "value": 2
}, - "frequency": "daily",
- "last_run": null,
- "created_at": "2026-08-29T12:00:00Z",
- "updated_at": "2026-08-29T12:05:00Z"
}
}Delete a segment
Disables the segment, marks it deleted, clears its next schedule cursor, and skips future open scheduled runs.
Authorizations:
path Parameters
| id required | string^[+-]?[0-9]+$ Segment ID. The implementation parses a signed base-10 bigint; successful segment IDs are positive decimal strings. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Amazon Advertising profile ID owned by the API key. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "success": true
}List schedule timezones
Returns the timezone choices for a segment owned by the API-key profile.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740997 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
{- "data": {
- "timezones": [
- "UTC",
- "America/Los_Angeles"
], - "default": "America/Los_Angeles",
- "default_is_valid": true
}
}Retrieve segment schedule
Returns data: null when the owned segment has no stored clock schedule.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740997 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
{- "data": null
}Set segment schedule
Saves a clock schedule, sets the segment frequency to scheduled, and clears frequency parameters. The segment cannot be negative; preview_count is preview-only and rejected here.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740997 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
| kind required | any Value: "cron" |
| timezone required | string |
| cron_expression required | string |
Responses
Production
Request samples
- Payload
{- "kind": "cron",
- "timezone": "America/Los_Angeles",
- "cron_expression": "0 9 * * 1-5"
}Response samples
- 200
- 400
- 401
- 403
- 429
{- "data": {
- "schedule": {
- "kind": "cron",
- "timezone": "America/Los_Angeles"
}, - "occurrences": [
- {
- "utc": "2026-09-01T16:00:00.000Z",
- "local": "2026-09-01 09:00:00 PDT"
}
], - "max_runs_per_day": 1,
- "has_nearby_schedule": false,
- "nearby_schedule_status": "clear"
}
}Delete segment schedule
Removes the schedule and switches the segment to manual.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740997 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
{- "success": true
}Preview segment schedule
Validates a proposed schedule without saving it for owned non-negative V2 segments.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740997 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
| kind required | any Value: "cron" |
| timezone required | string [ 1 .. 64 ] characters |
| cron_expression required | string [ 1 .. 128 ] characters |
| run_once_at | null |
| preview_count | integer [ 1 .. 10 ] Default: 5 |
Responses
Production
Request samples
- Payload
{- "kind": "once",
- "timezone": "America/Los_Angeles",
- "run_once_at": "2026-09-01T16:00:00.000Z",
- "preview_count": 3
}Response samples
- 200
- 400
- 401
- 403
- 429
{- "data": {
- "occurrences": [
- {
- "utc": "2026-09-01T16:00:00.000Z",
- "local": "2026-09-01 09:00:00 PDT"
}
], - "max_runs_per_day": 1,
- "has_nearby_schedule": false,
- "nearby_schedule_status": "clear"
}
}List audit logs
Lists profile-scoped records of MerchJar changes. The default date window is the 30 calendar days ending today, calculated when the request is handled.
Authorizations:
query Parameters
| page | integer >= 1 Default: 1 One-based page number. Missing, non-positive, or non-numeric values fall back to 1. |
| per_page | integer [ 1 .. 100 ] Default: 25 Results per page. Missing, non-positive, or non-numeric values fall back to 25; values above 100 are capped at 100. |
| from | string Example: from=2026-03-01 Inclusive UTC start date. Send an ISO calendar date such as |
| to | string Example: to=2026-03-31 Inclusive UTC end date. Send an ISO calendar date such as |
| target_type | string Enum: "campaigns" "ad_groups" "product_ads" "keywords" "targets" "campaign_negative_keywords" "negative_keywords" "negative_targets" "portfolios" "promotions" "recipes" "search_terms" "ads" "placements" Filter by affected entity type. |
| source_type | string Enum: "smart_bids" "promotion" "recipe" "bulk_action" "public_api" Filter by the type of source that initiated the audit log. |
| source_id | string^[1-9][0-9]*$ Example: source_id=9007199254740995 Filter by source ID. Send the ID as a decimal string so clients do not lose bigint precision. |
| count | string^(?:gt|gte|lt|lte|eq|neq):-?[0-9]+$|^between:... Example: count=gt:10 Filter on |
| sort | string Default: "-created_at" Sort by |
header Parameters
| profileid required | string <= 19 characters ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
- 503
{- "data": [
- {
- "id": "string",
- "profile_id": "string",
- "target_type": "string",
- "source_type": "smart_bids",
- "source_id": "string",
- "meta": { },
- "created_at": "string",
- "updated_at": "string"
}
], - "pagination": {
- "page": 1,
- "per_page": 1,
- "total": 0,
- "last_page": 1
}
}List audit log changes
Returns items only after verifying that the parent audit log belongs to the requested profile. The item data is retrieved from MerchJar's internal Laravel service and bigint identifiers are re-serialized as strings.
Authorizations:
path Parameters
| id required | string^[1-9][0-9]*$ Example: 789 Audit-log ID as a decimal string. |
query Parameters
| page | integer >= 1 Default: 1 One-based page number. Missing, non-positive, or non-numeric values fall back to 1. |
| per_page | integer [ 1 .. 100 ] Default: 25 Results per page. Missing, non-positive, or non-numeric values fall back to 25; values above 100 are capped at 100. |
| target_type | string Enum: "campaigns" "ad_groups" "product_ads" "keywords" "targets" "campaign_negative_keywords" "negative_keywords" "negative_targets" "portfolios" "promotions" "recipes" "search_terms" "ads" "placements" Filter item rows by target entity type. |
| target_id | string^[1-9][0-9]*$ Example: target_id=9007199254740997 Filter item rows by affected entity ID. Send the ID as a decimal string so clients do not lose bigint precision. |
header Parameters
| profileid required | string <= 19 characters ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 502
- 503
{- "data": [
- {
- "id": "string",
- "audit_log_id": "string",
- "target_id": "string",
- "target_type": "string",
- "meta": { },
- "created_at": "string",
- "updated_at": "string"
}
], - "pagination": {
- "page": 1,
- "per_page": 1,
- "total": 0,
- "last_page": 1
}, - "audit_log": {
- "id": "string",
- "profile_id": "string",
- "target_type": "string",
- "source_type": "smart_bids",
- "source_id": "string",
- "meta": { },
- "created_at": "string",
- "updated_at": "string"
}
}List entity changes
Returns the profile-scoped legacy bid-history stream, newest first with hash as the tie-breaker. MerchJar selects the change type from entity_type: campaign budgets, ad-group default bids, and keyword or target bids.
Authorizations:
path Parameters
| entity_type required | string Enum: "campaigns" "ad_groups" "keywords" "targets" |
| entity_id required | string^[1-9][0-9]*$ Example: 9007199254740997 Positive PostgreSQL-signed-bigint entity ID encoded as a decimal string (maximum |
query Parameters
| page | integer >= 1 Default: 1 One-based page number. Missing, non-positive, or non-numeric values fall back to 1; values above 21474836 are capped. |
| per_page | integer [ 1 .. 100 ] Default: 25 Results per page. Missing, non-positive, or non-numeric values fall back to 25; values above 100 are capped at 100. |
header Parameters
| profileid required | string <= 19 characters ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
- 503
{- "data": [
- {
- "entity_id": "string",
- "entity_type": "campaigns",
- "change_type": "BUDGET_AMOUNT",
- "previous_value": "string",
- "new_value": "string",
- "timestamp": "string",
- "hash": "string",
- "profile_id": "string"
}
], - "pagination": {
- "page": 1,
- "per_page": 1,
- "total": 0,
- "last_page": 1
}
}Import custom field CSV
Queues a CSV import for the selected entity type. The request body must be UTF-8 text/csv and no larger than 25 MiB. Set dry_run=true to validate without applying mutations.
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
query Parameters
| dry_run | boolean |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: text/csvrequired
Responses
Production
Request samples
- Payload
entity_id,field,value 9007199254740995,Priority,high
Response samples
- 202
- 400
- 401
- 403
- 429
{- "job": {
- "id": "job_01HXYZ",
- "status": "queued"
}
}Export custom field CSV
Queues a CSV export for the selected entity type.
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 202
- 401
- 403
- 429
{- "job": {
- "id": "job_01HXYZ",
- "status": "queued"
}
}Retrieve CSV job
Authorizations:
path Parameters
| jobId required | string Example: job_01HXYZ |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 401
- 403
- 429
{- "job": {
- "id": "job_01HXYZ",
- "status": "queued"
}
}Cancel CSV job
Authorizations:
path Parameters
| jobId required | string Example: job_01HXYZ |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 401
- 403
- 429
{- "job": {
- "id": "job_01HXYZ",
- "status": "queued"
}
}Download CSV errors
Authorizations:
path Parameters
| jobId required | string Example: job_01HXYZ |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 401
- 403
- 429
row,error 2,invalid value
Download CSV export
Authorizations:
path Parameters
| jobId required | string Example: job_01HXYZ |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 401
- 403
- 429
entity_id,field,value 9007199254740995,Priority,high
Retrieve field catalog
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 401
- 403
- 429
{- "version": "1",
- "definitions": [ ],
- "definition_count": 0,
- "value_count": 0
}Snapshot field values
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
| entity_ids required | Array of strings (NumericString) non-empty [ items^[1-9][0-9]*$ ] |
Responses
Production
Request samples
- Payload
{- "entity_ids": [
- "9007199254740995"
]
}Response samples
- 200
- 400
- 401
- 403
- 429
{- "values": [ ]
}Create field definition
Authorizations:
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
| entity_type required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" |
| name required | string |
| description | string or null |
| data_type required | integer Enum: 1 2 3 |
Responses
Production
Request samples
- Payload
{- "entity_type": "campaign",
- "name": "Priority",
- "data_type": 1
}Response samples
- 201
- 400
- 401
- 403
- 429
{- "definition": {
- "id": "1",
- "name": "Priority"
}
}Update field definition
Authorizations:
path Parameters
| definitionId required | string (NumericString) ^[1-9][0-9]*$ Example: 1 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
| entity_type required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" |
| expected_version required | string (NumericString) ^[1-9][0-9]*$ A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| name required | string |
| description | string or null |
Responses
Production
Request samples
- Payload
{- "entity_type": "campaign",
- "expected_version": "1",
- "name": "Priority"
}Response samples
- 200
- 400
- 401
- 403
- 429
{- "definition": {
- "id": "1",
- "name": "Priority"
}
}Delete field definition
Authorizations:
path Parameters
| definitionId required | string (NumericString) ^[1-9][0-9]*$ Example: 1 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
| entity_type required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" |
| expected_version required | string (NumericString) ^[1-9][0-9]*$ A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| disable_dependants | boolean |
Responses
Production
Request samples
- Payload
{- "entity_type": "campaign",
- "expected_version": "1"
}Response samples
- 200
- 400
- 401
- 403
- 429
{- "values": [ ]
}List field values
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
query Parameters
| entity_id | string (NumericString) ^[1-9][0-9]*$ Example: entity_id=9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| entity_ids | string Example: entity_ids=9007199254740995,9007199254740996 |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 401
- 403
- 429
{- "values": [ ]
}List definition values
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
| definitionId required | string (NumericString) ^[1-9][0-9]*$ Example: 1 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
query Parameters
| limit | integer [ 1 .. 200 ] Example: limit=100 |
| after_entity_id | string (NumericString) ^[1-9][0-9]*$ Example: after_entity_id=9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
{- "values": [ ]
}Update field values
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
required | Array of objects |
| source_reference | string or null <= 100 characters |
Responses
Production
Request samples
- Payload
{- "mutations": [
- {
- "field_definition_id": "1",
- "entity_id": "9007199254740995",
- "operation": "set",
- "value": "high"
}
]
}Response samples
- 200
- 400
- 401
- 403
- 429
{- "values": [ ]
}List field value history
Returns history newest-first by (created_at, id). To fetch the next page, send before_id equal to the final history id from the previous response; the cursor is excluded, so the next response contains older history. Preserve definition_id when it was used on the first request. For example, first request: /custom-fields/values/campaign/9007199254740995/history?definition_id=9007199254740997&limit=2; if its final history id is 9007199254741999, second request: /custom-fields/values/campaign/9007199254740995/history?definition_id=9007199254740997&limit=2&before_id=9007199254741999. A supplied cursor that does not match history in this request scope returns empty history.
Authorizations:
path Parameters
| entityType required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" Example: campaign |
| entityId required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
query Parameters
| definition_id | string (NumericString) ^[1-9][0-9]*$ Example: definition_id=1 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| before_id | string (NumericString) ^[1-9][0-9]*$ Example: before_id=9007199254741999 The final history ID from the preceding page, sent as a decimal string. |
| limit | integer [ 1 .. 200 ] Example: limit=100 |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
{- "values": [ ]
}Roll back field change
Authorizations:
path Parameters
| historyId required | string (NumericString) ^[1-9][0-9]*$ Example: 1 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Request Body schema: application/jsonrequired
| entity_type required | string (CustomFieldEntityType) Enum: "campaign" "ad_group" "target" "ad" |
| expected_version required | string or null^[1-9][0-9]*$ |
Responses
Production
Request samples
- Payload
{- "entity_type": "campaign",
- "expected_version": "1"
}Response samples
- 200
- 400
- 401
- 403
- 429
{- "values": [ ]
}List targets
Lists Sponsored Products targets for the API-key-authorized profileid header. Results come from MerchJar's own target records and carry no performance metrics. Every filter is optional; an unfiltered page returns positive and negative targets of every target type. A successful public target create, update, or archive has already written its local projection before it returned, but a change made in Amazon or another tool appears only after the next MerchJar ingestion.
Authorizations:
query Parameters
| page | integer >= 1 Default: 1 Example: page=1 One-based page number. |
| per_page | integer [ 1 .. 100 ] Default: 25 Example: per_page=25 Results per page, from 1 through 100. |
| campaign_id | string (NumericString) ^[1-9][0-9]*$ Example: campaign_id=9007199254740994 Return only targets in this campaign. Send the ID as a decimal string. |
| ad_group_id | string (NumericString) ^[1-9][0-9]*$ Example: ad_group_id=9007199254740995 Return only targets in this ad group. Send the ID as a decimal string. |
| state | string Enum: "ENABLED" "PAUSED" "ARCHIVED" Example: state=ENABLED Return only targets in this serving state. |
| target_type | string non-empty Example: target_type=KEYWORD Return only targets of this target type, such as |
| negative | boolean Example: negative=true Return only negative targets when |
| sort | string Default: "target_id" Enum: "target_id" "-target_id" "last_updated_date_time" "-last_updated_date_time" Example: sort=-last_updated_date_time Sort field. Prefix with |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
- 503
{- "data": [
- {
- "target_id": "9007199254740997",
- "profile_id": "9007199254740993",
- "campaign_id": "9007199254740994",
- "ad_group_id": "9007199254740995",
- "ad_product": "SPONSORED_PRODUCTS",
- "target_level": "AD_GROUP",
- "target_type": "KEYWORD",
- "negative": false,
- "state": "ENABLED",
- "delivery_status": "DELIVERING",
- "delivery_reasons": [ ],
- "bid": 125,
- "bid_currency_code": "USD",
- "match_type": "EXACT",
- "keyword": "running shoes",
- "asin": null,
- "created_at": "2026-03-01T12:00:00Z",
- "updated_at": "2026-03-21T09:30:00Z"
}
], - "pagination": {
- "page": 1,
- "per_page": 25,
- "total": 1,
- "last_page": 1
}
}Retrieve a target
Retrieves one Sponsored Products target owned by the API-key-authorized profileid header. The response carries no performance metrics. A target belonging to another profile is reported as 404 not_found, so a cross-profile ID is indistinguishable from an absent ID.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740997 Target ID. Send it as a positive decimal string, never as a JavaScript number. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "data": {
- "target_id": "9007199254740997",
- "profile_id": "9007199254740993",
- "campaign_id": "9007199254740994",
- "ad_group_id": "9007199254740995",
- "ad_product": "SPONSORED_PRODUCTS",
- "target_level": "AD_GROUP",
- "target_type": "KEYWORD",
- "negative": false,
- "state": "ENABLED",
- "delivery_status": "DELIVERING",
- "delivery_reasons": [ ],
- "bid": 125,
- "bid_currency_code": "USD",
- "match_type": "EXACT",
- "keyword": "running shoes",
- "asin": null,
- "created_at": "2026-03-01T12:00:00Z",
- "updated_at": "2026-03-21T09:30:00Z"
}
}Create Sponsored Products campaigns
Creates between 1 and 1,000 Sponsored Products campaigns for the API-key-authorized profileid header. The request schema is strict: profile_id and every other undeclared field are rejected before MerchJar calls Amazon. The 200 response is Amazon's raw batch envelope, without a MerchJar wrapper. A success or partialSuccess result queues local projection; browse data is eventually consistent and the response does not report projection completion. An error-only Amazon envelope is also passed through, but does not queue a receipt. MerchJar provides no idempotency guarantee and does not automatically retry creates; if the outcome is unknown, verify Amazon or the normal read state before retrying. This router does not currently install the API-key rate limit middleware, so it does not emit the standard rate limit headers or 429/503 rate limit responses.
Authorizations:
header Parameters
| profileid required | string^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-... Example: 9007199254740993 Positive PostgreSQL signed-bigint Amazon Advertising profile ID owned by the API key. Send it as a decimal string, never as a JavaScript number. |
Request Body schema: application/jsonrequired
required | Array of objects [ 1 .. 1000 ] items |
Responses
Production
Request samples
- Payload
{- "campaigns": [
- {
- "adProduct": "SPONSORED_PRODUCTS",
- "name": "string",
- "state": "ENABLED",
- "marketplaceScope": "SINGLE_MARKETPLACE",
- "marketplaces": [
- "AE"
], - "startDateTime": "2019-08-24T14:15:22Z",
- "budgets": [
- {
- "budgetType": "MONETARY",
- "budgetValue": {
- "monetaryBudgetValue": {
- "monetaryBudget": {
- "value": 0,
- "currencyCode": "AED"
}
}
}, - "recurrenceTimePeriod": "DAILY"
}
], - "autoCreationSettings": {
- "autoCreateTargets": true,
- "autoManageCampaign": true
}
}
]
}Response samples
- 200
- 400
- 401
- 403
- 502
{- "error": [
- null
], - "success": [
- null
], - "partialSuccess": [
- null
]
}Update Sponsored Products campaign settings
Updates supplied Sponsored Products name, daily budget, bidding strategy, and/or placement adjustments for the API-key-authorized profile. The body is strict and sparse: omitted settings are not cleared. MerchJar passes Amazon's raw update envelope through unchanged and never retries an uncertain write.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive Amazon campaign ID as a decimal string; do not send a JavaScript number. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive PostgreSQL signed-bigint Amazon Advertising profile ID owned by the API key. |
| Idempotency-Key required | string [ 1 .. 64 ] characters Required 1-64 character opaque request identifier for durable, idempotent updates. |
Request Body schema: application/jsonrequired
| name required | string [ 1 .. 255 ] characters |
Array of objects = 1 items | |
object |
Responses
Production
Request samples
- Payload
{- "name": "string",
- "budgets": [
- {
- "budgetType": "MONETARY",
- "budgetValue": {
- "monetaryBudgetValue": {
- "monetaryBudget": {
- "value": 21474836.47,
- "currencyCode": "string"
}
}
}, - "recurrenceTimePeriod": "DAILY"
}
], - "optimizations": {
- "bidSettings": {
- "bidStrategy": "SALES_DOWN_ONLY",
- "bidAdjustments": {
- "placementBidAdjustments": [
- {
- "placement": "TOP_OF_SEARCH",
- "percentage": 900
}
]
}
}
}
}Response samples
- 200
- 400
- 401
- 403
- 409
- 502
{ }Create ad groups
Creates between 1 and 1,000 Sponsored Products ad groups for the API-key-authorized profileid header. The request schema is strict: profile_id and every other undeclared field are rejected before MerchJar calls Amazon. campaignId is forwarded directly to Amazon; MerchJar does not locally check that the campaign exists or is compatible. The 200 response is Amazon's raw batch envelope, without a MerchJar wrapper. A success or partialSuccess result queues local projection; browse data is eventually consistent and the response does not report projection completion. An error-only Amazon envelope is also passed through, but does not queue a receipt. MerchJar provides no idempotency guarantee and does not automatically retry creates; if the outcome is unknown, verify Amazon or the normal read state before retrying. This router does not currently install the API-key rate limit middleware, so it does not emit the standard rate limit headers or 429/503 rate limit responses.
Authorizations:
header Parameters
| profileid required | string^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-... Example: 9007199254740993 Positive PostgreSQL signed-bigint Amazon Advertising profile ID owned by the API key. Send it as a decimal string, never as a JavaScript number. |
Request Body schema: application/jsonrequired
required | Array of objects [ 1 .. 1000 ] items |
Responses
Production
Request samples
- Payload
{- "adGroups": [
- {
- "adProduct": "SPONSORED_PRODUCTS",
- "campaignId": "9007199254740995",
- "name": "string",
- "state": "ENABLED",
- "bid": {
- "defaultBid": 0,
- "currencyCode": "AED"
}
}
]
}Response samples
- 200
- 400
- 401
- 403
- 502
{- "error": [
- null
], - "success": [
- null
], - "partialSuccess": [
- null
]
}Update an ad group
Updates only defaultBid and/or state for one Sponsored Products ad group. An Idempotency-Key is required; unknown outcomes must be checked before retrying.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| Idempotency-Key required | string [ 1 .. 64 ] characters |
Request Body schema: application/jsonrequired
required | object |
| state | any Enum: "ENABLED" "PAUSED" |
Responses
Production
Request samples
- Payload
{- "bid": {
- "defaultBid": 0
}, - "state": "ENABLED"
}Response samples
- 400
- 401
- 403
{- "error": {
- "code": "string",
- "message": "string"
}
}Delete an ad group
Archives one Sponsored Products ad group and confirms Amazon reports ARCHIVED before local projection. An Idempotency-Key is required.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| Idempotency-Key required | string [ 1 .. 64 ] characters |
Responses
Production
Response samples
- 400
- 401
- 403
{- "error": {
- "code": "string",
- "message": "string"
}
}Create product ads
Creates between 1 and 1,000 Sponsored Products product ads for the API-key-authorized profileid header. This is deliberately not generic unified-v1 ad creation: each item supports only PRODUCT_AD with exactly one productCreative / advertisedProduct creative. The request schema is strict: profile_id, marketplace/global-store identity, headline, and every other undeclared field are rejected before MerchJar calls Amazon. The 200 response is Amazon's raw batch envelope, without a MerchJar wrapper. A success or partialSuccess result queues local projection; browse data is eventually consistent and the response does not report projection completion. An error-only Amazon envelope is also passed through, but does not queue a receipt. MerchJar provides no idempotency guarantee and does not automatically retry creates; if the outcome is unknown, verify Amazon or the normal read state before retrying. This router does not currently install the API-key rate limit middleware, so it does not emit the standard rate limit headers or 429/503 rate limit responses.
Authorizations:
header Parameters
| profileid required | string^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-... Example: 9007199254740993 Positive PostgreSQL signed-bigint Amazon Advertising profile ID owned by the API key. Send it as a decimal string, never as a JavaScript number. |
Request Body schema: application/jsonrequired
required | Array of objects [ 1 .. 1000 ] items |
Responses
Production
Request samples
- Payload
{- "ads": [
- {
- "adProduct": "SPONSORED_PRODUCTS",
- "adType": "PRODUCT_AD",
- "adGroupId": "9007199254740995",
- "state": "ENABLED",
- "creative": {
- "productCreative": {
- "productCreativeSettings": {
- "advertisedProduct": {
- "productId": "string",
- "productIdType": "ASIN"
}
}
}
}
}
]
}Response samples
- 200
- 400
- 401
- 403
- 502
{- "error": [
- null
], - "success": [
- null
], - "partialSuccess": [
- null
]
}Update a product ad
Updates only state for one Sponsored Products product ad. An Idempotency-Key is required.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| Idempotency-Key required | string [ 1 .. 64 ] characters |
Request Body schema: application/jsonrequired
| state required | any Enum: "ENABLED" "PAUSED" |
Responses
Production
Request samples
- Payload
{- "state": "ENABLED"
}Response samples
- 400
- 401
- 403
{- "error": {
- "code": "string",
- "message": "string"
}
}Delete a product ad
Archives one Sponsored Products product ad and verifies the terminal state; Amazon may omit an archived product ad from read-back. An Idempotency-Key is required.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| Idempotency-Key required | string [ 1 .. 64 ] characters |
Responses
Production
Response samples
- 400
- 401
- 403
{- "error": {
- "code": "string",
- "message": "string"
}
}Create negative targets
Creates between 1 and 1,000 negative Sponsored Products product targets for the API-key-authorized profileid header. Each target must have an ad-group parent, negative: true, targetType: PRODUCT, PRODUCT_EXACT matching, and an ASIN. The request schema is strict: unknown fields are rejected before MerchJar calls Amazon. A success or partialSuccess result queues local projection; an error-only envelope does not. MerchJar provides no idempotency guarantee and does not automatically retry creates; if the outcome is unknown, verify Amazon or the normal read state before retrying. This endpoint does not install the standard API-key rate limit middleware, so it does not emit the standard rate limit headers or standard 429 or 503 rate limit responses.
Authorizations:
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive Amazon Advertising profile ID owned by the API key. Send it as a decimal string, never as a JavaScript number. |
Request Body schema: application/jsonrequired
required | Array of objects [ 1 .. 1000 ] items |
Responses
Production
Request samples
- Payload
{- "targets": [
- {
- "adGroupId": "9007199254740995",
- "adProduct": "SPONSORED_PRODUCTS",
- "negative": true,
- "state": "ENABLED",
- "targetType": "PRODUCT",
- "targetDetails": {
- "productTarget": {
- "matchType": "PRODUCT_EXACT",
- "productId": "B012345678",
- "productIdType": "ASIN"
}
}
}
]
}Response samples
- 200
- 400
- 401
- 403
- 502
{- "error": [
- { }
], - "success": [
- { }
], - "partialSuccess": [
- { }
]
}Create targets
Creates between 1 and 1,000 Sponsored Products targets for the API-key-authorized profileid header. The request schema is strict: unknown fields are rejected before MerchJar calls Amazon. The response is Amazon's raw batch envelope. A success or partialSuccess result queues local projection; an error-only envelope does not. MerchJar provides no idempotency guarantee and does not automatically retry creates; if the outcome is unknown, verify Amazon or the normal read state before retrying. This endpoint does not install the standard API-key rate limit middleware, so it does not emit the standard rate limit headers or standard 429 or 503 rate limit responses.
Authorizations:
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive Amazon Advertising profile ID owned by the API key. Send it as a decimal string, never as a JavaScript number. |
Request Body schema: application/jsonrequired
required | Array of objects or objects or objects or objects or objects or objects [ 1 .. 1000 ] items One to 1,000 targets. Each target uses exactly one target type and matching target-details shape. |
Responses
Production
Request samples
- Payload
{- "targets": [
- {
- "adGroupId": "9007199254740995",
- "adProduct": "SPONSORED_PRODUCTS",
- "negative": false,
- "state": "ENABLED",
- "targetType": "PRODUCT",
- "targetDetails": {
- "productTarget": {
- "matchType": "PRODUCT_EXACT",
- "productId": "B012345678",
- "productIdType": "ASIN"
}
}
}
]
}Response samples
- 200
- 400
- 401
- 403
- 502
{- "success": [
- {
- "index": 0,
- "target": {
- "targetId": "9007199254740997"
}
}
]
}Update a target
Updates only bid and/or state for one Sponsored Products target. An Idempotency-Key is required.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| Idempotency-Key required | string [ 1 .. 64 ] characters |
Request Body schema: application/jsonrequired
required | object |
| state | any Enum: "ENABLED" "PAUSED" |
Responses
Production
Request samples
- Payload
{- "bid": {
- "bid": 0
}, - "state": "ENABLED"
}Response samples
- 400
- 401
- 403
{- "error": {
- "code": "string",
- "message": "string"
}
}Delete a target
Archives one Sponsored Products target and confirms Amazon reports ARCHIVED before local projection. An Idempotency-Key is required.
Authorizations:
path Parameters
| id required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740995 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| Idempotency-Key required | string [ 1 .. 64 ] characters |
Responses
Production
Response samples
- 400
- 401
- 403
{- "error": {
- "code": "string",
- "message": "string"
}
}Create bulk action
Submits a profile-scoped bulk action for asynchronous processing. Submit, then poll GET /bulk-actions/{request_id} until status is terminal, then page through items. Idempotency-Key is the durable request_id, scoped per profile. Reusing the same key returns the current record (202 while queued or running; 200 when terminal); request bodies are not fingerprinted, so a reused key with a different body returns the original record. The static required scope is campaigns:write only because the actual scope is derived from the request body.
Scope table (v1):
entity_type |
non-archive actions | archived |
|---|---|---|
campaigns |
campaigns:write |
campaigns:archive (NEW) |
ad_groups |
ad_groups:write |
ad_groups:archive |
keywords, targets |
targets:write |
targets:archive |
product_ads |
ads:write |
ads:archive |
negative_keywords, negative_targets, campaign_negative_keywords |
negative-targets:write |
negative-targets:archive (NEW) |
GET /bulk-actions/{request_id} |
bulk_actions:read (NEW) |
Unsupported operations: portfolio moves, dates, bid strategy, placements, creates, recipes, local-only actions, and search terms.
Authorizations:
header Parameters
| Idempotency-Key required | string^[\x21-\x7e]{1,64}$ Example: abc-123 Durable request_id, scoped per profile. The body is not fingerprinted; reusing this key returns the current record. |
Request Body schema: application/jsonrequired
| profile_id required | string (NumericString) ^[1-9][0-9]*$ A positive base-10 integer encoded as a string. Use this for profile IDs and entity IDs so values larger than JavaScript's safe integer limit retain their precision. |
| entity_type required | string Enum: "campaigns" "ad_groups" "keywords" "targets" "product_ads" "negative_keywords" "negative_targets" "campaign_negative_keywords" |
| entity_ids required | Array of strings (NumericString) [ 1 .. 50000 ] items unique [ items^[1-9][0-9]*$ ] |
required | any |
Responses
Production
Request samples
- Payload
{- "profile_id": "123456789012345",
- "entity_type": "keywords",
- "entity_ids": [
- "11111111111111",
- "22222222222222"
], - "action": {
- "type": "set_state",
- "state": "paused"
}
}Response samples
- 200
- 202
- 400
- 401
- 403
- 413
- 429
- 503
{- "data": {
- "request_id": "abc-123",
- "profile_id": "123456789012345",
- "entity_type": "keywords",
- "action": {
- "type": "set_state",
- "state": "paused"
}, - "status": "partial",
- "reason_code": null,
- "counts": {
- "requested": 3,
- "succeeded": 1,
- "failed": 1,
- "unchanged": 1,
- "skipped_archived": 0,
- "skipped_invalid": 0
}, - "items": [
- {
- "entity_id": "11111111111111",
- "status": "succeeded"
}, - {
- "entity_id": "22222222222222",
- "status": "failed",
- "error": {
- "code": "amazon_error",
- "message": "Amazon rejected the state change"
}
}, - {
- "entity_id": "33333333333333",
- "status": "unchanged"
}
], - "created_at": "2026-09-04T10:00:00Z",
- "started_at": "2026-09-04T10:00:01Z",
- "completed_at": "2026-09-04T10:00:03Z"
}, - "pagination": {
- "page": 1,
- "per_page": 1000,
- "total": 3,
- "last_page": 1
}
}Retrieve bulk action
Retrieves a submitted bulk action without resuming it. While the status is queued or running, it returns 202 with no items and null counts. Once terminal, it returns 200 and a page of items.
Authorizations:
path Parameters
| request_id required | string^[\x21-\x7e]{1,64}$ Example: abc-123 The Idempotency-Key used to submit the bulk action. |
query Parameters
| page | integer >= 1 Default: 1 One-based item page number. Defaults to 1. |
| per_page | integer [ 1 .. 1000 ] Default: 1000 Items per page. Defaults to 1000; values above 1000 are capped at 1000. |
header Parameters
| profileid required | string (NumericString) ^[1-9][0-9]*$ Example: 9007199254740993 Positive decimal Amazon Advertising profile ID owned by the API-key user. |
Responses
Production
Response samples
- 200
- 202
- 400
- 401
- 403
- 404
- 429
{- "data": {
- "request_id": "string",
- "profile_id": "9007199254740993",
- "entity_type": "campaigns",
- "action": {
- "type": "set_state",
- "state": "enabled"
}, - "status": "queued",
- "reason_code": "string",
- "counts": {
- "requested": 0,
- "succeeded": 0,
- "failed": 0,
- "unchanged": 0,
- "skipped_archived": 0,
- "skipped_invalid": 0
}, - "items": [
- {
- "entity_id": "9007199254740993",
- "status": "succeeded",
- "reason": "archived",
- "error": {
- "code": "string",
- "message": "string"
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "started_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z"
}, - "pagination": {
- "page": 1,
- "per_page": 1,
- "total": 0,
- "last_page": 1
}
}