Implementation
Cancellations Parameters
Click any row to see type, format, and value examples.
Parameter
Description
Required
enterpriseIdYour CJ Enterprise ID. Must match the account that owns the Action Tracker ID.
Required
Type: IDFormat: Numeric string
Examples
1234567
Note: Found in CJ Account Manager under Account > Settings.
actionTrackerIdThe ID of the action tracker associated with the original order.
Required
Type: NonNegativeIntFormat: Integer
Examples
123456
Note: Must belong to the same account as your Enterprise ID.
orderIdThe unique identifier for the order you are canceling. Must match the original order exactly.
Required
Type: StringFormat: Alphanumeric
Examples
ORD-2025-001234
ABC123XYZ
updateTimeTimestamp for when the cancellation is processed.
Required
Type: InstantFormat: ISO 8601 datetime
Examples
2025-04-09T14:30:00Z
Note: Cannot be in the future.
correctionReasonReason for the cancellation.
Optional
Type: CorrectionReasonFormat: Enum
Allowed Values
RETURNED
FRAUD
DUPLICATE
OTHER
statusOrder status. Required for open-ended locking orders.
Conditional
Type: OrderCancellationStatusFormat: Enum
Allowed Values
Declined
Note: Only required if the order uses open-ended locking. Must be set to Declined.
Cancellation Examples
Cancellation Mutation
mutation cancelOrder
{
cancelOrders(cancelledOrders:{
enterpriseId:1113122
actionTrackerId:1
orderId:"myorderId"
updateTime:"2020-10-10T01:01:01.0-07:00"
correctionReason:InvalidCreditCard
status:Declined
})
{
orders {
submissionId
status
}
errors { message, fields }
}
}curl 'https://tracking.api.cj.com/graphql' \\
-X POST \\
-H 'Authorization: Bearer <your-personal-access-token>' \\
-d '{"query":"mutation { cancelOrders(cancelledOrders:{ enterpriseId: <your-enterprise-id>, actionTrackerId: 22, orderId: \\"33\\", updateTime: \\"2020-10-10T01:01:01.0-07:00\\", correctionReason: InvalidCreditCard, status: Declined }) { orders { submissionId, status } errors { message, fields } } }"}'Cancellation Response
{
"data": {
"cancelOrders": {
"orders": [
{
"submissionId": "bcae41b7-0ace-11eb-80b2-000c0a0001f8",
"status": "Declined"
}
],
"errors": null
}
}
}Updated 11 days ago
What’s Next
