OrderReleaseUpdated
v0.0.1

OrderReleaseUpdated

This event is triggered when an order release 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 OrderReleased, or OrderReleasedFailed.

OrderReleaseUpdated Schema (json)
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "OrderReleaseChanged",
  "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/OrderRelease"
    },
    "OrderRelease": {
      "type": "object",
      "required": [
        "id",
        "orderId",
        "orderReference",
        "paymentProvider",
        "orderLines",
        "shippingFees",
        "gifts",
        "giftCards",
        "giftCardProducts",
        "totals",
        "created",
        "updated",
        "restarts",
        "revision"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The release 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"
        },
        "promotionProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "bonusProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "releasedPayment": {
          "$ref": "#/definitions/ReleasedPayment"
        },
        "orderLines": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderLine"
          }
        },
        "shippingFees": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ShippingFee"
          }
        },
        "giftCards": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GiftCard"
          }
        },
        "giftCardProducts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GiftCardProduct"
          }
        },
        "gifts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Gift"
          }
        },
        "bonus": {
          "$ref": "#/definitions/Bonus"
        },
        "reason": {
          "$ref": "#/definitions/Reason"
        },
        "totals": {
          "$ref": "#/definitions/ReleaseTotals"
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Created date for the order release"
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "Updated date for the order release"
        },
        "started": {
          "type": "string",
          "format": "date-time",
          "description": "Started date for the order release"
        },
        "completed": {
          "type": "string",
          "format": "date-time",
          "description": "Completed date for the order release"
        },
        "failed": {
          "type": "string",
          "format": "date-time",
          "description": "Failed date for the order release"
        },
        "restarted": {
          "type": "string",
          "format": "date-time",
          "description": "Restarted date for the order release"
        },
        "restarts": {
          "description": "The number of restarts",
          "type": "integer"
        },
        "revision": {
          "description": "The revision number of the order release",
          "type": "integer"
        }
      }
    },
    "ProviderStatus": {
      "type": "object",
      "required": ["providerId", "providerName", "status"],
      "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"
        }
      }
    },
    "ReleasedPayment": {
      "type": "object",
      "required": ["reference"],
      "properties": {
        "reference": {
          "type": "string",
          "description": "Reference for the released payment"
        }
      }
    },
    "OrderLine": {
      "type": "object",
      "required": [
        "orderLineId",
        "quantity",
        "taxPercentage",
        "taxPercentageDecimals",
        "currencyCode",
        "totalAmount",
        "totalTaxAmount",
        "totalDiscountAmount"
      ],
      "properties": {
        "orderLineId": {
          "type": "string",
          "description": "The id for the order line"
        },
        "quantity": {
          "type": "integer",
          "description": "Quantity for the order line"
        },
        "taxPercentage": {
          "type": "integer",
          "description": "Tax percentage for the order line"
        },
        "taxPercentageDecimals": {
          "type": "integer",
          "description": "Number of decimals in tax percentage, eg. taxPercentage=2500 and taxPercentageDecimals=2 -> 25.00% tax"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        },
        "totalAmount": {
          "type": "integer",
          "description": "Total amount for the order line"
        },
        "totalTaxAmount": {
          "type": "integer",
          "description": "Total tax amount for the order line"
        },
        "totalDiscountAmount": {
          "type": "integer",
          "description": "Total discount amount of the order line"
        }
      }
    },
    "ShippingFee": {
      "type": "object",
      "required": [
        "shippingFeeId",
        "taxPercentage",
        "taxPercentageDecimals",
        "currencyCode",
        "totalAmount",
        "totalTaxAmount",
        "totalDiscountAmount"
      ],
      "properties": {
        "shippingFeeId": {
          "type": "string",
          "description": "The id for the shipping fee"
        },
        "taxPercentage": {
          "type": "integer",
          "description": "Tax percentage for the shipping fee"
        },
        "taxPercentageDecimals": {
          "type": "integer",
          "description": "Number of decimals in tax percentage, eg. taxPercentage=2500 and taxPercentageDecimals=2 -> 25.00% tax"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        },
        "totalAmount": {
          "type": "integer",
          "description": "Total amount for the shipping fee"
        },
        "totalTaxAmount": {
          "type": "integer",
          "description": "Total tax amount for the shipping fee"
        },
        "totalDiscountAmount": {
          "type": "integer",
          "description": "Total discount amount of the shipping fee"
        }
      }
    },
    "Gift": {
      "type": "object",
      "required": ["giftId", "quantity"],
      "properties": {
        "giftId": {
          "type": "string",
          "description": "The id for the gift"
        },
        "quantity": {
          "type": "integer",
          "description": "Quantity for the gift"
        }
      }
    },
    "GiftCard": {
      "type": "object",
      "required": ["giftCardId", "amount", "currencyCode", "status"],
      "properties": {
        "giftCardId": {
          "type": "string",
          "description": "The id for the gift card"
        },
        "amount": {
          "type": "number",
          "format": "int64",
          "description": "The amount for the gift card"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        },
        "status": {
          "type": "string",
          "description": "The status of the gift card",
          "enum": ["RESERVED", "RESERVATION_FAILED", "REDEEMED", "REDEEM_FAILED"]
        },
        "transactionId": {
          "type": "string",
          "description": "The id for the gift card transaction"
        }
      }
    },
    "GiftCardProduct": {
      "type": "object",
      "required": ["giftCardProductId", "status", "priceAmount", "currencyCode"],
      "properties": {
        "giftCardProductId": {
          "type": "string",
          "description": "The id for the gift card product"
        },
        "priceAmount": {
          "type": "number",
          "format": "int64",
          "description": "The price amount for the gift card product"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        },
        "status": {
          "type": "string",
          "description": "The status of the gift card product"
        },
        "createId": {
          "type": "string",
          "description": "External id for the created gift card product"
        },
        "createTransactionId": {
          "type": "string",
          "description": "External transactional id for the gift card product creation"
        },
        "createFailedReason": {
          "type": "string",
          "description": "External failed reason for the gift card product creation"
        },
        "cancelTransactionId": {
          "type": "string",
          "description": "External transaction id for the gift card product cancellation"
        },
        "cancelErrorStatusCode": {
          "type": "number",
          "description": "External http status code for the failed gift card product cancellation"
        },
        "cancelErrorMessage": {
          "type": "string",
          "description": "External error message for the failed gift card product cancellation"
        }
      }
    },
    "Bonus": {
      "type": "object",
      "required": ["reservationId", "amount", "currencyCode"],
      "properties": {
        "reservationId": {
          "type": "string",
          "description": "The id for the bonus reservation"
        },
        "amount": {
          "type": "integer",
          "description": "Bonus amount"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        },
        "transactionId": {
          "type": "string",
          "description": "The id of the bonus transaction"
        }
      }
    },
    "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"
        }
      }
    },
    "ReleaseTotals": {
      "type": "object",
      "required": ["subTotal", "taxTotal", "shippingTotal", "giftCardTotal", "bonusTotal", "grandTotal"],
      "properties": {
        "subTotal": {
          "type": "integer",
          "description": "The total for all released order lines, including all matching discount codes & rules"
        },
        "taxTotal": {
          "type": "integer",
          "description": "The total tax for the release"
        },
        "shippingTotal": {
          "type": "integer",
          "description": "The total for all released shipping fees, including all matching discount codes & rules"
        },
        "giftCardTotal": {
          "type": "integer",
          "description": "The total amount for the gift card provider, excluded from `grandTotal`"
        },
        "bonusTotal": {
          "type": "integer",
          "description": "The total amount for the bonus provider, excluded from the `grandTotal`"
        },
        "grandTotal": {
          "type": "integer",
          "description": "The grand total for the release that will be sent to the payment provider. This will be calculated by (`subTotal` + `shippingTotal` - `bonusTotal` - `giftCardTotal`)"
        }
      }
    },
    "CurrencyCode": {
      "title": "CurrencyCode",
      "maxLength": 3,
      "minLength": 3,
      "pattern": "^[A-Z]{3}$",
      "type": "string",
      "description": "ISO 4217 currency code"
    }
  }
}
Last updated on 2026/3/3