Getting Started

Generating API Keys

Calling API Functions

JSON or XML

API Call Rate Limits

Affiliate Accounts

Functions

Types

Merchant Accounts

Functions

Types

GET Affiliates Function

Retrieves an array of affiliates, optionally filtered by one or more properties.


Syntax

GET https://api.commissionfactory.com/V1/Merchant/Affiliates?apiKey=[apiKey]&status=[status]

Parameters

Name Type Description
apiKey
Required
String A valid API key that represents a merchant account.
status
Optional
AffiliateStatus If specified, filters results by status.

Return Value

Type Description
AffiliateArray Represents zero or more affiliates.

Errors

Error Description
400 Bad Request One or more parameters could not be parsed correctly.
401 Unauthorised The API key is missing, invalid, or for a different account type; or the user account has been suspended or closed.
429 Too Many Requests The API call rate limit for the user account has been exceeded.
500 Internal Server Error An unexpected error occurred while processing your request.

Remarks

If you use the GET Affiliates function to retrieve multiple affiliates, then the TrafficSources property of each Affiliate object will be NULL.

If you use the GET Affiliates/[id] function to retrieve a single affiliate, then the TrafficSources property will contain a TrafficSourceArray object.

JSON XML

Example

Request

GET /V1/Merchant/Affiliates?apiKey=ABC123 HTTP/1.1
Accept: application/json
Host: api.commissionfactory.com
GET /V1/Merchant/Affiliates?apiKey=ABC123 HTTP/1.1
Accept: application/xml
Host: api.commissionfactory.com

Response

[
    {
        "Id": 1,
        "DateCreated": "2000-01-01T00:00:00.000",
        "DateModified": "2000-01-01T00:00:00.000",
        "DateApplied": "2000-01-01T00:00:00.000",
        "DateApproved": "2000-01-01T00:00:00.000",
        "ContactName": "John Smith",
        "BusinessName": "Example Pty Ltd",
        "Status": "Approved",
        "TrafficSources": null
    },
    {
        "Id": 2,
        "DateCreated": "2000-01-01T00:00:00.000",
        "DateModified": "2000-01-01T00:00:00.000",
        "DateApplied": "2000-01-01T00:00:00.000",
        "DateApproved": "2000-01-01T00:00:00.000",
        "ContactName": "Jane Doe",
        "BusinessName": "Sample Pty Ltd",
        "Status": "Approved",
        "TrafficSources": null
    },
    {
        "Id": 3,
        "DateCreated": "2000-01-01T00:00:00.000",
        "DateModified": "2000-01-01T00:00:00.000",
        "DateApplied": "2000-01-01T00:00:00.000",
        "DateApproved": null,
        "ContactName": "John Citizen",
        "BusinessName": null,
        "Status": "Pending",
        "TrafficSources": null
    }
]
<AffiliateArray xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://api.commissionfactory.com/V1/Merchant">
    <Affiliate>
        <Id>1</Id>
        <DateCreated>2000-01-01T00:00:00.000</DateCreated>
        <DateModified>2000-01-01T00:00:00.000</DateModified>
        <DateApplied>2000-01-01T00:00:00.000</DateApplied>
        <DateApproved>2000-01-01T00:00:00.000</DateApproved>
        <ContactName>John Smith</ContactName>
        <BusinessName>Example Pty Ltd</BusinessName>
        <Status>Approved</Status>
        <TrafficSources i:nil="true" />
    </Affiliate>
    <Affiliate>
        <Id>2</Id>
        <DateCreated>2000-01-01T00:00:00.000</DateCreated>
        <DateModified>2000-01-01T00:00:00.000</DateModified>
        <DateApplied>2000-01-01T00:00:00.000</DateApplied>
        <DateApproved>2000-01-01T00:00:00.000</DateApproved>
        <ContactName>Jane Doe</ContactName>
        <BusinessName>Sample Pty Ltd</BusinessName>
        <Status>Approved</Status>
        <TrafficSources i:nil="true" />
    </Affiliate>
    <Affiliate>
        <Id>3</Id>
        <DateCreated>2000-01-01T00:00:00.000</DateCreated>
        <DateModified>2000-01-01T00:00:00.000</DateModified>
        <DateApplied>2000-01-01T00:00:00.000</DateApplied>
        <DateApproved i:nil="true" />
        <ContactName>John Citizen</ContactName>
        <BusinessName i:nil="true" />
        <Status>Pending</Status>
        <TrafficSources i:nil="true" />
    </Affiliate>
<AffiliateArray>

Related Links