The HasOffers Affiliate API exposes many functions of the HasOffers platform to end users. By interacting directly with our API, affiliates can create and embed powerful widgets within their own applications.
Getting Your API Key
To use the API, you must have the network ID and an API key. You can get to these API setup features by going to the Tools menu and clicking on the APIs option.
Important: As with using any API, users are assumed to have a good degree of technical knowledge or have software developers able to understand and use our API. And keep your API key secure—it's essentially the password to your account from the API's perspective.
Generating Your API Key
If you've not yet generated an API key, your screen will look like this:
Create your key by clicking on the Request API Key button. If the network is set to auto-approve API key requests, the screen changes to reveal your API key; see the Retrieving Your API Key section below.
Other API Request Responses
If you don't instantly see an API key, your network has a different permission setting for the affiliate API. If you see the message "Affiliate API feature is disabled", your network doesn't allow affiliate to use the API.
Your network might instead manually authorize affiliates, rather than automatically approve them. If that's the case, you'll receive this message:
If your request is approved, your API key is found on this same page. See the following section.
Retrieving Your API Key
Whether you just generated your API key, requested an API key and had the request approved, or generated one in the past and need to retrieve it, go to the API page as above. The page will now show your API key along with the network ID; you need both of these to access the API.
Generating a Replacement API Key
If you need to generate a replacement API key for any reason, click on the Invalidate and Request A New Key button.
Making an API Request
Sample API Request
https://NETWORKID.api.hasoffers.com/Apiv3/json?Target=Affiliate_Affiliate&Method=getAccountManager&api_key=MY_API_KEY
Sample API Response
{ "request": { ...collapsed JSON data }, "response": { "status": 1, "httpStatus": 200, "data": { "id": "1", "first_name": "John", "last_name": "Doe", "title": "Affiliate Manager" }, "errors": [], "errorMessage": null } }