OrderCancellationUpdated
v0.0.1

OrderCancellationUpdated

This event is triggered when an order cancellation has been updated, this will include when the operation is e.g. started, restarted, completed, or failed.

If only the final outcome events are desired, we recommend listening for OrderCancelled, or OrderCancelledFailed.

OrderCancellationUpdated Schema (json)
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "OrderCancellationChanged",
  "required": ["detail-type", "resources", "detail", "id", "source", "time", "region", "version", "account"],
  "type": "object",
  "properties": {
    "account": {
      "type": "string"
    },
    "detail": {
      "$ref": "#/definitions/Detail"
    },
    "detail-type": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "resources": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "source": {
      "type": "string"
    },
    "time": {
      "format": "date-time",
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  },
  "definitions": {
    "Detail": {
      "properties": {
        "data": {
          "$ref": "#/definitions/Data"
        },
        "metadata": {
          "$ref": "#/definitions/Metadata"
        }
      },
      "required": ["metadata", "data"],
      "type": "object"
    },
    "Metadata": {
      "type": "object",
      "required": ["awsRequestId"],
      "properties": {
        "awsRequestId": {
          "type": "string"
        },
        "isTruncated": {
          "type": "boolean"
        }
      }
    },
    "Data": {
      "$ref": "#/definitions/OrderCancellation"
    },
    "OrderCancellation": {
      "type": "object",
      "required": ["id", "orderId", "orderReference", "paymentProvider", "created", "updated", "restarts", "revision"],
      "properties": {
        "id": {
          "type": "string",
          "description": "The cancellation id"
        },
        "orderId": {
          "type": "string",
          "description": "The order id"
        },
        "orderReference": {
          "type": "string",
          "description": "The order short reference"
        },
        "paymentProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "shippingProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "giftCardProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "giftCardProductProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "voucherProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "bonusProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "cancelledPayment": {
          "$ref": "#/definitions/CancelledPayment"
        },
        "giftCards": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GiftCard"
          }
        },
        "giftCardProducts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GiftCardProduct"
          }
        },
        "bonus": {
          "$ref": "#/definitions/Bonus"
        },
        "reason": {
          "$ref": "#/definitions/Reason"
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Created date for the order cancellation"
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "Updated date for the order cancellation"
        },
        "started": {
          "type": "string",
          "format": "date-time",
          "description": "Started date for the order cancellation"
        },
        "completed": {
          "type": "string",
          "format": "date-time",
          "description": "Completed date for the order cancellation"
        },
        "failed": {
          "type": "string",
          "format": "date-time",
          "description": "Failed date for the cancellation"
        },
        "restarts": {
          "description": "The number of restarts",
          "type": "integer"
        },
        "restarted": {
          "type": "string",
          "format": "date-time",
          "description": "Restarted date for the order cancellation"
        },
        "revision": {
          "description": "The revision number of the order cancellation",
          "type": "integer"
        }
      }
    },
    "ProviderStatus": {
      "type": "object",
      "required": ["providerId", "providerName"],
      "properties": {
        "providerId": {
          "type": "string",
          "description": "The id for the provider"
        },
        "providerName": {
          "type": "string",
          "description": "The name of the provider"
        },
        "status": {
          "$ref": "#/definitions/ProviderStatusLog"
        }
      }
    },
    "ProviderStatusLog": {
      "type": "object",
      "required": ["current", "history"],
      "properties": {
        "current": {
          "type": "string",
          "description": "The latest status for the provider"
        },
        "history": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ProviderStatusLogEntry"
          }
        }
      }
    },
    "ProviderStatusLogEntry": {
      "type": "object",
      "required": ["status", "timestamp", "type"],
      "properties": {
        "message": {
          "type": "string",
          "description": "Optional message for the status"
        },
        "errorMessage": {
          "type": "string",
          "description": "Optional error message from the provider"
        },
        "status": {
          "type": "string",
          "description": "The actual status"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp for the status"
        },
        "type": {
          "type": "string",
          "description": "Status type"
        }
      }
    },
    "CancelledPayment": {
      "type": "object",
      "required": ["reference"],
      "properties": {
        "reference": {
          "type": "string",
          "description": "Reference for the captured payment"
        }
      }
    },
    "GiftCard": {
      "type": "object",
      "required": ["giftCardId", "status"],
      "properties": {
        "giftCardId": {
          "type": "string",
          "description": "The id for the gift card"
        },
        "status": {
          "type": "string",
          "description": "The status of the gift card",
          "enum": ["RESERVED", "RESERVATION_FAILED", "REDEEMED", "REDEEM_FAILED"]
        },
        "reservationId": {
          "type": "string",
          "description": "The id for the gift card reservation"
        },
        "transactionId": {
          "type": "string",
          "description": "The id for the gift card redeem transaction"
        }
      }
    },
    "GiftCardProduct": {
      "type": "object",
      "required": ["giftCardProductId", "status"],
      "properties": {
        "giftCardProductId": {
          "type": "string",
          "description": "The id for the gift card product"
        },
        "status": {
          "type": "string",
          "description": "The status of the gift card product"
        },
        "cancelTransactionId": {
          "type": "string",
          "description": "External transaction id for the gift card product cancellation"
        }
      }
    },
    "Bonus": {
      "type": "object",
      "required": ["reservationId", "status"],
      "properties": {
        "reservationId": {
          "type": "string",
          "description": "The id for the bonus reservation"
        },
        "status": {
          "type": "string",
          "description": "The status of the bonus",
          "enum": ["RESERVED", "RESERVATION_FAILED"]
        }
      }
    },
    "Reason": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Optional code for the reason, useful for BI tracking"
        },
        "cause": {
          "type": "string",
          "description": "Optional human readable cause for the reason"
        }
      }
    }
  }
}
Last updated on 2026/3/3