Update Creative (PUT)

Update a creative

📘

URL: ​PUT/api/v1/creatives/:creativeId

Path Parameters

ParameterDescriptionTypeRequiredPossible Values
creativeIdThe ID of the creativestringYA valid creative ID

Request Parameters

ParameterDescriptionTypeRequiredPossible Values
advertiserIdThe ID of the specific advertiserintegerYA valid advertiser ID
metadataFields you can update in a creative:
  • name: Name of the creative. String data type, required field
  • templateId: ID of the template. Its fixed value is 436 at present. Integer data type
JSON ObjectYThe values:
  • name
  • templateId
adUnitsAd units on creative platform:
marqueeDesktop, marqueeApp, skylineDesktop, skylineApp, skylineDesktopV2, skylineAppV2, brandboxDesktop, brandboxApp, galleryDesktop, galleryApp
Ad units can contain the following fields. Go to the Appendix for a complete list of which fields apply to which ad units.
  • headline: This field cannot be deleted. Optional field. Character limit is dependent on the ad unit. Data type is string
  • subhead: This field can only be deleted for skyline ad units. Optional field. Character limit is dependent on the ad unit. Data type is string
    Note: subHead should always end with one of these characters ".", "!", "?", "*"
  • cta: Call to action. This field cannot be deleted. Optional field. Character limit 16 characters. Data type is string
    Note: cta must be drafted in sentence casing to avoid error.
  • imageAltText: This field cannot be deleted. Optional field. Data type is string. Character limit 150 characters
  • logoAltText: This field cannot be deleted. Optional field. Data type is string. Character limit 150 characters
  • legalDisclaimerLabel: Optional field, data type is string. legalDisclaimerLabel and legalDisclaimerPopUpCopy must be both supplied or not at all. Data type is string up to 12 characters. Set an empty string to disable the disclaimer popup.
  • legalDisclaimerPopUpCopy: Optional field, This is the text of the popup disclaimer. legalDisclaimerLabel and legalDisclaimerPopUpCopy must be both supplied or not at all. Data type is string, up to 600 characters. Set an empty string to disable the disclaimer popup.
  • legalDisclaimerText: You can update/delete this field. Pass an empty string if you don’t want to put a disclaimer text. Sending in a null or skipping the field WILL NOT delete the field, as all fields are optional by default. Optional field. Data type is string, up to 600 characters.
  • images: This field can only be deleted for skylineDesktop and skylineDesktopV2. It is recommended to send in images in all ad units unless the advertiser intends to update only a specific ad unit. It is also recommended to externally produce images as final assets (per Display ad specifications) as opposed to using the crop functionality.
    • name: data type string
      Note: For Desktop ad units (marqueeDesktop, skylineDesktop, skylineDesktopV2, brandboxDesktop, and galleryDesktop), allowed values for name are "desktopImage" and "desktopLogo".
      For App ad units (marqueeApp, brandboxApp, and galleryApp), allowed values for name are "mobileImage" and "mobileLogo".
    • assetId: You can replace the image by adding a new assetId. Data type: UUID string
    • crop: Only applicable for desktop image and mobile image. Not applicable for desktop/mobile logo image. It's an optional field. If you decide to crop the image, you cannot use both focal and rectangular values together.
      Note: Sending in a new image will reset crop settings.
      • focal: focal crop can be passed as part of a lifestyle image in any/all ad units. If set, the same Focal point crop settings will be applied to all ad units and will also overwrite any previously set rectangular crop settings.
        Focal will set the focus of the image at the specified x and y coordinates where x is horizontal, y is vertical, the origin is at the top left corner, and the range is between 0 and 1 exclusive.
        To remove Focal crop, request body must specify any ad unit(s) for which it is to be removed, with the image fields and an empty crop object. Note that, Focal crop will be removed from all ad units irrespective of the number of ad units passed without the focal crop attribute.
        • x: coordinate of the horizontal, ex: 0.2
        • y: coordinate of the vertical, ex: 0.4
      • rectangular: Rectangular crop settings can be modified for each ad unit. To remove the rectangular crop, request body must specify the ad unit(s) from which it is to be removed, including the image fields and an empty crop object
        • x: use x to crop image from left side
        • y: use y to crop image from top. Values of both x and y range between 0 and 1
        • w: use w to crop width of the image
        • h: use h to crop height of the image.
    Note: The desktop/mobile Image and desktop/mobile logos should have:
    • Max file size 10 mb
    • Max dimensions 5000px\5000px
JSON ObjectYmarqueeDesktop
marqueeApp
skylineDesktop skylineApp skylineDesktopV2
skylineAppV2
brandboxDesktop brandboxApp galleryDesktop galleryApp

👉

Please refer to the Appendix to find the required, optional, and non-required assets for each ad unit

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

