Add Creatives to Ad Groups
Add creative(s) to an Ad group while specifying click URLs and 3P trackers.
URL: POST/api/v1/adGroupCreativeAssociations
Note:
- This API supports batch operations with a max batch size of 5. For bulk operation, the advertiserId must be the same across all requests in the payload
- An ad group can only include creatives that are APPROVED or PENDING. Furthermore, for an ad group to go live, it must contain at least one APPROVED creative
Request Parameters
Parameter | Notes | Type | Required | Possible Values |
---|---|---|---|---|
advertiserId | The ID of the advertiser | integer | Y | Unique numeric identifier |
adGroupId | The ID of the ad group | integer | Y | Unique numeric identifier |
creativeId | The ID of the creative to be added to the ad group | string | Y | Unique numeric identifier |
urlTracker | Use this parameter to Specify click URLs and 3P trackers for each ad unit. It is an array holding following elements:
| string |
Headers
Header Name | Description | Required | Values |
Authorization | The token will provide you the access to the API. It is same for all advertisers you access through the API | Y | Please utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide. This key can be repurposed for SP API access as well. |
WM_CONSUMER.ID | We will provide you the consumer ID to access the API. It is same for all advertisers you access through the API. | Y | Please use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for further explanation on this |
WM_SEC.AUTH_SIGNATURE | Auth signature as an API key | Y | Use the signature generator code from Getting Started Guide to generate this value |
WM_CONSUMER.intimestamp | Timestamp for which the auth signature is generated. Use Unix epoch format for the timestamp | Y | Use the signature generator code (Getting Started Guide) to generate this value |
WM_SEC.KEY_VERSION | We will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API | Y | 1 |
Sample Request
curl -X POST \
' https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroupCreativeAssociations ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_CONSUMER.ID: abcde-v123-fa2r-a1fs-asd45f6qef' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \ --data '[ { "advertiserId" : 1, "adGroupId" : 1, "creativeId" : "abcd-1234", "urlTracker" : [ { "adUnit" : "marquee", "clickUrlDesktopMWeb" : "https://www.test.com/search?q=test+url+desktop+mweb", "clickUrlApp" : "https://www.test.com/search?q=test+url+desktop+app", "dcmClickUrlDesktopMWeb" : "https://test.net", "dcmClickUrlApp" : "https://test.net", "iasClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "iasClickUrlApp" : "https://test.com/def.jpeg", "dvClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "dvClickUrlApp" : "https://test.com/def.jpeg", "desktopMWebTag" : "https://test.com/abc.js" }, { "adUnit" : "gallery", "clickUrlDesktopMWeb" : "https://www.test.com/search?q=test+url+desktop+mweb", "clickUrlApp" : "https://www.test.com/search?q=test+url+desktop+app", "dcmClickUrlDesktopMWeb" : "https://test.net", "dcmClickUrlApp" : "https://test.net", "iasClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "iasClickUrlApp" : "https://test.com/def.jpeg", "dvClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "dvClickUrlApp" : "https://test.com/def.jpeg", "desktopMWebTag" : "https://test.com/abc.js" } ] }
]'
Sample Request (Batch Operation)
curl -X POST \
' https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroupCreativeAssociations ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_CONSUMER.ID: abcde-v123-fa2r-a1fs-asd45f6qef' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \ --data '[ { "advertiserId" : 1, "adGroupId" : 1, "creativeId" : "abcd-1234", "urlTracker" : [ { "adUnit" : "marquee", "clickUrlDesktopMWeb" : "https://www.test.com/search?q=test+url+desktop+mweb", "clickUrlApp" : "https://www.test.com/search?q=test+url+desktop+app", "dcmClickUrlDesktopMWeb" : "https://test.net", "dcmClickUrlApp" : "https://test.net", "iasClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "iasClickUrlApp" : "https://test.com/def.jpeg", "dvClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "dvClickUrlApp" : "https://test.com/def.jpeg", "desktopMWebTag" : "https://test.com/abc.js" }, { "adUnit" : "gallery", "clickUrlDesktopMWeb" : "https://www.test.com/search?q=test+url+desktop+mweb", "clickUrlApp" : "https://www.test.com/search?q=test+url+desktop+app", "dcmClickUrlDesktopMWeb" : "https://test.net", "dcmClickUrlApp" : "https://test.net", "iasClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "iasClickUrlApp" : "https://test.com/def.jpeg", "dvClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "dvClickUrlApp" : "https://test.com/def.jpeg", "desktopMWebTag" : "https://test.com/abc.js" } ] }, { "advertiserId" : 1, "adGroupId" : 1, "creativeId" : "abcd-1234", "urlTracker" : [ { "adUnit" : "marquee", "clickUrlDesktopMWeb" : "https://www.test.com/search?q=test+url+desktop+mweb", "clickUrlApp" : "https://www.test.com/search?q=test+url+desktop+app", "dcmClickUrlDesktopMWeb" : "https://test.net", "dcmClickUrlApp" : "https://test.net", "iasClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "iasClickUrlApp" : "https://test.com/def.jpeg", "dvClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "dvClickUrlApp" : "https://test.com/def.jpeg", "desktopMWebTag" : "https://test.com/abc.js" }, { "adUnit" : "gallery", "clickUrlDesktopMWeb" : "https://www.test.com/search?q=test+url+desktop+mweb", "clickUrlApp" : "https://www.test.com/search?q=test+url+desktop+app", "dcmClickUrlDesktopMWeb" : "https://test.net", "dcmClickUrlApp" : "https://test.net", "iasClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "iasClickUrlApp" : "https://test.com/def.jpeg", "dvClickUrlDesktopMWeb" : "https://test.com/abd.jpeg", "dvClickUrlApp" : "https://test.com/def.jpeg", "desktopMWebTag" : "https://test.com/abc.js" } ] }
]'
Response
Element | Description | Type |
---|---|---|
code | The response code can have following values: • success • failure | string |
details | Details will populate success or error message depending upon value of code | string |
adGroupId | ID of the ad group being added to the ad group | integer |
creativeId | ID of the creative | string |
Sample Response
[ { "code": "success", "details": "ADGROUP_CREATIVE_ASSOCIATION_CREATED_SUCCESSFULLY", "adGroupId": 1, "creativeId": "abcd-1234" }
]
Sample Response (Batch Operation)
[ { "code": "success", "details": ["string"], "adGroupId": 1, "creativeId": "abcd-1234" }, { "code": "failure", "details": ["string"], "adGroupId": 1, "creativeId": "abcd-12345" }
]
Updated about 2 months ago