How To Integrate

.africa | .joburg | .durban | .capetown

API Summary

To integrate with AF Proxy you can simply call any of the below functions with your authentication information.
For more information on JSON API's please see JSON:API

Available API Calls

API Call Example

$ch = curl_init('https://afproxy.africa/client-area/clientarea.php');

$params = array(

'username' => 'MyClientUsername',
'password' => 'MyClientPassword',
'api_call' => 'GetDomainList'

);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $params);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = json_decode(curl_exec($ch),1);

curl_close($ch);

Expected Result

[

'result'     =>   1000,
'resData  =>   [

[0]   =>   [

'domain'   =>   'mydomain.africa',
'registrationdate'   =>   '21-10-2018',
'expirydate'   =>   '21-10-2019',
'status'   =>   'Active',
'nextduedate'   =>   '21-10-2019'

]

[1]   =>   [

'domain'   =>   'mydomain.joburg',
'registrationdate'   =>   '10-10-2018',
'expirydate'   =>   '10-10-2019',
'status'   =>   'Active',
'nextduedate'   =>   '10-10-2019'

]

]

]

Develpment URL & Info

Development URL: https://dev.afproxy.africa

Important:

The development url provided will only simulate calls, and check syntax's, It will not process any orders when submitting data.

API Call Information

Important:

All API calls require the username and password which links to your account to authenticate.

Expected Response:

Every API call will return a JSON encoded response with result and resData. To determine if a call was successfull check that result has a 1000 value, if it has a 1001 value, there has been an error which will be reported in resData should there have been one.

Below each call there is a list of variables returned within the resData variables.

GetDomainList

VariableRequired / OptionalDetails
usernameRequiredYour Account Username
passwordRequiredYour Account Password

Response:

Each item in the response resData array will contain:

  • domain
  • status
  • contactid

Possible Domain Statuses:

  • Pending
  • Pending Transfer
  • Active
  • Redemption
  • Expired
  • Transferred Away
  • Cancelled
  • Fraud

DomainInfo

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
domainRequiredThe Domain Name

Response:

Each item in the response resData array will contain:

  • domain
  • status
  • autorenew
  • contactid
  • nameserver1
  • nameserver2
  • nameserver3
  • nameserver4
  • nameserver5
  • registrationdate
  • expirydate

Possible Domain Statuses:

  • Pending
  • Pending Transfer
  • Active
  • Redemption
  • Expired
  • Transferred Away
  • Cancelled
  • Fraud

CreateContact

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
firstnameRequired
lastnameRequired
emailRequired
companynameOptional
address1Required
address2Optional
cityRequired
stateRequired
postcodeRequired
countryRequired2 Character ISO Country Code
phonenumberRequiredFormat: \+[1-9][0-9]{0,4}\.[1-9][0-9]{3,14}
Example: +27.824571443

Response:

The response resData array will contain:

  • ContactID

ContactUpdate

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
contactidRequiredThe Contact ID returned when creating the contact
firstnameRequired
lastnameRequired
emailRequired
companynameOptional
address1Required
address2Optional
cityRequired
stateRequired
postcodeRequired
countryRequired2 Character ISO Country Code
phonenumberRequiredFormat: \+[1-9][0-9]{0,4}\.[1-9][0-9]{3,14}
Example: +27.824571443

Response:

The response resData array will contain:

  • ContactID

ContactDelete

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
contactidRequiredThe Contact ID returned when creating the contact

Response:

The response resData array will contain:

  • ContactID

ContactInfo

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
contactidRequiredThe Contact ID returned when creating the contact

Response:

The response resData array will contain:

  • ContactID
  • name
  • email
  • phonenumber
  • address1
  • address2
  • city
  • state
  • country
  • postcode

AccountBalance

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password

Response:

The response resData array will contain:

  • balance
  • currency

RegisterDomain

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
contactidOptionalLink a contact to a domain
domainRequiredThe Domain Name
regperiodRequiredMin: 1 | Max: 10
nameserver1Required
nameserver2Required
nameserver3Optional
nameserver4Optional
nameserver5Optional
autorenewoptional1 = Enabled
0 = Disabled

Response:

The response resData will contain string "success"  or error message.

RenewDomain

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
domainRequiredThe Domain Name

Response:

The response resData will contain string "success"  or error message.

TransferDomain

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
contactidOptionalLink a contact to a domain
domainRequiredThe Domain Name
eppcodeRequiredEPP Provided By Current Registrar
nameserver1Required
nameserver2Required
nameserver3Optional
nameserver4Optional
nameserver5Optional

Response:

The response resData will contain string "success"  or error message.

UpdateNameservers

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
domainRequiredThe Domain Name
nameserver1Required
nameserver2Required
nameserver3Optional
nameserver4Optional
nameserver5Optional

Response:

The response resData will contain string "success"  or error message.

ToggleAutoRenew

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
domainRequiredThe Domain Name
autorenewRequired1 = Enabled
0 = Disabled

Response:

The response resData will contain string "success"  or error message.

CheckPremiumStatus

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
domainRequiredThe Domain Name

Response:

The response resData array will contain:

  • Premium
    • 1 = Premium Domain
    • 0 = Non-Premium Domain

RequestEPPCode

VariableRequired / OptionalAdditional Details
usernameRequiredYour Account Username
passwordRequiredYour Account Password
domainRequiredThe Domain Name

Response:

The response resData array will contain:

  • eppcode