Implementation

Restatement Parameters

Click any row to see type, format, and value examples.
Parameter
Description
Required
enterpriseId
Your CJ Enterprise ID. Must match the account that owns the actionTrackerId.
Required
actionTrackerId
The Action Tracker ID associated with the original order.
Required
orderId
The unique order identifier for the order being restated. Must match the original order exactly.
Required
updateTime
The timestamp for this restatement in UTC ISO 8601 format. Cannot be set in the future.
Required
Type: InstantFormat: UTC ISO 8601 — yyyy-mm-ddThh:mm:ss.sssZ
Examples
2020-10-10T01:01:01.0-07:00
2020-10-10T08:01:01Z
Note: Use the Z designator for UTC offset. Past timestamps only — future timestamps will cause the request to fail.
amount
The updated order total in the currency specified. Do not include taxes or shipping.
Optional
Type: NonNegativeDecimalNumberFormat: Numeric string, e.g. "200.75"
Examples
200.75
99.00
Note: This value represents the restated order total. Send the full updated amount, not a delta.
discount
Total discount applied to the order as a whole. For item-level discounts, use the discount field within each item object.
Optional
Type: NonNegativeDecimalNumberFormat: Numeric string, e.g. "50.50"
Examples
50.50
0.00
Note: Pass 0.00 if no discount applies. Do not omit if the original order included a discount.
coupon
Coupon or voucher code applied to the restated order. Do not pass an excluded or exclusive coupon — this will cause the restatement to fail.
Optional
Type: String
Examples
SAVE20
Note: If a coupon code would make the order non-commissionable, the restatement will be rejected and the original order will remain unchanged.
currency
Three-letter ISO 4217 currency code for the order amount.
Optional
Type: StringFormat: ISO 4217 three-letter code
Examples
USD
GBP
EUR
Note: Defaults to the advertiser's functional currency if omitted. Submitting an empty value will cause a transaction error.
status
Required for orders with open-ended locking cycles. Indicates the current status of the order at the time of restatement.
Conditional
Type: OrderStatus
Allowed Values
Pending
Accepted
Note: Must be included for all open-ended locking orders. If omitted, the request will be accepted but will fail silently during processing.
correctionReason
An optional reason code describing why the order is being restated.
Optional
Type: CorrectionReason
Allowed Values
BadDebt
Bankruptcy
BookingCanceled
CannotShipSoldOut
Compliance
DuplicateOrder
InvalidCreditCard
Other
ReturnedMerchandise
UnqualifiedLead
items
Array of item objects representing all items in the restated order. Only populate on item-based actions.
Optional
Type: Array — [OrderItemInput!]Format: JSON array of item objects
Examples
[{ "sku": "sku1", "unitPrice": 100.75, "quantity": 1, "discount": 50.50 }]
[{ "sku": "sku1", "unitPrice": 100.75, "quantity": 1, "discount": 50.50 }, { "sku": "sku2", "unitPrice": 100, "quantity": 1, "discount": 0.00 }]
Note: Maximum 100 items per order. Each item must include sku, unitPrice, and quantity. The discount field within each item represents a product-level discount and is divided evenly across all units of that item.
verticalParameters
Optional vertical-specific attributes for the order such as travel details, finance fields, or retail metadata.
Optional
Type: VerticalParametersInput
Note: See the Vertical Parameters reference for the full list of supported fields by vertical. Common fields include advertiserVertical, confirmationNumber, originCity, destinationCity, and noCancellation.
customParameters
Array of custom name-value pairs for advertiser-specific data not covered by standard or vertical parameters.
Optional
Type: Array — [NameValuePairInput!]Format: Array of { name: String!, value: String! }
Examples
[{ "name": "campaignId", "value": "SUMMER2024" }]
bypassChannel
Used to attribute the restatement to a specific bypass channel. Advertiser-specific use only.
Optional
Type: BypassChannelInputFormat: { name: String!, timestamp: Instant! }

Restatement Examples

Restatement Mutation

mutation {
  restateOrders(restatedOrders: {
    enterpriseId: <your-enterprise-id>,
    actionTrackerId: 22,
    orderId: "33",
    updateTime: "2020-10-10T01:01:01.0-07:00",
    status: Pending,
    amount: 200.75,
    discount: 50.50,
    verticalParameters: {
      advertiserVertical: Travel,
      confirmationNumber: "YN25890C",
      originCity: "Los Angeles",
      originState: "California",
      destinationCity: "Seattle",
      destinationState: "Washington",
      noCancellation: "true",
    },
    items: [
      { unitPrice: 100.75, quantity: 1, sku: "sku1", discount: 50.50 },
      { unitPrice: 100, quantity: 1, sku: "sku2", discount: 0.00 }
    ],
  }) {
    orders {
      submissionId
      orderReceivedTime
      status
      updateTime
      orderId
      discount
      advertiser { enterpriseId }
      actionTracker { id }
      items { unitPrice, quantity, sku, discount }
      verticalParameters {
        advertiserVertical
        confirmationNumber
        originCity
        originState
        destinationCity
        destinationState
        noCancellation
      }
    }
    errors { message, fields }
  }
}
curl 'https://tracking.api.cj.com/graphql' \
  -X POST \
  -H 'Authorization: Bearer <your-personal-access-token>' \
  -d '{"query":"mutation { restateOrders(restatedOrders:{ enterpriseId: <your-enterprise-id>, actionTrackerId: 22, orderId: \"33\", updateTime: \"2020-10-10T01:01:01.0-07:00\", status: Pending, verticalParameters: { advertiserVertical: Travel, confirmationNumber: \"YN25890C\", originCity: \"Los Angeles\", originState: \"California\", destinationCity: \"Seattle\", destinationState: \"Washington\", noCancellation: \"true\" }, items: [ { unitPrice: 100.75, quantity: 1, sku: \"sku1\", discount: \"50.50\" }, { unitPrice: 100, quantity: 1, sku: \"sku2\", discount: \"0.00\" } ], amount: 200.75, discount: 50.50 }) { orders { submissionId orderReceivedTime status updateTime verticalParameters { advertiserVertical confirmationNumber originCity originState destinationCity destinationState noCancellation } advertiser { enterpriseId } actionTracker { id } orderId discount items { unitPrice quantity sku discount } } errors { message fields } } }"}'

Restatement Response

{
  "data": {
    "restateOrders": {
      "orders": [
        {
          "submissionId": "bcae1c94-0ace-11eb-80b3-00000a00001c",
          "orderReceivedTime": "2021-05-13T15:49:34.002Z",
          "status": "Pending",
          "updateTime": "2020-10-10T08:01:01Z",
          "orderId": "33",
          "discount": 50.5,
          "advertiser": { "enterpriseId": "15058" },
          "actionTracker": { "id": "22" },
          "items": [
            { "unitPrice": 100.75, "quantity": 1, "sku": "sku1", "discount": 50.5 },
            { "unitPrice": 100, "quantity": 1, "sku": "sku2", "discount": 0 }
          ],
          "verticalParameters": {
            "advertiserVertical": "Travel",
            "confirmationNumber": "YN25890C",
            "originCity": "Los Angeles",
            "originState": "California",
            "destinationCity": "Seattle",
            "destinationState": "Washington",
            "noCancellation": "true"
          }
        }
      ],
      "errors": null
    }
  }
}