The Real Time Commission Service is a SOAP-based (Simple Object Access Protocol) API that enables developers to request commission information as soon as the data is available within the system. Developers may specify the number of hours to look back into the data when creating the request parameters.
Refer to the following sections of this topic for more specific information.
Important: All information available at the time of the request is sent in the response. Not all advertisers report commissions on a real-time basis, which may result in the response not containing all commissions specified in the request.
Note: Refer to https://rtpubcommission.api.cj.com for the most recent version of the Real Time Commission Report Service WSDL. The WSDL provides all the programmatic information you need to use this API. The hand-edited version provides the information in a readable format; however, to ensure maximum compatibility with the system, use the AXIS version when developing your application.
Refer to the following table for a list of the required and optional request parameters. All parameter names and values are case sensitive.
|
Parameter Name |
Value |
Req? |
Description |
|
developerKey |
String |
Required |
Your developer key obtained from the Web Services Developer Site. |
|
websiteIds |
Long |
Optional |
Limits the results to a particular Web site or set of Web Sites. You may enter a single Web site ID or multiple Web site IDs separated by commas. Leaving this field blank or specifying 'all' returns results for all websites associated with your account. Note: Entering a Web site ID not associated with your publisher account returns an error. |
|
lookBackXHours |
Integer |
Required |
The number of hours (value of 1 &endash; 8) you wish to look back into data. For example, specifying a value of 4 returns all commissions which occurred and recorded in the system within the past 4 hours. |
|
advertiserIds |
Long |
Optional |
Limits the results to a set of particular advertisers (CIDs) using one of the following four values.
|
|
countries |
String |
Optional |
Limits the results to the country from where the commissions originated. You may enter a single ISO country code or multiple ISO country codes separated by commas. Leaving this field blank or specifying 'all' returns results for all countries. |
|
adIds |
Long |
Optional |
Limits the results to the ID for a specific ad. You may enter a single Ad ID or multiple Ad IDs separated by commas. Leaving this field blank or specifying 'all' returns results for all Ad IDs. |
|
includeDetails |
String |
Optional |
Specifies whether to include item details for each commission by providing one of the following values.
If you do not provide a value for this parameter, the default value is false. |
|
sortBy |
String |
Optional |
Sort the results by any of the following response fields.
|
|
sortOrder |
String |
Optional |
Specifies the order in which the results are sorted if a value has been entered in the sortBy parameter; the following vales are acceptable.
Note: Leaving the sortOrder blank returns the records in ascending order. |
The response includes information about the general response, as well as specific information for each record in the response. All parameter names and values are case sensitive.
The response includes the following information about the overall set of results in the response.
|
Field Name |
Value |
Description |
|
adId |
Long |
The associated ad identification number. |
|
advertiserId |
Long |
The associated advertiser's identification number. |
|
advertiserName |
String |
The associated advertiser's program name. |
|
commissionAmount |
Float |
The associated publisher commission amount. |
|
country |
String |
The country where the associated transaction occurred. |
|
details |
Array |
The details of the price and commission amount for each item that comprises the associated sale. The field only displays for commissions whose corresponding sale contains multiple items. |
|
eventDate |
Date |
The associated event date for the item. |
|
saleAmount |
Float |
The associated advertiser sale amount. |
|
sId |
Long |
The associated publisher surfer identification number. |
|
websiteId |
Long |
The associated publisher Web site identification number. |
The response includes the following fields for each commission where multiple items recorded in the corresponding sale.
|
Field Name |
Value |
Description |
|
amount |
Float |
The monetary amount, in USD, associated with the specific item in the transaction. |
|
commission |
Float |
The corresponding commission earned on the associated item. |
|
quantity |
Integer |
The quantity of the specific item for the associated transaction. |
|
sku |
String |
The SKU number of the associated item. |
|
Error |
Description |
|
Not Authenticated |
The system could not authenticate your developer key. |
|
Website specified does not match your account |
You entered a websiteId that does not correspond to your publisher account. |
|
Invalid lookBackXHours parameter: 10. it should be between 1 and 8 |
You entered an invalid number for the lookBackXHours parameter. |
|
Invalid ad id |
You entered an ad id that does not correspond to any ad setup in CJ Marketplace system. |