{
  "openapi": "3.0.3",
  "info": {
    "title": "Fiskil's core platform APIs",
    "description": "Handles a number of open Data fetching related tasks",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://api.fiskil.com"
    }
  ],
  "tags": [
    {
      "name": "Public",
      "description": "APIs intended to be called by Fiskil clients. The details can be found at https://docs.fiskil.com/data-api/api-reference"
    }
  ],
  "paths": {
    "/auth/session": {
      "post": {
        "tags": [
          "auth",
          "v3"
        ],
        "summary": "Create auth session",
        "description": "Create an auth session before auth process.",
        "operationId": "create-auth-session",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAuthSessionRequestBody"
              },
              "example": {
                "arrangement_id": "94549a73-a554-4b76-b824-d96898829751",
                "cancel_uri": "https://acme.com/cancel",
                "end_user_id": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB",
                "institution_id": "10",
                "redirect_uri": "https://acme.com/success"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddAuthSessionInConsoleResponseBody"
                },
                "example": {
                  "auth_url": "auth-session.com/redirect-url",
                  "expires_at": 1213467,
                  "id": "5qcql2s0bn9qfh1m5qd1sl4gth",
                  "session_id": "ea564d-56012s4-6ds4564"
                }
              }
            }
          },
          "400": {
            "description": "invalid_arrangement_id: Bad Request response.",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: Unauthorized response.",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "end_user_not_found: Not Found response.",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Token_header_Authorization": []
          }
        ]
      }
    },
    "/consent/{arrangement_id}": {
      "delete": {
        "tags": [
          "consent",
          "v3"
        ],
        "summary": "Revoke consent",
        "description": "Allows a client to revoke a consent",
        "operationId": "revoke-consent",
        "parameters": [
          {
            "name": "arrangement_id",
            "in": "path",
            "description": "CDR arrangement ID as returned by the list consents API.",
            "required": true,
            "schema": {
              "type": "string",
              "description": "CDR arrangement ID as returned by the list consents API.",
              "example": "94549a73-a554-4b76-b824-d96898829751"
            },
            "example": "94549a73-a554-4b76-b824-d96898829751"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content response."
          }
        },
        "security": [
          {
            "Token_header_Authorization": []
          }
        ]
      }
    },
    "/end-users": {
      "post": {
        "tags": [
          "end-users",
          "v3"
        ],
        "summary": "Create end user",
        "description": "Creates a new end user",
        "operationId": "create-end-user",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndUserRequestBody"
              },
              "example": {
                "abn": "51 824 753 556",
                "email": "john_starmer@gmail.com",
                "name": "John Starmer",
                "phone": "+614123456789"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Createenduser"
                },
                "example": {
                  "end_user_id": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB"
                }
              }
            }
          },
          "400": {
            "description": "end_user_already_exists: user with that email already exists",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: Unauthorized response.",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scopes: token doesn't have enough scope to access the resource",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Token_header_Authorization": []
          }
        ]
      },
      "get": {
        "tags": [
          "end-users",
          "v3"
        ],
        "summary": "List end users",
        "description": "List end users belonging to a client.",
        "operationId": "list-end-users",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "Email address to filter end users by.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page[before]",
            "in": "query",
            "description": "When page[before] is specified, backwards pagination is achieved.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page[after]",
            "in": "query",
            "description": "When page[after] is specified, forwards pagination is achieved.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "description": "When page[size] is specified, no more than page[size] resources will be included in the response. It is capped at 1000.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/front_door.EndUsersBodyV3"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/front_door.ErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/front_door.ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "Token_header_Authorization": []
          }
        ]
      }
    },
    "/end-users/{end_user_id}": {
      "post": {
        "tags": [
          "end-users",
          "v3"
        ],
        "summary": "Update end user",
        "description": "Update an end user",
        "operationId": "update-end-user",
        "parameters": [
          {
            "name": "end_user_id",
            "in": "path",
            "description": "ID of the end user",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the end user",
              "example": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB"
            },
            "example": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndUserRequestBody"
              },
              "example": {
                "abn": "51 824 753 556",
                "email": "john_starmer@gmail.com",
                "phone": "+614123456789",
                "session_id": "ses-123"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content response."
          },
          "400": {
            "description": "end_user_already_exists: user with that email already exists",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "end_user_not_found: end user not found",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/end-users/{id}": {
      "delete": {
        "tags": [
          "end-users",
          "v3"
        ],
        "summary": "Delete end user",
        "description": "Allows a client to delete an end user",
        "operationId": "delete-end-user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The id of the end user to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The id of the end user to delete.",
              "example": "482c0e2b-5866-46b1-b795-220b7bba45b5"
            },
            "example": "482c0e2b-5866-46b1-b795-220b7bba45b5"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content response."
          },
          "404": {
            "description": "end_user_not_found: End user not found",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Token_header_Authorization": []
          }
        ]
      },
      "get": {
        "tags": [
          "end-users",
          "v3"
        ],
        "summary": "Get end user by id",
        "description": "Finds an end user by end user id",
        "operationId": "get-end-user-by-id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the end user to fetch.",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the end user to fetch.",
              "example": "482c0e2b-5866-46b1-b795-220b7bba45b5"
            },
            "example": "482c0e2b-5866-46b1-b795-220b7bba45b5"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Enduser"
                },
                "example": {
                  "email": "john_starmer@gmail.com",
                  "id": "482c0e2b-5866-46b1-b795-220b7bba45b5",
                  "name": "John Starmer",
                  "phone": "+614123456789"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: Unauthorized response.",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "end_user_not_found: end user not found",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Token_header_Authorization": []
          }
        ]
      }
    },
    "/institutions": {
      "get": {
        "tags": [
          "institutions",
          "v3"
        ],
        "summary": "List institutions by client",
        "description": "Gets a list of institutions a client subscribes to.",
        "operationId": "list-institutions-by-client",
        "parameters": [
          {
            "name": "industry",
            "in": "query",
            "description": "The type of the institution e.g. “banking” or “energy”",
            "allowEmptyValue": true,
            "schema": {
              "type": "string",
              "description": "The type of the institution e.g. “banking” or “energy”",
              "example": "energy",
              "enum": [
                "banking",
                "energy"
              ]
            },
            "example": "banking"
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "Your team ID. You can get this from the settings menu of the Fiskil Console",
            "allowEmptyValue": true,
            "required": true,
            "schema": {
              "type": "string",
              "description": "Your team ID. You can get this from the settings menu of the Fiskil Console",
              "example": "your-team-id"
            },
            "example": "your-team-id"
          },
          {
            "name": "sess_id",
            "in": "query",
            "description": "The auth session id",
            "allowEmptyValue": true,
            "schema": {
              "type": "string",
              "description": "The auth session id",
              "example": "Et est quia enim ducimus."
            },
            "example": "Debitis molestiae et laboriosam ut."
          },
          {
            "name": "institution_mode",
            "in": "query",
            "description": "The institution mode. If set to recommended, will load recommended institution data only",
            "allowEmptyValue": true,
            "schema": {
              "type": "string",
              "description": "The institution mode. If set to recommended, will load recommended institution data only",
              "example": "recommended",
              "enum": [
                "recommended"
              ]
            },
            "example": "recommended"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InstitutionByClient"
                  },
                  "example": [
                    {
                      "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                      "id": "22",
                      "industry": "banking",
                      "is_accessible": true,
                      "logo": "https://eastpaclogo.com.au/eastpac.svg",
                      "name": "Eastpac",
                      "priority": 1,
                      "status": {
                        "connections": {
                          "status": "OUTAGE"
                        }
                      }
                    },
                    {
                      "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                      "id": "22",
                      "industry": "banking",
                      "is_accessible": true,
                      "logo": "https://eastpaclogo.com.au/eastpac.svg",
                      "name": "Eastpac",
                      "priority": 1,
                      "status": {
                        "connections": {
                          "status": "OUTAGE"
                        }
                      }
                    },
                    {
                      "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                      "id": "22",
                      "industry": "banking",
                      "is_accessible": true,
                      "logo": "https://eastpaclogo.com.au/eastpac.svg",
                      "name": "Eastpac",
                      "priority": 1,
                      "status": {
                        "connections": {
                          "status": "OUTAGE"
                        }
                      }
                    },
                    {
                      "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                      "id": "22",
                      "industry": "banking",
                      "is_accessible": true,
                      "logo": "https://eastpaclogo.com.au/eastpac.svg",
                      "name": "Eastpac",
                      "priority": 1,
                      "status": {
                        "connections": {
                          "status": "OUTAGE"
                        }
                      }
                    }
                  ]
                },
                "example": [
                  {
                    "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                    "id": "22",
                    "industry": "banking",
                    "is_accessible": true,
                    "logo": "https://eastpaclogo.com.au/eastpac.svg",
                    "name": "Eastpac",
                    "priority": 1,
                    "status": {
                      "connections": {
                        "status": "OUTAGE"
                      }
                    }
                  },
                  {
                    "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                    "id": "22",
                    "industry": "banking",
                    "is_accessible": true,
                    "logo": "https://eastpaclogo.com.au/eastpac.svg",
                    "name": "Eastpac",
                    "priority": 1,
                    "status": {
                      "connections": {
                        "status": "OUTAGE"
                      }
                    }
                  },
                  {
                    "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                    "id": "22",
                    "industry": "banking",
                    "is_accessible": true,
                    "logo": "https://eastpaclogo.com.au/eastpac.svg",
                    "name": "Eastpac",
                    "priority": 1,
                    "status": {
                      "connections": {
                        "status": "OUTAGE"
                      }
                    }
                  },
                  {
                    "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                    "id": "22",
                    "industry": "banking",
                    "is_accessible": true,
                    "logo": "https://eastpaclogo.com.au/eastpac.svg",
                    "name": "Eastpac",
                    "priority": 1,
                    "status": {
                      "connections": {
                        "status": "OUTAGE"
                      }
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "description": "bad_request: EndUserID is not associated with clientID passed in request",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/institutions/{id}": {
      "get": {
        "tags": [
          "institutions",
          "v3"
        ],
        "summary": "Get institution by id",
        "description": "Get institution by id",
        "operationId": "get-institution-by-id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the institution to fetch details of",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The ID of the institution to fetch details of",
              "example": "10"
            },
            "example": "10"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstitutionByClient"
                },
                "example": {
                  "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
                  "id": "22",
                  "industry": "banking",
                  "is_accessible": true,
                  "logo": "https://eastpaclogo.com.au/eastpac.svg",
                  "name": "Eastpac",
                  "priority": 1,
                  "status": {
                    "connections": {
                      "status": "DEGRADED"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "institution_not_found: Not Found response.",
            "content": {
              "application/vnd.goa.error": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/permissions": {
      "get": {
        "tags": [
          "permissions",
          "v3"
        ],
        "summary": "List permissions",
        "description": "Returns a list of Fiskil permissions.",
        "operationId": "list-permissions",
        "parameters": [
          {
            "name": "industry",
            "in": "query",
            "description": "The industry to filter on",
            "allowEmptyValue": true,
            "schema": {
              "type": "string",
              "description": "The industry to filter on",
              "example": "banking"
            },
            "example": "banking"
          }
        ],
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Permission"
                  },
                  "example": [
                    {
                      "description": "This will give the provider access to all of your transaction information",
                      "industry": "banking",
                      "name": "transactions",
                      "scope": "bank:transactions:read",
                      "standards": [
                        "CDR"
                      ]
                    },
                    {
                      "description": "This will give the provider access to all of your transaction information",
                      "industry": "banking",
                      "name": "transactions",
                      "scope": "bank:transactions:read",
                      "standards": [
                        "CDR"
                      ]
                    }
                  ]
                },
                "example": [
                  {
                    "description": "This will give the provider access to all of your transaction information",
                    "industry": "banking",
                    "name": "transactions",
                    "scope": "bank:transactions:read",
                    "standards": [
                      "CDR"
                    ]
                  },
                  {
                    "description": "This will give the provider access to all of your transaction information",
                    "industry": "banking",
                    "name": "transactions",
                    "scope": "bank:transactions:read",
                    "standards": [
                      "CDR"
                    ]
                  }
                ]
              }
            }
          }
        },
        "security": []
      }
    },
    "/consent": {
      "get": {
        "tags": [
          "consent",
          "v3"
        ],
        "summary": "List consents",
        "description": "List consents belonging to a client.",
        "operationId": "list-consents",
        "parameters": [
          {
            "name": "end_user_id",
            "in": "query",
            "description": "The ID of the end user to list consents for.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "description": "Filter to include only active or inactive consents.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expires_before",
            "in": "query",
            "description": "Optional RFC3339 timestamp. Only consents expiring before this time are returned.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page[before]",
            "in": "query",
            "description": "When page[before] is specified, backwards pagination is achieved.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page[after]",
            "in": "query",
            "description": "When page[after] is specified, forwards pagination is achieved.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "description": "When page[size] is specified, no more than page[size] resources will be included in the response. It is capped at 1000.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/front_door.ConsentsBodyV3"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/front_door.ErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/front_door.ErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "Token_header_Authorization": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AddAuthSessionInConsoleResponseBody": {
        "type": "object",
        "properties": {
          "auth_url": {
            "type": "string",
            "description": "The computed auth URL.",
            "example": "auth-session.com/redirect-url"
          },
          "expires_at": {
            "type": "integer",
            "description": "The computed auth URL expires at.",
            "example": 1213467,
            "format": "int64"
          },
          "id": {
            "type": "string",
            "description": "The client id.",
            "example": "5qcql2s0bn9qfh1m5qd1sl4gth"
          },
          "session_id": {
            "type": "string",
            "description": "Session Id",
            "example": "ea564d-56012s4-6ds4564"
          }
        },
        "example": {
          "auth_url": "auth-session.com/redirect-url",
          "expires_at": 1213467,
          "id": "5qcql2s0bn9qfh1m5qd1sl4gth",
          "session_id": "ea564d-56012s4-6ds4564"
        },
        "required": [
          "id",
          "session_id",
          "expires_at",
          "auth_url"
        ]
      },
      "ConnectionStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Whether the connection (consent) flow with an institution is healthy",
            "example": "DEGRADED",
            "enum": [
              "HEALTHY",
              "DEGRADED",
              "OUTAGE"
            ]
          }
        },
        "example": {
          "status": "HEALTHY"
        },
        "required": [
          "status"
        ]
      },
      "CreateAuthSessionRequestBody": {
        "type": "object",
        "properties": {
          "arrangement_id": {
            "type": "string",
            "description": "Existing CDR arrangement ID to amend/update",
            "example": "94549a73-a554-4b76-b824-d96898829751"
          },
          "cancel_uri": {
            "type": "string",
            "description": "Where the end user will be redirected on cancellation or failure. Required for redirect flows.",
            "example": "https://acme.com/cancel"
          },
          "end_user_id": {
            "type": "string",
            "description": "The end_user that will be consenting with an external provider",
            "example": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB"
          },
          "institution_id": {
            "type": "string",
            "description": "The institution id selected for the auth session. The user will not be able to select another institution during the consent flow.",
            "example": "10"
          },
          "redirect_uri": {
            "type": "string",
            "description": "Where the end user will be redirected to on success. Required for redirect flow.",
            "example": "https://acme.com/success"
          }
        },
        "example": {
          "arrangement_id": "94549a73-a554-4b76-b824-d96898829751",
          "cancel_uri": "https://acme.com/cancel",
          "end_user_id": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB",
          "institution_id": "10",
          "redirect_uri": "https://acme.com/success"
        },
        "required": [
          "end_user_id"
        ]
      },
      "CreateEndUserRequestBody": {
        "type": "object",
        "properties": {
          "abn": {
            "type": "string",
            "description": "Australian Business Number (ABN) of the end user if they represent a business",
            "example": "51 824 753 556"
          },
          "email": {
            "type": "string",
            "description": "An End Users email address. This should be their primary email, as it is used for notifying the End User about their consents.",
            "example": "john_starmer@gmail.com"
          },
          "name": {
            "type": "string",
            "description": "Name of the end user",
            "example": "John Starmer"
          },
          "phone": {
            "type": "string",
            "description": "An End Users Phone number in E.164 format",
            "example": "+614123456789"
          }
        },
        "example": {
          "abn": "51 824 753 556",
          "email": "john_starmer@gmail.com",
          "name": "John Starmer",
          "phone": "+614123456789"
        }
      },
      "Createenduser": {
        "type": "object",
        "properties": {
          "end_user_id": {
            "type": "string",
            "description": "A unique identifier for the End User object.",
            "example": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB"
          }
        },
        "example": {
          "end_user_id": "eu_2yRHN2ag2y4p8kCtm5DOeccZEXB"
        },
        "required": [
          "end_user_id"
        ]
      },
      "Enduser": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "An End Users email address. This should be their primary email, as it is used for notifying the End User about their consents.",
            "example": "john_starmer@gmail.com"
          },
          "id": {
            "type": "string",
            "description": "A unique identifier for the End User object.",
            "example": "482c0e2b-5866-46b1-b795-220b7bba45b5"
          },
          "name": {
            "type": "string",
            "description": "An End Users name.",
            "example": "John Starmer"
          },
          "phone": {
            "type": "string",
            "description": "An End Users Phone. It is used for notifying the End User about their consents.",
            "example": "+614123456789"
          }
        },
        "example": {
          "email": "john_starmer@gmail.com",
          "id": "482c0e2b-5866-46b1-b795-220b7bba45b5",
          "name": "John Starmer",
          "phone": "+614123456789"
        },
        "required": [
          "id"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "fault": {
            "type": "boolean",
            "description": "Is the error a server-side fault?",
            "example": true
          },
          "id": {
            "type": "string",
            "description": "ID is a unique identifier for this particular occurrence of the problem.",
            "example": "123abc"
          },
          "message": {
            "type": "string",
            "description": "Message is a human-readable explanation specific to this occurrence of the problem.",
            "example": "parameter 'p' must be an integer"
          },
          "name": {
            "type": "string",
            "description": "Name is the name of this class of errors.",
            "example": "bad_request"
          },
          "temporary": {
            "type": "boolean",
            "description": "Is the error temporary?",
            "example": true
          },
          "timeout": {
            "type": "boolean",
            "description": "Is the error a timeout?",
            "example": false
          }
        },
        "example": {
          "fault": true,
          "id": "123abc",
          "message": "parameter 'p' must be an integer",
          "name": "bad_request",
          "temporary": true,
          "timeout": false
        },
        "required": [
          "name",
          "id",
          "message",
          "temporary",
          "timeout",
          "fault"
        ]
      },
      "InstitutionByClient": {
        "type": "object",
        "properties": {
          "icon": {
            "type": "string",
            "description": "A URL to an icon for the institution",
            "example": "https://eastpaclogo.com.au/eastpac-icon.svg"
          },
          "id": {
            "type": "string",
            "description": "The id of the institution",
            "example": "22"
          },
          "industry": {
            "type": "string",
            "description": "The industry of the institution e.g. “banking” or “energy”",
            "example": "banking",
            "enum": [
              "banking",
              "energy"
            ]
          },
          "is_accessible": {
            "type": "boolean",
            "description": "Whether this institution is accessible by the teamID. Determines if institution can be used",
            "example": true
          },
          "logo": {
            "type": "string",
            "description": "A URL to the logo of the institution",
            "example": "https://eastpaclogo.com.au/eastpac.svg"
          },
          "name": {
            "type": "string",
            "description": "The name of the institution",
            "example": "Eastpac"
          },
          "priority": {
            "type": "integer",
            "description": "The order that this institution will appear in during an auth session",
            "example": 1,
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/InstitutionStatus"
          }
        },
        "description": "Gets a list of institutions from the perspective of the client.",
        "example": {
          "icon": "https://eastpaclogo.com.au/eastpac-icon.svg",
          "id": "22",
          "industry": "banking",
          "is_accessible": true,
          "logo": "https://eastpaclogo.com.au/eastpac.svg",
          "name": "Eastpac",
          "priority": 1,
          "status": {
            "connections": {
              "status": "OUTAGE"
            }
          }
        },
        "required": [
          "id",
          "name",
          "logo",
          "icon",
          "industry",
          "priority",
          "status"
        ]
      },
      "InstitutionStatus": {
        "type": "object",
        "properties": {
          "connections": {
            "$ref": "#/components/schemas/ConnectionStatus"
          }
        },
        "description": "The overall status of an institution",
        "example": {
          "connections": {
            "status": "OUTAGE"
          }
        },
        "required": [
          "connections"
        ]
      },
      "Permission": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "A description of the permission.",
            "example": "This will give the provider access to all of your transaction information"
          },
          "industry": {
            "type": "string",
            "description": "The industry this permission belongs to.",
            "example": "banking"
          },
          "name": {
            "type": "string",
            "description": "The name of the permission.",
            "example": "transactions"
          },
          "scope": {
            "type": "string",
            "description": "The CDS scope this permission translates to",
            "example": "bank:transactions:read"
          },
          "standards": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "Possimus et cumque eveniet ea quaerat."
            },
            "description": "Information about the assocated standards",
            "example": [
              "CDR"
            ]
          }
        },
        "description": "Information about permissions.",
        "example": {
          "description": "This will give the provider access to all of your transaction information",
          "industry": "banking",
          "name": "transactions",
          "scope": "bank:transactions:read",
          "standards": [
            "CDR"
          ]
        },
        "required": [
          "name",
          "description",
          "scope",
          "standards",
          "industry"
        ]
      },
      "UpdateEndUserRequestBody": {
        "type": "object",
        "properties": {
          "abn": {
            "type": "string",
            "description": "Australian Business Number (ABN) of the end user if they represent a business",
            "example": "51 824 753 556"
          },
          "email": {
            "type": "string",
            "description": "An End Users email address. This should be their primary email, as it is used for notifying the End User about their consents.",
            "example": "john_starmer@gmail.com"
          },
          "phone": {
            "type": "string",
            "description": "An End Users Phone number in E.164 format",
            "example": "+614123456789"
          },
          "session_id": {
            "type": "string",
            "description": "ID of the session",
            "example": "ses-123"
          }
        },
        "example": {
          "abn": "51 824 753 556",
          "email": "john_starmer@gmail.com",
          "phone": "+614123456789",
          "session_id": "ses-123"
        },
        "required": [
          "session_id"
        ]
      },
      "authapi.paginationLinks": {
        "type": "object",
        "properties": {
          "next": {
            "type": "string"
          },
          "prev": {
            "type": "string"
          }
        }
      },
      "front_door.ConsentsBodyV3": {
        "type": "object",
        "properties": {
          "consents": {
            "description": "A list of consents belonging to the client.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/server.ConsentResponse"
            }
          },
          "links": {
            "description": "Links to be used for pagination.",
            "allOf": [
              {
                "$ref": "#/components/schemas/authapi.paginationLinks"
              }
            ]
          }
        }
      },
      "front_door.EndUsersBodyV3": {
        "type": "object",
        "properties": {
          "end_users": {
            "description": "A list of end users belonging to the client.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/server.EnduserResponse"
            }
          },
          "links": {
            "description": "Links to be used for pagination.",
            "allOf": [
              {
                "$ref": "#/components/schemas/authapi.paginationLinks"
              }
            ]
          }
        }
      },
      "front_door.ErrorBody": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier for this error.",
            "type": "string"
          },
          "message": {
            "description": "Details about the error that occurred.",
            "type": "string"
          },
          "name": {
            "description": "The name of the error.",
            "type": "string"
          }
        }
      },
      "server.ConsentResponse": {
        "type": "object",
        "properties": {
          "account_ids": {
            "description": "List of IDs of accounts that were authorised for this consent. The details\nof the accounts can be looked up using the Accounts API for the appropriate\nindustry.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "active": {
            "description": "Indicates whether consent is active or not",
            "type": "boolean"
          },
          "app_logo": {
            "description": "URL to a logo of your application",
            "type": "string"
          },
          "app_name": {
            "description": "Your application name",
            "type": "string"
          },
          "arrangement_id": {
            "description": "CDR arrangement ID provided by DH.",
            "type": "string"
          },
          "created_at": {
            "description": "When the Consent was created",
            "type": "string"
          },
          "duration": {
            "description": "The time period access was granted. Its in seconds",
            "type": "integer"
          },
          "end_user_email": {
            "description": "End users email",
            "type": "string"
          },
          "end_user_id": {
            "description": "ID of the end user that authorised the consent",
            "type": "string"
          },
          "expires_at": {
            "description": "RFC3339 date-time that the consent expires (or already expired) at",
            "type": "string"
          },
          "institution_id": {
            "description": "The identifier for the institution the Consent is held with.",
            "type": "string"
          },
          "institution_logo": {
            "description": "Institution logo",
            "type": "string"
          },
          "institution_name": {
            "description": "Institution name",
            "type": "string"
          },
          "institution_type": {
            "description": "Institution Type",
            "type": "string"
          },
          "last_accessed": {
            "description": "The last time the ADR, or Fiskil used the consent to access data.",
            "type": "string"
          },
          "last_consent": {
            "description": "The last time the Consent was acknowledged by the End User.",
            "type": "string"
          },
          "permissions": {
            "description": "A list of the data permissions granted.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "termination_reason": {
            "description": "Reason for consent termination",
            "type": "string"
          }
        }
      },
      "server.EnduserResponse": {
        "type": "object",
        "properties": {
          "email": {
            "description": "An End Users email address. This should be their primary email, as it is\nused for notifying the End User about their consents.",
            "type": "string"
          },
          "id": {
            "description": "A unique identifier for the End User object.",
            "type": "string"
          },
          "name": {
            "description": "An End Users name.",
            "type": "string"
          },
          "phone": {
            "description": "An End Users Phone. It is used for notifying the End User about their\nconsents.",
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "Token_header_Authorization": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}