Getting Started

Generating API Keys

Calling API Functions

JSON or XML

API Call Rate Limits

Affiliate Accounts

Functions

Types

Merchant Accounts

Functions

Types

Calling API Functions

While the Commission Factory API exposes a wide range of functionality, every function call follows the same basic pattern.


REST Web Service

The Commission Factory API is a REST web service.

Calling a function involves making a web request to the server, and then interpreting the response. Each function description page within this documentation outlines the purpose of the function, any parameters it expects, and the response that you can expect in return.

For example, the GET Banners Function for affiliate accounts has the following syntax (optional parameters have been removed for brevity):

GET https://api.commissionfactory.com/V1/Affiliate/Banners?apiKey=[apiKey]

Assuming an example API key of "ABC123", you could call the function like this:

GET /V1/Affiliate/Banners?apiKey=ABC123 HTTP/1.1
Host: api.commissionfactory.com

And you could expect a response like this:

HTTP/1.1 200 OK
Content-Length: 1954
Content-Type: application/json; charset=utf-8

[{"Id":1,"DateCreated":"2000-01-01T00:00:00.000","DateModified":"2000-01-01T00:00:00.000","MerchantId":1,"MerchantName":"Example Pty Ltd","MerchantAvatarUrl":"https://c.cfjump.com/Avatars/0.png","GroupName":" Default Group","Name":"Banner 1","TargetUrl":"https://www.example.com/","Size":"Full Banner","Width":468,"Height":60,"ImageUrl":"https://t.cfjump.com/a/1/1","AltText":"Example Pty Ltd Banner","TrackingUrl":"https://t.cfjump.com/0/b/1","TrackingCode":"<a href=\"https://t.cfjump.com/0/b/1\" rel=\"noindex,nofollow\"><img style=\"border: none; vertical-align: middle;\" alt=\"Example Pty Ltd Banner\" src=\"https://t.cfjump.com/a/1/1\" /></a>"},{"Id":2,"DateCreated":"2000-01-01T00:00:00.000","DateModified":"2000-01-01T00:00:00.000","MerchantId":1,"MerchantName":"Example Pty Ltd","MerchantAvatarUrl":"https://c.cfjump.com/Avatars/0.png","GroupName":" Default Group","Name":"Banner 2","TargetUrl":"https://www.example.com/","Size":"Full Banner","Width":468,"Height":60,"ImageUrl":"https://t.cfjump.com/a/1/2","AltText":"Example Pty Ltd Banner","TrackingUrl":"https://t.cfjump.com/0/b/2","TrackingCode":"<a href=\"https://t.cfjump.com/0/b/2\" rel=\"noindex,nofollow\"><img style=\"border: none; vertical-align: middle;\" alt=\"Example Pty Ltd Banner\" src=\"https://t.cfjump.com/a/1/2\" /></a>"},{"Id":3,"DateCreated":"2000-01-01T00:00:00.000","DateModified":"2000-01-01T00:00:00.000","MerchantId":1,"MerchantName":"Example Pty Ltd","MerchantAvatarUrl":"https://c.cfjump.com/Avatars/0.png","GroupName":" Default Group","Name":"Banner 3","TargetUrl":"https://www.example.com/","Size":"Full Banner","Width":468,"Height":60,"ImageUrl":"https://t.cfjump.com/a/1/3","AltText":"Example Pty Ltd Banner","TrackingUrl":"https://t.cfjump.com/0/b/3","TrackingCode":"<a href=\"https://t.cfjump.com/0/b/3\" rel=\"noindex,nofollow\"><img style=\"border: none; vertical-align: middle;\" alt=\"Example Pty Ltd Banner\" src=\"https://t.cfjump.com/a/1/3\" /></a>"}]

The name of each function indicates which HTTP verb to use (i.e. "GET"), the full URL to send your request to, and the response you can expect.