{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-get-transaction-response-schema.json",
  "title": "GetTransactionResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-advances-api-openapi.yml#/components/schemas/GetTransactionResponse",
  "properties": {
    "transaction_id": {
      "type": "string",
      "title": "Transaction Id",
      "description": "The unique identifier for the transaction.",
      "hidden": false
    },
    "transaction_type": {
      "type": "string",
      "title": "Transaction Type",
      "description": "The type of the transaction.",
      "hidden": false
    },
    "original_amount_cents": {
      "type": "integer",
      "title": "Original Amount Cents",
      "description": "The original amount of the transaction, in cents.",
      "hidden": false
    },
    "balance_cents": {
      "type": "integer",
      "title": "Balance Cents",
      "description": "The current balance of the transaction, in cents.",
      "hidden": false
    },
    "effective_at": {
      "type": "string",
      "title": "Effective At",
      "description": "The time at which the transaction becomes effective.",
      "hidden": false
    },
    "issued_at": {
      "type": "string",
      "title": "Issued At",
      "description": "The time at which the system became aware of this transaction.",
      "hidden": false
    },
    "statuses": {
      "$ref": "#/$defs/StatusesResponse"
    }
  },
  "type": "object",
  "required": [
    "transaction_id",
    "transaction_type",
    "original_amount_cents",
    "balance_cents",
    "effective_at",
    "issued_at",
    "statuses"
  ],
  "$defs": {
    "AdvancePouringStatusValue": {
      "type": "string",
      "enum": [
        "PENDING",
        "POURED"
      ],
      "title": "AdvancePouringStatusValue"
    },
    "AdvanceReversalStatusValue": {
      "type": "string",
      "enum": [
        "NONE",
        "PENDING",
        "REVERSED"
      ],
      "title": "AdvanceReversalStatusValue"
    },
    "AdvanceSettlementStatusValue": {
      "type": "string",
      "enum": [
        "PENDING",
        "SETTLED"
      ],
      "title": "AdvanceSettlementStatusValue"
    },
    "StatusResponse_AdvancePouringStatusValue_": {
      "properties": {
        "effective_at": {
          "type": "string",
          "title": "Effective At",
          "description": "The time at which this status became effective.",
          "hidden": false
        },
        "issued_at": {
          "type": "string",
          "title": "Issued At",
          "description": "The time at which the system became aware of this status.",
          "hidden": false
        },
        "value": {
          "$ref": "#/$defs/AdvancePouringStatusValue",
          "description": "The current value of this status.",
          "hidden": false
        }
      },
      "type": "object",
      "required": [
        "effective_at",
        "issued_at",
        "value"
      ],
      "title": "StatusResponse[AdvancePouringStatusValue]"
    },
    "StatusResponse_AdvanceReversalStatusValue_": {
      "properties": {
        "effective_at": {
          "type": "string",
          "title": "Effective At",
          "description": "The time at which this status became effective.",
          "hidden": false
        },
        "issued_at": {
          "type": "string",
          "title": "Issued At",
          "description": "The time at which the system became aware of this status.",
          "hidden": false
        },
        "value": {
          "$ref": "#/$defs/AdvanceReversalStatusValue",
          "description": "The current value of this status.",
          "hidden": false
        }
      },
      "type": "object",
      "required": [
        "effective_at",
        "issued_at",
        "value"
      ],
      "title": "StatusResponse[AdvanceReversalStatusValue]"
    },
    "StatusResponse_AdvanceSettlementStatusValue_": {
      "properties": {
        "effective_at": {
          "type": "string",
          "title": "Effective At",
          "description": "The time at which this status became effective.",
          "hidden": false
        },
        "issued_at": {
          "type": "string",
          "title": "Issued At",
          "description": "The time at which the system became aware of this status.",
          "hidden": false
        },
        "value": {
          "$ref": "#/$defs/AdvanceSettlementStatusValue",
          "description": "The current value of this status.",
          "hidden": false
        }
      },
      "type": "object",
      "required": [
        "effective_at",
        "issued_at",
        "value"
      ],
      "title": "StatusResponse[AdvanceSettlementStatusValue]"
    },
    "StatusesResponse": {
      "properties": {
        "pouring": {
          "$ref": "#/$defs/StatusResponse_AdvancePouringStatusValue_",
          "description": "The latest pouring status of the transaction, if applicable."
        },
        "reversal": {
          "$ref": "#/$defs/StatusResponse_AdvanceReversalStatusValue_",
          "description": "The latest reversal status of the transaction, if applicable."
        },
        "settlement": {
          "$ref": "#/$defs/StatusResponse_AdvanceSettlementStatusValue_",
          "description": "The latest settlement status of the transaction, if applicable."
        }
      },
      "type": "object",
      "title": "StatusesResponse"
    }
  }
}