Read the endpoint documentation below for information on the data available through the API.

Categories
Categories Subscriptions Brands Reward Plans Payment Methods New Affiliate Terms of Service

Categories

Returns an array of Publish Point category objects that define the general topic of an affiliate's Publish Point. The selected category ID is required as the PublishPointCategory in the New Affiliate call.

The endpoint applies to the organisation identified by the {OrganisationID} parameter.

Authentication
  • This endpoint requires the APIKey in the header. Refer to the Authentication section for more information.
  • The OrganisationID does not change and can be reused once obtained.
  • The BrandId does not change and can be reused once obtained.
EnvironmentVerbExample URL
StagingGEThttps://api-gatencp.netrefer.com/v3/org/{OrganisationID}/categories
ProductionGEThttps://api-gate.netrefer.com/v3/org/{OrganisationID}/categories

A successful call returns an array of Category items:

Table
FieldTypeUsageExample
IDNumberUnique ID for the category. Used as the PublishPointCategory in the SignUp call when the category is selected.4
NameStringName of the category.“Sports - Soccer”
JSON
{
  "ID": 4,
  "Name": "Sports - Soccer"
}

Subscriptions

Returns an array of SubscriptionDetails objects representing the organisations available to the current user.

EnvironmentVerbExample URL
StagingGEThttps://api-gatencp.netrefer.com/v3/subscriptions
ProductionGEThttps://api-gate.netrefer.com/v3/subscriptions

A successful call returns an array of SubscriptionDetails objects:

Table
FieldTypeUsageExample
SubscriptionIDstring (GUID)The OrganisationID required to use the API.d937648e-6fd7-45b3-a38d-be5fe4f88ec
SubscriptionNamestringName of the subscription. Used for reference only and not required by the API.Subscription 1
JSON
{
  "subscriptionID": "d937648e-6fd7-45b3-a38d-be5fe4f88ec",
  "SubscriptionName": "Subscription 1"
}

Brands

Returns an array of Brand objects representing the brands supported by the organisation.

EnvironmentVerbExample URL
StagingGEThttps://api-gatencp.netrefer.com/v3/org/{OrganisationID}/brands
ProductionGEThttps://api-gate.netrefer.com/v3/org/{OrganisationID}/brands

A successful call returns an array of Brand items:

Table
FieldTypeUsageExample
IDNumberUnique ID for the brand. Used as the BrandID in the SignUp call when the brand is selected.2
NameStringName of the brand, which can be displayed to the registrant during registration.“LlamaCasino”
JSON
Brands
{
  "ID": 2,
  "Name": "LlamaCasino"
}

Reward Plans

Returns a list of Reward Plans that are visible and available during registration. The registrant can select a Reward Plan, which is passed in the main SignUp call as the CommissionPlanID property.

EnvironmentVerbExample URL
StagingGEThttps://api-gatencp.netrefer.com/v3/org/{OrganisationID}/rewardplans
ProductionGEThttps://api-gate.netrefer.com/v3/org/{OrganisationID}/rewardplans

A successful call returns a list of Reward Plans.

Table
FieldTypeUsageExample
IDNumberUnique ID for the Reward Plan. Used as the CommissionPlanID in the SignUp call when the plan is selected.75
NameStringName of the Reward Plan, which can be displayed to the registrant.“Rev Share 25%”
JSON
{
  "ID": 75,
  "Name": "Rev Share 25%"
}

Payment Methods

Returns a list of available payment methods. The selected payment method is passed in the main SignUp call as the PaymentMethodID property.

Each payment method may include additional required fields. These are passed in the main SignUp call as the PaymentMethodDetails object.

EnvironmentVerbExample URL
StagingGEThttps://api-gatencp.netrefer.com/v3/org/{OrganisationID}/paymentmethods
ProductionGEThttps://api-gate.netrefer.com/v3/org/{OrganisationID}/paymentmethods

A successful call returns an array of Payment Method items:

Table
FieldTypeUsageExample
IDNumberUnique ID for the payment method.7
NameStringName of the payment method.“Bank Wire Transfer”
CodeStringPayment method code.“dd”
FieldsArrayAdditional fields required by the payment method.See JSON example
JSON
Payment Method
{
  "ID": 7,
  "Name": "Bank Wire Transfer",
  "Code": "dd",
  "Fields": [
    {
      "ID": 1,
      "Name": "Bank Name",
      "Required": true
    },
    {
      "ID": 2,
      "Name": "Other Bank Name",
      "Required": false
    }
  ]
}

