API:API Network Offer Files(Legacy)
From HasOffers
Contents |
Definition
Returns a list of File information for an offer.
- URLs: http://demo.hasoffers.com/admin/api/v1/offer_files.format
- Formats: json, xml, csv
- HTTP Method: GET
- Authentication: This API requires user authentication. Your API key should be passed with the request to provide authentication.
Required Parameters
- api_key The API Key used as authentication.
- offer_id The offer from which to download associated creative file URLs.
- Example Request: http://demo.hasoffers.com/admin/api/v1/offer_files.json?api_key=NEThSQ1Ah92G8f7JYqQuO5hnsULkia&offer_id=1
Optional Parameters
- limit
- The maximum number of results that should be returned. 0 is unlimited results. Default is 0.
- Example: http://demo.hasoffers.com/admin/api/v1/offer_files.json?api_key=NEThSQ1Ah92G8f7JYqQuO5hnsULkia&offer_id=1&limit=50
- page
- The page number of the result set to coincide with the provided limit. Default is 1.
- Example: http://demo.hasoffers.com/admin/api/v1/offer_files.json?api_key=NEThSQ1Ah92G8f7JYqQuO5hnsULkia&offer_id=1&limit=10&page=2
- affiliate_id
- The ID of the affiliate to use when generating creative code. Default is 1.
- Example: http://demo.hasoffers.com/admin/api/v1/offer_files.json?api_key=NEThSQ1Ah92G8f7JYqQuO5hnsULkia&offer_id=1&affiliate_id=5
Response
Field Definitions
id int The unique identifier of the file.
offer_id int The unique identifier of the offer.
filename string The file's name.
display string A friendly version of the file's name.
status string The file's status (pending or active).
type string The file's type ('file', 'image banner', 'flash banner', or 'email creative').
width int If the file is an image, the width in pixels.
height int If the file is an image, the height in pixels.
url string Complete file URL.
creative_code string Creative code for offer file including tracking pixels and links.
JSON Example
.
{
"success": true,
"rows": 2,
"total_rows": 4,
"data": {
"offer_files": [
{
"id": "27",
"offer_id": "256",
"filename": "300x250-01.swf",
"display": "funcards-300x250-01",
"status": "active",
"type": "flash banner",
"width": "300",
"height": "250",
"url": "http://go2media.org/outbox/offer_files/demo/256/300x250-01.swf"
},
{
"id": "30",
"offer_id": "256",
"filename": "300x250-02.swf",
"display": "funcards-300x250-02",
"status": "active",
"type": "flash banner",
"width": "300",
"height": "250",
"url": "http://go2media.org/outbox/offer_files/demo/256/300x250-02.swf"
}
]
}
}
XML Example
.
<rsp stat="ok" rows="2" total_rows="4" >
<offer_file>
<id>27</id>
<offer_id>256</offer_id>
<filename>300x250-01.swf</filename>
<display>funcards-300x250-01</display>
<status>active</status>
<type>flash banner</type>
<width>300</width>
<height>250</height>
<url>http://go2media.org/outbox/offer_files/demo/256/300x250-01.swf</url>
</offer_file>
<offer_file>
<id>30</id>
<offer_id>256</offer_id>
<filename>300x250-02.swf</filename>
<display>funcards-300x250-02</display>
<status>active</status>
<type>flash banner</type>
<width>300</width>
<height>250</height>
<url>http://go2media.org/outbox/offer_files/demo/256/300x250-02.swf</url>
</offer_file>
</rsp>
Email this page to a friend or co-worker