Update Creative (PATCH)
You can update specific fields on a creative using this PATCH call
URL: PATCH/api/v1/creatives/:creativeId
Notes on Updating and Deleting Attributes
Certain attributes of a creative can be modified independently, while some attributes are dependent on other attributes and must both be updated at the same time. These attributes are described in the following sections.
Updating Attributes
Attributes listed in the same line must be updated together, while items on a single line can be updated independently of each other.
- Metadata
- Name
- Ad Unit (Single)
- Headline
- Sub head
- CTA
- Image Alt text + Lifestyle Image (dependent, must be updated together)
- Logo Alt text + Logo Image (dependent, must be updated together)
- Legal disclaimer label
- Legal disclaimer pop up copy
- Legal disclaimer text
- Lifestyle Image (Requires Image alt text when passed)
- Rectangular Crop
- Focal Crop (Will apply across all ad units)
- Logo image (Requires Logo alt text when passed)
Deleting Attributes
- Subhead in Skyline desktop V1 and V2
- Lifestyle image + image alt text in Skyline Desktop V1 and V2 (dependent, must be deleted together)
- Ad Unit
- Legal disclaimer label
- Legal disclaimer pop up copy
- Legal disclaimer text
- Lifestyle Image (this section only describes crop removal)
- Rectangular Crop
- Focal Crop (Will apply across all ad units)
Path Parameters
Parameter | Description | Type | Required | Possible Values |
---|---|---|---|---|
creativeId | The ID of the creative | string | Y | A valid creative ID |
Request Parameters
Note: You can pass either the metadata
parameter or the adUnits
object. Only one of either parameter is required.
Parameter | Description | Type | Required | Possible Values |
---|---|---|---|---|
advertiserId | The ID of the specific advertiser | integer | Y | A valid advertiser ID |
metadata | Fields you can update in a creative:
| JSON Object | N | The values:
|
adUnits | Ad 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.
| JSON Object | N | marqueeDesktop 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 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 for Updating Creative Name + Headline
curl -X PATCH 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/creatives/e02a09b2-1e3c-2g22-bf47-8a123c35002a' \ --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": 123, "metadata": { "name": "Simple Creative - updated" }, "adUnits": { "marqueeDesktop": { "headline": "Updated headLine" }, } }'
Sample Request for Removing Disclaimer Text
Note: You must send an empty string to confirm the removal of any existing Legal disclaimer text. Sending a null value or skipping the field will not delete the field, as all fields are optional by default.
curl -X PATCH 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/creatives/e02a09b2-1e3c-2g22-bf47-8a123c35002a' \ --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": 123, "adUnits": { "marqueeDesktop": { "legalDisclaimerText": "" } } }'
Sample Request for Removing Subhead (Skyline Desktop)
curl -X PATCH 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/creatives/e02a09b2-1e3c-2g22-bf47-8a123c35002a' \ --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": "16273800", "metadata": { "name": "Simple Creative PATCH - v1 - edited" }, "adUnits": { "skylineDesktopV2": { "subhead": "" } } }'
Sample Request for Removing Crop On a Single Ad Unit
curl -X PATCH 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/creatives/e02a09b2-1e3c-2g22-bf47-8a123c35002a' \ --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": "16273800", "adUnits": { "marqueeApp": { "images": [ { "name": "mobileImage", "assetId": "7c3049ed-8145-4727-9ca8-56b4c2388266", "crop": {} } ] } } }'
Sample Request for Removing Lifestyle Image from Skyline desktop ad unit
curl -X PATCH 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/creatives/e02a09b2-1e3c-2g22-bf47-8a123c35002a' \ --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": "16273800", "metadata": { "name": "Simple Creative PATCH - v1 - edited" }, "adUnits": { "skylineDesktopV2": { "images": [ { "name": "desktopImage", "assetId": "" } ] } } }'
Response
Element | Description | Type |
---|---|---|
code | Possible values of response code:
| string |
details | Possible values of details:
| string |
creativeId | ID of the creative. It is returned in response only if code=success | string |
message | Details of the error if value of code is failure and validation errors were found | string |
Sample Response
[ { "code": "success", "details": ["success"], "creativeId": "e02a09b2-1e3c-2g22-bf47-8a123c35002a" }
]
Updated 13 days ago