{
  "openapi": "3.1.0",
  "info": {
    "version": "v0.1.0",
    "title": "Hovi Business Wallet API",
    "description": "The Hovi Business Wallet API lets a business (legal person) receive, hold, and prove EU digital credentials (EUDI). It plugs the Core SDK directly for OID4VC / OID4VP operations."
  },
  "servers": [
    {
      "url": "https://api-test.businesswallet.hovi.app",
      "description": "Business Wallet Test"
    },
    {
      "url": "https://api.businesswallet.hovi.app",
      "description": "Business Wallet"
    }
  ],
  "tags": [
    {
      "name": "Organization",
      "description": "Business organization and wallet"
    }
  ],
  "paths": {
    "/organizations/": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "List My Wallets",
        "description": "Returns every organization wallet the signed-in account belongs to, oldest first, with the account\\'s role and permissions in it. active marks the session\\'s active wallet; onboardingCompleted is false for a wallet whose setup was not finished.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "organizations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "organization": {
                                "type": "object",
                                "properties": {}
                              },
                              "role": {
                                "type": "string",
                                "example": "admin"
                              },
                              "active": {
                                "type": "boolean",
                                "example": true
                              },
                              "onboardingCompleted": {
                                "type": "boolean",
                                "example": true
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "organizations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "organization": {
                                "type": "object",
                                "properties": {}
                              },
                              "role": {
                                "type": "string",
                                "example": "admin"
                              },
                              "active": {
                                "type": "boolean",
                                "example": true
                              },
                              "onboardingCompleted": {
                                "type": "boolean",
                                "example": true
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/organizations/switch": {
      "post": {
        "tags": [
          "Organization"
        ],
        "summary": "Switch Wallet",
        "description": "Makes the given wallet the active one for this session, and the one opened at the next sign-in. Answers like GET /auth/me.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {}
                        },
                        "organization": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {}
                        },
                        "organization": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "403": {
            "description": "The account is not a member of this wallet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notAMember"
                    },
                    "message": {
                      "type": "string",
                      "example": "You are not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notAMember"
                    },
                    "message": {
                      "type": "string",
                      "example": "You are not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "organizationId": "uuid"
              }
            },
            "application/xml": {
              "schema": {
                "organizationId": "uuid"
              }
            }
          }
        }
      }
    },
    "/organizations/leave": {
      "post": {
        "tags": [
          "Organization"
        ],
        "summary": "Leave Wallet",
        "description": "Removes the signed-in account from the given wallet; the wallet and its other members are not changed. The account that created the wallet, and the wallet\\'s last admin, cannot leave and delete the wallet instead. When it was the active wallet, the session moves to the account\\'s next wallet (organization is null when there is none: onboarding). Answers like GET /auth/me.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {}
                        },
                        "organization": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {}
                        },
                        "organization": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "403": {
            "description": "The account is not a member of this wallet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notAMember"
                    },
                    "message": {
                      "type": "string",
                      "example": "You are not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notAMember"
                    },
                    "message": {
                      "type": "string",
                      "example": "You are not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "409": {
            "description": "The account created the wallet (ownerCannotLeave), or is its last admin (lastAdmin)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "ownerCannotLeave"
                    },
                    "message": {
                      "type": "string",
                      "example": "You created this wallet, so you cannot leave it. Delete the wallet instead"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "ownerCannotLeave"
                    },
                    "message": {
                      "type": "string",
                      "example": "You created this wallet, so you cannot leave it. Delete the wallet instead"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "organizationId": "uuid"
              }
            },
            "application/xml": {
              "schema": {
                "organizationId": "uuid"
              }
            }
          }
        }
      }
    },
    "/team/": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "List Team",
        "description": "The members of the active wallet, oldest first, with their role, and its open invites (expiresAt in the past: the link no longer works; resend or revoke it). isOwner marks the account that created the wallet: it stays an admin and cannot be removed. Any member can read it.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "uuid"
                              },
                              "name": {
                                "type": "string",
                                "example": "Jane Doe"
                              },
                              "email": {
                                "type": "string",
                                "example": "jane@company.fi"
                              },
                              "role": {
                                "type": "string",
                                "example": "admin"
                              },
                              "status": {
                                "type": "string",
                                "example": "active"
                              },
                              "isOwner": {
                                "type": "boolean",
                                "example": true
                              },
                              "joinedAt": {
                                "type": "string",
                                "example": "2026-11-12T10:00:00.000Z"
                              },
                              "lastActiveAt": {}
                            }
                          }
                        },
                        "invitations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "uuid"
                              },
                              "email": {
                                "type": "string",
                                "example": "sara@company.fi"
                              },
                              "role": {
                                "type": "string",
                                "example": "member"
                              },
                              "status": {
                                "type": "string",
                                "example": "invited"
                              },
                              "invitedAt": {
                                "type": "string",
                                "example": "2026-11-12T10:00:00.000Z"
                              },
                              "expiresAt": {
                                "type": "string",
                                "example": "2026-11-19T10:00:00.000Z"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "uuid"
                              },
                              "name": {
                                "type": "string",
                                "example": "Jane Doe"
                              },
                              "email": {
                                "type": "string",
                                "example": "jane@company.fi"
                              },
                              "role": {
                                "type": "string",
                                "example": "admin"
                              },
                              "status": {
                                "type": "string",
                                "example": "active"
                              },
                              "isOwner": {
                                "type": "boolean",
                                "example": true
                              },
                              "joinedAt": {
                                "type": "string",
                                "example": "2026-11-12T10:00:00.000Z"
                              },
                              "lastActiveAt": {}
                            }
                          }
                        },
                        "invitations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "uuid"
                              },
                              "email": {
                                "type": "string",
                                "example": "sara@company.fi"
                              },
                              "role": {
                                "type": "string",
                                "example": "member"
                              },
                              "status": {
                                "type": "string",
                                "example": "invited"
                              },
                              "invitedAt": {
                                "type": "string",
                                "example": "2026-11-12T10:00:00.000Z"
                              },
                              "expiresAt": {
                                "type": "string",
                                "example": "2026-11-19T10:00:00.000Z"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "409": {
            "description": "No wallet yet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "organizationMissing"
                    },
                    "message": {
                      "type": "string",
                      "example": "Create your organization first"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "organizationMissing"
                    },
                    "message": {
                      "type": "string",
                      "example": "Create your organization first"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/team/invitations": {
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Invite Member",
        "description": "Emails a link to join the active wallet with the given role. The link works for 7 days and only for an account with this email address. The address follows the sign-up rule (company domains, and ALLOWED_EMAIL_DOMAINS when set). Admins only.",
        "responses": {
          "201": {
            "description": "Invite sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "invitation": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "invitation": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, acting permissions for an observer (observerViewOnly: observers only view, audit:read at most), a personal email provider (personalEmail), or a company domain outside ALLOWED_EMAIL_DOMAINS (emailDomainNotAllowed)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "emailDomainNotAllowed"
                    },
                    "message": {
                      "type": "string",
                      "example": "Sign-ups are open to approved company domains only for now"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "emailDomainNotAllowed"
                    },
                    "message": {
                      "type": "string",
                      "example": "Sign-ups are open to approved company domains only for now"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not an admin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "adminOnly"
                    },
                    "message": {
                      "type": "string",
                      "example": "Only an administrator can do this"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "adminOnly"
                    },
                    "message": {
                      "type": "string",
                      "example": "Only an administrator can do this"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Already a member (alreadyMember), already invited (alreadyInvited), too many open invites, or the wallet is not set up yet (onboardingNotCompleted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "alreadyInvited"
                    },
                    "message": {
                      "type": "string",
                      "example": "This person already has an open invite. Resend it instead"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "alreadyInvited"
                    },
                    "message": {
                      "type": "string",
                      "example": "This person already has an open invite. Resend it instead"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          },
          "503": {
            "description": "The email could not be sent; no invite was made",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationEmailFailed"
                    },
                    "message": {
                      "type": "string",
                      "example": "The invite email could not be sent. Try again"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationEmailFailed"
                    },
                    "message": {
                      "type": "string",
                      "example": "The invite email could not be sent. Try again"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "email": "sara@company.fi",
                "role": "operator",
                "permissions": [
                  "credentials:receive",
                  "proofs:share"
                ]
              }
            },
            "application/xml": {
              "schema": {
                "email": "sara@company.fi",
                "role": "operator",
                "permissions": [
                  "credentials:receive",
                  "proofs:share"
                ]
              }
            }
          }
        }
      }
    },
    "/team/invitations/{invitationId}/resend": {
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Resend Invite",
        "description": "Emails the invite again with a new link that works for 7 days; the earlier link stops working. Admins only.",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "invitation": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "invitation": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "No open invite with this id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite does not exist or is no longer open"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite does not exist or is no longer open"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/team/invitations/{invitationId}": {
      "delete": {
        "tags": [
          "Team"
        ],
        "summary": "Revoke Invite",
        "description": "The invite link stops working. Admins only.",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "No open invite with this id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite does not exist or is no longer open"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite does not exist or is no longer open"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/team/members/{userId}": {
      "patch": {
        "tags": [
          "Team"
        ],
        "summary": "Change Member Role",
        "description": "Changes the role and the scoped permissions (credentials:receive, credentials:delete, proofs:share, messages:use, audit:read; the role\\'s defaults when none are sent). Admins only. The owner\\'s role and the admin\\'s own role cannot be changed.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "example": "observer"
                        },
                        "permissions": {
                          "type": "array",
                          "example": [
                            "credentials:read",
                            "audit:read"
                          ],
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "example": "observer"
                        },
                        "permissions": {
                          "type": "array",
                          "example": [
                            "credentials:read",
                            "audit:read"
                          ],
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, or acting permissions for an observer (observerViewOnly: observers only view, audit:read at most)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "observerViewOnly"
                    },
                    "message": {
                      "type": "string",
                      "example": "Observers can only view. Make them an operator to let them act in the wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "observerViewOnly"
                    },
                    "message": {
                      "type": "string",
                      "example": "Observers can only view. Make them an operator to let them act in the wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not a member of this wallet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "memberNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This person is not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "memberNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This person is not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "409": {
            "description": "The owner (ownerProtected), the admin themselves (notYourself), or the last admin (lastAdmin)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "ownerProtected"
                    },
                    "message": {
                      "type": "string",
                      "example": "The owner stays an admin and cannot be removed"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "ownerProtected"
                    },
                    "message": {
                      "type": "string",
                      "example": "The owner stays an admin and cannot be removed"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "role": "observer",
                "permissions": [
                  "audit:read"
                ]
              }
            },
            "application/xml": {
              "schema": {
                "role": "observer",
                "permissions": [
                  "audit:read"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team"
        ],
        "summary": "Remove Member",
        "description": "Admins only. The owner cannot be removed, and an admin leaves the wallet instead of removing themselves. The member loses access at once.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not a member of this wallet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "memberNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This person is not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "memberNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This person is not a member of this wallet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "409": {
            "description": "The owner (ownerProtected), the admin themselves (notYourself), or the last admin (lastAdmin)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "ownerProtected"
                    },
                    "message": {
                      "type": "string",
                      "example": "The owner stays an admin and cannot be removed"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "ownerProtected"
                    },
                    "message": {
                      "type": "string",
                      "example": "The owner stays an admin and cannot be removed"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/invitations/lookup": {
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Look Up Invite",
        "description": "The wallet, inviter, invited email and role of an open invite link, so the invite page can show it before signing in. Public, limited per IP. An expired, revoked or used link answers invitationInvalid, without saying which.",
        "responses": {
          "200": {
            "description": "Open invite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "invitation": {
                          "type": "object",
                          "properties": {
                            "walletName": {
                              "type": "string",
                              "example": "Nordivo"
                            },
                            "inviterName": {
                              "type": "string",
                              "example": "Anas"
                            },
                            "email": {
                              "type": "string",
                              "example": "sara@company.fi"
                            },
                            "role": {
                              "type": "string",
                              "example": "member"
                            },
                            "expiresAt": {
                              "type": "string",
                              "example": "2026-11-19T10:00:00.000Z"
                            }
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "invitation": {
                          "type": "object",
                          "properties": {
                            "walletName": {
                              "type": "string",
                              "example": "Nordivo"
                            },
                            "inviterName": {
                              "type": "string",
                              "example": "Anas"
                            },
                            "email": {
                              "type": "string",
                              "example": "sara@company.fi"
                            },
                            "role": {
                              "type": "string",
                              "example": "member"
                            },
                            "expiresAt": {
                              "type": "string",
                              "example": "2026-11-19T10:00:00.000Z"
                            }
                          }
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "The link no longer works",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationInvalid"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite link no longer works"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationInvalid"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite link no longer works"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "token": "from the invite link"
              }
            },
            "application/xml": {
              "schema": {
                "token": "from the invite link"
              }
            }
          }
        }
      }
    },
    "/invitations/accept": {
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Accept Invite",
        "description": "Adds the signed-in account to the wallet with the invited role and makes it the session\\'s active wallet. Only for the account with the invited email address; its email counts as verified. Answers like GET /auth/me.",
        "responses": {
          "200": {
            "description": "Joined",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {}
                        },
                        "organization": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {}
                        },
                        "organization": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Signed in with another email address",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationOtherAccount"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite is for another email address"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationOtherAccount"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite is for another email address"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "The link no longer works",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationInvalid"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite link no longer works"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "invitationInvalid"
                    },
                    "message": {
                      "type": "string",
                      "example": "This invite link no longer works"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "token": "from the invite link"
              }
            },
            "application/xml": {
              "schema": {
                "token": "from the invite link"
              }
            }
          }
        }
      }
    },
    "/invitations/decline": {
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Decline Invite",
        "description": "The invite link stops working. Only for the account with the invited email address.",
        "responses": {
          "200": {
            "description": "Declined",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "token": "from the invite link"
              }
            },
            "application/xml": {
              "schema": {
                "token": "from the invite link"
              }
            }
          }
        }
      }
    },
    "/audit-logs/": {
      "get": {
        "tags": [
          "Audit Logs"
        ],
        "summary": "List Audit Logs",
        "description": "Who did what in the active wallet, newest first: sign-ins (account.signed_in, in the wallet the session opened), credential.requested, credential.received, credential.deleted, proof.shared, proof.declined, member.invited, member.invite_revoked, member.joined, member.role_changed, member.access_changed, member.removed, wallet.left and organization.updated. actor is null when the account no longer exists. page starts at 0; limit is at most 100. The filters apply to the whole log and total counts the matching entries. Members with audit:read only.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number, from 0",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Entries per page, 1 to 100 (default 50)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "description": "Only these actions, comma separated, for example member.role_changed,member.access_changed",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Only entries at or after this ISO 8601 time, for example 2026-11-01T00:00:00.000Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Only entries at or before this ISO 8601 time, for example 2026-11-30T23:59:59.999Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Free text, at most 100 characters, matched case-insensitively against the entry details and the name and email of who did it",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "entries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "id"
                              },
                              "action": {
                                "type": "string",
                                "example": "proof.shared"
                              },
                              "details": {
                                "type": "object",
                                "properties": {
                                  "credential": {
                                    "type": "string",
                                    "example": "LPID"
                                  },
                                  "verifier": {
                                    "type": "string",
                                    "example": "Verifier Oy"
                                  }
                                }
                              },
                              "actor": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "example": "uuid"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Jane Doe"
                                  },
                                  "email": {
                                    "type": "string",
                                    "example": "jane@company.fi"
                                  }
                                }
                              },
                              "createdAt": {
                                "type": "string",
                                "example": "2026-11-12T10:00:00.000Z"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "number",
                          "example": 1
                        },
                        "page": {
                          "type": "number",
                          "example": 0
                        },
                        "limit": {
                          "type": "number",
                          "example": 50
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "entries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "id"
                              },
                              "action": {
                                "type": "string",
                                "example": "proof.shared"
                              },
                              "details": {
                                "type": "object",
                                "properties": {
                                  "credential": {
                                    "type": "string",
                                    "example": "LPID"
                                  },
                                  "verifier": {
                                    "type": "string",
                                    "example": "Verifier Oy"
                                  }
                                }
                              },
                              "actor": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "example": "uuid"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Jane Doe"
                                  },
                                  "email": {
                                    "type": "string",
                                    "example": "jane@company.fi"
                                  }
                                }
                              },
                              "createdAt": {
                                "type": "string",
                                "example": "2026-11-12T10:00:00.000Z"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "number",
                          "example": 1
                        },
                        "page": {
                          "type": "number",
                          "example": 0
                        },
                        "limit": {
                          "type": "number",
                          "example": 50
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid page, limit, action, from, to or q",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not an admin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "adminOnly"
                    },
                    "message": {
                      "type": "string",
                      "example": "Only an administrator can do this"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "adminOnly"
                    },
                    "message": {
                      "type": "string",
                      "example": "Only an administrator can do this"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/registers/companies": {
      "get": {
        "tags": [
          "Registers"
        ],
        "summary": "Search Finnish Companies",
        "description": "Searches the Finnish Trade Register (PRH) by company name, or returns the company with that Business ID. Best matches first, at most 8.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Company name (3 to 100 characters) or a Finnish Business ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "companies": {
                          "type": "array",
                          "example": [],
                          "items": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "companies": {
                          "type": "array",
                          "example": [],
                          "items": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid parameters"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          },
          "503": {
            "description": "Register not responding",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "registerUnavailable"
                    },
                    "message": {
                      "type": "string",
                      "example": "The business register is not responding, please try again"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "registerUnavailable"
                    },
                    "message": {
                      "type": "string",
                      "example": "The business register is not responding, please try again"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/registers/companies/{businessId}": {
      "get": {
        "tags": [
          "Registers"
        ],
        "summary": "Get Finnish Company",
        "description": "Returns the company with this Business ID from PRH and its LEI from GLEIF when it has a valid one.",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {}
                        },
                        "lei": {
                          "type": "object",
                          "properties": {}
                        },
                        "source": {
                          "type": "string",
                          "example": "gleif+prh"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {}
                        },
                        "lei": {
                          "type": "object",
                          "properties": {}
                        },
                        "source": {
                          "type": "string",
                          "example": "gleif+prh"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not in the register",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notInRegister"
                    },
                    "message": {
                      "type": "string",
                      "example": "The company is not in the Finnish Trade Register"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notInRegister"
                    },
                    "message": {
                      "type": "string",
                      "example": "The company is not in the Finnish Trade Register"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/registers/country": {
      "get": {
        "tags": [
          "Registers"
        ],
        "summary": "Get Visitor Country",
        "description": "The country of the visitor\\'s IP address (ISO code, from IPinfo), to preselect it in onboarding. null when it is not known.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "example": "FI"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "example": "FI"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/registers/lei/{lei}": {
      "get": {
        "tags": [
          "Registers"
        ],
        "summary": "Look Up LEI",
        "description": "Returns the GLEIF record of the LEI and the Finnish company with the Business ID on that record. Only LEIs registered in Finland are supported.",
        "parameters": [
          {
            "name": "lei",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {}
                        },
                        "lei": {
                          "type": "object",
                          "properties": {}
                        },
                        "source": {
                          "type": "string",
                          "example": "gleif+prh"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {}
                        },
                        "lei": {
                          "type": "object",
                          "properties": {}
                        },
                        "source": {
                          "type": "string",
                          "example": "gleif+prh"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Not a Finnish LEI",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notFinnish"
                    },
                    "message": {
                      "type": "string",
                      "example": "This LEI is not registered in Finland"
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "jurisdiction": {
                          "type": "string",
                          "example": "DE"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "notFinnish"
                    },
                    "message": {
                      "type": "string",
                      "example": "This LEI is not registered in Finland"
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "jurisdiction": {
                          "type": "string",
                          "example": "DE"
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown LEI",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "leiNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "GLEIF has no record of this LEI"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "leiNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "GLEIF has no record of this LEI"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/issuers/": {
      "get": {
        "tags": [
          "Issuers"
        ],
        "summary": "List Issuers",
        "description": "Marketplace partners that issue a credential after a sign-in (OID4VCI authorization code flow): their business profile (name, legal name, category, country, Business ID, LEI, website, logo) and the credential each offers (name, description). A credential is requested by the partner id. Each wallet sees the partners shown to every wallet and the ones shown to its own organization; sandbox partners only while the wallet has sandbox on. environment is sandbox or production (test is also true for sandbox partners).",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "issuers": {
                          "type": "array",
                          "example": [],
                          "items": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "issuers": {
                          "type": "array",
                          "example": [],
                          "items": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/issuers/{partnerId}": {
      "get": {
        "tags": [
          "Issuers"
        ],
        "summary": "Get Issuer",
        "description": "",
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown issuer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This issuer or credential is not available"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This issuer or credential is not available"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/credential-requests/": {
      "post": {
        "tags": [
          "Credential Requests"
        ],
        "summary": "Request Credential",
        "description": "Requests the credential a marketplace partner offers, by the partner id from GET /issuers. The wallet asks the partner for a credential offer that needs a sign-in, and answers with the issuer and credential as the offer describes them (offer) and the issuer sign-in page (authorizationUrl) to open in a browser or show as a QR code. The request expires after 10 minutes.",
        "responses": {
          "201": {
            "description": "Started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "properties": {}
                        },
                        "offer": {
                          "type": "object",
                          "properties": {
                            "issuer": {
                              "type": "object",
                              "properties": {}
                            },
                            "credential": {
                              "type": "object",
                              "properties": {}
                            }
                          }
                        },
                        "authorizationUrl": {
                          "type": "string",
                          "example": "https://issuer.example/authorize?..."
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "properties": {}
                        },
                        "offer": {
                          "type": "object",
                          "properties": {
                            "issuer": {
                              "type": "object",
                              "properties": {}
                            },
                            "credential": {
                              "type": "object",
                              "properties": {}
                            }
                          }
                        },
                        "authorizationUrl": {
                          "type": "string",
                          "example": "https://issuer.example/authorize?..."
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown partner",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This issuer or credential is not available"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This issuer or credential is not available"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          },
          "501": {
            "description": "The sign-in of this issuer is not supported yet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerNotSupported"
                    },
                    "message": {
                      "type": "string",
                      "example": "The wallet cannot sign in at this issuer yet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerNotSupported"
                    },
                    "message": {
                      "type": "string",
                      "example": "The wallet cannot sign in at this issuer yet"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "503": {
            "description": "The issuer or the wallet service is not responding",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerUnavailable"
                    },
                    "message": {
                      "type": "string",
                      "example": "The issuer is not responding, please try again later"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "issuerUnavailable"
                    },
                    "message": {
                      "type": "string",
                      "example": "The issuer is not responding, please try again later"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "partnerId": "hovi-zitadel-identity"
              }
            },
            "application/xml": {
              "schema": {
                "partnerId": "hovi-zitadel-identity"
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Credential Requests"
        ],
        "summary": "List Credential Requests",
        "description": "Credential requests of the organization (up to 100), newest first, with status awaiting_sign_in, issued, failed, expired or cancelled.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "requests": {
                          "type": "array",
                          "example": [],
                          "items": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "requests": {
                          "type": "array",
                          "example": [],
                          "items": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/credential-requests/{requestId}/complete": {
      "post": {
        "tags": [
          "Credential Requests"
        ],
        "summary": "Complete Credential Request",
        "description": "Called by the callback page after the issuer sign-in, with the code (and iss) from the redirect, or with the error the issuer sent when the user refused or cancelled (the request then fails as signInRefused). Stores the credential in the requesting organization wallet. Works without a session, so the sign-in can finish on another device, and is rate limited per client IP. An iss that is not the sign-in server of the offer leaves the request pending. Answers only the status, and the issuer and credential name from the offer.",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Issued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "issued"
                        },
                        "issuerName": {
                          "type": "string",
                          "example": ""
                        },
                        "credentialName": {
                          "type": "string",
                          "example": ""
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "issued"
                        },
                        "issuerName": {
                          "type": "string",
                          "example": ""
                        },
                        "credentialName": {
                          "type": "string",
                          "example": ""
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The issuer refused",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestFailed"
                    },
                    "message": {
                      "type": "string",
                      "example": "The issuer did not issue the credential"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestFailed"
                    },
                    "message": {
                      "type": "string",
                      "example": "The issuer did not issue the credential"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Expired or already finished",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestExpired"
                    },
                    "message": {
                      "type": "string",
                      "example": "This credential request has expired"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestExpired"
                    },
                    "message": {
                      "type": "string",
                      "example": "This credential request has expired"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "code": "one-time code",
                "iss": "https://auth.issuer.example"
              }
            },
            "application/xml": {
              "schema": {
                "code": "one-time code",
                "iss": "https://auth.issuer.example"
              }
            }
          }
        }
      }
    },
    "/credential-requests/{requestId}": {
      "get": {
        "tags": [
          "Credential Requests"
        ],
        "summary": "Get Credential Request",
        "description": "",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not a request of this organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This credential request does not exist"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestNotFound"
                    },
                    "message": {
                      "type": "string",
                      "example": "This credential request does not exist"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/credential-requests/{requestId}/cancel": {
      "post": {
        "tags": [
          "Credential Requests"
        ],
        "summary": "Cancel Credential Request",
        "description": "Cancels a request that is still waiting for the sign-in.",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "properties": {}
                        }
                      }
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Already finished",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestNotPending"
                    },
                    "message": {
                      "type": "string",
                      "example": "This credential request is already finished"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "code": {
                      "type": "string",
                      "example": "credentialRequestNotPending"
                    },
                    "message": {
                      "type": "string",
                      "example": "This credential request is already finished"
                    }
                  },
                  "xml": {
                    "name": "main"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Business Wallet session token"
      }
    },
    "schemas": {}
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}