Skip to main content
Version: 1.01

Cancel Order

PATCH /api/1.01/order/cancel/{trx}

Canceling an order after creation using the trx returned by the Create order endpoint. Orders that have not being confirmed will be deleted and return HTTP status 204, while orders that have been confirmed will be canceled instead and return a (partial) order.

info

Note: The response of this endpoint depends on the status of your order.

Requested Parameters

FieldTypeRequiredDefaultDescription
trxStringYes-Trx of order

Example Request

curl -X PATCH https://connect.relograde.com/api/1.01/order/cancel/RELO0TFQK8FXQXSPURM \
-H "Authorization: Bearer <token>"

Example Response

{
"trx": "RELO0TFQK8FXQXSPURM",
"priceCurrency": "eur",
"priceAmount": 58.14,
"priceVat": 0.23,
"priceInclVat": 58.37,
"priceFx": 1.0,
"dateCreated": "2025-01-24T11:30:20.000Z",
"paymentStatus": "paid",
"type": "api",
"reference": "test",
"state": "sandbox",
"orderStatus": "cancelled",
"isBalancePayment": true,
"downloaded": false,
"items": [
{
"product": {
"slug": "rewarble-ww-eur-5",
"name": "rewarble 5 EUR WW",
"brand": "rewarble",
"productType": "topup",
"region": "ww",
"faceValueAmount": 5.0,
"faceValueCurrency": "eur",
"mainCategory": "giftcard",
"redeemType": "currency",
"isStocked": true
},
"amount": 5,
"priceCurrency": "eur",
"singlePriceAmount": 5.1,
"totalPriceAmount": 25.5,
"totalPriceVat": 0.1,
"totalPriceInclVat": 25.6,
"priceFx": 1.0,
"paymentCurrency": "eur",
"singlePriceAmountInPaymentCurrency": 5.1,
"totalPriceAmountInPaymentCurrency": 25.5,
"totalPriceVatInPaymentCurrency": 0.1,
"totalPriceInclVatInPaymentCurrency": 25.6,
"orderLines": [
{
"tag": "TAG-189a9fe4-3a7e-40fd-a357-153e885481fd",
"status": "pending"
},
{
"tag": "TAG-1ee8f999-c47f-4cfb-9309-0912f62dcc49",
"status": "pending"
},
{
"tag": "TAG-faef041d-774e-4c0a-88ee-6ac3ae1261c3",
"status": "pending"
},
{
"tag": "TAG-6fa744d7-4a6b-415a-9833-d06274c73145",
"status": "pending"
},
{
"tag": "TAG-6823ef30-94cd-45d4-a23b-25e93ebb9145",
"status": "pending"
}
],
"linesCompleted": 0,
"productSlug": "rewarble-ww-eur-5",
"faceValueAmount": 5.0,
"faceValueCurrency": "eur",
"faceValueFx": 1.0
},
{
"product": {
"slug": "rewarble-variable-eur",
"name": "Rewarble Variable EUR",
"brand": "rewarble",
"productType": "topup",
"region": "ww",
"faceValueCurrency": "eur",
"faceValueMin": 5.0,
"faceValueMax": 500.0,
"mainCategory": "giftcard",
"redeemType": "currency",
"isStocked": true
},
"amount": 1,
"priceCurrency": "eur",
"singlePriceAmount": 32.64,
"totalPriceAmount": 32.64,
"totalPriceVat": 0.13,
"totalPriceInclVat": 32.77,
"priceFx": 1.0,
"paymentCurrency": "eur",
"singlePriceAmountInPaymentCurrency": 32.64,
"totalPriceAmountInPaymentCurrency": 32.64,
"totalPriceVatInPaymentCurrency": 0.13,
"totalPriceInclVatInPaymentCurrency": 32.77,
"orderLines": [
{
"tag": "TAG-f43c2cf3-bebc-4486-8dcb-c417c874db0b",
"status": "pending"
}
],
"linesCompleted": 0,
"productSlug": "rewarble-variable-eur",
"faceValueAmount": 32.0,
"faceValueCurrency": "eur",
"faceValueFx": 1.0
}
]
}

Response Fields

Field nameField typeField description
trxStringTrx of order (Identifier)
priceCurrencyStringCurrency of price
priceAmountDecimalPrice before VAT
priceVatDecimalVAT amount
priceInclVatDecimalPrice including VAT
priceFxDecimalPrice calculation multiplier
dateCreatedDateCreation date of order
paymentStatusStringStatus of payment
typeStringType of system used to create order (portal or api)
referenceStringReference of order
stateStringEnvironment of order (live or sandbox)
orderStatusStringStatus of order
isBalancePaymentBooleanWhether the order is a balance payment or not
downloadedBooleanWhether the order has been downloaded or not
itemsObjectItem object
productObjectProduct object
slugStringSlug of product
nameStringName of product
brandStringBrand of product
productTypeStringType of product
regionStringRegion in which the product can be used
faceValueAmountDecimalValue of product
faceValueCurrencyStringCurrency of faceValue
mainCategoryStringMain category of product
redeemTypeStringRedeem type of product
isStockedBooleanWhether the product is in stock or not
amountIntegerAmount of product
priceCurrencyStringCurrency of price
singlePriceAmountDecimalPrice for a single product
totalPriceAmountDecimalTotal price of all products
totalPriceVatDecimalTotal VAT amount
totalPriceInclVatDecimalTotal price including VAT
paymentCurrencyStringCurrency of payment price
singlePriceAmountInPaymentCurrencyDecimalPrice of a single product in payment currency
totalPriceAmountInpaymentCurrencyDecimalTotal price of all products in payment currency
totalPriceVatInPaymentCurrencyDecimalTotal VAT amount in payment currency
totalPriceInclVatInPaymentCurrencyDecimalTotal price including VAT in payment currency
orderLinesArrayArray of codes ordered
tagStringInternal tag (id) of the code
statusStringStatus of product
linesCompletedIntegerAmount of orderLines with status finished
productSlugStringSlug of product
faceValueAmountDecimalValue of product
faceValueCurrencyStringCurrency of faceValueAmount
faceValuefxDecimalPrice calculation multiplier for faceValueAmount

Errors

Errors response
EndpointHTTP status codeHTTP statusMessageReason
Cancel order404NOT_FOUNDorder not foundInvalid order TRX
Cancel order400BAD_REQUESTInvalid order statusThe order status is neither created or pending

Notes

note
  • Currency codes follow ISO 4217 standard
  • Codes shown in example have been altered and made invalid
  • Only orders with status “created” or “pending” can be canceled
  • Price information may be provided either as fixed price or as fee.
  • Price information may have been altered in the documentation
  • Orders that are not confirmed will return 204 with no body
  • Orders that are confirmed will return a 200 with a (partial) order inside the body