Worked Example - Using the Payment Method Details

IDs and field requirements may differ depending on your system.

In this example, the registrant selects “Skrill (Money Bookers)” as their payment method. The payment method has an ID of 6 and requires the following field:

IDNameRequired
10Skrill (MoneyBookers) EmailYes

The required field is completed by the registrant and included in the SignUp API call using the following structure:

Code Example
{
  ...
  "PaymentMethodID": 6, //This is the ID of the chosen Payment Method
  "PaymentMethodDetails": [
    {
      "ID": 10,
      "Value": "test.affiliate@example.com" //This is the value of the field that the registrant filled in
    }
    //If we had any more fields, we would insert them here
  ]
}

New Affiliate

The New Affiliate endpoint registers a new affiliate. Depending on the system configuration, it may also send confirmation or welcome emails.

The POST method accepts the affiliate details in JSON format within the request body. Some fields require IDs retrieved from the other endpoints described above.

EnvironmentVerbExample URL
StagingPOSThttps://api-gatencp.netrefer.com/v3/org/{OrganisationID}/signup/newAffiliate
ProductionPOSThttps://api-gate.netrefer.com/v3/org/{OrganisationID}/signup/newAffiliate
Table
FieldTypeUsageExample
SecurityAnswerStringAnswer to the selected security question.“daisy”
SecurityQuestionIDNumberID of the selected security question. Leave null if not required.10
NameString *Name of the affiliate company.“Llama Affiliates”
TitleStringAffiliate title.“HRH”
FirstNameStringAffiliate first name.“David”
SurnameStringAffiliate surname.“Tenant”
UserNameString *Username used by the affiliate to log in to the portal.“laff_user”
PasswordString *Password used by the affiliate to log in. May be subject to length and composition requirements.“secretPassword1123!”
UserTypeIDNumberDefaults to 1.1
IDNumberStringAffiliate ID number.“42601F”
Address1StringFirst address field.“NetRefer”
Address2StringSecond address field.“High Street”
CityStringCity.“Valletta”
CountryString *Three-letter ISO country code for the affiliate's country.“MLT”
StateStringState or region.“Malta”
ZipStringZIP or postal code for the affiliate's address.“ADD 0123”
CurrencyStringAffiliate currency in ISO 4217 format.“EUR”
MessengerStringMessenger address.“tr.dis@example.com”
SkypeStringSkype handle.“tr.dis@example.com”
EmailString *Affiliate email address.“llamaffiliates@example.com”
TelephoneString *Affiliate telephone number.“123456789”
TelephoneDialCodeString *Three-letter ISO country code used to determine the dialling code prepended to the telephone number.“GBR”
FaxStringAffiliate fax number.“123456789”
FaxDialCodeStringThree-letter ISO country code used to determine the dialling code preceding the fax number.“GBR”
UserLanguageString *Two-letter ISO language code for the affiliate's language.“en”
PublishPointNameString *Name of the Publish Point, such as the affiliate's website.“Camelid Racing Secrets”
PublishPointLanguageString *Two-letter ISO language code for the Publish Point.“en”
PublishPointCategoryNumber *Publish Point Category ID retrieved from GET /categories.5
PublishPointTypeNumberPublish Point Type, such as website or blog post. Defaults to Website if not supplied.1
URLString *URL of the affiliate's website.“www.example.com/sports”
ParentAffiliateIDNumber
ReceivePromotionsBooleanIndicates whether the affiliate has consented to receive promotional messages.true
BrandIDNumber *Brand ID under which the affiliate will be registered. Retrieve available IDs using GET /brands.5
CommissionPlanIDNumberReward Plan ID for the affiliate. If not supplied, the default plan configured in the system is used. Retrieve available IDs using GET /rewardPlans.2
PaymentMethodIDNumber *Payment Method ID retrieved from GET /paymentMethods.10
PayeeNameString *Name of the entity receiving payments.“D. Tenant”
PaymentMethodDetailsObject *Additional fields required by the selected Payment Method. Retrieve the required fields using GET /paymentMethods.
TaxRegistrationNumberStringAffiliate tax registration number.“C12345618232”
CompanyRegistrationNumberStringAffiliate company registration number.“C123456”
RegisteredForTaxBooleanIndicates whether the affiliate is registered for tax.true
TaxCountryString *Country where the affiliate is registered for tax, in ISO ALPHA-3 format. Required if the affiliate is registered for tax.“GBR”
TosDocumentGuidStringUnique identifier for the Terms of Service accepted by the affiliate. Retrieve this using the /TermsOfService endpoint.“b1296ad7-a57b-41a8-9f35-1098bf7477c4”
AcceptTosBooleanIndicates whether the affiliate has accepted the Terms of Service identified by TosDocumentGuid. If TosDocumentGuid is supplied, this value must be true.true

