Help
CJ Affiliate credentials
Where to find each CJ Affiliate credential Affilitera asks for, who can create it, and what each connection error means.
Last updated
CJ connects with a Personal Access Token and your Publisher CID. The Website ID is needed for tracking links, and Publisher Currency labels your orders, because CJ's API does not state a currency on each commission.
Personal Access Token
A personal access token from CJ's developer site. Affilitera sends it as a Bearer token on every request to CJ.
Where to find it
- Sign in at developers.cj.com.
- Open Authentication → Personal Access Tokens.
- Generate a token and copy it.
Publisher CID (Company ID / CID)
Your CJ Company ID (CID), a number. Affilitera uses it to name your account in CJ requests, product feeds and tracking links.
Where to find it
- Sign in at members.cj.com.
- Read the number in the top-right corner, next to your username.
Website ID (PID)
The numeric Website ID (PID) of your site in CJ. Affilitera uses it with CJ's Link Search API to build tracking links.
Where to find it
- Sign in at members.cj.com.
- Open Account → Websites.
- Copy the ID of the website you promote.
Publisher Currency (ISO 4217 code)
The currency your CJ account is paid in, as a three-letter code such as USD. CJ reports amounts in your account's currency but does not say which on each record, so Affilitera labels every CJ order with this code.
Where to find it
- In members.cj.com, open Account → Payment Details.
- Check the currency shown there and choose the same code here.
Choices: USD, AED, AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SAR, SEK, SGD, THB, TRY, VND, ZAR
Send files to your SFTP drop
CJ can send your product catalogs as files, every day, to a server you give it. Give it this connection's SFTP drop: Affilitera reads each file as it arrives, so whole catalogs are read in full without paging CJ's API. Products are read only for advertisers you are approved with.
On this connection, open "SFTP drop" and click Create SFTP login. It shows the server, port, username, password and folder once: copy the password then, because it is not shown again. If it is lost, click Rotate password to make a new one and put that into CJ Affiliate instead.
Point CJ Affiliate at it
- On this connection, open SFTP drop and click Create SFTP login. Copy the password: it is shown once.
- Sign in to CJ and open the Subscription Manager, where CJ sets up product catalog exports.
- Create an export (or edit yours) for the advertisers whose products you want.
- Choose delivery by SFTP and enter the server, port, username, password and folder below.
- Choose the columns under "Columns to include" and the settings under "Export settings", then save.
Server: The Server shown in this connection's SFTP drop panel.
Port: 2222
Protocol: SFTP
Username: The Username shown in the panel (drop_ followed by 16 letters and digits).
Password: The password shown once when you created or rotated the login.
Folder: /incoming
Export settings
Delivery: SFTP, to the server and folder above.
Format: CSV, tab-separated or pipe-delimited text with a header row, or XML. Columns are read by name, so their order does not matter.
Compression: None, gzip (.gz) or zip (.zip, one catalog file per zip).
Schedule: Daily. A new file replaces nothing by itself: each one is read and its products updated.
Advertisers: One file may carry several advertisers: the Advertiser ID column decides which advertiser each product belongs to.
Columns to include
Columns are read by their header name, in any order. A file without one of the required columns is not read: the connection says which column is missing, and the file is kept until you send a corrected one. Any other column is kept with the product.
Required columns
- Product ID: CJ's own product ID: the same ID CJ's API gives the product. Column name: ID (also read as PRODUCT_ID, PRODUCTID, CJ_PRODUCT_ID).
- Product name: The product's name. Column name: TITLE (also read as NAME, PRODUCT_NAME).
- Advertiser ID: The advertiser's CJ ID (CID). Products are read only for advertisers you are approved with. Column name: ADVERTISER_ID (also read as ADVERTISERID, ADVERTISER_CID, CID, PROGRAM_ID).
- Product URL: The product page on the advertiser's site. Column name: LINK (also read as PRODUCT_URL, URL).
- Price: The product's standard price, with its currency ("12.99 USD") or with a Currency column. Column name: PRICE.
Recommended columns
- Currency: ISO currency code, needed when Price does not state one. Column name: CURRENCY (also read as PRICE_CURRENCY).
- Buy URL: CJ's tracking link for the product (with your PID). Column name: BUY_URL (also read as BUYURL, CLICK_URL, LINK_CODE).
- Sale price: The promotional price, when there is one. Column name: SALE_PRICE (also read as SALEPRICE).
- Sale price effective date: When the sale price applies: start/end. Column name: SALE_PRICE_EFFECTIVE_DATE.
- Image URL: The main product image. Column name: IMAGE_LINK (also read as IMAGEURL, IMAGE_URL).
- Description: The product description. Column name: DESCRIPTION.
- Brand: The product's brand. Column name: BRAND (also read as MANUFACTURER).
- Availability: in stock / out of stock / preorder (or yes / no). Column name: AVAILABILITY (also read as INSTOCK, IN_STOCK).
- GTIN: The product's barcode number. Column name: GTIN (also read as UPC, EAN, ISBN).
- MPN: The manufacturer's part number. Column name: MPN (also read as MANUFACTURERID, MANUFACTURER_ID).
- Google product category: The product's category. Column name: GOOGLE_PRODUCT_CATEGORY (also read as ADVERTISERCATEGORY, ADVERTISER_CATEGORY, PRODUCT_TYPE).
- Catalog ad ID: The ID of the CJ catalog the product is in: which of an advertiser's catalogs it belongs to. Column name: AD_ID (also read as ADID, CATALOG_ID, CATALOGID).
- Catalog name: The name of the CJ catalog the product is in. Column name: CATALOG_NAME (also read as CATALOGNAME).
What happens to the files
Each file is read within a few minutes of the next products sync, and deleted once it has been read to its end. Products are written only where they changed. A file without a required column is not read: this connection's sync history says which column is missing, and the file is kept until a corrected one arrives. Products CJ stops sending are not removed on the strength of a file alone; the regular sync still removes products CJ no longer lists.
Common errors
These are the messages a CJ Affiliate connection can show on its row in My Network, or after Test connection.
CJ: personalAccessToken not configured
The connection has no Personal Access Token saved.
- Generate a token at developers.cj.com → Authentication → Personal Access Tokens.
- Paste it into Personal Access Token, save, then test again.
CJ: publisherCid not configured
The connection has no Publisher CID saved.
- Copy the number in the top-right corner of members.cj.com, next to your username.
- Paste it into Publisher CID, save, then test again.
About Publisher CID (Company ID / CID)
CJ: credentials not configured
A sync ran without the Personal Access Token or the Publisher CID saved.
- Save both Personal Access Token and Publisher CID on the connection.
- The next sync uses them.
About Publisher CID (Company ID / CID)
CJ: websiteId not configured — required for linkCode tracking URLs
Tracking links cannot be built without your Website ID (PID).
- Open members.cj.com → Account → Websites and copy your website's ID.
- Paste it into Website ID (PID) and save.
CJ: websiteId not configured — set Website ID (PID) in credentials
This part of the sync needs your Website ID (PID), and none is saved.
- Open members.cj.com → Account → Websites and copy your website's ID.
- Paste it into Website ID (PID) and save.
CJ: publisherCurrency not configured — set Publisher Currency (ISO 4217 code) in credentials
Orders are not read until a valid three-letter currency code is saved, so no order is booked in a guessed currency.
- Check the currency in members.cj.com → Account → Payment Details.
- Choose the same code in Publisher Currency and save.
About Publisher Currency (ISO 4217 code)
CJ REST … — …
CJ answered a request with an error. The number is CJ's answer. A 401 or 403 means CJ did not accept the request with the saved token and CID.
- Generate a new Personal Access Token at developers.cj.com → Authentication → Personal Access Tokens.
- Check the Publisher CID against the number next to your username at members.cj.com.
- Save both and test again.
About Publisher CID (Company ID / CID)
What each status on the connection means
Credentials rejected
CJ Affiliate refused the saved credentials. They were mistyped, regenerated or revoked on the CJ Affiliate side, or belong to a user who has lost access.
- Open the connection and choose Update credentials.
- Copy each value again from CJ Affiliate, using the steps in the field sections above, and save.
- Test the connection. The next sync uses the new values.
Credentials expired
A token CJ Affiliate issues for a limited time, or for one use only, is no longer valid.
- Create a new token in CJ Affiliate as described in the field section above.
- Save it on the connection and test again.
Credential missing
A value the connection needs has not been saved, so Affilitera cannot call CJ Affiliate at all.
- Open the connection and choose Update credentials.
- Fill in every required field and save.
API access off
CJ Affiliate accepted the credentials but refused the data. API or reporting access is not switched on for this account or site on the CJ Affiliate side.
- Switch on API or reporting access in CJ Affiliate (see the setup notes in the field sections above).
- Test the connection again. Nothing needs changing in Affilitera.
Account mismatch
The saved values come from different CJ Affiliate accounts, for example an ID from one account and a key from another.
- Sign in to the one CJ Affiliate account you want to connect.
- Copy every value from that same account, save, and test again.
Token save pending
CJ Affiliate issued a new token and Affilitera could not save it yet. This usually clears on its own at the next sync.
- Wait for the next sync.
- If the message stays, create a new token in CJ Affiliate and save it on the connection.
Check credentials
CJ Affiliate refused the connection with a message Affilitera does not recognize.
- Check each saved value against CJ Affiliate, using the field sections above.
- Save and test again. If it still fails, contact support and quote the message shown on the connection.