API:API Affiliates(Legacy)
From HasOffers
Definition:
Returns a list of affiliates.
- URLs: http://demo.hasoffers.com/admin/api/v1/affiliates.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.
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/affiliates.json?api_key=NEThSQ1Ah92G8f7JYqQuO5hnsULkia&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/affiliates.json?api_key=NEThSQ1Ah92G8f7JYqQuO5hnsULkia&limit=10&page=2
Response
JSON Example
{
"success":true
,"rows":2
,"total_rows":14
,"data":{
"affiliates":[
{
"id":"16"
,"account_manager_id":"5"
,"company":"AFFcompany"
,"status":"active"
,"date_added":"2009-07-05 23:24:27"
,"payment_terms":"net 30"
,"method":"check"
,"address1":"123 Main St"
,"address2":""
,"city":"Springfield"
,"region":"MI"
,"country":"US"
,"other":""
,"zipcode":"49015"
,"phone":"269-555-1212"
,"w9_filed":"0"
,"referral_id":""
}
,{
"id":"2"
,"account_manager_id":"1"
,"company":"Affiliate Toyz"
,"status":"blocked"
,"date_added":"2009-04-16 14:47:01"
,"payment_terms":"net 7"
,"method":"check"
,"address1":"123 Wall St"
,"address2":""
,"city":"New York"
,"region":"NY"
,"country":"US"
,"other":""
,"zipcode":"10025"
,"phone":"212-555-4000"
,"w9_filed":"0"
,"referral_id":""
}
]
}
}
XML Example
<rsp stat="ok" rows="2" total_rows="14">
<affiliate>
<id>16</id>
<account_manager_id>5</account_manager_id>
<company>AFFcompany</company>
<status>active</status>
<date_added>2009-07-05 23:24:27</date_added>
<payment_terms>net 30</payment_terms>
<method>check</method>
<address1>123 Main St</address1>
<address2/>
<city>Springfield</city>
<region>MI</region>
<country>US</country>
<other/>
<zipcode>49015</zipcode>
<phone>269-555-1212</phone>
<w9_filed>0</w9_filed>
<referral_id/>
</affiliate>
<affiliate>
<id>2</id>
<account_manager_id>1</account_manager_id>
<company>Affiliate Toyz</company>
<status>blocked</status>
<date_added>2009-04-16 14:47:01</date_added>
<payment_terms>net 7</payment_terms>
<method>check</method>
<address1>123 Wall St</address1>
<address2/>
<city>New York</city>
<region>NY</region>
<country>US</country>
<other/>
<zipcode>10025</zipcode>
<phone>212-555-4000</phone>
<w9_filed>0</w9_filed>
<referral_id/>
</affiliate>
</rsp>
Email this page to a friend or co-worker