Add Itemsets to Campaigns
This API allows users to associate featured and halo (both auto created and custom) measurement itemsets with a campaign or remove their campaign association
Note: Halo itemsets association and removal is allowed only for campaigns with start date on or after 04/01/2025. For older campaigns the default behavior will continue
URL: POST/api/v1/itemsetAssociation
Request Parameters
Parameter | Notes | Type | Required | Possible Values |
---|---|---|---|---|
advertiserId | ID of the advertiser | integer | Y | Unique numeric identifier |
campaignId | ID of the campaign | integer | Y | Unique numeric identifier |
itemsetId | ID of the featured itemset | integer | Y | If omitted, the featured itemset will be removed from the campaign. • If the campaign had auto-created halo itemsets (BRAND or CATEGORY), they will also be removed. • If a CUSTOM halo itemset was associated, it will remain unaffected |
itemsetType | Type of itemset being associated. Should always be featured | string | N | Value: featured |
haloAssociationType | Type of Halo association Note:
| string | N |
|
haloItemsetId | ID of the custom halo itemset to be associated. Note: If haloAssociationType is BRAND or CATEGORY , parameter haloItemsetId will not be considered | integer | Condiotional Note: Required if haloAssociationType is CUSTOM | Valid ID value |
To remove an itemset:
- To remove featured itemset: Omit itemsetId from the request. Note that removing an itemset will also remove any auto-created halo itemsets (BRAND or CATEGORY) associated to the campaign. CUSTOM halo itemset will not be removed
- To remove Halo itemset: Set haloAssociationType = NONE
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 |
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 more information |
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_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 |
WM_CONSUMER.intimestamp | Timestamp for which the auth signature is generated. Use Unix epoch format for the timestamp. | Y | Use the signature generator code from Getting Started Guide to generate this value |
Sample Request - Associate featured itemset and an auto created BRAND halo itemset
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemsetAssociation' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "advertiserId": 1, "campaignId": 1, "itemsetId": 1234, "itemsetType": "featured", "haloAssociationType": "BRAND" }
]'
Sample Request - Associate custom halo itemset
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemsetAssociation' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "advertiserId": 1, "campaignId": 73512, "itemsetId": 1234, "itemsetType": "FEATURED", "haloAssociationType": "CUSTOM", "haloItemsetId": 123 }
]'
Sample Request - Associate no halo itemset
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemsetAssociation' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "advertiserId": 1, "campaignId": 73512, "itemsetId": 1234, "itemsetType": "FEATURED" }
]'
Sample Request - Batch operation
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemsetAssociation' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "advertiserId": 1, "campaignId": 1, "itemsetId": 1234, "itemsetType": "featured", "haloAssociationType": "BRAND" }, { "advertiserId": 1, "campaignId": 73512, "itemsetType": "FEATURED", "haloAssociationType": "CUSTOM", "haloItemsetId": 123 }
]'
Sample Request - Remove Featured and Auto Halo Associations
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemsetAssociation' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "advertiserId": 1, "campaignId": 73512, "itemsetType": "FEATURED" }
]'
Sample Request - Invalid featured itemset id
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemsetAssociation' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "advertiserId": 1, "campaignId": 73512, "itemsetType": "FEATURED", "haloAssociationType" : "CUSTOM", "itemsetId": 1234, "haloItemsetId": 123 }
]'
Sample Request - Invalid haloItemsetId
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemsetAssociation' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "advertiserId": 1, "campaignId": 73512, "itemsetType": "FEATURED", "haloAssociationType" : "CUSTOM", "itemsetId": 1234, "haloItemsetId": 123 }
]'
Response
Element | Description | Type |
---|---|---|
code | The response code can have following values:
Click here for more information about Status Codes and Errors | string |
details | Details of the error if the value of response code is failure | list of strings |
campaignId | ID of the campaign | integer |
itemsetId | ID of the item set | integer |
Sample Response - Associate featured itemset and an auto created BRAND halo itemset (Success)
[ { "code": "success", "details": [ "ITEMSET_CAMPAIGN_ASSOCIATION_SUCCESS" ], "campaignId": 1, "itemsetId": 1234 }
]
Sample Response - Associate custom halo itemset (Success)
[ { "code": "success", "details": [ "ITEMSET_CAMPAIGN_ASSOCIATION_SUCCESS" ], "campaignId": 1, "itemsetId": 1234 }
]
Sample Response - Associate no halo itemset (Success)
[ { "code": "success", "details": [ "ITEMSET_CAMPAIGN_ASSOCIATION_SUCCESS" ], "campaignId": 1, "itemsetId": 1234 }
]
Sample Response - Batch operation (Success)
[ { "code": "success", "details": ["ITEMSET_CAMPAIGN_ASSOCIATION_SUCCESS"], "campaignId": 1, "itemsetId": 1234 }, { "code": "success", "details": ["ITEMSET_CAMPAIGN_ASSOCIATION_SUCCESS"], "campaignId": 1, "itemsetId": 1234 } ]
Sample Response - Remove Featured and Auto Halo Associations (Success)
[ { "code": "success", "campaignId": 73512, "details": [ "REMOVE_ITEMSET_CAMPAIGN_ASSOCIATION_SUCCESS" ] }
]
Sample Response - Invalid featured itemset id (Success) -NA
Sample Response - Invalid featured itemset id
[ { "code": "failure", "campaignId": 73512, "details": [ "INVALID_FEATURED_ITEMSET_ID" ] }
]
Sample Response - Invalid haloItemsetId(Success) -NA
Sample Response - Invalid haloItemsetId
[ { "code": "failure", "campaignId": 73512, "details": [ "INVALID_HALO_ITEMSET_ID" ] }
]
Updated 1 day ago