Getting Started

Generating API Keys

Calling API Functions

JSON or XML

API Call Rate Limits

Affiliate Accounts

Functions

Types

Merchant Accounts

Functions

Types

GET Transactions Function

Retrieves an array of transactions for a specified date range, optionally filtered by one or more properties.


Syntax

GET https://api.commissionfactory.com/V1/Affiliate/Transactions?apiKey=[apiKey]&fromDate=[fromDate]&toDate=[toDate]&dateProperty=[dateProperty]&merchantId=[merchantId]&merchantName=[merchantName]&trafficType=[trafficType]&trafficSource=[trafficSource]&creativeType=[creativeType]&creativeId=[creativeId]&creativeName=[creativeName]&customerCountryCode=[customerCountryCode]&customerCountryName=[customerCountryName]&customerType=[customerType]&orderId=[orderId]&uniqueId=[uniqueId]&uniqueId2=[uniqueId2]&uniqueId3=[uniqueId3]&uniqueId4=[uniqueId4]&trackingMethod=[trackingMethod]&trafficSourceApproved=[trafficSourceApproved]&status=[status]&status2=[status2]&invoiceId=[invoiceId]&voidReason=[voidReason]

Parameters

Name Type Description
apiKey
Required
String A valid API key that represents an affiliate account.
fromDate
Required
DateTime The start date of the date range to select.
toDate
Required
DateTime The end date of the date range to select.
dateProperty
Optional
String Specifies which property is queried by the "fromDate" and "toDate" parameters. Can be either "DateCreated" or "DateModified". The default is "DateCreated".
merchantId
Optional
Integer If specified, filters results by merchant ID.
merchantName
Optional
String If specified, filters results by merchant name.
trafficType
Optional
TrafficType If specified, filters results by traffic source type.
trafficSource
Optional
String If specified, filters results by traffic source.
creativeType
Optional
CreativeType If specified, filters results by creative type.
creativeId
Optional
Integer If specified, filters results by creative ID.
creativeName
Optional
String If specified, filters results by creative name.
customerCountryCode
Optional
String If specified, filters results by customer country code.
customerCountryName
Optional
String If specified, filters results by customer country name.
customerType
Optional
CustomerType If specified, filters results by customer type.
orderId
Optional
String If specified, filters results by order ID.
uniqueId
Optional
String If specified, filters results by unique ID.
uniqueId2
Optional
String If specified, filters results by unique ID 2.
uniqueId3
Optional
String If specified, filters results by unique ID 3.
uniqueId4
Optional
String If specified, filters results by unique ID 4.
trackingMethod
Optional
TrackingMethod If specified, filters results by tracking method.
trafficSourceApproved
Optional
Boolean If specified, filters results by the traffic source approved flag.
status
Optional
TransactionStatus If specified, filters results by status. This property is deprecated, as it does not include the full range of possible transaction statuses. Please see the status2 parameter.
status2
Optional
TransactionStatus2 If specified, filters results by status.
invoiceId
Optional
Integer If specified, filters results by invoice ID.
voidReason
Optional
TransactionVoidReason If specified, filters results by void reason.
amendedReason
Optional
TransactionAmendedReason The reason that the transaction was amended.

Return Value

Type Description
TransactionArray Represents zero or more transactions.

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

The selected date range is inclusive of the fromDate and toDate parameters.

Both parameters are truncated so that only their date components are used, and their time components (if present) are ignored.

If fromDate is greater than toDate, then the parameters are swapped.

JSON XML

Example

Request