curl -X PUT\'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/creatives' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth>' \
--header 'WM_CONSUMER.ID: <consumer_id>' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.INTIMESTAMP: 1737762273000' \
--header 'WM_SEC.AUTH_SIGNATURE: <signature>' \
--data '{ "advertiserId": <advertiser_id>, "metadata": { "name": "creative name", "templateId": "436" }, "adUnits": { "marqueeDesktop": { "headline": "The headline.", "subhead": "The subhead.", "cta": "Shop now", "imageAltText": "A picture of our product", "logoAltText": "Our company logo", "legalDisclaimerText": "Disclaimer.", "legalDisclaimerLabel": "Legal Disclaimer", "legalDisclaimerPopUpCopy": "Popup Disclaimer", "variantId": "436", "images": [ { "name": "desktopImage", "assetId": "<asset_id>" }, { "name": "desktopLogo", "assetId": "<asset_id>" } ] }, "marqueeApp": { "headline": "The headline.", "subhead": "The subhead.", "cta": "Shop now", "imageAltText": "A picture of our product", "logoAltText": "Our company logo", "legalDisclaimerText": "Disclaimer.", "legalDisclaimerLabel": "Popup title.", "legalDisclaimerPopUpCopy": "Popup Disclaimer.", "variantId": "436", "images": [ { "name": "mobileImage", "assetId": "<asset_id>" }, { "name": "mobileLogo", "assetId": "<asset_id>" } ] }, "skylineDesktop": { "headline": "The headline.", "subhead": "The subhead.", "imageAltText": "A picture of our product", "logoAltText": "Our company logo", "legalDisclaimerText": "Disclaimer.", "legalDisclaimerLabel": "Popup title.", "legalDisclaimerPopUpCopy": "Popup Disclaimer.", "variantId": "436", "images": [ { "name": "desktopImage", "assetId": "<asset_id>" }, { "name": "desktopLogo", "assetId": "<asset_id>" } ] }, "skylineApp": { "headline": "The headline.", "logoAltText": "Our company logo", "legalDisclaimerLabel": "Popup title.", "legalDisclaimerPopUpCopy": "Popup Disclaimer.", "variantId": "436", "images": [ { "name": "mobileLogo", "assetId": "<asset_id>" } ] }, "brandboxDesktop": { "headline": "The headline.", "subhead": "The subhead.", "cta": "Shop now", "imageAltText": "A picture of our product", "logoAltText": "Our company logo", "legalDisclaimerText": "Disclaimer.", "legalDisclaimerLabel": "Popup title.", "legalDisclaimerPopUpCopy": "Popup Disclaimer.", "variantId": "436", "images": [ { "name": "desktopImage", "assetId": "<asset_id>" }, { "name": "desktopLogo", "assetId": "<asset_id>" } ] }, "brandboxApp": { "headline": "The headline.", "subhead": "The subhead.", "imageAltText": "A picture of our product", "logoAltText": "Our company logo", "legalDisclaimerText": "Disclaimer.", "legalDisclaimerLabel": "Popup title.", "legalDisclaimerPopUpCopy": "Popup Disclaimer.", "variantId": "436", "images": [ { "name": "mobileImage", "assetId": "<asset_id>" }, { "name": "mobileLogo", "assetId": "<asset_id>" } ] }, "galleryDesktop": { "headline": "The headline.", "subhead": "The subhead.", "cta": "Shop now", "imageAltText": "A picture of our product", "logoAltText": "Our company logo", "legalDisclaimerText": "Disclaimer.", "legalDisclaimerLabel": "Popup title.", "legalDisclaimerPopUpCopy": "Popup Disclaimer.", "variantId": "436", "images": [ { "name": "desktopImage", "assetId": "<asset_id>" }, { "name": "desktopLogo", "assetId": "<asset_id>" } ] }, "galleryApp": { "headline": "The headline.", "cta": "Shop now", "imageAltText": "A picture of our product", "logoAltText": "Our company logo", "legalDisclaimerText": "Disclaimer.", "legalDisclaimerLabel": "Popup title.", "legalDisclaimerPopUpCopy": "Popup Disclaimer.", "variantId": "436", "images": [ { "name": "mobileImage", "assetId": "<asset_id>" }, { "name": "mobileLogo", "assetId": "<asset_id>" } ] } }
}' 

Response

ElementDescriptionType
codePossible values of response code:
  • success
  • failure
string
detailsPossible values of details:
  • Details of the error if value of response code is failure
  • It returns a string value "success" if value of response code is success
string
creativeIdID of the creative. It is returned in response only if code=successstring
messageDetails of the error if value of code is failure and validation errors were foundstring

Sample Response 1

[ { "code": "success", "details": ["success"], "creativeId": "e02a09b2-1e3c-2g22-bf47-8a123c35002a" }
]

Sample Response 2

[ { "code": "failure", "details": ["CREATIVE_VALIDATION_ERROR"], "message":"Found 8 validation error(s).\n$.adUnits.marqueeDesktop.headline: must be at least 1 characters long\n $.adUnits.marqueeDesktop.subhead does not end with a period(.), exclamation(!), question(?), or an asterisk(*).\n $.adUnits.marqueeDesktop.cta does not follow sentence casing.\n $.adUnits.marqueeDesktop.imageAltText: must be at least 1 characters long\n $.adUnits.marqueeDesktop.logoAltText: must be at least 1 characters long\n $.adUnits.marqueeDesktop.images: null found, array expected\n Disclaimer Pop up copy and Label should be used together.\n $.metadata.templateId: does not have a value in the enumeration [436]" }
]