Create Sponsored Brands Profile for Campaign

Create a new Sponsored Brands profile, for a campaign, that is relevant to the products in the respective campaign. This defines the look and click behavior of your Sponsored Brands placement. Successfully created profiles will be assigned a unique Sponsored Brands Profile ID.

You can create only one Sponsored Brands profile by using URL v1

Using v2 URL, you can create dual Sponsored Brands profiles for a campaign

Note: A profile is created with review status set as “pending review” by default

🌐

v1 URL: POST/api/v1/sba_profile

Query Parameters

ParameterNotesTypeRequired Possible Values
campaignIdThe ID of the campaignintegerYA valid campaign ID
adGroupIdThe ID of the ad groupintegerYA valid ad group ID
searchAmpNameThe name of the Brand. This field should not be left empty.stringYName of the brand that is part of this profile. It should be max. 35 characters, all of which are NOT recommended to be special characters
headlineTextCustom headline text showcasing why customers should buy your products This field is required.stringYPiece of text that explains your brand value within following constraints:
  • It should be max. 45 characters
  • It is recommended to NOT use all special characters in this field
clickUrlThe destination URL or landing page URL. It is the website address that a visitor lands on when he/she clicks on the ad. This field is required.  stringYClickable URL must be https://www.walmart.com URL that displays product(s) for the advertised brand. It can be either of:
  1. Search Page
  2. Browse Page
  3. Brand Shop
  4. Brand Shelf

clickUrl requirements:
  1. Any “:” in the URL should be replaced with “%3A”
  2. Any “+” in the URL should be replaced with “%20″
  3. Any “||” in the URL should be replaced with “%7C%7C”
  4. URL query string should not contain “typeahead=” parameter
  5. For 3P sellers, add hidden_facet=retailer_id%3A<seller_id>to the end of clickURL
Note: If requirements not met, the request will fail with encode issue.

Headers

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 1

curl -X POST \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/sba_profile' \
--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'\
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '[
{ "campaignId": 12345, "adGroupId": 54321, "searchAmpName": "Great Value", "headlineText": "This is Great Value", "clickUrl": "https://www.walmart.com"
}
]'

Sample Request 2

curl -X POST \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/sba_profile' \
--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'\
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '{ "campaignId": 12345, "adGroupId": 54321, "searchAmpName": "Great Value", "headlineText": "This is Great Value", "clickUrl": "https://www.walmart.com/search?q=abcd%20xyz" }'

Response

Element DescriptionType
codeThe response code can have following values: success, failurestring
detailsDetails of the error if value of response code is failurestring
sbaProfileIdID of the SBA profileinteger

Sponsored Brands Profiles can be either created or not based upon different scenarios. Sample response here provides an idea of how the response looks like in either case.

Sample Response 1

[ { "code": "success", "details": "", " sbaProfileId ": 50001 }, { "code": "failure", "details": "error message", " sbaProfileId ": 0 }
]

Sample Response 2

[ { "code": "failure", "details": "", " sbaProfileId ": 50001 }, { "code": "failure", "details": "The Click URL has not been correctly encoded. Please encode and retry", " sbaProfileId ": 0 }
]

🌐

v2 URL: ​POST/api/v2/sba_profile

Note:

  • First profile created will be enabled by default
  • Second profile created will be disabled by default
  • Any new profile will be created as “pending review” by default
  • Only enabled profile will serve on a live campaign
  • Only two profiles can be created at max per ad group
  • If you create two profiles for an ad group then:
    • Only 1 profile can be enabled at a time
    • To disable an “enabled” profile, you need to enable the “disabled” profile

Query Parameters

ParameterNotesTypeRequiredPossible Values
campaignId  The ID of the campaignintegerYA valid campaign ID
adGroupIdThe ID of the ad groupintegerYA valid ad group ID
searchAmpNameThe name of the Brand. This field should not be left empty.stringYName of the brand that is part of this profile. It should be max. 35 characters, all of which are NOT recommended to be special characters
headlineTextCustom headline text showcasing why customers should buy your products. This field is required.stringYPiece of text that explains your brand value within following constraints:
  • It should be max. 45 characters
  • It is recommended to NOT use all special characters in this field
clickUrlThe destination URL or landing page URL. It is the website address that a visitor lands on when he/she clicks on the ad. This field is required.stringYClickable URL must be https://www.walmart.com URL that displays product(s) for the advertised brand. It can be either of:
  1. Search Page
  2. Browse Page
  3. Brand Shop
  4. Brand Shelf

clickUrl requirements:
  1. Any “:” in the URL should be replaced with “%3A”
  2. Any “+” in the URL should be replaced with “%20″
  3. Any “||” in the URL should be replaced with “%7C%7C”
  4. URL query string should not contain “typeahead=” parameter
  5. For 3P sellers, add hidden_facet=retailer_id%3A<seller_id>to the end of clickURL
Note: If requirements not met, the request will fail with encode issue.

Sample Request 1

curl -X POST \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v2/sba_profile' \
--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'\
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '[
{ "campaignId": 12345, "adGroupId": 54321, "searchAmpName": "Great Value", "headlineText": "This is Great Value", "clickUrl": "https://www.walmart.com", }
]'

Response

ElementDescriptionType
codeThe response code can have following values: success, failurestring
detailsDetails of the error if value of response code is failurestring
sbaProfileIdID of the Sponsored Brands profileinteger

Sample Response

[ { "code": "success", "details": "", " sbaProfileId ": 600001 }, { "code": "failure", "details": "error message", " sbaProfileId ": 0 }
]