|
Sample URI: |
https://publisher-lookup.api.cj.com/v2/joined-publisher-lookup?url=http%3A%2F%2Fwww.cj.com |
|
Sample Header |
Click here for .txt file. |
The Publisher Lookup Service is a REST API that enables advertisers to create in-house tools that programmatically search for information regarding their joined publishers. This API provides advertisers with a valuable programming resource for managing joined publisher information and increasing the effectiveness of their publisher partnerships. Developers may request data using multiple parameters to return specific results based on those request parameters (e.g., You may request a publisher's relationship status within your affiliate program at any given time). You can access other publisher attributes such as program name, Web sites and PIDs, categories and promotional methods used, a well as other information related to the publisher's account.
Commission Junction's REST Web Services use the standard HTTP Authorization header to pass authentication information. You must provide your developer key to pass authentication. The request URI for the Publisher Lookup Service API must be properly encoded based on HTML 4 specification form content encoding rules. Please refer to http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4 for the standard specification. For example, if I am an advertiser who is joined to a publisher with http://www.cj.com as their Web site, the properly encoded URI would display like the sample URI above.
Note: Some languages may have built-in utility methods for encoding URIs based on RFC 1738. Unfortunately, these utility methods may not properly encode white space character and "+" character. Specifically, white space character should be encoded to "+" character, and "+" character should be encoded to "%2B", as displayed in the example above.
Click the following links to display more specific information.
|
Header |
Description |
|
authorization |
Your developer key obtained from the Web Services Developer Site. |
Refer to the following table for a list of request parameters. All parameter names and values are case-insensitive. Submitting an empty request does not return all possible results; an empty request returns zero results.
|
Parameter Name |
Description |
|
publisher-name |
Searches for the joined publishers' names. |
|
country |
Searches for the country where the joined publisher is located (by ISO country code as referenced here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). |
|
pid |
Searches for the publisher’s Web site ID. |
|
cid |
Searches for the publisher’s company ID. |
|
special-incentive |
Searches whether the publisher runs an incentive/special program. |
The following response fields get returned in XML for joined publishers that meet the request parameters.
|
Field Name |
Description |
|
cid |
The publisher’s company ID. |
|
country |
The country where the publisher is located. |
|
currency |
The functional currency used by the publisher. |
|
join-date |
The date on which the publisher joined the network. |
|
network-rating |
The publisher’s Network Earnings rating, which shows how publishers rate with other publishers in the network based on the volume of commissions earned. |
|
program-name |
The publisher's name. |
|
program-term-name |
The program term name the publisher is associated with. |
|
program-term-status |
The status of program term the publisher’s is associated with. |
|
web-sites |
The publisher's Web site information, including the following.
|
|
seven-day-epc |
The publisher’s 7-day EPC (Average Earnings Per One Hundred Clicks). |
|
three-month-epc |
The publisher’s 3-month EPC (Average Earnings Per One Hundred Clicks). |
Refer to the following sample XML response.
|
<cj-api> <publishers page-number="1" records-returned="25" total-matched="2733"> <publisher> <cid>3616458</cid> <country>US</country> <currency>USD</currency> <join-date>02/05/2009</join-date> <network-rating>1</network-rating> <program-name>Glass Media</program-name> <program-term> <name>PI October 2008</name> </program-term> <promotional-methods> <promotional-method>Search Engine Marketing</promotional-method> <promotional-method>Email Marketing</promotional-method> <promotional-method>Web site / Content</promotional-method> </promotional-methods> <seven-day-epc>N/A</seven-day-epc> <three-month-epc>N/A</three-month-epc> <websites> <website> <name>Glass Media</name> <pid>6347803</pid> <url>http://Glass.com</url> <category>Marketing</category> </website> </websites> </publisher> </publishers> </cj-api> |
Note: The HTTP Response Code for the following errors is 401.
|
Message |
Description |
|
None |
Incorrect resource URL |
|
"You must specify a developer key."
|
No developer key specified |
|
"Not Authenticated: xxxxxx" (where xxxxxx is the echo of the developer key used). |
Invalid developer key specified |
Note: The HTTP Response Code for the following errors is 400.
|
Message |
Description |
|
"Not Authorized"
|
Publisher developer key used (must use advertiser developer key). |
|
"Invalid page-number provided."
|
Invalid page number specified (non-numeric). |
|
"Only positive value is allowed for page-number." |
Negative page number specified. |
|
"At least one of the required query parameters (url, cid, pid, country, publisher-name, special-incentive) is needed." |
No query parameter specified. |
|
"Only one of the required query parameters (url, cid, pid, country, publisher-name, special-incentive) is allowed." |
More than one query parameters specified. |
|
"Invalid Key provided. Valid keys are: url, publisher-name, cid, pid, country, special-incentive." |
The query parameter specified is not of a valid key. |
|
"Search criterion is required." |
A valid query parameter key is specified with no value. |
|
"Only ISO Code is allowed for country." |
An integer is provided for country code. |
|
"Only numeric value is allowed for cid." |
Invalid CID specified (non-numeric). |
|
"Only positive value is allowed for cid." |
Negative CID specified. |
|
"Only numeric value is allowed for pid." |
Invalid PID specified (non-numeric). |
|
"Only positive value is allowed for pid." |
Negative PID specified. |
|
"Only 'yes' is allowed." |
Invalid special incentive specified (only "yes" case-insensitive is allowed). |
|
"Publisher Name has to be greater than 3 characters." |
Less than 3 characters are specified for publisher name. |