Global Ad Media V2
- Description
- Request URL
- Path and Query Parameters
- Sample Requests and Responses
- cURL Example
- Error Codes
Description
The Global Ad Media Service is a read only resource that returns all the media information for a known list of global header and footer pool names.
HTTP Method and Request URL
GET
https://api.macys.com/v2/admedia/global?poolName=[poolName]&strict=[true/false]&secure=[true/false]
|
Parameter |
Description |
Mandatory |
Sample Value |
|
Accept |
Specifies the output format. Can be application/json or application/xml. |
Yes |
application/json application/xml |
|
x-macys-webservice-client-id |
Pass the apikey as a header value which is called x-macys-webservice-client-id. The api key is the 24 character alphanumeric string assigned to your application when you registered it. Click here for a list of your API keys. |
Yes |
x-macys-webservice-client-id:xmj9js4jkdpe1983fmwu98gh |
Query Parameters
|
Parameter |
Description |
Mandatory |
Sample Value |
|
poolName |
Specify one or more pool names separated by comma. |
Yes |
poolName=GLOBALFOOTER |
|
strict |
If (strict=true), and if there is no data found for any given poolName then an exception will be thrown. |
Yes |
true or false |
| secure | By default this is set to false. If set to true links in response will be https NOT http | No |
true or false |
| callback | If sent, the format is JSONP (JSON with Padding) with the callback returned with the JSON response. You can put anything in the callback parameter and whatever you send is returned. | No |
magicofmacysapi |
Sample Request and Response
Sample Request
Request URL:
GET
https://api.macys.com/v2/admedia/global?poolName=GLOBALFOOTER&strict=true&secure=true
HTTP Header:
x-macys-webservice-client-id: xmj9js4jkdpe1983fmwu98gh
Accept: application/json
{
"mediaPoolMapper": {
"mediaPoolItem": [{
"poolName": "GLOBALFOOTER",
"mediaItemMapper": {
"mediaItem": [{
"mediaLinkMapper": {
"mediaLinkItem": [{
"coordinates": "",
"text": "",
"linkType": "STATIC",
"value": "http://www.macys.com/m/campaign/splash/corporate/campaigns",
"fullLinkURL": "http://www.macys.com/m/campaign/splash/corporate/campaigns"
}]
},
"filename": "1111_vet_day_sale_HP_efb_1077413.jpg",
"fullImageURL": "http://assets.macys.com/navapp/dyn_img/site_ad/1111_vet_day_sale_HP_efb_1077413.jpg",
"height": 61,
"width": 209,
"text": "what's happening at Macy's",
"description": "1111VetsDaySaleHPEventBox",
"mediaGroupType": "AD",
"mediaType": "IMAGE",
"mediaGroupId": "553777"
}]
}
}]
}
}
cURL Example
curl -X GET -H "X-Macys-Webservice-Client-Id: xxxxxxxxxxx" -H "Accept: application/json" -H "Content-Type: application/json" -H "https://api.macys.com/v2/admedia/global?poolName=GLOBALFOOTER&strict=true&secure=true"
Error Codes
Call Specific Error Codes:
{
"errorCode"409
"No data for search criteria"
"errorDetail"
"No global media data found for the search criteria"
"success"false>
}
General Error Handling Documentation:
Docs Navigation
- Overview
- Customer Services
- Common API Characteristics
- Ad Media
- Catalog Services
- Order Services
- Mobile Utilities
- Promotion and Coupon Services
- Registry Services
- Review Services
- Store Services
- User Services
- Error Handling
- Deprecated Services
- Macy's API FAQ
- BOPS Stores
- What's New