Implementation

File Format Requirements

Submit restatement data to CJ as a CSV file with a header row defining the fields and one row per restatement record. CJ processes the file on a scheduled basis and applies each row as an update to the corresponding order.

πŸ“‹Before you start
  • Use CSV (comma-separated values) format with UTF-8 encoding.
  • The first row must be a header row listing each field name.
  • Each subsequent row must contain values that map to the header columns.
  • Pass a blank value for any optional field where data is unavailable.
  • Do not include unescaped commas, line breaks, or quotation marks inside field values β€” these will break the file's structure.

Example File

Restatement Data File - Sample CSV
UTF-8 Β· comma-delimited Β· 3 sample rows
Standard e-commerce order with line items, quantities, and subtotals.
Fields - hover for details
companyId
enterpriseId
subscriptionId
actionTrackerId
orderId
updateTime
amount
discount
currency
itemSku
itemUnitPrice
itemQuantity
itemDiscount
coupon
correctionReason
companyIdenterpriseIdsubscriptionIdactionTrackerIdorderIdupdateTimeamountdiscountcurrencyitemSkuitemUnitPriceitemQuantityitemDiscountcouponcorrectionReason
3982101234567398210398210OID-08777232026-03-27T12:18:14Z139.900USDSKU-PNT-269.9520-ReturnedMerchandise
3982101234567398210398210OID-22298322026-03-27T11:02:07Z122.940USDSKU-BLK-LG;SKU-WHT-SM;SKU-GRN-MD22.99;21.99;25.992;3;15.00;7.50;2.50TWOFIFTYOFFReturnedMerchandise
3982101234567398210398210OID-9982212026-03-25T01:23:11Z159.9831.99USDSKU-PURP-SM;SKU-BLU-XL59.99;99.991;10;0TWENTYOFFCannotShip

Body Fields

The table below lists all body fields (required and optional) supported in your ASCII file. Each header value must have a corresponding body value. Blank values can be passed for non-required fields when no data is available.

Click any row to see type, format, and value examples.
Parameter
Description
Required
companyId
Your Company ID (CID) assigned by CJ.
Required
Type: StringFormat: Numeric string
Note: Example: 123456
enterpriseId
Your advertiser account number assigned by CJ.
Required
Type: StringFormat: Numeric string
Note: Example: 253253984
subscriptionId
The Subscription ID for your data file, provided by CJ. Only one Subscription ID and Enterprise ID combination is accepted per file.
Required
Type: StringFormat: Numeric string
Note: Example: 224468
actionTrackerId
The CJ-assigned Action ID for the commissionable sale or lead. This field cannot be changed from the original order.
Required
Type: StringFormat: Numeric string
Note: Example: 5634
orderId
Your unique order identifier. Truncated after 96 characters. Use alphanumeric characters only β€” URL-encode any special characters or spaces. Do not include PII such as email addresses.
Required
Type: StringFormat: Alphanumeric, max 96 characters. URL-encode special characters.
Note: Example: Order1456
updateTime
Timestamp of the update in ISO 8601 format. Future dates are not accepted.
Required
Type: StringFormat: ISO 8601 β€” yyyy-mm-ddThh:mm:ss+/-hh:mm
Allowed Values
2021-05-12T03:04:05.6-07:00
1970-03-27T12:18:14Z
Note: Use Z as the zone designator for zero UTC offset. Future-dated timestamps will be rejected.
correctionReason
This value states the reason for restating the order.
Recommended
Type: StringFormat: Alphanumeric, max 96 characters. URL-encode special characters.
Allowed Values
InvalidCreditCard
UnqualifiedLead
CannotShip
SoldOut
DuplicateOrder
ReturnedMerchandise
Other

Custom Parameters can be included by prefixing any custom field name with cp. β€” for example, cp.customerType or cp.campaignSource.

Vertical-specific parameters (e.g. travel, finance, retail) are not included here. To view the full list of available vertical parameters that can be appended to your restatement file, see the Vertical Parameters page.

Order Amount Fields

Simple Sale Actions

For basic transactions, use the amount field:

Click any row to see type, format, and value examples.
Parameter
Description
Required
amount
Transaction subtotal in decimal format. No currency symbols, commas, or special characters. Defaults to your account's functional currency.
Conditionally Required
Type: DecimalFormat: Numeric only. No currency symbols or commas.
Note: Required for Simple Sale and Simple Lead Action Trackers. Example: 19.99
currency
Three-character ISO 4217 currency code. Only include if the transaction currency differs from your account's functional currency.
Optional
Type: StringFormat: ISO 4217 three-letter code
Allowed Values
USD
GBP
EUR
Note: Refer to the Support Center for the full list of supported currency codes.

Advanced Sale Actions (Item-Based)

For orders with multiple items, use the individual item fields or the combined items field β€” not both.

Click any row to see type, format, and value examples.
Parameter
Description
Required
itemSku
Product SKU for each item in the cart. Values must be alphanumeric, max 100 characters each, and must exactly match SKUs in your item lists and product catalog. Multiple values separated by semicolons.
Conditionally Required
Type: StringFormat: Alphanumeric. Multiple values separated by semicolons. No semicolons within a value.
Note: Use itemSku + itemUnitPrice + itemQuantity (+ optional itemDiscount), OR use the combined items field. Example: sku123;sku456
itemUnitPrice
Unit price for each item in the cart. Represents the per-unit price of each item. Multiple values separated by semicolons.
Conditionally Required
Type: DecimalFormat: Numeric only. Multiple values separated by semicolons.
Note: Example: 10.99;19.99
itemQuantity
Quantity for each item. Values must be integers greater than or equal to 1. Multiple values separated by semicolons.
Conditionally Required
Type: IntegerFormat: Whole numbers >= 1. Multiple values separated by semicolons.
Note: Example: 2;1
itemDiscount
Optional discount applied to each item. The discount applies to the total for the SKU β€” for example, a 2.56 discount on an item with quantity 2 distributes to 1.28 per unit. Multiple values separated by semicolons.
Optional
Type: DecimalFormat: Numeric only. Multiple values separated by semicolons.
Note: Can be combined with a whole-order discount for orders using both item-level and order-level discounts. Example: 1.50;0
items
Combined item field β€” an alternative to the individual itemSku / itemUnitPrice / itemQuantity fields. Each item is expressed as SKU;UnitPrice;Quantity with an optional ;Discount appended. Multiple items separated by double semicolons (;;).
Conditionally Required
Type: StringFormat: sku;unitPrice;quantity[;discount] β€” multiple items separated by ;;
Allowed Values
sku123;19.99;1
sku123;19.99;1;1.50 (with discount)
sku123;19.99;1;;sku456;10.99;2 (multiple items)
sku123;19.99;1;1.50;;sku456;10.99;2;0 (multiple with discounts)
Note: Use the items field OR itemSku + itemUnitPrice + itemQuantity β€” not both.

Status Fields

Click any row to see type, format, and value examples.
Parameter
Description
Required
status
Required for orders with open-ended locking (Pending Actions). Do not include this field if your orders do not use open-ended locking. Note: Declined status is not valid in restatements β€” use Order Cancellations files instead.
Conditionally Required
Type: String
Allowed Values
Pending
Accepted
Note: Only include this field when restating orders that use open-ended locking.
🚧

Only include this field if your program uses the Open-Ended Lifecycle solution (typical for travel and extended booking programs). Standard restatements should not include this field β€” passing a status value on a non Open-Ended Lifecycle program will cause an error.