API:API User Authentication(Legacy)

From HasOffers

Contents

Definition

Authenticates an affiliate, advertiser, or employee based on email and password credentials.


Required Parameters

  • api_key The API Key used as authentication.
  • email The email address of the authenticating user
  • password The password of the authenticating user


Affiliate


JSON Example

     {
         "success":true,
         "data":{
             "AffiliateUser":{
                 "id":"1",
                 "affiliate_id":"1",
                 "email":"demo@hasoffers.com",
                 "first_name":"Demo",
                 "last_name":"Account",
                 "home_phone":"555-5555",
                 "cell_phone":"555-5555",
                 "title":"",
                 "join_date":"2009-04-16 13:55:56",
                 "last_login":"2009-09-17 19:02:18",
                 "status":"active"
             },
             "Affiliate":{
                 "id":"1",
                 "account_manager_id":"1",
                 "company":"Demo Affiliate",
                 "status":"active",
                 "date_added":"2009-06-18 02:48:45",
                 "payment_terms":"net 7",
                 "method":"check",
                 "address1":"123 Main St",
                 "address2":"",
                 "city":"Smallville",
                 "region":"WA",
                 "country":"US",
                 "other":"",
                 "zipcode":"98121",
                 "phone":"206.555.1234",
                 "w9_filed":"1",
                 "referral_id":null
             }
         }
     }
         

XML Example

Note: remove ! before using code.

     <rsp stat="ok">
         <AffiliateUser>
             <id>1</id>
             <affiliate_id>1</affiliate_id>
             <!email>demo@hasoffers.com<!/email>
             <first_name>Demo</first_name>
             <last_name>Account</last_name>
             <home_phone>555-5555</home_phone>
             <cell_phone>555-5555</cell_phone>
             <title/>
             <join_date>2009-04-16 13:55:56</join_date>
             <last_login>2009-09-17 19:05:10</last_login>
             <status>active</status>
         </AffiliateUser>
         <Affiliate>
             <id>1</id>
             <account_manager_id>1</account_manager_id>
             <company>Demo Affiliate</company>
             <status>active</status>
             <date_added>2009-06-18 02:48:45</date_added>
             <payment_terms>net 7</payment_terms>
             <method>check</method>
             <address1>123 Main St</address1>
             <address2/>
             <city>Smallville</city>
             <region>WA</region>
             <country>US</country>
             <other/>
             <zipcode>98121</zipcode>
             <phone>206.555.1234</phone>
             <w9_filed>1</w9_filed>
             <referral_id/>
         </Affiliate>
     </rsp>

Advertiser

JSON Example

.


            {
                "success":true,
                "data":{
                    "AdvertiserUser":{
                        "id":"25",
                        "advertiser_id":"21",
                        "email":"demo@hasoffers.com",
                        "first_name":"Demo",
                        "last_name":"Account",
                        "home_phone":null,
                        "cell_phone":null,
                        "title":"Advertiser Manager",
                        "join_date":"2009-07-30 14:27:36",
                        "last_login":"2009-09-17 19:29:24",
                        "status":"active"
                    },
                    "Advertiser":{
                        "id":"21",
                        "account_manager_id":"1",
                        "company":"HasOffers",
                        "status":"deleted",
                        "date_added":"2009-07-30 14:27:36",
                        "address1":"123 St.",
                        "address2":"",
                        "city":"Seattle WA",
                        "region":"WA",
                        "country":"US",
                        "other":null,
                        "zipcode":"98121",
                        "phone":"123-456-7890"
                    }
                }
            }


XML Example

Note: remove ! before using code.

           <rsp stat="ok">
               <AdvertiserUser>
                   <id>25</id>
                   <advertiser_id>21</advertiser_id>
                   <!email>demo@hasoffers.com<!/email>
                   <first_name>Demo</first_name>
                   <last_name>Account</last_name>
                   <home_phone/>
                   <cell_phone/>
                   <title>Advertiser Manager</title>
                   <join_date>2009-07-30 14:27:36</join_date>
                   <last_login>2009-09-17 19:30:53</last_login>
                   <status>active</status>
               </AdvertiserUser>
               <Advertiser>
                   <id>21</id>
                   <account_manager_id>1</account_manager_id>
                   <company>HasOFfers</company>
                   <status>deleted</status>
                   <date_added>2009-07-30 14:27:36</date_added>
                   <address1>123 St.</address1>
                   <address2/>
                   <city>Seattle WA</city>
                   <region>WA</region>
                   <country>US</country>
                   <other/>
                   <zipcode>98121</zipcode>
                   <phone>123-456-7890</phone>
               </Advertiser>
           </rsp>

Employee


JSON Example

.

                  {
                      "success":true,
                      "data":{
                          "Employee":{
                              "id":"1",
                              "email":"demo@hasoffers.com",
                              "first_name":"Demo",
                              "last_name":"Account",
                              "home_phone":"555-5555",
                              "cell_phone":"555-5555",
                              "aim":"demo@example.org",
                              "title":"",
                              "join_date":"2009-04-16 13:55:52",
                              "last_login":"2009-09-17 19:32:39",
                              "status":"active",
                              "photo":"http:\/\/cdn.go2media.org\/user_content\/brand\/logos\/\/demo\/4a035b11a0a73.gif"
                          }
                      }
                  }

XML Example

Note: remove ! before using code.

                 <rsp stat="ok">
                     <Employee>
                         <id>1</id>
                         <!email>demo@hasoffers.com<!/email>
                         <first_name>Demo</first_name>
                         <last_name>Account</last_name>
                         <home_phone>555-5555</home_phone>
                         <cell_phone>555-5555</cell_phone>
                         <aim>demo@example.org</aim>
                         <title/>
                         <join_date>2009-04-16 13:55:52</join_date>
                         <last_login>2009-09-17 19:34:26</last_login>
                         <status>active</status>
                         <photo>
                             4a035b11a0a73.gif
                         </photo>
                     </Employee>
                 </rsp>

 
Email this page to a friend or co-worker