• Register

Global Ad Media V2

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]

Path and Query Parameters

HTTP Header Parameters

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

back to top

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

back to top

Sample Response

{
       "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"

 

 

back to top

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:

Click Here

back to top

Docs Navigation