{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-post-advance-payment-response-schema.json",
  "title": "PostAdvancePaymentResponse",
  "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/PostAdvancePaymentResponse",
  "properties": {
    "account_id": {
      "type": "string",
      "title": "Account Id"
    },
    "advance_id": {
      "type": "string",
      "title": "Advance Id"
    },
    "transaction_id": {
      "type": "string",
      "title": "Transaction Id"
    },
    "original_amount_cents": {
      "type": "integer",
      "title": "Original Amount Cents"
    },
    "balance_cents": {
      "type": "integer",
      "title": "Balance Cents"
    },
    "effective_at": {
      "type": "string",
      "title": "Effective At"
    },
    "issued_at": {
      "type": "string",
      "title": "Issued At"
    },
    "statuses": {
      "$ref": "#/$defs/AdvancePaymentStatuses"
    }
  },
  "type": "object",
  "required": [
    "account_id",
    "advance_id",
    "transaction_id",
    "original_amount_cents",
    "balance_cents",
    "effective_at",
    "issued_at",
    "statuses"
  ],
  "$defs": {
    "AdvancePaymentStatuses": {
      "properties": {
        "pouring": {
          "$ref": "#/$defs/AdvancePouringStatus"
        },
        "reversal": {
          "$ref": "#/$defs/AdvanceReversalStatus"
        },
        "settlement": {
          "$ref": "#/$defs/AdvanceSettlementStatus"
        }
      },
      "type": "object",
      "required": [
        "pouring",
        "reversal",
        "settlement"
      ],
      "title": "AdvancePaymentStatuses"
    },
    "AdvancePouringStatus": {
      "properties": {
        "effective_at": {
          "type": "string",
          "title": "Effective At"
        },
        "issued_at": {
          "type": "string",
          "title": "Issued At"
        },
        "value": {
          "$ref": "#/$defs/AdvancePouringStatusValue"
        }
      },
      "type": "object",
      "required": [
        "effective_at",
        "issued_at",
        "value"
      ],
      "title": "AdvancePouringStatus"
    },
    "AdvancePouringStatusValue": {
      "type": "string",
      "enum": [
        "PENDING",
        "POURED"
      ],
      "title": "AdvancePouringStatusValue"
    },
    "AdvanceReversalStatus": {
      "properties": {
        "effective_at": {
          "type": "string",
          "title": "Effective At"
        },
        "issued_at": {
          "type": "string",
          "title": "Issued At"
        },
        "value": {
          "$ref": "#/$defs/AdvanceReversalStatusValue"
        }
      },
      "type": "object",
      "required": [
        "effective_at",
        "issued_at",
        "value"
      ],
      "title": "AdvanceReversalStatus"
    },
    "AdvanceReversalStatusValue": {
      "type": "string",
      "enum": [
        "NONE",
        "PENDING",
        "REVERSED"
      ],
      "title": "AdvanceReversalStatusValue"
    },
    "AdvanceSettlementStatus": {
      "properties": {
        "effective_at": {
          "type": "string",
          "title": "Effective At"
        },
        "issued_at": {
          "type": "string",
          "title": "Issued At"
        },
        "value": {
          "$ref": "#/$defs/AdvanceSettlementStatusValue"
        }
      },
      "type": "object",
      "required": [
        "effective_at",
        "issued_at",
        "value"
      ],
      "title": "AdvanceSettlementStatus"
    },
    "AdvanceSettlementStatusValue": {
      "type": "string",
      "enum": [
        "PENDING",
        "SETTLED"
      ],
      "title": "AdvanceSettlementStatusValue"
    }
  }
}