GET
method on amc/accounts to fetch the AMC Account ID/Entity ID.{
"audienceName": "AudienceDemo",
"audienceDescription": "Audience created for Audience Demo",
"advertiserId": "11111111",
"advertiserType": "xxxxxx",
"query": "SELECT user_id FROM amazon_attributed_events_by_conversion_time_for_audiences WHERE conversion_event_subtype = 'shoppingCart'",
"timeWindowStart": "2024-05-25T00:00:00Z",
"timeWindowEnd": "2024-05-27T01:00:00Z",
"refreshRateDays": 1,
"timeWindowRelative": "TRUE"
}
curl --location --request POST 'https://www.amazon.com/ap/oa/amc/audiences/query' \
--header 'Amazon-Advertising-API-ClientId: {{client_id}}' \
--header 'Amazon-Advertising-API-EntityId: {{advertiser_id}}' \
--header 'Amazon-Marketing-Cloud-Audience-InstanceId: {{instanceId}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"audienceName": "AudienceDemo",
"audienceDescription": "Audience created for Audience Demo",
"advertiserId": "11111111",
"advertiserType": "xxxxxx",
"query": "SELECT user_id FROM amazon_attributed_events_by_conversion_time_for_audiences WHERE conversion_event_subtype = '\''shoppingCart'\''",
"timeWindowStart": "2024-05-25T00:00:00Z",
"timeWindowEnd": "2024-05-27T01:00:00Z",
"refreshRateDays": 1,
"timeWindowRelative": "TRUE"
}'
{"audienceExecutionDescription":"Successfully started audience creation workflow.","audienceExecutionId":"7ad8521c-ddd1-42b7-9172-e3b8ad93dc5a","status":"PENDING"}