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 Unique numeric identifier 
campaignId  ID of the campaign integer Unique numeric identifier 
itemsetId ID of the featured itemsetinteger YIf 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 Value: featured
haloAssociationTypeType of Halo association
Note:
  • Default value is NONE
  • To auto create and associate a halo itemset, use values BRAND or CATEGORY
string N
  • NONE: No halo itemset associated (default). Removes all halo itemset associated to a campaign.
  • BRAND : Auto-generated halo itemset from the same brand(s) as the featured itemset, excluding excluding items already in the featured item set.
  • CATEGORY : Auto-generated halo itemset from the same brand and product categories as the featured itemset, excluding items already in the featured item set
  • CUSTOM: User defined halo itemset
haloItemsetIdID of the custom halo itemset to be associated.
Note: If haloAssociationType is BRAND or CATEGORY, parameter haloItemsetId will not be considered
integerCondiotional
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 NameDescriptionRequiredValues
AuthorizationThe token will provide you the access to the API. It is same for all advertisers you access through the API.YPlease utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide
WM_CONSUMER.IDWe will provide you the consumer ID to access the API. It is same for all advertisers you access through the API.   YPlease 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_SIGNATUREAuth signature as an API key.YUse the signature generator code from Getting Started Guide to generate this value
WM_SEC.KEY_VERSIONWe will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API.Y1
WM_CONSUMER.intimestampTimestamp for which the auth signature is generated. Use Unix epoch format for the timestamp.YUse 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

ElementDescriptionType
codeThe response code can have following values:
  • success
  • failure

Click here for more information about Status Codes and Errors
string
detailsDetails of the error if the value of response code is failurelist of strings
campaignIdID of the campaigninteger
itemsetIdID of the item setinteger

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" ] }
]