GET /V1/Affiliate/Transactions?apiKey=ABC123&fromDate=2000-01-01&toDate=2000-01-03 HTTP/1.1
Accept: application/json
Host: api.commissionfactory.com
GET /V1/Affiliate/Transactions?apiKey=ABC123&fromDate=2000-01-01&toDate=2000-01-03 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",
        "TrafficType": "Website",
        "TrafficSource": "https://www.example.com/",
        "CreativeType": "Text Link",
        "CreativeId": null,
        "CreativeName": null,
        "CustomerCountryCode": "AUS",
        "CustomerCountryName": "Australia",
        "CustomerType": "New",
        "OrderId": "T0001",
        "AdditionalNotes": null,
        "UniqueId": null,
        "UniqueId2": null,
        "UniqueId3": null,
        "UniqueId4": null,
        "TrackingMethod": "Cookie",
        "SaleValue": 100.0000,
        "Commission": 10.0000,
        "ReportedCurrencyCode": "AUD",
        "ReportedCurrencyName": "Australian Dollar",
        "ReportedSaleValue": 100.0000,
        "TrafficSourceApproved": true,
        "Status": "Approved",
        "Status2": "Paid",
        "InvoiceId": 12345,
        "Paid": true,
        "VoidReason": null,
        "AmendedReason": null,
        "CouponCode": "FREE101",
        "Items": [
            {
                "Sku": "P0001",
                "Quantity": 1,
                "ReportedSaleValue": 50.00,
                "SaleValue": 50.00,
                "Commission": 5.00,
                "Name": "Example Product 1",
                "Brand": "Example Brand 1",
                "Category": "Clothing"
            },
            {
                "Sku": "P0002",
                "Quantity": 1,
                "ReportedSaleValue": 25.00,
                "SaleValue": 25.00,
                "Commission": 2.50,
                "Name": "Example Product 2",
                "Brand": "Example Brand 1",
                "Category": "Shoes"
            },
            {
                "Sku": "P0003",
                "Quantity": 1,
                "ReportedSaleValue": 25.00,
                "SaleValue": 25.00,
                "Commission": 2.50,
                "Name": "Example Product 3",
                "Brand": "Example Brand 2",
                "Category": "Jewellery"
            }
        ]
    },
    {
        "Id": 2,
        "DateCreated": "2000-01-02T00:00:00.000",
        "DateModified": "2000-01-02T00:00:00.000",
        "MerchantId": 1,
        "MerchantName": "Example Pty Ltd",
        "MerchantAvatarUrl": "https://c.cfjump.com/Avatars/0.png",
        "TrafficType": "Website",
        "TrafficSource": "https://www.example.com/",
        "CreativeType": "Text Link",
        "CreativeId": null,
        "CreativeName": null,
        "CustomerCountryCode": "AUS",
        "CustomerCountryName": "Australia",
        "CustomerType": "Return",
        "OrderId": "T0002",
        "AdditionalNotes": null,
        "UniqueId": null,
        "UniqueId2": null,
        "UniqueId3": null,
        "UniqueId4": null,
        "TrackingMethod": "Cookie",
        "SaleValue": 100.0000,
        "Commission": 10.0000,
        "ReportedCurrencyCode": "AUD",
        "ReportedCurrencyName": "Australian Dollar",
        "ReportedSaleValue": 100.0000,
        "TrafficSourceApproved": true,
        "Status": "Pending",
        "Status2": "Pending",
        "InvoiceId": null,
        "Paid": null,
        "VoidReason": null,
        "AmendedReason": "Partial Order Return",
        "CouponCode": "FREE101",
        "Items": [ ]
    },
    {
        "Id": 3,
        "DateCreated": "2000-01-03T00:00:00.000",
        "DateModified": "2000-01-03T00:00:00.000",
        "MerchantId": 3,
        "MerchantName": "Example Pty Ltd",
        "MerchantAvatarUrl": "https://c.cfjump.com/Avatars/0.png",
        "TrafficType": "Website",
        "TrafficSource": "https://www.example.com/",
        "CreativeType": "Text Link",
        "CreativeId": null,
        "CreativeName": null,
        "CustomerCountryCode": "AUS",
        "CustomerCountryName": "Australia",
        "CustomerType": "New",
        "OrderId": "T0003",
        "AdditionalNotes": null,
        "UniqueId": null,
        "UniqueId2": null,
        "UniqueId3": null,
        "UniqueId4": null,
        "TrackingMethod": "Cookie",
        "SaleValue": 100.0000,
        "Commission": 10.0000,
        "ReportedCurrencyCode": "AUD",
        "ReportedCurrencyName": "Australian Dollar",
        "ReportedSaleValue": 100.0000,
        "TrafficSourceApproved": true,
        "Status": "Void",
        "Status2": "Void",
        "InvoiceId": null,
        "Paid": null,
        "VoidReason": "Cancelled Order",
        "AmendedReason": null,
        "CouponCode": null,
        "Items": [
            {
                "Sku": "P0001",
                "Quantity": 1,
                "ReportedSaleValue": 50.00,
                "SaleValue": 50.00,
                "Commission": 5.00,
                "Name": "Example Product 1",
                "Brand": "Example Brand 1",
                "Category": "Clothing"
            },
            {
                "Sku": "P0002",
                "Quantity": 1,
                "ReportedSaleValue": 25.00,
                "SaleValue": 25.00,
                "Commission": 2.50,
                "Name": "Example Product 2",
                "Brand": "Example Brand 1",
                "Category": "Shoes"
            },
            {
                "Sku": "P0003",
                "Quantity": 1,
                "ReportedSaleValue": 25.00,
                "SaleValue": 25.00,
                "Commission": 2.50,
                "Name": "Example Product 3",
                "Brand": "Example Brand 2",
                "Category": "Jewellery"
            }
        ]
    }
]
<TransactionArray xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://api.commissionfactory.com/V1/Affiliate">
    <Transaction>
        <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>
        <TrafficType>Website</TrafficType>
        <TrafficSource>https://www.example.com/</TrafficSource>
        <CreativeType>Text Link</CreativeType>
        <CreativeId i:nil="true" />
        <CreativeName i:nil="true" />
        <CustomerCountryCode>AUS</CustomerCountryCode>
        <CustomerCountryName>Australia</CustomerCountryName>
        <CustomerType>New</CustomerType>
        <OrderId>T0001</OrderId>
        <AdditionalNotes i:nil="true" />
        <UniqueId i:nil="true" />
        <UniqueId2 i:nil="true" />
        <UniqueId3 i:nil="true" />
        <UniqueId4 i:nil="true" />
        <TrackingMethod>Cookie</TrackingMethod>
        <SaleValue>100.0000</SaleValue>
        <Commission>10.0000</Commission>
        <ReportedCurrencyCode>AUD</ReportedCurrencyCode>
        <ReportedCurrencyName>Australian Dollar</ReportedCurrencyName>
        <ReportedSaleValue>100.0000</ReportedSaleValue>
        <TrafficSourceApproved>true</TrafficSourceApproved>
        <Status>Approved</Status>
        <Status2>Paid</Status2>
        <InvoiceId>12345</InvoiceId>
        <Paid>true</Paid>
        <VoidReason i:nil="true" />
        <AmendedReason i:nil="true" />
        <CouponCode>FREE101</CouponCode>
        <Items>
            <TransactionItem>
                <Sku>P0001<Sku>
                <Quantity>1<Quantity>
                <ReportedSaleValue>50.00<ReportedSaleValue>
                <SaleValue>50.00<SaleValue>
                <Commission>5.00<Commission>
                <Name>Example Product 1<Name>
                <Brand>Example Brand 1<Brand>
                <Category>Clothing<Category>
            </TransactionItem>
            <TransactionItem>
                <Sku>P0002<Sku>
                <Quantity>1<Quantity>
                <ReportedSaleValue>25.00<ReportedSaleValue>
                <SaleValue>25.00<SaleValue>
                <Commission>2.50<Commission>
                <Name>Example Product 2<Name>
                <Brand>Example Brand 1<Brand>
                <Category>Shoes<Category>
            </TransactionItem>
            <TransactionItem>
                <Sku>P0003<Sku>
                <Quantity>1<Quantity>
                <ReportedSaleValue>25.00<ReportedSaleValue>
                <SaleValue>25.00<SaleValue>
                <Commission>2.50<Commission>
                <Name>Example Product 3<Name>
                <Brand>Example Brand 2<Brand>
                <Category>Jewellery<Category>
            </TransactionItem>
        </Items>
    </Transaction>
    <Transaction>
        <Id>2</Id>
        <DateCreated>2000-01-02T00:00:00.000</DateCreated>
        <DateModified>2000-01-02T00:00:00.000</DateModified>
        <MerchantId>1</MerchantId>
        <MerchantName>Example Pty Ltd</MerchantName>
        <MerchantAvatarUrl>https://c.cfjump.com/Avatars/0.png</MerchantAvatarUrl>
        <TrafficType>Website</TrafficType>
        <TrafficSource>https://www.example.com/</TrafficSource>
        <CreativeType>Text Link</CreativeType>
        <CreativeId i:nil="true" />
        <CreativeName i:nil="true" />
        <CustomerCountryCode>AUS</CustomerCountryCode>
        <CustomerCountryName>Australia</CustomerCountryName>
        <CustomerType>Return</CustomerType>
        <OrderId>T0002</OrderId>
        <AdditionalNotes i:nil="true" />
        <UniqueId i:nil="true" />
        <UniqueId2 i:nil="true" />
        <UniqueId3 i:nil="true" />
        <UniqueId4 i:nil="true" />
        <TrackingMethod>Cookie</TrackingMethod>
        <SaleValue>100.0000</SaleValue>
        <Commission>10.0000</Commission>
        <ReportedCurrencyCode>AUD</ReportedCurrencyCode>
        <ReportedCurrencyName>Australian Dollar</ReportedCurrencyName>
        <ReportedSaleValue>100.0000</ReportedSaleValue>
        <TrafficSourceApproved>true</TrafficSourceApproved>
        <Status>Pending</Status>
        <Status2>Pending</Status2>
        <InvoiceId i:nil="true" />
        <Paid i:nil="true" />
        <VoidReason i:nil="true" />
        <AmendedReason>Partial Order Return</AmendedReason>
        <CouponCode>FREE101</CouponCode>
        <Items />
    </Transaction>
    <Transaction>
        <Id>3</Id>
        <DateCreated>2000-01-03T00:00:00.000</DateCreated>
        <DateModified>2000-01-03T00:00:00.000</DateModified>
        <MerchantId>3</MerchantId>
        <MerchantName>Example Pty Ltd</MerchantName>
        <MerchantAvatarUrl>https://c.cfjump.com/Avatars/0.png</MerchantAvatarUrl>
        <TrafficType>Website</TrafficType>
        <TrafficSource>https://www.example.com/</TrafficSource>
        <CreativeType>Text Link</CreativeType>
        <CreativeId i:nil="true" />
        <CreativeName i:nil="true" />
        <CustomerCountryCode>AUS</CustomerCountryCode>
        <CustomerCountryName>Australia</CustomerCountryName>
        <CustomerType>New</CustomerType>
        <OrderId>T0003</OrderId>
        <AdditionalNotes i:nil="true" />
        <UniqueId i:nil="true" />
        <UniqueId2 i:nil="true" />
        <UniqueId3 i:nil="true" />
        <UniqueId4 i:nil="true" />
        <TrackingMethod>Cookie</TrackingMethod>
        <SaleValue>100.0000</SaleValue>
        <Commission>10.0000</Commission>
        <ReportedCurrencyCode>AUD</ReportedCurrencyCode>
        <ReportedCurrencyName>Australian Dollar</ReportedCurrencyName>
        <ReportedSaleValue>100.0000</ReportedSaleValue>
        <TrafficSourceApproved>true</TrafficSourceApproved>
        <Status>Void</Status>
        <Status2>Void</Status2>
        <InvoiceId i:nil="true" />
        <Paid i:nil="true" />
        <VoidReason>Cancelled Order</VoidReason>
        <AmendedReason i:nil="true" />
        <CouponCode i:nil="true" />
        <Items>
            <TransactionItem>
                <Sku>P0001<Sku>
                <Quantity>1<Quantity>
                <ReportedSaleValue>50.00<ReportedSaleValue>
                <SaleValue>50.00<SaleValue>
                <Commission>5.00<Commission>
                <Name>Example Product 1<Name>
                <Brand>Example Brand 1<Brand>
                <Category>Clothing<Category>
            </TransactionItem>
            <TransactionItem>
                <Sku>P0002<Sku>
                <Quantity>1<Quantity>
                <ReportedSaleValue>25.00<ReportedSaleValue>
                <SaleValue>25.00<SaleValue>
                <Commission>2.50<Commission>
                <Name>Example Product 2<Name>
                <Brand>Example Brand 1<Brand>
                <Category>Shoes<Category>
            </TransactionItem>
            <TransactionItem>
                <Sku>P0003<Sku>
                <Quantity>1<Quantity>
                <ReportedSaleValue>25.00<ReportedSaleValue>
                <SaleValue>25.00<SaleValue>
                <Commission>2.50<Commission>
                <Name>Example Product 3<Name>
                <Brand>Example Brand 2<Brand>
                <Category>Jewellery<Category>
            </TransactionItem>
        </Items>
    </Transaction>
</TransactionArray>

Related Links