{
  "openapi": "3.0.1",
  "paths": {
    "/approved": {
      "post": {
        "summary": "Approve Request",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovedPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovedPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovedPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/disbursed": {
      "post": {
        "summary": "Disbursed Request",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisbursedPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DisbursedPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DisbursedPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/ready-for-disbursement": {
      "post": {
        "summary": "Ready for Disbursement Request",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReadyForDisbursementPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReadyForDisbursementPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReadyForDisbursementPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/awaiting-confirmation": {
      "post": {
        "summary": "Waiting for Confirmation Request (only sales finance product)",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AwaitingConfirmationPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AwaitingConfirmationPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AwaitingConfirmationPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/issued": {
      "post": {
        "summary": "Credit card is issued",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssuedPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IssuedPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IssuedPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/document-signed": {
      "post": {
        "summary": "Document Signed Request",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSignedPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSignedPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSignedPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/document-sent": {
      "post": {
        "summary": "Document Sent Request",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSentPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSentPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSentPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/declined": {
      "post": {
        "summary": "Declined Request",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclinedPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclinedPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeclinedPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/canceled": {
      "post": {
        "summary": "Canceled Request",
        "tags": ["MultiEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelPayloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelPayloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelPayloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    },
    "/callback": {
      "post": {
        "tags": ["SingleEndpoint Callback"],
        "parameters": [
          {
            "name": "API-KEY",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApprovedPayloadRequest": {
        "title": "Approved Request",
        "required": [
          "agentId",
          "applicationId",
          "externalApplicationId",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          },
          "payload": {
            "$ref": "#/components/schemas/ApprovedPayload"
          }
        },
        "additionalProperties": false
      },
      "ApprovedPayload": {
        "title": "Approved Payload",
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "description": "The product approved",
            "nullable": true
          },
          "approvedAmount": {
            "type": "number",
            "description": "The total approved loan amount",
            "format": "double"
          },
          "duration": {
            "type": "integer",
            "description": "Duration of the loan, in months",
            "format": "int32"
          },
          "refinanceRequirement": {
            "type": "boolean",
            "description": "Whether there is a requirement of refinancing existing loans"
          },
          "internalRedemptionAmount": {
            "type": "number",
            "description": "Whether this is an internal redemption/refinancing",
            "format": "double",
            "nullable": true
          },
          "monthlyCost": {
            "type": "number",
            "description": "Monthly loan cost",
            "format": "double"
          },
          "interestRate": {
            "type": "number",
            "description": "Nominal interest rate",
            "format": "double",
            "nullable": true
          },
          "effectiveInterestRate": {
            "type": "number",
            "description": "Effective interest rate",
            "format": "double"
          },
          "setupFee": {
            "type": "number",
            "description": "Setup/starting fee",
            "format": "double",
            "nullable": true
          },
          "invoiceFee": {
            "type": "number",
            "description": "Invoice fee (if any)",
            "format": "double",
            "nullable": true
          },
          "monthlyFee": {
            "type": "number",
            "description": "Monthly fee (if any)",
            "format": "double",
            "nullable": true
          },
          "quarterlyFee": {
            "type": "number",
            "description": "Quarterly fee (if any)",
            "format": "double",
            "nullable": true
          },
          "yearlyFee": {
            "type": "number",
            "description": "Yearly fee (if any)",
            "format": "double",
            "nullable": true
          },
          "existingCustomer": {
            "type": "boolean",
            "description": "Whether this is an existing customer with the bank",
            "nullable": true
          },
          "installmentType": {
            "$ref": "#/components/schemas/InstallmentType"
          },
          "offerValidUntil": {
            "type": "string",
            "description": "The validity of the offer",
            "format": "date-time"
          },
          "signingLink": {
            "type": "string",
            "description": "A link to where the applicant should sign the documents\r\n(typically at the bank's \"customer page\", or with an external signature provider)",
            "format": "uri",
            "nullable": true
          },
          "refinanceAmount": {
            "type": "number",
            "description": "The loan amount approved for refinance",
            "format": "double",
            "nullable": true
          },
          "counterOffer": {
            "description": "This field is not included by default and must be enabled by the bank.",
            "type": "object",
            "properties": {
              "approvedAmount": {
                "type": "number",
                "description": "The total approved loan amount",
                "format": "double"
              },
              "duration": {
                "type": "integer",
                "description": "Duration of the loan, in months",
                "format": "int32"
              },
              "monthlyCost": {
                "type": "number",
                "description": "Monthly loan cost",
                "format": "double"
              },
              "offerValidUntil": {
                "type": "string",
                "description": "The validity of the offer",
                "format": "date-time"
              },
              "signingLink": {
                "type": "string",
                "description": "A link to where the applicant should sign the documents\r\n(typically at the bank's \"customer page\", or with an external signature provider)",
                "format": "uri",
                "nullable": true
              },
              "interestRate": {
                "type": "number",
                "description": "Nominal interest rate",
                "format": "double",
                "nullable": true
              },
              "effectiveInterestRate": {
                "type": "number",
                "description": "Effective interest rate",
                "format": "double"
              },
              "setupFee": {
                "type": "number",
                "description": "Setup/starting fee",
                "format": "double",
                "nullable": true
              },
              "monthlyFee": {
                "type": "number",
                "description": "Monthly fee (if any)",
                "format": "double",
                "nullable": true
              },
              "refinanceAmount": {
                "type": "number",
                "description": "The loan amount approved for refinance in the counter offer",
                "format": "double",
                "nullable": true
              }
            }
          },
          "tinkRequired": {
            "type": "boolean",
            "description": "Whether the customer needs to do a Tink verification before signing",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeclinedPayloadRequest": {
        "title": "Declined Request",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CancelPayloadRequest": {
        "title": "Cancel Request",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DocumentSentPayloadRequest": {
        "title": "Document Sent Request",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DocumentSignedPayloadRequest": {
        "title": "Document Signed Request",
        "required": ["agentId", "applicationId", "timestamp"],
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Agent's application Id"
          },
          "agentId": {
            "type": "string",
            "description": "The agent's identifier, usually the agent's name."
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          },
          "payload": {
            "$ref": "#/components/schemas/DocumentSignedPayload"
          }
        },
        "additionalProperties": false
      },
      "DocumentSignedPayload": {
        "title": "Document Signed Payload",
        "type": "object",
        "properties": {
          "signed": {
            "type": "string",
            "description": "When the document was signed",
            "format": "date-time"
          },
          "signedAmount": {
            "type": "number",
            "description": "The amount signed for",
            "format": "double"
          },
          "creditLimit": {
            "type": "number",
            "description": "The credit limit signed for",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "AwaitingConfirmationPayloadRequest": {
        "title": "Awaiting Confirmation Request",
        "required": [
          "agentId",
          "applicationId",
          "externalApplicationId",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          },
          "payload": {
            "$ref": "#/components/schemas/AwaitingConfirmationPayload"
          }
        },
        "additionalProperties": false
      },
      "AwaitingConfirmationPayload": {
        "title": "Awaiting Confirmation Payload",
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount ready for disbursement",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "IssuedPayloadRequest": {
        "title": "Issued Request",
        "required": [
          "agentId",
          "applicationId",
          "externalApplicationId",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          },
          "payload": {
            "$ref": "#/components/schemas/IssuedPayload"
          }
        },
        "additionalProperties": false
      },
      "IssuedPayload": {
        "title": "Issued Payload",
        "type": "object",
        "properties": {
          "creditLimit": {
            "type": "number",
            "description": "The credit limit approved",
            "format": "double"
          },
          "annualFee": {
            "type": "number",
            "description": "The annual fee for the credit card",
            "format": "double"
          },
          "startupFee": {
            "type": "number",
            "description": "The startup fee for the credit card",
            "format": "double"
          },
          "termFee": {
            "type": "number",
            "description": "The term fee for the credit card",
            "format": "double"
          },
          "interestRate": {
            "type": "number",
            "description": "The interest rate for the credit card",
            "format": "double"
          },
          "signed": {
            "type": "string",
            "description": "When the document was signed",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReadyForDisbursementPayloadRequest": {
        "title": "Ready for Disbursement Request",
        "required": [
          "agentId",
          "applicationId",
          "externalApplicationId",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          },
          "payload": {
            "$ref": "#/components/schemas/ReadyForDisbursementPayload"
          }
        },
        "additionalProperties": false
      },
      "ReadyForDisbursementPayload": {
        "title": "Ready for Disbursement Payload",
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount ready for disbursement",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "DisbursedPayloadRequest": {
        "title": "Disbursed Request",
        "required": [
          "agentId",
          "applicationId",
          "externalApplicationId",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          },
          "payload": {
            "$ref": "#/components/schemas/DisbursedPayload"
          }
        },
        "additionalProperties": false
      },
      "DisbursedPayload": {
        "title": "Disbursed Payload",
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "The disbursed amount",
            "format": "double"
          },
          "duration": {
            "type": "integer",
            "description": "Duration of the loan, in months",
            "format": "int32"
          },
          "interestRate": {
            "type": "number",
            "description": "Nominal interest rate",
            "format": "double"
          },
          "signed": {
            "type": "string",
            "description": "When the document was signed",
            "format": "date-time",
            "nullable": true
          },
          "signedAmount": {
            "type": "number",
            "description": "The amount signed for",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "NotificationRequest": {
        "title": "Single Endpoint Request",
        "required": [
          "agentId",
          "applicationId",
          "event",
          "externalApplicationId",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "description": "Application Id (as received when originally inserting the application)"
          },
          "externalApplicationId": {
            "type": "string",
            "description": "Application Id from Agent"
          },
          "agentId": {
            "type": "string",
            "description": "The agent Id"
          },
          "agentCountryId": {
            "type": "string",
            "description": "The agent Id concatenated with the country code (e.g. agentId_no)"
          },
          "country": {
            "type": "string",
            "description": "The country code (e.g. NO, SE)"
          },
          "timestamp": {
            "type": "string",
            "description": "Time when the event occured",
            "format": "date-time"
          },
          "payload": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApprovedPayload"
              },
              {
                "$ref": "#/components/schemas/DocumentSignedPayload"
              },
              {
                "$ref": "#/components/schemas/ReadyForDisbursementPayload"
              },
              {
                "$ref": "#/components/schemas/AwaitingConfirmationPayload"
              },
              {
                "$ref": "#/components/schemas/DisbursedPayload"
              }
            ],
            "description": "Payload (depends on event type)",
            "nullable": true,
            "discriminator": {
              "propertyName": "event",
              "mapping": {
                "approved": "ApprovedPayload",
                "disbursed": "DisbursedPayload",
                "document-signed": "DocumentSignedPayload",
                "awaiting-confirmation": "AwaitingConfirmationPayload",
                "issued": "IssuedPayload",
                "ready-for-disbursement": "ReadyForDisbursementPayload"
              }
            }
          },
          "event": {
            "enum": [
              "approved",
              "declined",
              "document-sent",
              "document-signed",
              "canceled",
              "awaiting-confirmation",
              "ready-for-disbursement",
              "issued",
              "disbursed"
            ],
            "type": "string",
            "description": "The event type that triggered the update"
          }
        },
        "additionalProperties": false
      },
      "InstallmentType": {
        "title": "InstallmentType",
        "enum": ["Serial", "Annuity"],
        "type": "string"
      }
    }
  }
}
