{
  "openapi": "3.0.1",
  "info": {
    "title": "Aritma Banking API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://bankservice.zdata.no",
      "description": "Open Banking API"
    },
    {
      "url": "https://bankservicedemo.zdata.no",
      "description": "Open Banking API (Dev)"
    }
  ],
  "paths": {
    "/api/v3/accounts/bank": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "POST request for new bank integration",
        "operationId": "PostBankAccount",
        "requestBody": {
          "description": "Update model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                },
                "CompanyId": "1d47020f-6d6e-4389-ac69-26994f082ac1",
                "AccountNumber": "123456789012"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                },
                "CompanyId": "1d47020f-6d6e-4389-ac69-26994f082ac1",
                "AccountNumber": "123456789012"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                },
                "CompanyId": "1d47020f-6d6e-4389-ac69-26994f082ac1",
                "AccountNumber": "123456789012"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                },
                "CompanyId": "1d47020f-6d6e-4389-ac69-26994f082ac1",
                "AccountNumber": "123456789012"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns account id. Request added for ZData approval",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "400": {
            "description": "Invalid model",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "User not authorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accounts/{companyId}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Lists all accounts for a company",
        "operationId": "GetBankAccountList",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of accounts",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ListCompanyAccountsResponse"
                },
                "example": {
                  "CompanyId": "924d66f0-ed40-43d4-a9a8-d30135260ba0",
                  "Accounts": [
                    {
                      "AccountId": "8586cc4b-502d-4c1a-aa75-fdafe957354c",
                      "AccountNumber": "123456789012",
                      "Bic": "DNBANOKK",
                      "Currency": "NOK",
                      "AccountGroupId": "6e7d66c9-9367-467c-b2ca-74072ff9b1ab",
                      "Ledger": "1920",
                      "Aliases": {
                        "Iban": "NO22123456789012",
                        "PlusGirot": "1234567",
                        "BankGirot": "1234567",
                        "GiroKonto": "1234567"
                      },
                      "ReadyForPayments": true
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCompanyAccountsResponse"
                },
                "example": {
                  "CompanyId": "924d66f0-ed40-43d4-a9a8-d30135260ba0",
                  "Accounts": [
                    {
                      "AccountId": "8586cc4b-502d-4c1a-aa75-fdafe957354c",
                      "AccountNumber": "123456789012",
                      "Bic": "DNBANOKK",
                      "Currency": "NOK",
                      "AccountGroupId": "6e7d66c9-9367-467c-b2ca-74072ff9b1ab",
                      "Ledger": "1920",
                      "Aliases": {
                        "Iban": "NO22123456789012",
                        "PlusGirot": "1234567",
                        "BankGirot": "1234567",
                        "GiroKonto": "1234567"
                      },
                      "ReadyForPayments": true
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCompanyAccountsResponse"
                },
                "example": {
                  "CompanyId": "924d66f0-ed40-43d4-a9a8-d30135260ba0",
                  "Accounts": [
                    {
                      "AccountId": "8586cc4b-502d-4c1a-aa75-fdafe957354c",
                      "AccountNumber": "123456789012",
                      "Bic": "DNBANOKK",
                      "Currency": "NOK",
                      "AccountGroupId": "6e7d66c9-9367-467c-b2ca-74072ff9b1ab",
                      "Ledger": "1920",
                      "Aliases": {
                        "Iban": "NO22123456789012",
                        "PlusGirot": "1234567",
                        "BankGirot": "1234567",
                        "GiroKonto": "1234567"
                      },
                      "ReadyForPayments": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Accounts for company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accounts/{bban}/readiness": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get account status for creating payments",
        "operationId": "GetBankAccountReadinessById",
        "parameters": [
          {
            "name": "bban",
            "in": "path",
            "description": "BBAN",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The account status for creating payments",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccountReadinessResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountReadinessResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountReadinessResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accounts/{companyId}/{bankAccountId}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get account data for a specific account in a specific company",
        "operationId": "GetBankAccountById",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bankAccountId",
            "in": "path",
            "description": "Bank account id or bban",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The account details",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "3e320b56-6706-48b6-840d-e7534912c0b1",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "5bd2ee91-0cf0-4518-a9b1-4f3a6a1d38a2",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "3e320b56-6706-48b6-840d-e7534912c0b1",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "5bd2ee91-0cf0-4518-a9b1-4f3a6a1d38a2",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "3e320b56-6706-48b6-840d-e7534912c0b1",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "5bd2ee91-0cf0-4518-a9b1-4f3a6a1d38a2",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Updates bankaccount",
        "operationId": "UpdateBankAccount",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bankAccountId",
            "in": "path",
            "description": "Bank account id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Bank account model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                }
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                }
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBankAccountRequest"
              },
              "example": {
                "Bic": "DNBANOKK",
                "Currency": "NOK",
                "Ledger": "1920",
                "Aliases": {
                  "Iban": "NO22123456789012",
                  "PlusGirot": "1234567",
                  "BankGirot": "1234567",
                  "GiroKonto": "1234567"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated account details",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "e9e35c72-2c13-4b33-97b9-fb9a5778accf",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "6d51c78b-faee-481e-83a2-763d3c3f962d",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "e9e35c72-2c13-4b33-97b9-fb9a5778accf",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "6d51c78b-faee-481e-83a2-763d3c3f962d",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "e9e35c72-2c13-4b33-97b9-fb9a5778accf",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "6d51c78b-faee-481e-83a2-763d3c3f962d",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid update request",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Deletes an account by companyId and accountId",
        "operationId": "DeleteAccountByCompanyId",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bankAccountId",
            "in": "path",
            "description": "Bank account id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "400": {
            "description": "Account connected to statement, balance, receivable or payment",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accounts/{bankAccountId}/companySwitch": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Changes company on bankaccount",
        "operationId": "CompanySwitch",
        "parameters": [
          {
            "name": "bankAccountId",
            "in": "path",
            "description": "Bank account id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Request with new company id",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/BankAccountCompanySwitchRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankAccountCompanySwitchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BankAccountCompanySwitchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BankAccountCompanySwitchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "2579431e-8e99-4526-b3ff-40062b65a7cf",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "fdf26a5d-8817-4391-a50f-b4a65f5a45b2",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "2579431e-8e99-4526-b3ff-40062b65a7cf",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "fdf26a5d-8817-4391-a50f-b4a65f5a45b2",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                },
                "example": {
                  "AccountId": "2579431e-8e99-4526-b3ff-40062b65a7cf",
                  "AccountNumber": "123456789012",
                  "Bic": "DNBANOKK",
                  "Currency": "NOK",
                  "AccountGroupId": "fdf26a5d-8817-4391-a50f-b4a65f5a45b2",
                  "Ledger": "1920",
                  "Aliases": {
                    "Iban": "NO22123456789012",
                    "PlusGirot": "1234567",
                    "BankGirot": "1234567",
                    "GiroKonto": "1234567"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accountgroups/{companyId}": {
      "get": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Get all account groups for company",
        "operationId": "GetAccountGroupsForCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeUnassociated",
            "in": "query",
            "description": "",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeUnassociatedDaughters",
            "in": "query",
            "description": "",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Account groups for company",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accountgroups/{companyId}/{accountGroupId}": {
      "get": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Get account group by AccountGroupId",
        "operationId": "GetAccountGroupById",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountGroupId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Account groups",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account group not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Update account group name",
        "operationId": "UpdateAccountGroup",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountGroupId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountGroupNameRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountGroupNameRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountGroupNameRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountGroupNameRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account group not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Delete account group",
        "operationId": "DeleteAccountGroupByCompanyId",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountGroupId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Account group not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accountgroups": {
      "post": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Post new account group",
        "operationId": "AddAcountGroupToCompany",
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accountgroups/{companyId}/{accountGroupId}/user": {
      "post": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Add user to account group",
        "operationId": "PostUserInAccountGroup",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountGroupId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupUserRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupUserRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "User/Account group not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accountgroups/{companyId}/{accountGroupId}/user/{userId}": {
      "delete": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Remove user from account group",
        "operationId": "DeleteUserInAccountGroup",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountGroupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "User/Account group not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accountgroups/{companyId}/{accountGroupId}/account": {
      "post": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Add account to account group",
        "operationId": "PutAccountInAccountGroup",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountGroupId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupAccountRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupAccountRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupAccountRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccountGroupAccountRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "AccountGroup/Account not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/accountgroups/{companyId}/{accountGroupId}/account/{accountId}": {
      "delete": {
        "tags": [
          "AccountGroup"
        ],
        "summary": "Remove account from account group",
        "operationId": "DeleteAccountInAccountGroup",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountGroupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountGroupResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "AccountGroup/Account not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/balances/{companyId}/{account}": {
      "get": {
        "tags": [
          "Balance"
        ],
        "summary": "Get balance for account.",
        "operationId": "GetBalance",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company Id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account",
            "in": "path",
            "description": "Account number",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Date (yyyy-mm-dd). Returns balance. When no balance, returns the nearest older balance.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateSwitch",
            "in": "query",
            "description": "False, same as above.  When True , Returns balance. When no balance, returns the nearest newer balance.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid state"
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Balance not found"
          }
        }
      }
    },
    "/api/v3/companies": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Gets details for all valid companies",
        "description": "Subject to change. Data may be migrated to another API",
        "operationId": "GetAllCompanies",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "Optional state filter",
            "schema": {
              "$ref": "#/components/schemas/CompanyState"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Flat list of valid companies",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDetailResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDetailResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDetailResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Company"
        ],
        "summary": "Create new company",
        "operationId": "AddCompany",
        "requestBody": {
          "description": "Company model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/NewCompanyRequest"
              },
              "example": {
                "CompanyId": "572a2419-3284-408e-b265-230133ec8830",
                "Name": "Duck corp",
                "Address": "Apalveien 222",
                "ZipCode": "0010",
                "ZipArea": "Oslo",
                "Country": "Norway"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewCompanyRequest"
              },
              "example": {
                "CompanyId": "572a2419-3284-408e-b265-230133ec8830",
                "Name": "Duck corp",
                "Address": "Apalveien 222",
                "ZipCode": "0010",
                "ZipArea": "Oslo",
                "Country": "Norway"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewCompanyRequest"
              },
              "example": {
                "CompanyId": "572a2419-3284-408e-b265-230133ec8830",
                "Name": "Duck corp",
                "Address": "Apalveien 222",
                "ZipCode": "0010",
                "ZipArea": "Oslo",
                "Country": "Norway"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewCompanyRequest"
              },
              "example": {
                "CompanyId": "572a2419-3284-408e-b265-230133ec8830",
                "Name": "Duck corp",
                "Address": "Apalveien 222",
                "ZipCode": "0010",
                "ZipArea": "Oslo",
                "Country": "Norway"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "\"Company id\"",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "User not authorized for parent company"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/companies/{companyId}": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Gets company details",
        "description": "Subject to change. Data may be migrated to another API",
        "operationId": "GetCompanyById",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Company dto",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDetailResponse"
                },
                "example": {
                  "Name": "Z Data AS",
                  "Address": "Damsgårdsveien 167",
                  "ZipCode": "5160",
                  "ZipArea": "Laksevåg",
                  "Country": "Norge",
                  "OrganizationNumber": "976197976",
                  "CompanyId": "a7efc311-6be3-4ff4-9543-2f8ca9206826",
                  "State": 1
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDetailResponse"
                },
                "example": {
                  "Name": "Z Data AS",
                  "Address": "Damsgårdsveien 167",
                  "ZipCode": "5160",
                  "ZipArea": "Laksevåg",
                  "Country": "Norge",
                  "OrganizationNumber": "976197976",
                  "CompanyId": "a7efc311-6be3-4ff4-9543-2f8ca9206826",
                  "State": 1
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDetailResponse"
                },
                "example": {
                  "Name": "Z Data AS",
                  "Address": "Damsgårdsveien 167",
                  "ZipCode": "5160",
                  "ZipArea": "Laksevåg",
                  "Country": "Norge",
                  "OrganizationNumber": "976197976",
                  "CompanyId": "a7efc311-6be3-4ff4-9543-2f8ca9206826",
                  "State": 1
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Company"
        ],
        "summary": "Deactivate company",
        "operationId": "DeactivateCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "\"Company id\""
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Company not found"
          }
        }
      }
    },
    "/api/v3/companies/{companyId}/subsidiaries": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Gets company subsidiaries",
        "description": "Subject to change. Data may be migrated to another API",
        "operationId": "GetSubsidiaries",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subsidiary dto's",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDetailResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDetailResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDetailResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/companies/{companyId}/users": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Gets company users",
        "description": "Subject to change. Data may be migrated to another API",
        "operationId": "GetCompanyUsers",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "\"Company id\"",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/events/deadletters/{eventId}": {
      "get": {
        "tags": [
          "EventGridDeadLetter"
        ],
        "summary": "Get dead letter event",
        "operationId": "GetDeadLetterEvent",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventContentResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventContentResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventContentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Dead letter event not found"
          }
        }
      },
      "delete": {
        "tags": [
          "EventGridDeadLetter"
        ],
        "summary": "Delete dead letter event",
        "operationId": "DeleteDeadLetterEvent",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Dead letter event not found"
          }
        }
      }
    },
    "/api/v3/events/deadletters": {
      "get": {
        "tags": [
          "EventGridDeadLetter"
        ],
        "summary": "Get list of dead letter event metadata for client",
        "operationId": "GetDeadLetterEventsForClient",
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventResponsePaginatedResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventResponsePaginatedResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventResponsePaginatedResult"
                }
              }
            }
          },
          "404": {
            "description": "No dead letter events found for client"
          }
        }
      }
    },
    "/api/v3/events/companies/{companyId}/deadletters": {
      "get": {
        "tags": [
          "EventGridDeadLetter"
        ],
        "summary": "Get list of dead letter event metadata for company",
        "operationId": "GetDeadLetterEventsForCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventResponsePaginatedResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventResponsePaginatedResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeadLetterEventResponsePaginatedResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "No dead letter events found for company"
          }
        }
      }
    },
    "/api/v3/events/companies/{companyId}/subscriptions/{subscriptionName}/deadletters": {
      "get": {
        "tags": [
          "EventGridDeadLetter"
        ],
        "summary": "Get list of dead letter event metadata for subscription",
        "operationId": "GetDeadLetterEventsForSubscription",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "subscriptionName",
            "in": "path",
            "description": "Subscription name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeadLetterEventResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeadLetterEventResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeadLetterEventResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "No dead letter events found for subscription"
          }
        }
      }
    },
    "/api/v3/companies/{companyId}/subscriptions": {
      "get": {
        "tags": [
          "EventGridSubscription"
        ],
        "summary": "Get event subscriptions for company",
        "operationId": "GetEventSubscriptionsForCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponsePaginatedResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponsePaginatedResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponsePaginatedResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/v3/companies/{companyId}/subscriptions/{subscriptionName}": {
      "get": {
        "tags": [
          "EventGridSubscription"
        ],
        "summary": "Get subscription.",
        "operationId": "GetEventSubscription",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "subscriptionName",
            "in": "path",
            "description": "Subscription name (only A-Z a-z 0-9 and \"-\") (3-64 characters).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Subscription not found"
          }
        }
      },
      "put": {
        "tags": [
          "EventGridSubscription"
        ],
        "summary": "Create or update event subscription.",
        "operationId": "CreateEventGridSubscription",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "subscriptionName",
            "in": "path",
            "description": "Subscription name (only A-Z a-z 0-9 and \"-\") (3-64 characters).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Event subscription.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      },
      "delete": {
        "tags": [
          "EventGridSubscription"
        ],
        "summary": "Delete event subscription",
        "operationId": "DeleteEventSubscription",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "subscriptionName",
            "in": "path",
            "description": "Subscription name (only A-Z a-z 0-9 and \"-\") (3-64 characters).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Event subscription not found"
          }
        }
      }
    },
    "/api/v3/subscriptions/{subscriptionName}": {
      "put": {
        "tags": [
          "EventGridSubscription"
        ],
        "summary": "Create or update event subscription for multiple companies.",
        "operationId": "CreateEventGridSubscriptionBatch",
        "parameters": [
          {
            "name": "subscriptionName",
            "in": "path",
            "description": "Subscription name (only A-Z a-z 0-9 and \"-\") (3-64 characters).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Event subscription batch.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionCompanyIdsBatchRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionCompanyIdsBatchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionCompanyIdsBatchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionCompanyIdsBatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponsePaginatedResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponsePaginatedResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankEventSubscriptionResponsePaginatedResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Company ids not found"
          }
        }
      }
    },
    "/api/v3/onboarding/{bic}": {
      "get": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Returns an onboarding instruction on for the provided BIC",
        "operationId": "GetTemplateAsHtml",
        "parameters": [
          {
            "name": "bic",
            "in": "path",
            "description": "The bank's BIC code",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "description": "Language code (EN, NO, SE, DK, etc), defaults to NO",
            "schema": {
              "type": "string",
              "default": "NO"
            }
          },
          {
            "name": "payments",
            "in": "query",
            "description": "Include onboarding info for payments (if applicable)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "receivables",
            "in": "query",
            "description": "Include onboarding info for receivables (if applicable)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "statements",
            "in": "query",
            "description": "Include onboarding info for statements (if applicable)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "balances",
            "in": "query",
            "description": "Include onboarding info for balances (if applicable)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Onboarding instructions as HTML",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid grant type/client"
          }
        }
      }
    },
    "/api/v3/onboarding/preapproval/{account}": {
      "get": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Get whether approval requirement is activated on account",
        "operationId": "GetAccountBalance",
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "description": "Account number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalEnabledResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalEnabledResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalEnabledResponse"
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Account not found"
          }
        }
      }
    },
    "/api/v3/payments/{messageId}": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Get payments by messageId",
        "operationId": "GetByMessageId",
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "description": "Payment message id filter",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Pagination: Number to skip (default 0)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Pagination: Max number to return (default 100)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsResponse"
                },
                "example": {
                  "Payments": [
                    {
                      "PaymentId": "21c77f77-72c1-4a10-9a20-51f4c889edd5",
                      "SourceReference": "100;101;22;6",
                      "Status": 6,
                      "ExecutionDate": "0001-01-01T00:00:00",
                      "Links": [
                        {
                          "Rel": "payment",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a/c4dc6968-5161-4666-bd21-cee1a3c3ea72"
                        }
                      ]
                    }
                  ],
                  "Total": 15,
                  "Links": [
                    {
                      "Rel": "first",
                      "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a?skip=0&take=100"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsResponse"
                },
                "example": {
                  "Payments": [
                    {
                      "PaymentId": "21c77f77-72c1-4a10-9a20-51f4c889edd5",
                      "SourceReference": "100;101;22;6",
                      "Status": 6,
                      "ExecutionDate": "0001-01-01T00:00:00",
                      "Links": [
                        {
                          "Rel": "payment",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a/c4dc6968-5161-4666-bd21-cee1a3c3ea72"
                        }
                      ]
                    }
                  ],
                  "Total": 15,
                  "Links": [
                    {
                      "Rel": "first",
                      "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a?skip=0&take=100"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsResponse"
                },
                "example": {
                  "Payments": [
                    {
                      "PaymentId": "21c77f77-72c1-4a10-9a20-51f4c889edd5",
                      "SourceReference": "100;101;22;6",
                      "Status": 6,
                      "ExecutionDate": "0001-01-01T00:00:00",
                      "Links": [
                        {
                          "Rel": "payment",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a/c4dc6968-5161-4666-bd21-cee1a3c3ea72"
                        }
                      ]
                    }
                  ],
                  "Total": 15,
                  "Links": [
                    {
                      "Rel": "first",
                      "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a?skip=0&take=100"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid messageId"
          }
        }
      }
    },
    "/api/v3/payments/{companyId}/batches/{batchId}/transactions": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Get payments by batchId",
        "operationId": "GetPaymentsByBatchId",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Unique Guid for company",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "Unique Guid for the batch",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsResponse"
                },
                "example": {
                  "Payments": [
                    {
                      "PaymentId": "4bd3581b-f73c-44dd-b268-11ae57792553",
                      "SourceReference": "100;101;22;6",
                      "Status": 6,
                      "ExecutionDate": "0001-01-01T00:00:00",
                      "Links": [
                        {
                          "Rel": "payment",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a/c4dc6968-5161-4666-bd21-cee1a3c3ea72"
                        }
                      ]
                    }
                  ],
                  "Total": 15,
                  "Links": [
                    {
                      "Rel": "first",
                      "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a?skip=0&take=100"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsResponse"
                },
                "example": {
                  "Payments": [
                    {
                      "PaymentId": "4bd3581b-f73c-44dd-b268-11ae57792553",
                      "SourceReference": "100;101;22;6",
                      "Status": 6,
                      "ExecutionDate": "0001-01-01T00:00:00",
                      "Links": [
                        {
                          "Rel": "payment",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a/c4dc6968-5161-4666-bd21-cee1a3c3ea72"
                        }
                      ]
                    }
                  ],
                  "Total": 15,
                  "Links": [
                    {
                      "Rel": "first",
                      "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a?skip=0&take=100"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsResponse"
                },
                "example": {
                  "Payments": [
                    {
                      "PaymentId": "4bd3581b-f73c-44dd-b268-11ae57792553",
                      "SourceReference": "100;101;22;6",
                      "Status": 6,
                      "ExecutionDate": "0001-01-01T00:00:00",
                      "Links": [
                        {
                          "Rel": "payment",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a/c4dc6968-5161-4666-bd21-cee1a3c3ea72"
                        }
                      ]
                    }
                  ],
                  "Total": 15,
                  "Links": [
                    {
                      "Rel": "first",
                      "Href": "https://bankservice.zdata.no/api/v3/payments/8043f884-0a70-40f9-9e57-58347102412a?skip=0&take=100"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid messageId"
          }
        }
      }
    },
    "/api/v3/payments/{companyId}/batches/{batchId}": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Get payment lines by batchId",
        "operationId": "GetPaymentLinesByBatchId",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Unique Guid for company",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "Unique Guid for the batch",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentLineResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentLineResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentLineResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid messageId"
          }
        }
      }
    },
    "/api/v3/payments/{messageId}/{paymentId}": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Get payment by sourceReference",
        "operationId": "GetPaymentLineBySourceReference",
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "description": "The unique id for the remittance",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "description": "Payment id of payment line",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLineResponse"
                },
                "example": {
                  "PaymentId": "467f042f-820e-4c24-a607-135d41bc1e2c",
                  "Status": 0,
                  "RejectionCode": "RR09",
                  "RejectionMessage": "ISO Invalid Structured Creditor Reference",
                  "Amount": 50,
                  "Currency": "NOK",
                  "ExecutionDate": "0001-01-01T00:00:00",
                  "DebtorAccountNumber": "5337431043",
                  "CreditorName": "Kreditor AS",
                  "CreditorAccountNumber": "123456789012",
                  "CreditorAccountCurrency": "NOK",
                  "ChargeAmount": 70,
                  "ChargeCurrency": "NOK",
                  "Description": "Invoice number 32",
                  "InvoiceNumber": "Something",
                  "Settlement": {
                    "BookingDate": "2026-03-24T12:08:23.0826744+01:00",
                    "ValueDate": "2026-03-24T12:08:23.0826745+01:00",
                    "ExchangeRate": 1.2,
                    "Reference": "12345"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLineResponse"
                },
                "example": {
                  "PaymentId": "467f042f-820e-4c24-a607-135d41bc1e2c",
                  "Status": 0,
                  "RejectionCode": "RR09",
                  "RejectionMessage": "ISO Invalid Structured Creditor Reference",
                  "Amount": 50,
                  "Currency": "NOK",
                  "ExecutionDate": "0001-01-01T00:00:00",
                  "DebtorAccountNumber": "5337431043",
                  "CreditorName": "Kreditor AS",
                  "CreditorAccountNumber": "123456789012",
                  "CreditorAccountCurrency": "NOK",
                  "ChargeAmount": 70,
                  "ChargeCurrency": "NOK",
                  "Description": "Invoice number 32",
                  "InvoiceNumber": "Something",
                  "Settlement": {
                    "BookingDate": "2026-03-24T12:08:23.0826744+01:00",
                    "ValueDate": "2026-03-24T12:08:23.0826745+01:00",
                    "ExchangeRate": 1.2,
                    "Reference": "12345"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLineResponse"
                },
                "example": {
                  "PaymentId": "467f042f-820e-4c24-a607-135d41bc1e2c",
                  "Status": 0,
                  "RejectionCode": "RR09",
                  "RejectionMessage": "ISO Invalid Structured Creditor Reference",
                  "Amount": 50,
                  "Currency": "NOK",
                  "ExecutionDate": "0001-01-01T00:00:00",
                  "DebtorAccountNumber": "5337431043",
                  "CreditorName": "Kreditor AS",
                  "CreditorAccountNumber": "123456789012",
                  "CreditorAccountCurrency": "NOK",
                  "ChargeAmount": 70,
                  "ChargeCurrency": "NOK",
                  "Description": "Invoice number 32",
                  "InvoiceNumber": "Something",
                  "Settlement": {
                    "BookingDate": "2026-03-24T12:08:23.0826744+01:00",
                    "ValueDate": "2026-03-24T12:08:23.0826745+01:00",
                    "ExchangeRate": 1.2,
                    "Reference": "12345"
                  }
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid messageId"
          }
        }
      }
    },
    "/api/v3/payments/{companyId}/summaries": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Get summary of payments for company",
        "operationId": "GetPaymentsByCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Unique Guid for company",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Transaction state",
            "schema": {
              "$ref": "#/components/schemas/TransactionState"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Earliest date to be included",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Latest date to be included",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentsResponse"
                },
                "example": {
                  "Summaries": [
                    {
                      "MessageId": "964972f0-70d8-4ce1-8425-4403f28bb37a",
                      "Timestamp": "2026-03-24T12:08:23.0835291+01:00",
                      "FirstExecutionDate": "2026-03-24T12:08:23.0835274+01:00",
                      "LastExecutionDate": "2026-03-24T12:08:23.0835275+01:00",
                      "Amounts": {
                        "NOK": 55
                      },
                      "Links": [
                        {
                          "Rel": "payments",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/0a8f02d5-24e1-4ea5-be46-135c2fa4f8c9"
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentsResponse"
                },
                "example": {
                  "Summaries": [
                    {
                      "MessageId": "964972f0-70d8-4ce1-8425-4403f28bb37a",
                      "Timestamp": "2026-03-24T12:08:23.0835291+01:00",
                      "FirstExecutionDate": "2026-03-24T12:08:23.0835274+01:00",
                      "LastExecutionDate": "2026-03-24T12:08:23.0835275+01:00",
                      "Amounts": {
                        "NOK": 55
                      },
                      "Links": [
                        {
                          "Rel": "payments",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/0a8f02d5-24e1-4ea5-be46-135c2fa4f8c9"
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentsResponse"
                },
                "example": {
                  "Summaries": [
                    {
                      "MessageId": "964972f0-70d8-4ce1-8425-4403f28bb37a",
                      "Timestamp": "2026-03-24T12:08:23.0835291+01:00",
                      "FirstExecutionDate": "2026-03-24T12:08:23.0835274+01:00",
                      "LastExecutionDate": "2026-03-24T12:08:23.0835275+01:00",
                      "Amounts": {
                        "NOK": 55
                      },
                      "Links": [
                        {
                          "Rel": "payments",
                          "Href": "https://bankservice.zdata.no/api/v3/payments/0a8f02d5-24e1-4ea5-be46-135c2fa4f8c9"
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid companyId"
          }
        }
      }
    },
    "/api/v3/payments/{companyId}/movements": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Gets booked payments for company",
        "operationId": "GetPaymentMovementsByCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Unique Guid for company",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountNumber",
            "in": "query",
            "description": "Bank account number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Earliest date to be included",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Latest date to be included",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sourceReference",
            "in": "query",
            "description": "Source reference of a payment. When included, all payments within the same payment bundle will be returned",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsMovementsResponse"
                },
                "example": {
                  "BookedPayments": [
                    {
                      "BookedAmount": 55,
                      "AccountCurrency": "NOK",
                      "ExchangeRate": 0,
                      "BookingDate": "2026-03-24T12:08:23.0843546+01:00",
                      "BankReference": "123321",
                      "ChargeAmount": 66,
                      "ChargeCurrency": "NOK",
                      "Payments": [
                        {
                          "PaymentId": "00000000-0000-0000-0000-000000000000",
                          "MessageId": "00000000-0000-0000-0000-000000000000",
                          "Links": [
                            {
                              "Rel": "payment",
                              "Href": "http://bankservice.zdata.no/api/v3/payments/5cfd18e2-f37b-4d67-9661-f897b152d459/d0bde9d1-569d-4f5c-aaa7-f8197631fe23"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsMovementsResponse"
                },
                "example": {
                  "BookedPayments": [
                    {
                      "BookedAmount": 55,
                      "AccountCurrency": "NOK",
                      "ExchangeRate": 0,
                      "BookingDate": "2026-03-24T12:08:23.0843546+01:00",
                      "BankReference": "123321",
                      "ChargeAmount": 66,
                      "ChargeCurrency": "NOK",
                      "Payments": [
                        {
                          "PaymentId": "00000000-0000-0000-0000-000000000000",
                          "MessageId": "00000000-0000-0000-0000-000000000000",
                          "Links": [
                            {
                              "Rel": "payment",
                              "Href": "http://bankservice.zdata.no/api/v3/payments/5cfd18e2-f37b-4d67-9661-f897b152d459/d0bde9d1-569d-4f5c-aaa7-f8197631fe23"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsMovementsResponse"
                },
                "example": {
                  "BookedPayments": [
                    {
                      "BookedAmount": 55,
                      "AccountCurrency": "NOK",
                      "ExchangeRate": 0,
                      "BookingDate": "2026-03-24T12:08:23.0843546+01:00",
                      "BankReference": "123321",
                      "ChargeAmount": 66,
                      "ChargeCurrency": "NOK",
                      "Payments": [
                        {
                          "PaymentId": "00000000-0000-0000-0000-000000000000",
                          "MessageId": "00000000-0000-0000-0000-000000000000",
                          "Links": [
                            {
                              "Rel": "payment",
                              "Href": "http://bankservice.zdata.no/api/v3/payments/5cfd18e2-f37b-4d67-9661-f897b152d459/d0bde9d1-569d-4f5c-aaa7-f8197631fe23"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid messageId/sourceReference"
          }
        }
      }
    },
    "/api/v3/payments/{companyId}/batches/{batchId}/movements": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Gets booked payments for settlement",
        "operationId": "GetPaymentMovementsByMessageId",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Unique Guid for company",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "Unique Guid for the batch",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of entries to skip",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of entries to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsMovementsResponse"
                },
                "example": {
                  "BookedPayments": [
                    {
                      "BookedAmount": 55,
                      "AccountCurrency": "NOK",
                      "ExchangeRate": 0,
                      "BookingDate": "2026-03-24T12:08:23.0847021+01:00",
                      "BankReference": "123321",
                      "ChargeAmount": 66,
                      "ChargeCurrency": "NOK",
                      "Payments": [
                        {
                          "PaymentId": "00000000-0000-0000-0000-000000000000",
                          "MessageId": "00000000-0000-0000-0000-000000000000",
                          "Links": [
                            {
                              "Rel": "payment",
                              "Href": "http://bankservice.zdata.no/api/v3/payments/5cfd18e2-f37b-4d67-9661-f897b152d459/d0bde9d1-569d-4f5c-aaa7-f8197631fe23"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsMovementsResponse"
                },
                "example": {
                  "BookedPayments": [
                    {
                      "BookedAmount": 55,
                      "AccountCurrency": "NOK",
                      "ExchangeRate": 0,
                      "BookingDate": "2026-03-24T12:08:23.0847021+01:00",
                      "BankReference": "123321",
                      "ChargeAmount": 66,
                      "ChargeCurrency": "NOK",
                      "Payments": [
                        {
                          "PaymentId": "00000000-0000-0000-0000-000000000000",
                          "MessageId": "00000000-0000-0000-0000-000000000000",
                          "Links": [
                            {
                              "Rel": "payment",
                              "Href": "http://bankservice.zdata.no/api/v3/payments/5cfd18e2-f37b-4d67-9661-f897b152d459/d0bde9d1-569d-4f5c-aaa7-f8197631fe23"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsMovementsResponse"
                },
                "example": {
                  "BookedPayments": [
                    {
                      "BookedAmount": 55,
                      "AccountCurrency": "NOK",
                      "ExchangeRate": 0,
                      "BookingDate": "2026-03-24T12:08:23.0847021+01:00",
                      "BankReference": "123321",
                      "ChargeAmount": 66,
                      "ChargeCurrency": "NOK",
                      "Payments": [
                        {
                          "PaymentId": "00000000-0000-0000-0000-000000000000",
                          "MessageId": "00000000-0000-0000-0000-000000000000",
                          "Links": [
                            {
                              "Rel": "payment",
                              "Href": "http://bankservice.zdata.no/api/v3/payments/5cfd18e2-f37b-4d67-9661-f897b152d459/d0bde9d1-569d-4f5c-aaa7-f8197631fe23"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "Total": 0
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid companyId/settlementId"
          }
        }
      }
    },
    "/api/v3/payments/{messageId}/dismiss": {
      "put": {
        "tags": [
          "Payment"
        ],
        "summary": "Dismiss payments",
        "description": "Tokens provided to this endpoint must use implicit or authorization code grant type flows.",
        "operationId": "DismissPaymentsByMessageId",
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "description": "The unique id for the payments",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Rejection message",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RejectionDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectionDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectionDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RejectionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDismissalResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDismissalResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDismissalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Already approved, Missing access to bankaccounts",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDismissalResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDismissalResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDismissalResponse"
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Remittance not found"
          }
        }
      }
    },
    "/api/v3/payments/{messageId}/approve": {
      "put": {
        "tags": [
          "Payment"
        ],
        "summary": "Approves payments by message id.",
        "description": "Tokens provided to this endpoint must use implicit or authorization code grant type flows.",
        "operationId": "ApprovePaymentsByMessageId",
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "description": "The unique id for the payments",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Already reviewed, Payments were approved",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalResponse"
                }
              }
            }
          },
          "401": {
            "description": "User not authorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Contains authentication method used to gain access to resource",
                "schema": {
                  "type": "string",
                  "description": "Contains authentication method used to gain access to resource",
                  "format": ""
                }
              },
              "X-Authentication-Reason": {
                "description": "Contains keywords that describe why access is not granted. These values can be provided as acr_values to token server for user verification",
                "schema": {
                  "type": "string",
                  "description": "Contains keywords that describe why access is not granted. These values can be provided as acr_values to token server for user verification",
                  "format": ""
                }
              }
            }
          },
          "404": {
            "description": "Remittance not found"
          }
        }
      },
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Get payment approval data",
        "operationId": "GetApprovalsByMessageId",
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "description": "Payment message id filter",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalInfoResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalInfoResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentApprovalInfoResponse"
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Invalid messageId"
          }
        }
      }
    },
    "/api/v3/payments/{companyId}": {
      "post": {
        "tags": [
          "Payment"
        ],
        "summary": "Submits payments for an account.\r\n\nThe AccountNumber MUST be owned by the company and in an account group that the user has access to.",
        "operationId": "CreatePaymentsForCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentsRequest"
              },
              "example": {
                "MessageId": "f3327370-aa1d-48de-aac8-d37986413b46",
                "AccountNumber": "52011976166",
                "SinglePayments": false,
                "PaymentLines": [
                  {
                    "PaymentMethod": 1,
                    "Priority": 1,
                    "PaymentPurpose": 0,
                    "ExecutionDate": "2026-03-31T00:00:00+02:00",
                    "SourceReference": "12346",
                    "RegulatoryReportingCode": 14,
                    "RegulatoryReportingInfo": "Kjøp og salg",
                    "Amount": 1,
                    "Currency": "NOK",
                    "InvoiceNo": "21515",
                    "Creditor": {
                      "Name": "Ola Nordmann",
                      "CountryCode": "NO",
                      "AccountNumber": "NO8595220610722",
                      "Bic": "HANDNOKK",
                      "AccountType": 0,
                      "Address": "Veien 4",
                      "Address2": "Veien 2",
                      "Address3": "Veien 3",
                      "ZipCode": "4250",
                      "ZipArea": "Kopervik"
                    }
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentsRequest"
              },
              "example": {
                "MessageId": "f3327370-aa1d-48de-aac8-d37986413b46",
                "AccountNumber": "52011976166",
                "SinglePayments": false,
                "PaymentLines": [
                  {
                    "PaymentMethod": 1,
                    "Priority": 1,
                    "PaymentPurpose": 0,
                    "ExecutionDate": "2026-03-31T00:00:00+02:00",
                    "SourceReference": "12346",
                    "RegulatoryReportingCode": 14,
                    "RegulatoryReportingInfo": "Kjøp og salg",
                    "Amount": 1,
                    "Currency": "NOK",
                    "InvoiceNo": "21515",
                    "Creditor": {
                      "Name": "Ola Nordmann",
                      "CountryCode": "NO",
                      "AccountNumber": "NO8595220610722",
                      "Bic": "HANDNOKK",
                      "AccountType": 0,
                      "Address": "Veien 4",
                      "Address2": "Veien 2",
                      "Address3": "Veien 3",
                      "ZipCode": "4250",
                      "ZipArea": "Kopervik"
                    }
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentsRequest"
              },
              "example": {
                "MessageId": "f3327370-aa1d-48de-aac8-d37986413b46",
                "AccountNumber": "52011976166",
                "SinglePayments": false,
                "PaymentLines": [
                  {
                    "PaymentMethod": 1,
                    "Priority": 1,
                    "PaymentPurpose": 0,
                    "ExecutionDate": "2026-03-31T00:00:00+02:00",
                    "SourceReference": "12346",
                    "RegulatoryReportingCode": 14,
                    "RegulatoryReportingInfo": "Kjøp og salg",
                    "Amount": 1,
                    "Currency": "NOK",
                    "InvoiceNo": "21515",
                    "Creditor": {
                      "Name": "Ola Nordmann",
                      "CountryCode": "NO",
                      "AccountNumber": "NO8595220610722",
                      "Bic": "HANDNOKK",
                      "AccountType": 0,
                      "Address": "Veien 4",
                      "Address2": "Veien 2",
                      "Address3": "Veien 3",
                      "ZipCode": "4250",
                      "ZipArea": "Kopervik"
                    }
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentsRequest"
              },
              "example": {
                "MessageId": "f3327370-aa1d-48de-aac8-d37986413b46",
                "AccountNumber": "52011976166",
                "SinglePayments": false,
                "PaymentLines": [
                  {
                    "PaymentMethod": 1,
                    "Priority": 1,
                    "PaymentPurpose": 0,
                    "ExecutionDate": "2026-03-31T00:00:00+02:00",
                    "SourceReference": "12346",
                    "RegulatoryReportingCode": 14,
                    "RegulatoryReportingInfo": "Kjøp og salg",
                    "Amount": 1,
                    "Currency": "NOK",
                    "InvoiceNo": "21515",
                    "Creditor": {
                      "Name": "Ola Nordmann",
                      "CountryCode": "NO",
                      "AccountNumber": "NO8595220610722",
                      "Bic": "HANDNOKK",
                      "AccountType": 0,
                      "Address": "Veien 4",
                      "Address2": "Veien 2",
                      "Address3": "Veien 3",
                      "ZipCode": "4250",
                      "ZipArea": "Kopervik"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/receivables/{companyId}/{state}": {
      "get": {
        "tags": [
          "Receivable"
        ],
        "summary": "Get incoming payments",
        "operationId": "GetIncomingPayments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company Id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "path",
            "description": "Receivable state filter",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/InpaymentState"
            }
          },
          {
            "name": "account",
            "in": "query",
            "description": "Account filter (optional)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Time frame limitation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Time frame limitation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Pagination: Max number to return (default 100)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Pagination: Number to skip (default 0)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ReceivablesResponse"
                },
                "example": {
                  "State": 0,
                  "Receivables": [
                    {
                      "ReceivableId": "15757c4b-9fcf-4427-8933-fe5bdfa69f3f",
                      "EntryId": "067b2505-d2c1-43fe-bc08-337ee2693770",
                      "AccountNumber": "123456789012",
                      "DebtorAccountNumber": "098765432112",
                      "DebtorName": "Donald Duck",
                      "DebtorAddress": "Veien 12A",
                      "ArchiveReference": "1234",
                      "Description": "Submitted to Onkel Skrue",
                      "InvoiceNumber": "12345",
                      "BookingDate": "2026-03-24T12:08:23.0881616+01:00",
                      "ValueDate": "2026-03-24T12:08:23.0881629+01:00",
                      "Amount": 55,
                      "Currency": "NOK",
                      "BookedAmount": 65,
                      "AccountCurrency": "NOK",
                      "ChargeAmount": 10,
                      "ChargeCurrency": "NOK",
                      "Type": 0,
                      "BankTransactionCode": "PMNT-ICDT-DMCT"
                    }
                  ],
                  "Total": 0
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceivablesResponse"
                },
                "example": {
                  "State": 0,
                  "Receivables": [
                    {
                      "ReceivableId": "15757c4b-9fcf-4427-8933-fe5bdfa69f3f",
                      "EntryId": "067b2505-d2c1-43fe-bc08-337ee2693770",
                      "AccountNumber": "123456789012",
                      "DebtorAccountNumber": "098765432112",
                      "DebtorName": "Donald Duck",
                      "DebtorAddress": "Veien 12A",
                      "ArchiveReference": "1234",
                      "Description": "Submitted to Onkel Skrue",
                      "InvoiceNumber": "12345",
                      "BookingDate": "2026-03-24T12:08:23.0881616+01:00",
                      "ValueDate": "2026-03-24T12:08:23.0881629+01:00",
                      "Amount": 55,
                      "Currency": "NOK",
                      "BookedAmount": 65,
                      "AccountCurrency": "NOK",
                      "ChargeAmount": 10,
                      "ChargeCurrency": "NOK",
                      "Type": 0,
                      "BankTransactionCode": "PMNT-ICDT-DMCT"
                    }
                  ],
                  "Total": 0
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceivablesResponse"
                },
                "example": {
                  "State": 0,
                  "Receivables": [
                    {
                      "ReceivableId": "15757c4b-9fcf-4427-8933-fe5bdfa69f3f",
                      "EntryId": "067b2505-d2c1-43fe-bc08-337ee2693770",
                      "AccountNumber": "123456789012",
                      "DebtorAccountNumber": "098765432112",
                      "DebtorName": "Donald Duck",
                      "DebtorAddress": "Veien 12A",
                      "ArchiveReference": "1234",
                      "Description": "Submitted to Onkel Skrue",
                      "InvoiceNumber": "12345",
                      "BookingDate": "2026-03-24T12:08:23.0881616+01:00",
                      "ValueDate": "2026-03-24T12:08:23.0881629+01:00",
                      "Amount": 55,
                      "Currency": "NOK",
                      "BookedAmount": 65,
                      "AccountCurrency": "NOK",
                      "ChargeAmount": 10,
                      "ChargeCurrency": "NOK",
                      "Type": 0,
                      "BankTransactionCode": "PMNT-ICDT-DMCT"
                    }
                  ],
                  "Total": 0
                }
              }
            }
          },
          "400": {
            "description": "\"Invalid state\""
          },
          "401": {
            "description": "User not authorized"
          }
        }
      }
    },
    "/api/v3/receivables/{companyId}/batches/{batchId}/transactions": {
      "get": {
        "tags": [
          "Receivable"
        ],
        "summary": "Get receivables for a given file. Only valid with client credentials flow",
        "operationId": "GetReceivablesByBatchId",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company Id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "Batch id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Pagination: Max number to return (default 100)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Pagination: Number to skip (default 0)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ReceivableDtoPaginatedResult"
                },
                "example": {
                  "TotalCount": 1,
                  "Skip": 0,
                  "Take": 10,
                  "Items": [
                    {
                      "ReceivableId": "2177a2b0-bada-4d95-a759-3a81d25138c3",
                      "EntryId": "5fa5d083-b19f-4a96-91f0-bc41d98da5d9",
                      "AccountNumber": "123456789012",
                      "DebtorAccountNumber": "098765432112",
                      "DebtorName": "Donald Duck",
                      "DebtorAddress": "Veien 12A",
                      "ArchiveReference": "1234",
                      "Description": "Submitted to Onkel Skrue",
                      "InvoiceNumber": "12345",
                      "BookingDate": "2026-03-24T12:08:23.0886041+01:00",
                      "ValueDate": "2026-03-24T12:08:23.0886054+01:00",
                      "Amount": 55,
                      "Currency": "NOK",
                      "BookedAmount": 65,
                      "AccountCurrency": "NOK",
                      "ChargeAmount": 10,
                      "ChargeCurrency": "NOK",
                      "Type": 0,
                      "BankTransactionCode": "PMNT-ICDT-DMCT"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceivableDtoPaginatedResult"
                },
                "example": {
                  "TotalCount": 1,
                  "Skip": 0,
                  "Take": 10,
                  "Items": [
                    {
                      "ReceivableId": "2177a2b0-bada-4d95-a759-3a81d25138c3",
                      "EntryId": "5fa5d083-b19f-4a96-91f0-bc41d98da5d9",
                      "AccountNumber": "123456789012",
                      "DebtorAccountNumber": "098765432112",
                      "DebtorName": "Donald Duck",
                      "DebtorAddress": "Veien 12A",
                      "ArchiveReference": "1234",
                      "Description": "Submitted to Onkel Skrue",
                      "InvoiceNumber": "12345",
                      "BookingDate": "2026-03-24T12:08:23.0886041+01:00",
                      "ValueDate": "2026-03-24T12:08:23.0886054+01:00",
                      "Amount": 55,
                      "Currency": "NOK",
                      "BookedAmount": 65,
                      "AccountCurrency": "NOK",
                      "ChargeAmount": 10,
                      "ChargeCurrency": "NOK",
                      "Type": 0,
                      "BankTransactionCode": "PMNT-ICDT-DMCT"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceivableDtoPaginatedResult"
                },
                "example": {
                  "TotalCount": 1,
                  "Skip": 0,
                  "Take": 10,
                  "Items": [
                    {
                      "ReceivableId": "2177a2b0-bada-4d95-a759-3a81d25138c3",
                      "EntryId": "5fa5d083-b19f-4a96-91f0-bc41d98da5d9",
                      "AccountNumber": "123456789012",
                      "DebtorAccountNumber": "098765432112",
                      "DebtorName": "Donald Duck",
                      "DebtorAddress": "Veien 12A",
                      "ArchiveReference": "1234",
                      "Description": "Submitted to Onkel Skrue",
                      "InvoiceNumber": "12345",
                      "BookingDate": "2026-03-24T12:08:23.0886041+01:00",
                      "ValueDate": "2026-03-24T12:08:23.0886054+01:00",
                      "Amount": 55,
                      "Currency": "NOK",
                      "BookedAmount": 65,
                      "AccountCurrency": "NOK",
                      "ChargeAmount": 10,
                      "ChargeCurrency": "NOK",
                      "Type": 0,
                      "BankTransactionCode": "PMNT-ICDT-DMCT"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Id not found"
          }
        }
      }
    },
    "/api/v3/receivables/{companyId}/batches/{batchId}": {
      "put": {
        "tags": [
          "Receivable"
        ],
        "summary": "Change state of all receivables in batch.",
        "operationId": "PutReceivablesByBatch",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company Id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "Batch id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Update model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesBatchRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesBatchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesBatchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesBatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Id not found"
          }
        }
      }
    },
    "/api/v3/receivables/update": {
      "post": {
        "tags": [
          "Receivable"
        ],
        "summary": "Update transaction state",
        "operationId": "PostUpdateState",
        "requestBody": {
          "description": "Update model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesRequest"
              },
              "example": {
                "State": 2,
                "ErrorMessage": "Something failed",
                "Id": "511cdf4e-19ae-4234-acad-6478d88098b1"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesRequest"
              },
              "example": {
                "State": 2,
                "ErrorMessage": "Something failed",
                "Id": "511cdf4e-19ae-4234-acad-6478d88098b1"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesRequest"
              },
              "example": {
                "State": 2,
                "ErrorMessage": "Something failed",
                "Id": "511cdf4e-19ae-4234-acad-6478d88098b1"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReceivablesRequest"
              },
              "example": {
                "State": 2,
                "ErrorMessage": "Something failed",
                "Id": "511cdf4e-19ae-4234-acad-6478d88098b1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated states"
          },
          "400": {
            "description": "\"Invalid model\"",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Incoming payment id not found"
          }
        }
      }
    },
    "/api/v3/receipt/suppliernotification/{companyId}": {
      "get": {
        "tags": [
          "Recipients"
        ],
        "summary": "Lists all payments recipients for a company",
        "operationId": "GetRecipientsForCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company identification",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of recipients",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Recipients for company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Recipients"
        ],
        "summary": "Create new recipient",
        "operationId": "AddRecipientToCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientRequest"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientRequest"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientRequest"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Recipients for company not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/receipt/suppliernotification/{companyId}/{recipientId}": {
      "put": {
        "tags": [
          "Recipients"
        ],
        "summary": "Update recipient",
        "operationId": "UpdateRecipient",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recipientId",
            "in": "path",
            "description": "Id of recipient",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Update model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecipientRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRecipientRequest"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRecipientRequest"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRecipientRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Recipient not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Recipients"
        ],
        "summary": "Delete recipient",
        "operationId": "DeleteRecipient",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recipientId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRecipientResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Action not permitted for user",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Recipient not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/services/bank": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "POST request for new bank integration",
        "operationId": "PostBankService",
        "requestBody": {
          "description": "Model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankServiceRequest"
              },
              "example": {
                "CompanyId": "acd23f17-5dfb-4de2-ac92-4ea7d240d98e",
                "Bic": "DNBANOKK",
                "BankApproval": true
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankServiceRequest"
              },
              "example": {
                "CompanyId": "acd23f17-5dfb-4de2-ac92-4ea7d240d98e",
                "Bic": "DNBANOKK",
                "BankApproval": true
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankServiceRequest"
              },
              "example": {
                "CompanyId": "acd23f17-5dfb-4de2-ac92-4ea7d240d98e",
                "Bic": "DNBANOKK",
                "BankApproval": true
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBankServiceRequest"
              },
              "example": {
                "CompanyId": "acd23f17-5dfb-4de2-ac92-4ea7d240d98e",
                "Bic": "DNBANOKK",
                "BankApproval": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns service id. Request added for ZData approval",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "400": {
            "description": "Unknown BIC, contact ZData to have this bank added",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "User not authorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/services/bank/{companyId}": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Gets company services",
        "operationId": "GetBankServicesForCompany",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Optional state filter",
            "schema": {
              "$ref": "#/components/schemas/BankServiceState"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service dto's",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BankServiceResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BankServiceResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BankServiceResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/v3/services/bank/{companyId}/{serviceId}": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Gets company service",
        "operationId": "GetBankServiceById",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "serviceId",
            "in": "path",
            "description": "Service id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service dto",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankServiceResponse"
                },
                "example": {
                  "Id": "440f78e1-9744-4ba6-893a-021c8757b9f1",
                  "CompanyId": "bdcbf6fc-b11e-4983-b480-48ac6da7248d",
                  "Name": "Agreenet for Donal Duck",
                  "State": 0,
                  "BIC": "DNBANOKK",
                  "Created": "2026-03-24T12:08:23.0964071+01:00"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankServiceResponse"
                },
                "example": {
                  "Id": "440f78e1-9744-4ba6-893a-021c8757b9f1",
                  "CompanyId": "bdcbf6fc-b11e-4983-b480-48ac6da7248d",
                  "Name": "Agreenet for Donal Duck",
                  "State": 0,
                  "BIC": "DNBANOKK",
                  "Created": "2026-03-24T12:08:23.0964071+01:00"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankServiceResponse"
                },
                "example": {
                  "Id": "440f78e1-9744-4ba6-893a-021c8757b9f1",
                  "CompanyId": "bdcbf6fc-b11e-4983-b480-48ac6da7248d",
                  "Name": "Agreenet for Donal Duck",
                  "State": 0,
                  "BIC": "DNBANOKK",
                  "Created": "2026-03-24T12:08:23.0964071+01:00"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Service not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/statements/{companyId}": {
      "get": {
        "tags": [
          "Statement"
        ],
        "summary": "Returns bank statements for a given company. All statements are given in aggregated form, to get detailed transactions use the transactions link",
        "operationId": "GetStatementsByAccountAndDateSpan",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountNo",
            "in": "query",
            "description": "Optional filtering on account number",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Timeframe limitation, must be provided together with toDate",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Timeframe limitation, must be provided together with fromDate",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Optional filtering on transaction state, state can be used to avoid downloading statements twice, use state link (PUT) to set state",
            "schema": {
              "$ref": "#/components/schemas/BankStatementState"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementAggregatedResponse"
                },
                "example": {
                  "Statements": [
                    {
                      "StatementId": "c02aa352-5b2b-4426-9fb9-92c6a2bd1e78",
                      "Name": "Donal Duck",
                      "AccountNumber": "123456789012",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "121212",
                      "BankInformation": "NO124123 23123",
                      "StructuredReference": "123123",
                      "Amount": 55,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0977273+01:00",
                      "ValueDate": "2026-03-24T12:08:23.097729+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "EntryReference": "123123",
                      "TransactionCount": 1,
                      "Links": [
                        {
                          "Rel": "details",
                          "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/transactions"
                        },
                        {
                          "Rel": "state",
                          "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/state"
                        }
                      ]
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementAggregatedResponse"
                },
                "example": {
                  "Statements": [
                    {
                      "StatementId": "c02aa352-5b2b-4426-9fb9-92c6a2bd1e78",
                      "Name": "Donal Duck",
                      "AccountNumber": "123456789012",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "121212",
                      "BankInformation": "NO124123 23123",
                      "StructuredReference": "123123",
                      "Amount": 55,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0977273+01:00",
                      "ValueDate": "2026-03-24T12:08:23.097729+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "EntryReference": "123123",
                      "TransactionCount": 1,
                      "Links": [
                        {
                          "Rel": "details",
                          "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/transactions"
                        },
                        {
                          "Rel": "state",
                          "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/state"
                        }
                      ]
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementAggregatedResponse"
                },
                "example": {
                  "Statements": [
                    {
                      "StatementId": "c02aa352-5b2b-4426-9fb9-92c6a2bd1e78",
                      "Name": "Donal Duck",
                      "AccountNumber": "123456789012",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "121212",
                      "BankInformation": "NO124123 23123",
                      "StructuredReference": "123123",
                      "Amount": 55,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0977273+01:00",
                      "ValueDate": "2026-03-24T12:08:23.097729+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "EntryReference": "123123",
                      "TransactionCount": 1,
                      "Links": [
                        {
                          "Rel": "details",
                          "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/transactions"
                        },
                        {
                          "Rel": "state",
                          "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/state"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid account number or date format",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "User not authorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Statements not found for this company",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/statements/{companyId}/entries/{entryId}": {
      "get": {
        "tags": [
          "Statement"
        ],
        "summary": "Returns bank statements for a given id in aggregated form. To get detailed transactions use the transactions link",
        "operationId": "GetStatementByStatementId",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "The company id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entryId",
            "in": "path",
            "description": "The entry id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatement"
                },
                "example": {
                  "StatementId": "61191513-c0d8-4a81-bd0f-217b4f51e580",
                  "Name": "Donal Duck",
                  "AccountNumber": "123456789012",
                  "AccountCurrency": "NOK",
                  "ArchiveReference": "121212",
                  "BankInformation": "NO124123 23123",
                  "StructuredReference": "123123",
                  "Amount": 55,
                  "AmountCurrency": "NOK",
                  "Description": "Description",
                  "BookingDate": "2026-03-24T12:08:23.0986847+01:00",
                  "ValueDate": "2026-03-24T12:08:23.0986861+01:00",
                  "BankTransactionCodes": "PMNT-ICDT-DMCT",
                  "EntryReference": "123123",
                  "TransactionCount": 1,
                  "Links": [
                    {
                      "Rel": "details",
                      "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/transactions"
                    },
                    {
                      "Rel": "state",
                      "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/state"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatement"
                },
                "example": {
                  "StatementId": "61191513-c0d8-4a81-bd0f-217b4f51e580",
                  "Name": "Donal Duck",
                  "AccountNumber": "123456789012",
                  "AccountCurrency": "NOK",
                  "ArchiveReference": "121212",
                  "BankInformation": "NO124123 23123",
                  "StructuredReference": "123123",
                  "Amount": 55,
                  "AmountCurrency": "NOK",
                  "Description": "Description",
                  "BookingDate": "2026-03-24T12:08:23.0986847+01:00",
                  "ValueDate": "2026-03-24T12:08:23.0986861+01:00",
                  "BankTransactionCodes": "PMNT-ICDT-DMCT",
                  "EntryReference": "123123",
                  "TransactionCount": 1,
                  "Links": [
                    {
                      "Rel": "details",
                      "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/transactions"
                    },
                    {
                      "Rel": "state",
                      "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/state"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatement"
                },
                "example": {
                  "StatementId": "61191513-c0d8-4a81-bd0f-217b4f51e580",
                  "Name": "Donal Duck",
                  "AccountNumber": "123456789012",
                  "AccountCurrency": "NOK",
                  "ArchiveReference": "121212",
                  "BankInformation": "NO124123 23123",
                  "StructuredReference": "123123",
                  "Amount": 55,
                  "AmountCurrency": "NOK",
                  "Description": "Description",
                  "BookingDate": "2026-03-24T12:08:23.0986847+01:00",
                  "ValueDate": "2026-03-24T12:08:23.0986861+01:00",
                  "BankTransactionCodes": "PMNT-ICDT-DMCT",
                  "EntryReference": "123123",
                  "TransactionCount": 1,
                  "Links": [
                    {
                      "Rel": "details",
                      "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/transactions"
                    },
                    {
                      "Rel": "state",
                      "Href": "https://bankservicedemo.zdata.no/api/v3/statements/c32e6b5b-ca63-48d0-91ab-d5c6cb781737/7eeda2b9-e57e-49e3-8591-f3fc2cad2cd7/state"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "User not authorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Statements not found for this company",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/statements/{companyId}/{statementId}/transactions": {
      "get": {
        "tags": [
          "Statement"
        ],
        "summary": "Returns all transactions for a given statement.",
        "description": "Renamed to /{companyId}/entries/{entryId}/transactions",
        "operationId": "GetStatementDetails",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Id of company that owns the statement",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "statementId",
            "in": "path",
            "description": "Unique StatementId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementDetailsResponse"
                },
                "example": {
                  "StatementId": "fb0847ad-4c7c-40f7-837c-c75b8c1a8c2a",
                  "Transactions": [
                    {
                      "StatementId": "17b53abc-4520-4025-9a45-dd7118ad8eb5",
                      "Name": "Some name",
                      "AccountNumber": "1233456",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "12345677",
                      "BankInformation": "123123",
                      "StructuredReference": "31231231",
                      "Amount": 56,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0994153+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "Type": "Debit",
                      "TransactionId": "9c89d83d-1595-49b0-aa57-632538ad2676",
                      "InvoiceNumber": "123345",
                      "ReceiverName": "Donald Duck",
                      "ReceiverAccount": "123445678978",
                      "SenderName": "Dolly Duck",
                      "SenderAccount": "098765432112",
                      "UnstructuredText": {
                        "Ustrd": [],
                        "AddtlTxInf": [],
                        "InstrId": [
                          "InstrId A, InstrId B"
                        ],
                        "PrtryCd": [],
                        "AddtlNtryInf": [
                          "AddtlNtryInf Text"
                        ]
                      }
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementDetailsResponse"
                },
                "example": {
                  "StatementId": "fb0847ad-4c7c-40f7-837c-c75b8c1a8c2a",
                  "Transactions": [
                    {
                      "StatementId": "17b53abc-4520-4025-9a45-dd7118ad8eb5",
                      "Name": "Some name",
                      "AccountNumber": "1233456",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "12345677",
                      "BankInformation": "123123",
                      "StructuredReference": "31231231",
                      "Amount": 56,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0994153+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "Type": "Debit",
                      "TransactionId": "9c89d83d-1595-49b0-aa57-632538ad2676",
                      "InvoiceNumber": "123345",
                      "ReceiverName": "Donald Duck",
                      "ReceiverAccount": "123445678978",
                      "SenderName": "Dolly Duck",
                      "SenderAccount": "098765432112",
                      "UnstructuredText": {
                        "Ustrd": [],
                        "AddtlTxInf": [],
                        "InstrId": [
                          "InstrId A, InstrId B"
                        ],
                        "PrtryCd": [],
                        "AddtlNtryInf": [
                          "AddtlNtryInf Text"
                        ]
                      }
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementDetailsResponse"
                },
                "example": {
                  "StatementId": "fb0847ad-4c7c-40f7-837c-c75b8c1a8c2a",
                  "Transactions": [
                    {
                      "StatementId": "17b53abc-4520-4025-9a45-dd7118ad8eb5",
                      "Name": "Some name",
                      "AccountNumber": "1233456",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "12345677",
                      "BankInformation": "123123",
                      "StructuredReference": "31231231",
                      "Amount": 56,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0994153+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "Type": "Debit",
                      "TransactionId": "9c89d83d-1595-49b0-aa57-632538ad2676",
                      "InvoiceNumber": "123345",
                      "ReceiverName": "Donald Duck",
                      "ReceiverAccount": "123445678978",
                      "SenderName": "Dolly Duck",
                      "SenderAccount": "098765432112",
                      "UnstructuredText": {
                        "Ustrd": [],
                        "AddtlTxInf": [],
                        "InstrId": [
                          "InstrId A, InstrId B"
                        ],
                        "PrtryCd": [],
                        "AddtlNtryInf": [
                          "AddtlNtryInf Text"
                        ]
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/api/v3/statements/{companyId}/entries/{entryId}/transactions": {
      "get": {
        "tags": [
          "Statement"
        ],
        "summary": "Returns all transactions for a given statement.",
        "operationId": "GetStatementEntryTransactions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Id of company that owns the statement",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entryId",
            "in": "path",
            "description": "Unique statement entry id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementDetailsResponse"
                },
                "example": {
                  "StatementId": "73cf170b-6e6a-431e-ac68-cdf0cded1dcb",
                  "Transactions": [
                    {
                      "StatementId": "b874ce9a-48f7-4ad2-ac73-b73709db0e40",
                      "Name": "Some name",
                      "AccountNumber": "1233456",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "12345677",
                      "BankInformation": "123123",
                      "StructuredReference": "31231231",
                      "Amount": 56,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0997016+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "Type": "Debit",
                      "TransactionId": "620b6131-21e7-4673-a0b8-482ccf3de568",
                      "InvoiceNumber": "123345",
                      "ReceiverName": "Donald Duck",
                      "ReceiverAccount": "123445678978",
                      "SenderName": "Dolly Duck",
                      "SenderAccount": "098765432112",
                      "UnstructuredText": {
                        "Ustrd": [],
                        "AddtlTxInf": [],
                        "InstrId": [
                          "InstrId A, InstrId B"
                        ],
                        "PrtryCd": [],
                        "AddtlNtryInf": [
                          "AddtlNtryInf Text"
                        ]
                      }
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementDetailsResponse"
                },
                "example": {
                  "StatementId": "73cf170b-6e6a-431e-ac68-cdf0cded1dcb",
                  "Transactions": [
                    {
                      "StatementId": "b874ce9a-48f7-4ad2-ac73-b73709db0e40",
                      "Name": "Some name",
                      "AccountNumber": "1233456",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "12345677",
                      "BankInformation": "123123",
                      "StructuredReference": "31231231",
                      "Amount": 56,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0997016+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "Type": "Debit",
                      "TransactionId": "620b6131-21e7-4673-a0b8-482ccf3de568",
                      "InvoiceNumber": "123345",
                      "ReceiverName": "Donald Duck",
                      "ReceiverAccount": "123445678978",
                      "SenderName": "Dolly Duck",
                      "SenderAccount": "098765432112",
                      "UnstructuredText": {
                        "Ustrd": [],
                        "AddtlTxInf": [],
                        "InstrId": [
                          "InstrId A, InstrId B"
                        ],
                        "PrtryCd": [],
                        "AddtlNtryInf": [
                          "AddtlNtryInf Text"
                        ]
                      }
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementDetailsResponse"
                },
                "example": {
                  "StatementId": "73cf170b-6e6a-431e-ac68-cdf0cded1dcb",
                  "Transactions": [
                    {
                      "StatementId": "b874ce9a-48f7-4ad2-ac73-b73709db0e40",
                      "Name": "Some name",
                      "AccountNumber": "1233456",
                      "AccountCurrency": "NOK",
                      "ArchiveReference": "12345677",
                      "BankInformation": "123123",
                      "StructuredReference": "31231231",
                      "Amount": 56,
                      "AmountCurrency": "NOK",
                      "Description": "Description",
                      "BookingDate": "2026-03-24T12:08:23.0997016+01:00",
                      "BankTransactionCodes": "PMNT-ICDT-DMCT",
                      "Type": "Debit",
                      "TransactionId": "620b6131-21e7-4673-a0b8-482ccf3de568",
                      "InvoiceNumber": "123345",
                      "ReceiverName": "Donald Duck",
                      "ReceiverAccount": "123445678978",
                      "SenderName": "Dolly Duck",
                      "SenderAccount": "098765432112",
                      "UnstructuredText": {
                        "Ustrd": [],
                        "AddtlTxInf": [],
                        "InstrId": [
                          "InstrId A, InstrId B"
                        ],
                        "PrtryCd": [],
                        "AddtlNtryInf": [
                          "AddtlNtryInf Text"
                        ]
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/statements/{companyId}/{statementId}/state": {
      "put": {
        "tags": [
          "Statement"
        ],
        "summary": "Updates state of all transactions for a given statement.",
        "operationId": "SetStatementState",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "Id of company that owns the statement",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "statementId",
            "in": "path",
            "description": "Unique StatementId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Update request",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/StatementUpdateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatementUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StatementUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StatementUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StatementUpdateResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementUpdateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementUpdateResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/users/{userId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets user details",
        "operationId": "GetById",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                },
                "example": {
                  "Id": "123321123",
                  "CompanyId": "9739db9e-0991-48f9-ac65-d0e630332027",
                  "Username": "duck@duck.com",
                  "Email": "duck@duck.com",
                  "Name": "Duck corp",
                  "PhoneNumber": "52 52 52 52",
                  "ActiveUser": true
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                },
                "example": {
                  "Id": "123321123",
                  "CompanyId": "9739db9e-0991-48f9-ac65-d0e630332027",
                  "Username": "duck@duck.com",
                  "Email": "duck@duck.com",
                  "Name": "Duck corp",
                  "PhoneNumber": "52 52 52 52",
                  "ActiveUser": true
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                },
                "example": {
                  "Id": "123321123",
                  "CompanyId": "9739db9e-0991-48f9-ac65-d0e630332027",
                  "Username": "duck@duck.com",
                  "Email": "duck@duck.com",
                  "Name": "Duck corp",
                  "PhoneNumber": "52 52 52 52",
                  "ActiveUser": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "User not found"
          }
        }
      }
    },
    "/api/v3/users": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "POST new user",
        "operationId": "PostNewUser",
        "requestBody": {
          "description": "Update model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/NewUserRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewUserRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User created",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "202": {
            "description": "User created, but failed to set password",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "User not authorized"
          },
          "404": {
            "description": "Company not found"
          }
        }
      }
    },
    "/api/v3/users/resetpassword": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Sends mail to user for password reset",
        "operationId": "RequestPasswordChange",
        "requestBody": {
          "description": "Model for password reset",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              },
              "example": {
                "Username": "myusername"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              },
              "example": {
                "Username": "myusername"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              },
              "example": {
                "Username": "myusername"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              },
              "example": {
                "Username": "myusername"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountGroupAccount": {
        "required": [
          "accountNumber",
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Accounts id",
            "format": "uuid"
          },
          "accountNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Accounts bban"
          }
        },
        "additionalProperties": false
      },
      "AccountGroupAccountRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "AccountGroupRequest": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AccountGroupResponse": {
        "required": [
          "companyId",
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "minLength": 1,
            "type": "string",
            "description": "Account group id"
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Account group name"
          },
          "companyId": {
            "type": "string",
            "description": "Account group company id",
            "format": "uuid"
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountGroupAccount"
            },
            "description": "Accounts",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountGroupUser"
            },
            "description": "Users",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AccountGroupUser": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "minLength": 1,
            "type": "string",
            "description": "User Id"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "AccountGroupUserRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "AccountReadinessResponse": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "Company id of account",
            "format": "uuid"
          },
          "approvalsRequired": {
            "type": "integer",
            "description": "Number of approvals needed for bank upload",
            "format": "int32"
          },
          "hasBic": {
            "type": "boolean",
            "description": "Account has BIC set"
          },
          "hasCurrency": {
            "type": "boolean",
            "description": "Account has currency set"
          },
          "hasBankIntegration": {
            "type": "boolean",
            "description": "Account has bank intregration set. If false, must be handled by ZData"
          },
          "readyForPayments": {
            "type": "boolean",
            "description": "Indicates whether account is ready for posting payments",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "AccountType": {
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "description": "AccountType\n* 0 - BBAN\n* 1 - IBAN\n* 2 - Plus girot\n* 3 - Bank girot\n* 4 - Giro konto",
        "format": "int32"
      },
      "ApiLink": {
        "type": "object",
        "properties": {
          "rel": {
            "type": "string",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          },
          "href": {
            "type": "string",
            "format": "uri",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApprovalDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "Id of approver",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Approver name",
            "nullable": true
          },
          "approvedAt": {
            "type": "string",
            "description": "Time of approval",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ApprovalEnabledResponse": {
        "type": "object",
        "properties": {
          "preApprovalEnabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BalanceResponse": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Balance date",
            "format": "date-time"
          },
          "balanceBooked": {
            "type": "number",
            "description": "Booked balance in bank",
            "format": "double",
            "example": 1337
          },
          "balanceAvailable": {
            "type": "number",
            "description": "Available balance in bank",
            "format": "double",
            "nullable": true,
            "example": 1033.7
          },
          "accountNumber": {
            "type": "string",
            "description": "Account number",
            "nullable": true,
            "example": "13370101337"
          },
          "currency": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankAccountAliases": {
        "type": "object",
        "properties": {
          "iban": {
            "type": "string",
            "description": "IBAN",
            "nullable": true
          },
          "normalizedIban": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "plusGirot": {
            "type": "string",
            "description": "Optional alias for PlusGirot",
            "nullable": true
          },
          "bankGirot": {
            "type": "string",
            "description": "Optional alias for BankGirot",
            "nullable": true
          },
          "giroKonto": {
            "type": "string",
            "description": "Optional alias for GiroKonto",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankAccountCompanySwitchRequest": {
        "required": [
          "companyId"
        ],
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "New company id",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "BankAccountResponse": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Account identification",
            "format": "uuid"
          },
          "accountNumber": {
            "type": "string",
            "description": "Account number",
            "nullable": true
          },
          "bic": {
            "type": "string",
            "description": "Bank identification code",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency",
            "nullable": true
          },
          "accountGroupId": {
            "type": "string",
            "description": "Account group identification",
            "format": "uuid",
            "nullable": true
          },
          "ledger": {
            "type": "string",
            "description": "Ledger",
            "nullable": true
          },
          "aliases": {
            "$ref": "#/components/schemas/BankAccountAliases"
          },
          "connectionProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "Connection properties",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankAccountResponseWithReadiness": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Account identification",
            "format": "uuid"
          },
          "accountNumber": {
            "type": "string",
            "description": "Account number",
            "nullable": true
          },
          "bic": {
            "type": "string",
            "description": "Bank identification code",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency",
            "nullable": true
          },
          "accountGroupId": {
            "type": "string",
            "description": "Account group identification",
            "format": "uuid",
            "nullable": true
          },
          "ledger": {
            "type": "string",
            "description": "Ledger",
            "nullable": true
          },
          "aliases": {
            "$ref": "#/components/schemas/BankAccountAliases"
          },
          "connectionProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "Connection properties",
            "nullable": true
          },
          "readyForPayments": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BankEventSubscriptionResponse": {
        "type": "object",
        "properties": {
          "subscriptionName": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "string",
            "nullable": true
          },
          "provisioningState": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "topic": {
            "type": "string",
            "nullable": true
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankEventSubscriptionResponsePaginatedResult": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "skip": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "take": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankEventSubscriptionResponse"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankServiceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Service id",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "description": "Company id",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Service name",
            "nullable": true
          },
          "state": {
            "$ref": "#/components/schemas/BankServiceState"
          },
          "bic": {
            "type": "string",
            "description": "Service BIC",
            "nullable": true
          },
          "created": {
            "type": "string",
            "description": "Service creation time",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "BankServiceState": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "description": "BankServiceState\n* 0 - Unknown\n* 1 - Active\n* 2 - Wait for signing\n* 3 - Wait for bank approve\n* 4 - Wait for zData approve\n* 5 - Deactivated",
        "format": "int32"
      },
      "BankStatement": {
        "required": [
          "accountCurrency",
          "accountNumber",
          "amount",
          "archiveReference",
          "bookingDate",
          "valueDate"
        ],
        "type": "object",
        "properties": {
          "statementId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Owner of the account",
            "nullable": true
          },
          "accountNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Account"
          },
          "accountCurrency": {
            "minLength": 1,
            "type": "string",
            "description": "Account currency code"
          },
          "archiveReference": {
            "minLength": 1,
            "type": "string",
            "description": "Bank reference"
          },
          "bankInformation": {
            "type": "string",
            "description": "Bank information",
            "nullable": true
          },
          "structuredReference": {
            "type": "string",
            "description": "KID, FIC, OCR (SCOR  reference)",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Payment amount or fee amount",
            "format": "double"
          },
          "amountCurrency": {
            "type": "string",
            "description": "Currency of amount",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Unstructured reference (payment message)",
            "nullable": true
          },
          "bookingDate": {
            "type": "string",
            "description": "Processed date",
            "format": "date-time"
          },
          "valueDate": {
            "type": "string",
            "description": "Exchange date",
            "format": "date-time"
          },
          "bankTransactionCodes": {
            "type": "string",
            "description": "Bank Transaction Codes Domain, Family and Sub-Familiy, dash separated.",
            "nullable": true
          },
          "entryReference": {
            "type": "string",
            "description": "This is a reference set on the statement entry level",
            "nullable": true
          },
          "transactionCount": {
            "type": "integer",
            "description": "Number of transactions associated with this statement",
            "format": "int32"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankStatementAggregatedResponse": {
        "type": "object",
        "properties": {
          "statements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankStatement"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankStatementDetailsResponse": {
        "type": "object",
        "properties": {
          "statementId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankStatementTransaction"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BankStatementState": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "description": "BankStatementState\n* 0 - Created\n* 1 - Transferred\n* 2 - Error",
        "format": "int32"
      },
      "BankStatementTransaction": {
        "required": [
          "accountCurrency",
          "accountNumber",
          "amount",
          "archiveReference",
          "bookingDate",
          "transactionId",
          "valueDate"
        ],
        "type": "object",
        "properties": {
          "statementId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Owner of the account",
            "nullable": true
          },
          "accountNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Account"
          },
          "accountCurrency": {
            "minLength": 1,
            "type": "string",
            "description": "Account currency code"
          },
          "archiveReference": {
            "minLength": 1,
            "type": "string",
            "description": "Bank reference"
          },
          "bankInformation": {
            "type": "string",
            "description": "Bank information",
            "nullable": true
          },
          "structuredReference": {
            "type": "string",
            "description": "KID, FIC, OCR (SCOR  reference)",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Payment amount or fee amount",
            "format": "double"
          },
          "amountCurrency": {
            "type": "string",
            "description": "Currency of amount",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Unstructured reference (payment message)",
            "nullable": true
          },
          "bookingDate": {
            "type": "string",
            "description": "Processed date",
            "format": "date-time"
          },
          "valueDate": {
            "type": "string",
            "description": "Exchange date",
            "format": "date-time"
          },
          "bankTransactionCodes": {
            "type": "string",
            "description": "Bank Transaction Codes Domain, Family and Sub-Familiy, dash separated.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of transaction (debit or credit)",
            "nullable": true
          },
          "transactionId": {
            "type": "string",
            "description": "Unique reference for transaction",
            "format": "uuid"
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice number",
            "nullable": true
          },
          "receiverName": {
            "type": "string",
            "description": "Name of receiver. Used if the transaction is a payment.",
            "nullable": true
          },
          "receiverAccount": {
            "type": "string",
            "description": "Account of receiver. Used if the transaction is a payment.",
            "nullable": true
          },
          "senderName": {
            "type": "string",
            "description": "Name of sender. Used if transaction is a ingoing payment.",
            "nullable": true
          },
          "senderAccount": {
            "type": "string",
            "description": "Account of sender. Used if the transaction is a ingoing payment.",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message, only exist on error state",
            "nullable": true
          },
          "unstructuredText": {
            "$ref": "#/components/schemas/UnstructuredText"
          },
          "exchangeRate": {
            "type": "number",
            "description": "Exchangerate",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BookedPayment": {
        "type": "object",
        "properties": {
          "bookedAmount": {
            "type": "number",
            "format": "double"
          },
          "accountCurrency": {
            "type": "string",
            "nullable": true
          },
          "exchangeRate": {
            "type": "number",
            "format": "double"
          },
          "bookingDate": {
            "type": "string",
            "format": "date-time"
          },
          "valueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "bankReference": {
            "type": "string",
            "nullable": true
          },
          "chargeAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "chargeCurrency": {
            "type": "string",
            "nullable": true
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentReference"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompanyDetailResponse": {
        "required": [
          "companyId",
          "organizationNumber",
          "state"
        ],
        "type": "object",
        "properties": {
          "parentCompanyId": {
            "type": "string",
            "description": "Id of parent company. Can be used to request subsidiary status for company. NOT IMPLEMENTED FOR EXTERNAL USE!",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Company name",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Company address",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "Company zipcode",
            "nullable": true
          },
          "zipArea": {
            "type": "string",
            "description": "Company zip area",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Company country",
            "nullable": true
          },
          "organizationNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Company organization number. If matched in Brønnøysund, company name and adress will be overwritten"
          },
          "companyId": {
            "type": "string",
            "description": "Company id",
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/CompanyState"
          }
        },
        "additionalProperties": false
      },
      "CompanyPaymentsResponse": {
        "type": "object",
        "properties": {
          "summaries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentSummary"
            },
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "CompanyState": {
        "enum": [
          0,
          1,
          2,
          999
        ],
        "type": "integer",
        "description": "CompanyState\n* 0 - Unknown\n* 1 - Active\n* 2 - Wait for zData approve\n* 999 - Deleted",
        "format": "int32"
      },
      "CreatePaymentsRequest": {
        "required": [
          "accountNumber",
          "messageId",
          "paymentLines"
        ],
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "accountNumber": {
            "minLength": 1,
            "type": "string"
          },
          "singlePayments": {
            "type": "boolean",
            "description": "Always send single payments to creditor. This will not work with credit notes."
          },
          "paymentLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentLine"
            }
          }
        },
        "additionalProperties": false,
        "description": "A list of payments to create for a given account number."
      },
      "Creditor": {
        "required": [
          "accountNumber",
          "accountType",
          "countryCode",
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Receiver name"
          },
          "countryCode": {
            "minLength": 1,
            "type": "string",
            "description": "Receiver country code"
          },
          "accountNumber": {
            "minLength": 2,
            "type": "string",
            "description": "Receiver account number"
          },
          "bic": {
            "type": "string",
            "description": "Receiver BIC-/SWIFT code",
            "nullable": true
          },
          "accountType": {
            "$ref": "#/components/schemas/AccountType"
          },
          "bankCode": {
            "type": "string",
            "description": "Clearing system bank code (Sort code, fedwire code, routing number). Normally used outside EU",
            "nullable": true
          },
          "bankCountryCode": {
            "type": "string",
            "description": "Creditors bank country code",
            "nullable": true
          },
          "address": {
            "maxLength": 128,
            "type": "string",
            "description": "Address line 1 of receiver",
            "nullable": true
          },
          "address2": {
            "maxLength": 128,
            "type": "string",
            "description": "Address line 2 of receiver",
            "nullable": true
          },
          "address3": {
            "maxLength": 128,
            "type": "string",
            "description": "Address line 3 of receiver",
            "nullable": true
          },
          "zipCode": {
            "maxLength": 16,
            "type": "string",
            "description": "Post code of receiver",
            "nullable": true
          },
          "zipArea": {
            "maxLength": 128,
            "type": "string",
            "description": "Post Area of receiver",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeadLetterEventContentResponse": {
        "type": "object",
        "properties": {
          "event": {
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeadLetterEventResponse": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "nullable": true
          },
          "subscriptionName": {
            "type": "string",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeadLetterEventResponsePaginatedResult": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "skip": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "take": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeadLetterEventResponse"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DismissalStatus": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "description": "DismissalStatus\n* 0 - User has already approved payment\n* 1 - User cannot access all bankaccounts present in payment\n* 2 - Payment was dismissed\n* 3 - Payment was not found\n* 4 - Payment was already dismissed\n* 5 - Payment state does not allow approval/rejection",
        "format": "int32"
      },
      "EventSubscriptionCompanyIdsBatchRequest": {
        "type": "object",
        "properties": {
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "destination": {
            "$ref": "#/components/schemas/EventSubscriptionDestination"
          }
        },
        "additionalProperties": false
      },
      "EventSubscriptionDestination": {
        "type": "object",
        "properties": {
          "endpointUrl": {
            "type": "string",
            "nullable": true
          },
          "maxEventsPerBatch": {
            "type": "integer",
            "format": "int32"
          },
          "preferredBatchSizeInKilobytes": {
            "type": "integer",
            "format": "int32"
          },
          "azureActiveDirectoryApplicationIdOrUri": {
            "type": "string",
            "nullable": true
          },
          "azureActiveDirectoryTenantId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EventSubscriptionRequest": {
        "type": "object",
        "properties": {
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "destination": {
            "$ref": "#/components/schemas/EventSubscriptionDestination"
          }
        },
        "additionalProperties": false
      },
      "InpaymentState": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "description": "InpaymentState\n* 0 - Queued\n* 1 - Transferred\n* 2 - Error",
        "format": "int32"
      },
      "ListCompanyAccountsResponse": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankAccountResponseWithReadiness"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewBankAccountRequest": {
        "required": [
          "accountNumber",
          "bic",
          "companyId"
        ],
        "type": "object",
        "properties": {
          "bic": {
            "minLength": 1,
            "type": "string",
            "description": "Bank identifier code"
          },
          "currency": {
            "type": "string",
            "description": "Currency",
            "nullable": true
          },
          "ledger": {
            "type": "string",
            "description": "Ledger",
            "nullable": true
          },
          "aliases": {
            "$ref": "#/components/schemas/BankAccountAliases"
          },
          "companyId": {
            "type": "string",
            "description": "Company id to associate with bankaccount",
            "format": "uuid"
          },
          "accountNumber": {
            "minLength": 6,
            "type": "string",
            "description": "Account number"
          },
          "normalizedAccountNumber": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Dto for new BankAccounts. May be expanded to include accountGroupId and agreementId."
      },
      "NewBankServiceRequest": {
        "required": [
          "bic",
          "companyId"
        ],
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "Company id to register associate with service",
            "format": "uuid"
          },
          "bic": {
            "minLength": 1,
            "type": "string",
            "description": "Bank identifier code"
          },
          "bankApproval": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "NewCompanyRequest": {
        "required": [
          "organizationNumber"
        ],
        "type": "object",
        "properties": {
          "organizationNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Company organization number. If matched in Brønnøysund, company name and adress will be overwritten"
          },
          "normalizedOrganizationNumber": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "companyId": {
            "type": "string",
            "description": "Desired company id (optional)",
            "format": "uuid",
            "nullable": true
          },
          "parentCompanyId": {
            "type": "string",
            "description": "Id of parent company. Can be used to request subsidiary status for company.",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Company name. Mandatory for companies outside Norway",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Company address",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "Company zipcode",
            "nullable": true
          },
          "zipArea": {
            "type": "string",
            "description": "Company zip area",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Company country required if company is not found in [The Brønnøysund Register](https://www.brreg.no/en/). Mandatory for companies outside Norway",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewUserRequest": {
        "required": [
          "companyId",
          "email",
          "name",
          "phoneNumber",
          "username"
        ],
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "Company id to associate with user",
            "format": "uuid",
            "example": "C32E6B5B-CA63-48D0-91AB-D5C6CB781737"
          },
          "username": {
            "minLength": 1,
            "type": "string",
            "description": "Username",
            "example": "user1@mycompany.com"
          },
          "email": {
            "minLength": 1,
            "type": "string",
            "description": "Users email",
            "format": "email",
            "example": "user1@mycompany.com"
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Name",
            "example": "Ola Nordmann"
          },
          "phoneNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Phone number",
            "example": "90001337"
          },
          "password": {
            "type": "string",
            "description": "Password (optional), if not set user will receive email to complete registration",
            "nullable": true,
            "example": "sdf35asty4q3g5ehgg%¤"
          }
        },
        "additionalProperties": false
      },
      "PaymentApprovalInfoResponse": {
        "type": "object",
        "properties": {
          "approvalsRequired": {
            "type": "integer",
            "description": "Total number of approvals required",
            "format": "int32"
          },
          "approvals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovalDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentApprovalResponse": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/PaymentApproveResult"
          },
          "approvalsRemaining": {
            "type": "integer",
            "description": "Number of approvals before payment is sent to bank",
            "format": "int32"
          },
          "success": {
            "type": "boolean",
            "description": "Whether approval was successful",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "description": "Message explaining status",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PaymentApproveResult": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "type": "integer",
        "description": "PaymentApproveResult\n* 0 - User has already approved payment\n* 1 - User cannot access all bankaccounts present in payment\n* 2 - Payment was approved\n* 3 - Payment is pending approvals\n* 4 - User cannot approve a payment they sent\n* 5 - Payment not found\n* 6 - File has completed approval",
        "format": "int32"
      },
      "PaymentDismissalResponse": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/DismissalStatus"
          },
          "success": {
            "type": "boolean",
            "description": "Whether payments were dismissed or not",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "description": "Message explaining status",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PaymentLine": {
        "required": [
          "amount",
          "creditor",
          "currency",
          "executionDate",
          "sourceReference"
        ],
        "type": "object",
        "properties": {
          "paymentMethod": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "priority": {
            "$ref": "#/components/schemas/Priority"
          },
          "paymentPurpose": {
            "$ref": "#/components/schemas/PaymentPurpose"
          },
          "executionDate": {
            "type": "string",
            "format": "date-time"
          },
          "sourceReference": {
            "minLength": 1,
            "type": "string",
            "description": "Original ERP-system reference"
          },
          "regulatoryReportingCode": {
            "type": "integer",
            "description": "Declaration code",
            "format": "int32"
          },
          "regulatoryReportingInfo": {
            "type": "string",
            "description": "Declaration text",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Invoice amount. Creditnotes are accepted",
            "format": "double"
          },
          "currency": {
            "minLength": 1,
            "type": "string",
            "description": "Invoice amount currency"
          },
          "structuredReference": {
            "type": "string",
            "description": "KID, FIK, OCR, Creditor reference",
            "nullable": true
          },
          "invoiceNo": {
            "type": "string",
            "description": "Invoice number",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Invoice message",
            "nullable": true
          },
          "statementMessage": {
            "maxLength": 35,
            "type": "string",
            "description": "If present, can be used for text on beneficiary's statement of account",
            "nullable": true
          },
          "creditor": {
            "$ref": "#/components/schemas/Creditor"
          }
        },
        "additionalProperties": false
      },
      "PaymentLineResponse": {
        "required": [
          "amount",
          "paymentId",
          "sourceReference",
          "status"
        ],
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "string",
            "description": "Payment id",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionState"
          },
          "rejectionCode": {
            "type": "string",
            "description": "Rejection code if payment has been rejected by bank",
            "nullable": true
          },
          "rejectionMessage": {
            "type": "string",
            "description": "Rejection message from bank, if payment has been rejected",
            "nullable": true
          },
          "sourceReference": {
            "minLength": 1,
            "type": "string"
          },
          "amount": {
            "type": "number",
            "description": "Original invoice amount",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "executionDate": {
            "type": "string",
            "format": "date-time"
          },
          "debtorAccountNumber": {
            "type": "string",
            "nullable": true
          },
          "creditorName": {
            "type": "string",
            "nullable": true
          },
          "creditorAccountNumber": {
            "type": "string",
            "nullable": true
          },
          "creditorAccountCurrency": {
            "type": "string",
            "nullable": true
          },
          "chargeAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "chargeCurrency": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "invoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "structuredReference": {
            "type": "string",
            "nullable": true
          },
          "settlement": {
            "$ref": "#/components/schemas/SettlementDto"
          }
        },
        "additionalProperties": false
      },
      "PaymentMethod": {
        "enum": [
          1,
          2
        ],
        "type": "integer",
        "description": "PaymentMethod\n* 1 - Transfer\n* 2 - Inter company",
        "format": "int32"
      },
      "PaymentPurpose": {
        "enum": [
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "description": "PaymentPurpose\n* 1 - Bonus\n* 2 - Salary\n* 3 - Pension\n* 4 - Tax\n* 5 - Intra company",
        "format": "int32"
      },
      "PaymentRecipientRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentRecipientResponse": {
        "type": "object",
        "properties": {
          "receiptId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "accountNumber": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentReference": {
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "string",
            "format": "uuid"
          },
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceReference": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentStatusResponse": {
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceReference": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/TransactionState"
          },
          "executionDate": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentSummary": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firstExecutionDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastExecutionDate": {
            "type": "string",
            "format": "date-time"
          },
          "amounts": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            },
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentsMovementsResponse": {
        "type": "object",
        "properties": {
          "bookedPayments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookedPayment"
            },
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PaymentsResponse": {
        "required": [
          "payments",
          "total"
        ],
        "type": "object",
        "properties": {
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentStatusResponse"
            },
            "description": "Transactions"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Priority": {
        "enum": [
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "Priority\n* 1 - Normal\n* 2 - High\n* 3 - Faster payments",
        "format": "int32"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "Prtry": {
        "type": "object",
        "properties": {
          "tp": {
            "type": "string",
            "nullable": true
          },
          "ref": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReceivableDto": {
        "type": "object",
        "properties": {
          "receivableId": {
            "type": "string",
            "description": "Unique reference for receivable",
            "format": "uuid"
          },
          "entryId": {
            "type": "string",
            "description": "Entry id from account statement",
            "format": "uuid",
            "nullable": true
          },
          "entryReference": {
            "type": "string",
            "description": "EntryReference",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "description": "Deposit account",
            "nullable": true
          },
          "debtorAccountNumber": {
            "type": "string",
            "description": "Withdrawal account",
            "nullable": true
          },
          "debtorName": {
            "type": "string",
            "description": "Customer name",
            "nullable": true
          },
          "debtorAddress": {
            "type": "string",
            "description": "Customer address",
            "nullable": true
          },
          "archiveReference": {
            "type": "string",
            "description": "Bank reference",
            "nullable": true
          },
          "structuredReference": {
            "type": "string",
            "description": "KID, FIK, OCR (SCOR reference)",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Unstructured reference (payment message)",
            "nullable": true
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice number",
            "nullable": true
          },
          "bookingDate": {
            "type": "string",
            "description": "Processed date",
            "format": "date-time"
          },
          "valueDate": {
            "type": "string",
            "description": "Exchange date",
            "format": "date-time"
          },
          "amount": {
            "type": "number",
            "description": "Payment amount or fee amount",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "Payment or fee currency type",
            "nullable": true
          },
          "bookedAmount": {
            "type": "number",
            "description": "Booked amount",
            "format": "double",
            "nullable": true
          },
          "exchangeRate": {
            "type": "number",
            "description": "Exchange rate",
            "format": "double",
            "nullable": true
          },
          "accountCurrency": {
            "type": "string",
            "description": "Currency of bank account;",
            "nullable": true
          },
          "chargeAmount": {
            "type": "number",
            "description": "Charge amount",
            "format": "double",
            "nullable": true
          },
          "chargeCurrency": {
            "type": "string",
            "description": "Charge Currency",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/TransactionType"
          },
          "bankTransactionCode": {
            "type": "string",
            "description": "Bank Transaction Codes Domain, Family and Sub-Familiy, dash separated.",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message, only exists on error state",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReceivableDtoPaginatedResult": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "skip": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "take": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceivableDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReceivablesResponse": {
        "required": [
          "receivables",
          "state",
          "total"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/InpaymentState"
          },
          "receivables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceivableDto"
            },
            "description": "Transactions"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "RejectionDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for rejection",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResetPasswordRequest": {
        "required": [
          "username"
        ],
        "type": "object",
        "properties": {
          "username": {
            "minLength": 1,
            "type": "string",
            "description": "Username"
          }
        },
        "additionalProperties": false
      },
      "SettlementDto": {
        "type": "object",
        "properties": {
          "bookingDate": {
            "type": "string",
            "description": "Payment date",
            "format": "date-time",
            "nullable": true
          },
          "valueDate": {
            "type": "string",
            "description": "Value date",
            "format": "date-time",
            "nullable": true
          },
          "exchangeRate": {
            "type": "number",
            "description": "Exchange rate",
            "format": "double"
          },
          "reference": {
            "type": "string",
            "description": "Bank reference",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StatementUpdateRequest": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/BankStatementState"
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message (used if State is set to Error)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StatementUpdateResponse": {
        "type": "object",
        "properties": {
          "statementId": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "updatedTransactions": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionState": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "type": "integer",
        "description": "TransactionState\n* 0 - Submitted\n* 1 - Queued for approval\n* 2 - Dismissed by user\n* 3 - Ready for transfer\n* 4 - Pending bank\n* 5 - Rejected by bank\n* 6 - Accepted bank\n* 7 - Completed\n* 8 - Dismissed by ZData",
        "format": "int32"
      },
      "TransactionType": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "description": "TransactionType\n* 0 - Payment\n* 1 - Charge",
        "format": "int32"
      },
      "UnstructuredText": {
        "type": "object",
        "properties": {
          "ustrd": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "addtlTxInf": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "instrId": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "prtryCd": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "refsPrtry": {
            "$ref": "#/components/schemas/Prtry"
          },
          "addtlNtryInf": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateAccountGroupNameRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateBankAccountRequest": {
        "required": [
          "bic"
        ],
        "type": "object",
        "properties": {
          "bic": {
            "minLength": 1,
            "type": "string",
            "description": "Bank identifier code"
          },
          "currency": {
            "type": "string",
            "description": "Currency",
            "nullable": true
          },
          "ledger": {
            "type": "string",
            "description": "Ledger",
            "nullable": true
          },
          "aliases": {
            "$ref": "#/components/schemas/BankAccountAliases"
          }
        },
        "additionalProperties": false,
        "description": "Dto for new BankAccounts. May be expanded to include accountGroupId and agreementId."
      },
      "UpdateReceivablesBatchRequest": {
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/InpaymentState"
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message (used if State is set to Error)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateReceivablesRequest": {
        "required": [
          "id",
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/InpaymentState"
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message (used if State is set to Error)",
            "nullable": true
          },
          "id": {
            "type": "string",
            "description": "Inpayment Id",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "UserResponse": {
        "required": [
          "companyId",
          "email",
          "id",
          "name",
          "phoneNumber",
          "username"
        ],
        "type": "object",
        "properties": {
          "id": {
            "minLength": 1,
            "type": "string",
            "description": "User id"
          },
          "companyId": {
            "type": "string",
            "description": "Company id",
            "format": "uuid"
          },
          "username": {
            "minLength": 1,
            "type": "string",
            "description": "Username"
          },
          "email": {
            "minLength": 1,
            "type": "string",
            "description": "Users email"
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Name"
          },
          "phoneNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Phone number"
          },
          "activeUser": {
            "type": "boolean"
          },
          "accountingSystemUser": {
            "type": "string",
            "description": "Username in accounting system",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "implicit": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://id.zdata.no/connect/authorize",
            "scopes": {
              "bankservice": "Access to BankService API"
            }
          }
        }
      },
      "client_credentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://id.zdata.no/connect/token",
            "scopes": {
              "bankservice": "Access to BankService API"
            }
          }
        }
      },
      "implicit_dev": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://id-dev.zdata.no/connect/authorize",
            "scopes": {
              "bankservice": "Access to BankService API"
            }
          }
        }
      },
      "client_credentials_dev": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://id-dev.zdata.no/connect/token",
            "scopes": {
              "bankservice": "Access to BankService API"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "client_credentials": [
        "openid",
        "profile",
        "bankservice"
      ]
    },
    {
      "implicit": [
        "openid",
        "profile",
        "bankservice"
      ]
    },
    {
      "client_credentials_dev": [
        "openid",
        "profile",
        "bankservice"
      ]
    },
    {
      "implicit_dev": [
        "openid",
        "profile",
        "bankservice"
      ]
    }
  ]
}