Difference between revisions of "Offerit REST API Affiliate Login Ips"
From Offerit
OfferitRob (talk | contribs) (Created page with "{{Offerit Manual | show_api_admin_section = true }} == '''POST /affiliate/affiliate_login_ips''' == '''Description''' *This Offerit API function allows you to pull a list...") |
OfferitRob (talk | contribs) |
||
Line 1: | Line 1: | ||
{{Offerit Manual | {{Offerit Manual | ||
− | | | + | | show_rest_api_section = true |
}} | }} | ||
== '''POST /affiliate/affiliate_login_ips''' == | == '''POST /affiliate/affiliate_login_ips''' == |
Revision as of 15:47, 22 March 2017
POST /affiliate/affiliate_login_ips
Description
- This Offerit API function allows you to pull a list of ips that affiliates have logged in from.
Resource URL
- http://domain/api//affiliate/affiliate_login_ips
- Replace domain with the Offerit domain
- POST
Response Format
- JSON
- HTTP headers
Parameters
Paremeters must be sent with the request body. The examples below show the parameters sent as x-www-form-urlencoded
- all parameters are optional for this call
- loginid
- type: integer
- loginid_list
- type: array
- username
- type: string
- username_list
- type: array
- return_type
- type: string
- loginid or username, determines the key index that is returned from the function
Example Request
POST
http://domain/api/affiliate/affiliate_login_ips
- Response:
[ {"result":"success","message":{"3":{"74.105.95.43":["2015-08-06 03:35:41"],"75.99.182.234":["2016-06-06 15:46:31","2016-06-06 10:40:49","2016-06-01 12:11:09","2016-05-12 11:56:31","2016-01-25 16:01:03","2016-01-07 11:43:31","2015-10-12 10:58:31","2015-07-31 23:09:43","2015-07-29 12:16:10","2015-04-02 13:03:05","2015-03-09 17:14:44","2015-03-06 13:08:51","2015-02-23 17:13:12","2015-02-10 16:14:33","2015-02-10 16:10:25","2015-02-10 16:00:08"],"74.102.35.46":["2015-03-13 23:25:57","2015-03-13 23:22:40"],"98.109.57.8":["2012-08-12 21:23:06"]}}} ]
Example Code
PHP
<?php $curl = curl_init(); $data = array( 'username' => 'productsupport', 'return_type' => 'loginid' ); $url = 'http://domain/api/affiliate/affiliate_login_ips'; $headers = array( 'api-key: 44b5498dbcb481a0d00b404c0169af62', 'api-username: productsupport' ); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); $resp = curl_exec($curl); //dumps an associative array representation of the json var_dump(json_decode($resp, true)); // Close request to clear up some resources curl_close($curl); ?> ?>