Getting Started

Generating API Keys

Calling API Functions

JSON or XML

API Call Rate Limits

Affiliate Accounts

Functions

Types

Merchant Accounts

Functions

Types

GET Promotions/[id] Function

Retrieves a single promotion by its ID.


Syntax

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

Parameters

Name Type Description
id
Required
Integer The ID of a single promotion to retrieve.
apiKey
Required
String A valid API key that represents an affiliate account.
targetUrl
Optional
String If specified, A valid URL that must begin with the merchant’s default campaign URL. More Info
uniqueId
Optional
String If specified, a unique ID to add to the tracking link. More Info

Return Value

Type Description
Promotion Represents a single promotion.

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.
404 Not Found The requested item could not be found.
500 Internal Server Error An unexpected error occured while processing your request.
503 Service Unavailable The API call rate limit for the user account has been exceeded.
NOTE: As of 2019-02-01, the response from the server will change:
429 Too Many Requests

JSON XML

Example

Request

GET /V1/Affiliate/Promotions/1?apiKey=ABC123 HTTP/1.1
Accept: application/json
Host: api.commissionfactory.com
GET /V1/Affiliate/Promotions/1?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",
    "MerchantId": 1,
    "MerchantName": "Example Pty Ltd",
    "MerchantAvatarUrl": "https://c.cfjump.com/Avatars/0.png",
    "Description": "Free shipping for July",
    "TargetUrl": "https://www.example.com/",
    "TermsAndConditions": "Cannot be combined with any other offer.",
    "StartDate": null,
    "EndDate": null,
    "TrackingUrl": "https://t.cfjump.com/0/o/1",
    "TrackingCode": "<a href=\"https://t.cfjump.com/0/o/1\" rel=\"noindex,nofollow\">Free shipping for July</a>"
}
<Promotion xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://api.commissionfactory.com/V1/Affiliate">
    <Id>1</Id>
    <DateCreated>2000-01-01T00:00:00.000</DateCreated>
    <DateModified>2000-01-01T00:00:00.000</DateModified>
    <MerchantId>1</MerchantId>
    <MerchantName>Example Pty Ltd</MerchantName>
    <MerchantAvatarUrl>https://c.cfjump.com/Avatars/0.png</MerchantAvatarUrl>
    <Description>Free shipping for July</Description>
    <TargetUrl>https://www.example.com/</TargetUrl>
    <TermsAndConditions>Cannot be combined with any other offer.</TermsAndConditions>
    <StartDate>null</StartDate>
    <EndDate>null</EndDate>
    <TrackingUrl>https://t.cfjump.com/0/o/1</TrackingUrl>
    <TrackingCode>&lt;a href="https://t.cfjump.com/0/o/1" rel="noindex,nofollow"&gt;Free shipping for July&lt;/a&gt;</TrackingCode>
</Promotion>

Related Links