Payment Method Detail Object Fields

FieldTypeUsageExample
IDNumber *Payment Method Detail ID retrieved from GET /paymentMethods.57
ValueString *Value of the Payment Method Detail.“test.affiliate@example.com”
JSON
NewAffiliate Model
{
  "SecurityAnswer": "daisy",
  "SecurityQuestionID": 10,
  "Address1": "NetRefer",
  "Address2": "High Street",
  "BrandID": 5,
  "City": "Valletta",
  "CommissionPlanID": 2,
  "Country": "MLT",
  "Currency": "EUR",
  "Email": "llamaffiliates@example.com",
  "Fax": "string",
  "FaxDialCode": "string",
  "FirstName": "David",
  "HasAdminFees": false,
  "IDNumber": "42601F",
  "Messenger": "tr.dis@example.com",
  "Name": "llamAffiliates",
  "ReceivePromotions": true,
  "Skype": "tr.dis@example.com",
  "State": "Malta",
  "Surname": "Tenant",
  "Telephone": "123456789",
  "TelephoneDialCode": "GBP",
  "Title": "HRH",
  "Zip": "ADD123",
  "PublishPointLanguage": "en",
  "PublishPointName": "Camelid Racing Secrets",
  "PublishPointCategory": 5,
  "PublishPointType": 1,
  "URL": "www.example.com/sports",
  "UserLanguage": "en",
  "Password": "secretPassword1123!",
  "Position": "string",
  "UserName": "laff",
  "UserTypeID": 1,
  "PaymentMethodID": 10,
  "PayeeName": "D. Tennant",
  "PaymentMethodDetails": [
    {
      "ID": 57,
      "Value": "test.affiliate@example.com"
    }
  ],
  "TaxRegistrationNumber": "C12345618232",
  "CompanyRegistrationNumber": "C123456",
  "RegisteredForTax": true,
  "TaxCountry": "GBR",
  "TosDocumentGuid": "b1296ad7-a57b-41a8-9f35-1098bf7477c4",
  "AcceptTos": true
}

Terms of Service

The Terms of Service endpoint returns the Terms of Service that the registrant must accept. The BrandID and LanguageCode must be supplied to retrieve the applicable Terms of Service.

If Terms of Service are not available for the specified language, the default Terms of Service are returned

If Terms of Service have not been configured, the endpoint returns a 404 Not Found response.

When the registrant accepts the Terms of Service, the Terms of Service identifier must be included in the New Affiliate call as TosDocumentGuid.

EnvironmentVerbExample URL
StagingGEThttps://api-gatencp.netrefer.com/v3/org/{OrganisationID}/TermsOfService/{BrandID}/{LanguageCode}
ProductionGEThttps://api-gate.netrefer.com/v3/org/{OrganisationID}/TermsOfService/{BrandID}/{LanguageCode}

A successful call returns the Terms of Service to display to the registrant and the identifier required for the New Affiliate call.

Table
FieldTypeUsageExample
ToSIDString (GUID)Unique ID for the Terms of Service. Used as the TosDocumentGuid in the SignUp call.b1296ad7-a57b-41a8-9f35-1098bf7477c4
ContentStringTerms of Service content that the registrant must accept.“Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua [...]”
JSON
{
  "ToSID": "b1296ad7-a57b-41a8-9f35-1098bf7477c4",
  "Content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua [...]"
}