openapi: 3.0.3
info:
  title: RITM API V1
  description: |-
    RITM is a delegated identity management system that allows organisations to securely connect identities through roles and their associated entitlements, while leveraging self-service capabilities.

    **Introduction to the RITM API**

    Next to technical API's that are typically used by the RITM platform itself, OneWelcome also provides more functional oriented API's to ease integrations with the customers' applications.
    This specification is meant to provide information and guidance with respect to the functional RITM API's.

    **Versions of the API**

    Our API's are versioned and will remain backwards-compatible for 6 months after the end-of-life for this particular version is announced. Newer versions are expected to be compatible with old versions but both request parameters and response bodies could be subject to changes between versions.

    The response body for an API call could contain more information then described in this specification and users of the API should ignore this extra information.

  termsOfService: https://www.onewelcome.com/terms-of-use
  license:
    name: OneWelcome License
    url: https://www.onewelcome.com/
  version: 2023.12.0
externalDocs:
  description: Find out more about RITM
  url: https://developer.onewelcome.com/documentation/introduction-to-ritm
servers:
  - url: https://{customerID}.iwelcome.com/api/v1
    description: customerID is assigned by OneWelcome
tags:
  - name: Access and Authorisation information
    description: |-
      Calls related to retrieving access and authorisation information (both self-service and admin).
  - name: Users
    description: |-
      Calls related to managing users.
  # - name: Data
  #  description: |-
  #    Calls related to data.
  - name: Applications
    description: |-
      Calls related to 3rd party applications
  - name: Applications - Application categories
    description: |-
      Calls related to 3rd party application categories
  - name: Applications - Resource types
    description: |-
      Calls related to resource types
  - name: Applications - Resources
    description: |-
      Calls related to resources
  - name: Access - Access roles
    description: |-
      Calls related to access roles.
  - name: Data - Structures
    description: |-
      Calls related to the management of structures.
  - name: Data - Groups
    description: |-
      Calls related to the management of groups in structures.
paths:
  /user/me:
    get:
      tags:
        - Access and Authorisation information
      summary: Retrieve profile information of the authenticated user
      description: |-
        The profile of a user contains several attributes with information about this user. This API retrieves attributes and their values related to the profile of the authenticated user.

        This endpoint:
        - is intended to return information for the authenticated caller of the API (by means of an OAuth Access Token) not for any given user
        - will only return attribute related information and not group membership or role assignment information as this is by-default shielded by RITM for the user when looking at his own profile (UI and/or API)
      parameters:
        - in: query
          name: attributesOf
          required: false
          description: |-
            Defined set of attributes whereby the possible options relate to the corresponding functionality in the RITM UI.

            The **MANAGEMENT_USER_EDIT** option, for example, will return the profile information (if available) that can also be found on the first tab of the "Edit user" page in the RITM UI.

            - AFFECTED_IDENTITIES
            - API_USER_CREATE
            - MANAGEMENT_IMPORT
            - MANAGEMENT_USER_ADD
            - MANAGEMENT_USER_EDIT
            - MANAGEMENT_USER_PROFILE
            - MANAGEMENT_USER_INVITE
            - MANAGEMENT_USER_SEND_INVITATION
            - MANAGEMENT_USERS
            - MASS_UPDATES
            - PROFILE_MANAGED_IDENTITIES
            - REPORTS_USERS
            - STRUCTURES
            - USER_PROFILE
          schema:
            type: string
            enum:
              - AFFECTED_IDENTITIES
              - API_USER_CREATE
              - MANAGEMENT_IMPORT
              - MANAGEMENT_USER_ADD
              - MANAGEMENT_USER_EDIT
              - MANAGEMENT_USER_PROFILE
              - MANAGEMENT_USER_INVITE
              - MANAGEMENT_USER_SEND_INVITATION
              - MANAGEMENT_USERS
              - MASS_UPDATES
              - PROFILE_MANAGED_IDENTITIES
              - REPORTS_USERS
              - STRUCTURES
              - USER_PROFILE
            default: MANAGEMENT_USER_EDIT
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/userMeResponse"
              examples:
                Name only:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "name": {
                        "givenName": "John",
                        "familyName": "Doe"
                      }
                    }
                Typical profile:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "name": {
                        "givenName": "John",
                        "familyName": "Doe"
                      },
                      "addresses": [
                        {
                          "type": "work",
                          "iwelcome_street": "Soesterweg",
                          "iwelcome_houseNumber": "300",
                          "iwelcome_additional": "E",
                          "iwelcome_zone": "3812 BH",
                          "iwelcome_area": "Amersfoort",
                          "country": "NL"
                          }
                      ],
                      "emails": [
                        {
                          "type": "work",
                          "value": "john.p.doe@example.com",
                          "primary": true
                        }
                      ],
                      "phoneNumbers": [
                        {
                          "type": "mobile",
                          "value": "+31612345678",
                          "primary": true
                        }
                      ]
                    }
                Customer specific:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "urn:scim:schemas:extension:custom:1.0": {
                        "customAttribute1": "value1",
                        "customAttribute2": 12345,
                        "customAttribute3": true,
                        "customAttribute4": [
                          "arrayValue1",
                          "arrayValue2"
                        ],
                        "customAttribute5":
                          {
                            "subAttribute1": "subValue1",
                            "subAttribute2": 12345,
                            "subAttribute3": false
                          },
                        "customAttribute6":
                          [
                            {
                              "subAttribute1": "subValue1",
                              "subAttribute2": 12345,
                              "subAttribute3": false
                            }
                          ]
                      }
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "403":
          description: "Forbidden"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No groups:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_GROUPS"
                      ns: "PERMISSION"
                      message: "The account is not assigned to any group"
                      status: 403
                No roles:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_ROLES"
                      ns: "PERMISSION"
                      message: "The account has neither admin, nor personal roles assigned"
                      status: 403
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid attributesOf parameter:
                  value:
                    error:
                      code: ERROR
                      ns: GLOBAL
                      message: "error.profile.invalidAttributesOf"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /structure/authorized:
    get:
      tags:
        - Access and Authorisation information
      summary: Get the managed groups of the authenticated user
      description: |-
        Users with RITM Admin roles and the appropriate entitlements can manage several groups with structures. This API fetches these managed group for the authenticated user.

        This endpoint:
        - is intended to return information for the authenticated caller of the API (by means of an OAuth Access Token) not for any given user
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/structureAuthorizedResponse"
              examples:
                No managed structures and groups:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "managedStructures": []
                    }
                One or more managed structures and groups:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "managedStructures": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "managedGroups": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1",
                              "children": [],
                              "roles": [],
                              "attributes": {
                                "vatNumber": 63826382
                              }
                            }
                          ]
                        },
                        {
                          "code": "structure-fsLsscQThkcx",
                          "name": "Structure 2",
                          "managedGroups": [
                            {
                              "code": "my_code_for_group2",
                              "name": "Group 2",
                              "children": [],
                              "roles": []
                            }
                          ]
                        },
                        {
                          "code": "structure-DA9dPBPncmyB",
                          "name": "Structure 3",
                          "managedGroups": [
                            {
                              "code": "my_code_for_group3",
                              "name": "Group 3",
                              "children": [
                                {
                                  "code": "my_code_for_subgroup1",
                                  "name": "Subgroup 1",
                                  "children": [],
                                  "roles": []
                                }
                              ],
                              "roles": [
                                {
                                  "type": "ACCESS",
                                  "code": "role-673f20jvsklwh",
                                  "name": "Drift - Full admin access"
                                },
                                {
                                  "type": "ADMIN",
                                  "code": "role-63nso3bs9ln",
                                  "name": "Customer Care"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "403":
          description: "Forbidden"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No groups:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_GROUPS"
                      ns: "PERMISSION"
                      message: "The account is not assigned to any group"
                      status: 403
                No roles:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_ROLES"
                      ns: "PERMISSION"
                      message: "The account has neither admin, nor personal roles assigned"
                      status: 403
      security:
        - OAuth2: []
        - APIKey: []
  /roles/assignable:
    get:
      tags:
        - Access and Authorisation information
      summary: Retrieve the roles that the authenticated user is allowed to assign
      description: |-
        A user with one or more RITM Admin roles could have the appropriate entitlements to assign roles to their managed identities. This endpoint can be used to retrieve:
        - all possible roles that can be assigned
        - roles that can be assigned, but related to a specific application
      parameters:
        - in: query
          name: application
          schema:
            type: string
            example: "application_client_id"
          required: false
        - in: query
          name: structureCode
          schema:
            type: string
            example: "structure-t04wu2fQbnEk"
          required: true
        - in: query
          name: groupCode
          schema:
            type: string
            example: "my_defined_groupcode"
          required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/rolesAssignableResponse"
              examples:
                No assignable roles:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "cascadableAdminRoles": [],
                      "cascadablePersonalRoles": [],
                      "cascadableAccessRoles": []
                    }
                No assignable roles related to a known application:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "application": "drift",
                      "cascadableAdminRoles": [],
                      "cascadablePersonalRoles": [],
                      "cascadableAccessRoles": []
                    }
                Assignable roles available:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "cascadableAdminRoles": [
                        {
                          "code": "role-8N3y6UjljsD6",
                          "name": "Delegated User Manager"
                        }
                      ],
                      "cascadablePersonalRoles": [
                        {
                          "code": "role-o9ccF3opKQUL",
                          "name": "Self Service"
                        },
                        {
                          "code": "role-CKfZPizVqakt",
                          "name": "Self Service - View only"
                        }
                      ],
                      "cascadableAccessRoles": [
                        {
                          "code": "role-DvpfxcqlLUXT",
                          "name": "ServiceNow - admin"
                        },
                        {
                          "code": "role-NmCdpWl98tZ3",
                          "name": "ServiceNow - user_admin"
                        },
                        {
                          "code": "role-2trgzxg3y6qx",
                          "name": "ServiceNow - user"
                        }
                      ]
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing structurecode:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.role.assignable.empty.structureCode"
                      data:
                        field: "structureCode"
                      status: 400
                Missing groupcode:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.role.assignable.empty.groupCode"
                      data:
                        field: "groupCode"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No application found:
                  value:
                    error:
                      code: "APP_NOT_FOUND"
                      ns: "GLOBAL"
                      message: "There is no ACTIVE application with identifier 'office365'"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /third-party-applications/roles:
    get:
      tags:
        - Access and Authorisation information
      summary: Retrieve application specific roles of the authenticated user or of a managed identity
      description: |-
        Any user could potentially have been assigned one or more roles related to third party application access. This API will retrieve all the third party application roles, for a given application, that are assigned to a particular user.

        This information could either be retrieved for the user himself (authenticating with an OAuth Access Token) or for any of the managed identities of the caller (typically by authenticating with an OAuth Access Token or API-Key). **application** will always be required as a request parameter. The **application** is the actual application code as defined in RITM and could be typically seen as the client_id in case of an OAuth/OIDC application or a SAML EntityID of the SP.
      parameters:
        - in: query
          name: uid
          schema:
            $ref: "#/components/schemas/uid"
          required: false
          description: |-
            If **uid** is not included as a parameter, the API will retrieve the application specific roles of the authenticated user.
        - in: query
          name: application
          schema:
            type: string
            example: application_client_id
          required: true
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/thirdPartyApplicationsRolesResponse"
              examples:
                No application roles for the given user/application:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "application": "drift",
                      "applicationRoles": []
                    }
                One or more application roles for the given user/application:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "application": "drift",
                      "applicationRoles": [
                        "User",
                        "Editor"
                      ]
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing uid parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.thirdPartyApp.getRoles.empty.uid"
                      data:
                        field: "uid"
                      status: 400
                Missing application parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.thirdPartyApp.getRoles.empty.application"
                      data:
                        field: "application"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Application not found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "error.application.not.found"
                      status: 404
                User not found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "error.user.not.found"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /users/managed-identities:
    get:
      tags:
        - Access and Authorisation information
      summary: Retrieve profile, group and role information of managed identities
      description: |-
        Any user with will have several attributes as part of their profile but they will also have one or more group memberships and potentially one or more assigned roles. This API retrieves all the mentioned information for one specific managed identity (user) or all the managed identities of the authenticated user.
      parameters:
        - in: query
          name: uid
          required: false
          description: |-
            If **uid** is not included as a parameter, the API will retrieve all managed identities of the authenticated user (with pagination).
          schema:
            $ref: "#/components/schemas/uid"
        - in: query
          name: attributesOf
          required: false
          description: |-
            Defined set of attributes whereby the possible options relate to the corresponding functionality in the RITM UI.

            The **MANAGEMENT_USER_EDIT** option, for example, will return the profile information (if available) that can also be found on the first tab of the "Edit user" page in the RITM UI.

            - AFFECTED_IDENTITIES
            - API_USER_CREATE
            - MANAGEMENT_IMPORT
            - MANAGEMENT_USER_ADD
            - MANAGEMENT_USER_EDIT
            - MANAGEMENT_USER_PROFILE
            - MANAGEMENT_USER_INVITE
            - MANAGEMENT_USER_SEND_INVITATION
            - MANAGEMENT_USERS
            - MASS_UPDATES
            - PROFILE_MANAGED_IDENTITIES
            - REPORTS_USERS
            - STRUCTURES
            - USER_PROFILE
          schema:
            type: string
            enum:
              - AFFECTED_IDENTITIES
              - API_USER_CREATE
              - MANAGEMENT_IMPORT
              - MANAGEMENT_USER_ADD
              - MANAGEMENT_USER_EDIT
              - MANAGEMENT_USER_PROFILE
              - MANAGEMENT_USER_INVITE
              - MANAGEMENT_USER_SEND_INVITATION
              - MANAGEMENT_USERS
              - MASS_UPDATES
              - PROFILE_MANAGED_IDENTITIES
              - REPORTS_USERS
              - STRUCTURES
              - USER_PROFILE
            default: MANAGEMENT_USER_EDIT
        - in: query
          name: structureCode
          description: |-
            **structureCode** is an optional filter to only retrieve the managed identities from that particular structure. **structureCode** is only required if **groupCode** is also used.
          schema:
            type: string
            example: structure-t04wu2fQbnEk
          required: false
        - in: query
          name: groupCode
          description: |-
            **groupCode** is an optional filter to only retrieve the managed identities from that particular group.
          schema:
            type: string
            example: my_code_for_group1
          required: false
        - in: query
          name: showGroupAttributes
          description: |-
            **showGroupAttributes** is an optional filter to be able to specify if custom group attributes should also be included in the response or not. By default it is set to **true**.
          required: false
          schema:
            type: boolean
            default: true
            example: false
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usersManagedIdentitiesResponse"
              examples:
                One or more managed identities, showGroupAttributes set to true:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "profileInformation": {
                            "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                            "name": {
                              "givenName": "John",
                              "familyName": "Doe"
                            },
                            "emails": [
                              {
                                "type": "work",
                                "value": "john.p.doe@example.com",
                                "primary": true
                              }
                            ]
                          },
                          "roleAssignments": {
                            "adminRoles": [
                              {
                                "code": "role-wYSRxmeChQdJ",
                                "name": "Customer Care",
                                "startDate": "2021-08-01T00:00:00.000Z",
                                "endDate": "2021-12-31T00:00:00.000Z"
                              }
                            ],
                            "personalRoles": [
                              {
                                "code": "role-LJxdruuzjERF",
                                "name": "Self Service",
                                "startDate": "2021-01-01T00:00:00.000Z",
                                "endDate": "2021-12-31T00:00:00.000Z"
                              }
                            ],
                            "accessRoles": [
                              {
                                "code": "role-JgvpFeGFykyd",
                                "name": "Drift - Account Owner",
                                "startDate": "2021-04-01T00:00:00.000Z",
                                "endDate": "2021-12-31T00:00:00.000Z",
                                "assignedStructureCode": "structure-t04wu2fQbnEk",
                                "assignedStructureGroup": "my_code_for_group1",
                                "applications": [
                                  {
                                    "code": "drift",
                                    "name": "Drift",
                                    "applicationRoles": [
                                      "Account Owner"
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          "structureMemberships": [
                            {
                              "code": "structure-t04wu2fQbnEk",
                              "name": "Structure 1",
                              "groupMemberships": [
                                {
                                  "code": "my_code_for_group1",
                                  "name": "Group 1",
                                  "attributes": {
                                    "vatNumber": 63826382
                                  }
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                No managed identities:
                  value:
                    totalItems: 0
                    limit: 10
                    page: 1
                    pageCount: 1
                    result: []
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Structure not in management scope:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "The structure structure-t04wu2fQbnEk you are trying to filter by is not part of your scope"
                      status: 401
                Group not in management scope:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "The group my_code_for_group1 you are trying to filter by is not part of your scope"
                      status: 401
        "403":
          description: "Forbidden"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No groups:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_GROUPS"
                      ns: "PERMISSION"
                      message: "The account is not assigned to any group"
                      status: 403
                No roles:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_ROLES"
                      ns: "PERMISSION"
                      message: "The account has neither admin, nor personal roles assigned"
                      status: 403
        "422":
          description: "Unprocessable Entity"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "STRUCTURE.NOT_FOUND"
                      ns: "STRUCTURE"
                      message: "StructureCode is mandatory if groupCode is used."
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /structure/memberships:
    get:
      tags:
        - Access and Authorisation information
      summary: Get the group memberships of managed identities
      description: |-
        Users with RITM Admin roles can retrieve group memberships for a managed identity by using this API.
      parameters:
        - in: query
          name: uid
          required: true
          schema:
            $ref: "#/components/schemas/uid"
        - in: query
          name: showGroupAttributes
          description: |-
            **showGroupAttributes** is an optional filter to be able to specify if custom group attributes should also be included in the response or not. By default it is set to **true**.
          required: false
          schema:
            type: boolean
            default: true
            example: false
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/structureMembershipsResponse"
              examples:
                One or more group memberships:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1",
                              "attributes": {
                                "vatNumber": 63826382
                              }
                            }
                          ]
                        }
                      ]
                    }
                One or more group memberships, where showGroupAttributes is set to false:
                  value:
                    {
                      "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1"
                            }
                          ]
                        }
                      ]
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing uid:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.memberships.empty.uid"
                      data:
                        field: "uid"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorized to manage yourself:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to read own memberships"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No managed identity found:
                  value:
                    error:
                      code: "AUTHORIZED_PROFILE_NOT_FOUND"
                      ns: "GLOBAL"
                      message: "Searching for user 6410dcb2346b4030babe3db53b5f4051 by user john.p.doe@example.com/org insurgroup/seg insurgroup returned 0 users"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /structureData:
    post:
      tags:
        - Data - Structures
      summary: Create a new structure
      description: |-
        Users with RITM Admin roles and with the correct platform access can create a new structure using this API.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/structureCreateRequest"
            example:
              {
                "name": "Organisational Chart",
                "description": "Lorem ipsum dolor sit a met",
                "isNested": false,
                "status": "ACTIVE",
                "structureType": "STATIC",
                "hasCustomAttributes": true,
                "attributes": [
                  {
                    "code": "vatNumber",
                    "name": "VAT Number"
                  }
                ],
                "hasRolesPerGroup": true,
                "structureGroups": [
                  {
                    "name": "Marketing",
                    "code": "marketing",
                    "attributes": {
                      "vatNumber": 63826382
                    },
                    "roles": [
                      {
                        "code": "role-673f20jvsklwh",
                        "type": "ACCESS"
                      },
                      {
                        "code": "role-63nso3bs9ln",
                        "type": "ADMIN"
                      }
                    ]
                  }
                ]
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "configuration": {
                    "isNested": false,
                    "structureType": "STATIC"
                  },
                  "code": "structure-1234567891011",
                  "name": "Organisational Chart",
                  "description": "Lorem ipsum dolor sit a met",
                  "status": "ACTIVE",
                  "hasCustomAttributes": true,
                  "attributes": [
                    {
                      "code": "vatNumber",
                      "name": "VAT Number"
                    }
                  ],
                  "hasRolesPerGroup": true,
                  "structureItems": [
                    {
                      "name": "Marketing",
                      "code": "marketing",
                      "attributes": {
                        "vatNumber": 63826382
                      },
                      "children": [],
                      "roles": [
                        {
                          "code": "role-673f20jvsklwh",
                          "type": "ACCESS"
                        },
                        {
                          "code": "role-63nso3bs9ln",
                          "type": "ADMIN"
                        }
                      ]
                    }
                  ],
                  "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing name:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.create.empty.displayName"
                      data:
                        field: "name"
                      status: 400
                Missing or incorrect status:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.create.empty.status"
                      data:
                        field: "status"
                      status: 400
                Missing or incorrect isNested:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.create.empty.isNested"
                      data:
                        field: "isNested"
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorised to create structure:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to create structure"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "422":
          description: "Invalid data"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                The provided value for structureType is not valid:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structureType.invalid"
                      status: 422
                The provided value for hasCustomAttributes is not valid:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.attributes.custom.restriction"
                      status: 422
                Missing value for custom attribute code:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.attributes.empty.code"
                      status: 422
                Used group attribute code is not configured for the structure:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.groups.attribute.not.configured"
                      status: 422
                The provided value for custom attribute code is already in use:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.attributes.duplicate.code"
                      status: 422
                All groups need to have a code:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.create.empty.code"
                      status: 422
                All groups need to have a name:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.create.empty.name"
                      status: 422
                Children for groups need to be passed as an array:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.children.not.array"
                      status: 422
                The provided value for hasRolesPerGroup is not valid:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.invalid.hasRolesPerGroup"
                      status: 422
                All roles need to have a code:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.code"
                      status: 422
                All roles need to have a type:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.roleType"
                      status: 422
                The added role does not exist or is outside of scope:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.role.invalid"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /structuresData:
    get:
      tags:
        - Data - Structures
      summary: Search for existing structures
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve structures using this API. The search parameters are AND-ed.
      parameters:
        - in: query
          name: name
          description: |-
            The name of the structure. Case-insensitive and partial match.
          schema:
            type: string
            example: Organisational chart
          required: false
        - in: query
          name: code
          description: |-
            The code corresponding to the structure being retrieved. Exact match.
          schema:
            type: string
            example: structure-1234567891011
          required: false
        - in: query
          name: description
          description: |-
            A short description of the structure, of maximum 250 characters. Case-insensitive and partial match.
          schema:
            type: string
            example: This structure contains the organisation's employees, grouped by job title.
          required: false
        - in: query
          name: status
          description: |-
            The status of the new structure. Can be active or inactive. Case-insensitive and exact match.
          schema:
            type: string
            enum: [ACTIVE, INACTIVE]
            default: ACTIVE
            example: ACTIVE
          required: false
        - in: query
          name: isNested
          description: |-
            **isNested** determines whether the groups configured within the structure can be configured in a flat layout, or in a branching one.
          schema:
            type: boolean
            example: false
          required: false
        - in: query
          name: showInactive
          description: |-
            If set to true also shows INACTIVE structures if **status** is not passed
          schema:
            type: boolean
            example: true
          required: false
        - in: query
          name: showGroupAttributes
          description: |-
            **showGroupAttributes** is an optional filter to be able to specify if custom group attributes should also be included in the response or not. By default it is set to **true**.
          required: false
          schema:
            type: boolean
            default: true
            example: true
        - in: query
          name: showGroupRoles
          description: |-
            **showGroupRoles** is an optional filter to be able to specify if group roles should also be included in the response or not. By default it is set to **true**.
          required: false
          schema:
            type: boolean
            default: true
            example: true
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              examples:
                One or more structures found:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "configuration": {
                            "isNested": false,
                            "structureType": "STATIC"
                          },
                          "code": "structure-1234567891011",
                          "name": "Organisational Chart",
                          "description": "Lorem ipsum dolor sit a met",
                          "status": "ACTIVE",
                          "hasCustomAttributes": true,
                          "attributes": [
                            {
                              "code": "vatNumber",
                              "name": "VAT Number"
                            }
                          ],
                          "hasRolesPerGroup": true,
                          "structureGroups": [
                            {
                              "children": [],
                              "name": "Marketing",
                              "code": "marketing",
                              "attributes": {
                                "vatNumber": 63826382
                              },
                              "roles": [
                                {
                                  "code": "role-673f20jvsklwh",
                                  "type": "ACCESS"
                                },
                                {
                                  "code": "role-63nso3bs9ln",
                                  "type": "ADMIN"
                                }
                              ]
                            }
                          ],
                          "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002"
                        }
                      ]
                    }
                One or more structures found and ShowGroupAttributes is set to false:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "configuration": {
                            "isNested": false,
                            "structureType": "STATIC"
                          },
                          "code": "structure-1234567891011",
                          "name": "Organisational Chart",
                          "description": "Lorem ipsum dolor sit a met",
                          "status": "ACTIVE",
                          "hasCustomAttributes": true,
                          "attributes": [
                            {
                              "code": "vatNumber",
                              "name": "VAT Number"
                            }
                          ],
                          "hasRolesPerGroup": true,
                          "structureGroups": [
                            {
                              "children": [],
                              "name": "Marketing",
                              "code": "marketing",
                              "attributes": {
                                "vatNumber": 63826382
                              },
                              "roles": [
                                {
                                  "code": "role-673f20jvsklwh",
                                  "type": "ACCESS"
                                },
                                {
                                  "code": "role-63nso3bs9ln",
                                  "type": "ADMIN"
                                }
                              ]
                            }
                          ],
                          "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002"
                        }
                      ]
                    }
                One or more structures found and ShowGroupRoles is set to false:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "configuration": {
                            "isNested": false,
                            "structureType": "STATIC"
                          },
                          "code": "structure-1234567891011",
                          "name": "Organisational Chart",
                          "description": "Lorem ipsum dolor sit a met",
                          "status": "ACTIVE",
                          "hasCustomAttributes": true,
                          "attributes": [
                            {
                              "code": "vatNumber",
                              "name": "VAT Number"
                            }
                          ],
                          "hasRolesPerGroup": true,
                          "structureGroups": [
                            {
                              "children": [],
                              "name": "Marketing",
                              "code": "marketing"
                            }
                          ],
                          "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002"
                        }
                      ]
                    }
                No structures found:
                  value:
                    {
                      "totalItems": 0,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 0,
                      "result": []
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "TRANSPORT.INVALID_PAYLOAD"
                  ns: "TRANSPORT"
                  message: "Invalid payload."
                  status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "AUTH.EXPIRED"
                  ns: "AUTH"
                  message: "Authorized access_code is expired"
                  status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /structureData/{code}:
    get:
      tags:
        - Data - Structures
      summary: Retrieve an existing structure
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve a specific structure by code.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: structure-1234567891011
        - in: query
          name: showGroupAttributes
          description: |-
            **showGroupAttributes** is an optional filter to be able to specify if custom group attributes should also be included in the response or not. By default it is set to **true**.
          required: false
          schema:
            type: boolean
            default: true
            example: false
        - in: query
          name: showGroupRoles
          description: |-
            **showGroupRoles** is an optional filter to be able to specify if group roles should also be included in the response or not. By default it is set to **true**.
          required: false
          schema:
            type: boolean
            default: true
            example: true
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              examples:
                ShowGroupAttributes is set to True:
                  value:
                    {
                      "configuration": {
                        "isNested": false,
                        "structureType": "STATIC"
                      },
                      "code": "structure-1234567891011",
                      "name": "Organisational Chart one",
                      "description": "description for Organisational",
                      "status": "ACTIVE",
                      "hasCustomAttributes": true,
                      "hasRolesPerGroup": true,
                      "attributes": [
                        {
                          "code": "vatNumber",
                          "name": "VAT Number"
                        }
                      ],
                      "structureGroups": [
                        {
                          "code": "marketing",
                          "name": "Marketing",
                          "attributes": {
                            "vatNumber": 63826382
                          },
                          "children": [],
                          "roles": [
                            {
                              "code": "role-673f20jvsklwh",
                              "type": "ACCESS"
                            },
                            {
                              "code": "role-63nso3bs9ln",
                              "type": "ADMIN"
                            }
                          ]
                        }
                      ],
                      "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002"
                    }
                ShowGroupAttributes is set to false:
                  value:
                    {
                      "configuration": {
                        "isNested": false,
                        "structureType": "STATIC"
                      },
                      "code": "structure-1234567891011",
                      "name": "Organisational Chart one",
                      "description": "description for Organisational",
                      "status": "ACTIVE",
                      "hasCustomAttributes": true,
                      "attributes": [
                        {
                          "code": "vatNumber",
                          "name": "VAT Number"
                        }
                      ],
                      "hasRolesPerGroup": true,
                      "structureGroups": [
                        {
                          "code": "marketing",
                          "name": "Marketing",
                          "children": [],
                          "roles": [
                            {
                              "code": "role-673f20jvsklwh",
                              "type": "ACCESS"
                            },
                            {
                              "code": "role-63nso3bs9ln",
                              "type": "ADMIN"
                            }
                          ]
                        }
                      ],
                      "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002",
                    }
                ShowGroupRoles is set to false:
                  value:
                    {
                      "configuration": {
                        "isNested": false,
                        "structureType": "STATIC"
                      },
                      "code": "structure-1234567891011",
                      "name": "Organisational Chart one",
                      "description": "description for Organisational",
                      "status": "ACTIVE",
                      "hasCustomAttributes": true,
                      "attributes": [
                        {
                          "code": "vatNumber",
                          "name": "VAT Number"
                        }
                      ],
                      "hasRolesPerGroup": true,
                      "structureGroups": [
                        {
                          "code": "marketing",
                          "name": "Marketing",
                          "children": []
                        }
                      ],
                      "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002",
                    }
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "AUTH.EXPIRED"
                  ns: "AUTH"
                  message: "Authorized access_code is expired"
                  status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "STRUCTURE.NOT_FOUND"
                  ns: "STRUCTURE"
                  message: "error.structure.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: []
    patch:
      tags:
        - Data - Structures
      summary: Update an existing structure
      description: |-
        Users with RITM Admin roles and with the correct platform access can update a specific structure by code.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: structure-1234567891011
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/structureEditRequest"
            example:
              {
                "name": "Organisational Chart one",
                "description": "description for Organisational",
                "status": "ACTIVE",
                "hasCustomAttributes": true,
                "attributes": [
                  {
                    "code": "vatNumber",
                    "name": "VAT Number"
                  }
                ],
                "hasRolesPerGroup": true,
                "structureGroups": [
                  {
                    "code": "marketing",
                    "name": "Marketing",
                    "attributes": {
                      "vatNumber": 63826382
                    },
                    "children": [],
                    "roles": [
                      {
                        "code": "role-673f20jvsklwh",
                        "type": "ACCESS"
                      },
                      {
                        "code": "role-63nso3bs9ln",
                        "type": "ADMIN"
                      }
                    ]
                  }
                ]
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "configuration": {
                    "isNested": false,
                    "structureType": "STATIC"
                  },
                  "code": "structure-1234567891011",
                  "name": "Organisational Chart one",
                  "description": "description for Organisational",
                  "status": "ACTIVE",
                  "hasCustomAttributes": true,
                  "attributes": [
                    {
                      "code": "vatNumber",
                      "name": "VAT Number"
                    }
                  ],
                  "hasRolesPerGroup": true,
                  "structureGroups": [
                    {
                      "code": "marketing",
                      "name": "Marketing",
                      "attributes": {
                        "vatNumber": 63826382
                      },
                      "children": [],
                      "roles": [
                        {
                          "code": "role-673f20jvsklwh",
                          "type": "ACCESS"
                        },
                        {
                          "code": "role-63nso3bs9ln",
                          "type": "ADMIN"
                        }
                      ]
                    }
                  ],
                  "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002"
                }
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorised to update structure:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to update structure"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "422":
          description: "Invalid data"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing value for custom attribute code:
                  value:
                    error:
                      code: "INVALID.DATA"
                      ns: "INVALID"
                      message: "error.structure.attributes.empty.code"
                      status: 422
                The provided value for custom attribute code is already in use:
                  value:
                    error:
                      code: "INVALID.DATA"
                      ns: "INVALID"
                      message: "error.structure.attributes.duplicate.code"
                      status: 422
                ? The provided custom attribute for the group is not configured on the structure
                : value:
                    error:
                      code: "INVALID.DATA"
                      ns: "INVALID"
                      message: "error.group.attributes.duplicate.code"
                      status: 422
                The provided custom roles for the group are already present:
                  value:
                    error:
                      code: "INVALID.DATA"
                      ns: "INVALID"
                      message: "error.structure.group.roles.already.present"
                      status: 422
                All roles need to have a code:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.code"
                      status: 422
                All roles need to have a type:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.roleType"
                      status: 422
                The added role does not exist or is outside of scope:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.role.invalid"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
    delete:
      tags:
        - Data - Structures
      summary: Delete an existing structure
      description: |-
        Users with RITM Admin roles and with the correct platform access can delete a specific structure by code.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: structure-1234567891011
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example: {}
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorised to delete structure:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to delete structure"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "403":
          description: "Forbidden"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "FORBIDDEN"
                  ns: "GLOBAL"
                  message: "error.structure.hasUsers"
                  status: 403
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "STRUCTURE.NOT_FOUND"
                  ns: "STRUCTURE"
                  message: "error.structure.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /group:
    post:
      tags:
        - Data - Groups
      summary: Create a new group
      description: |-
        Users with RITM Admin roles and with the correct platform access can create a new group using this API.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/groupCreateRequest"
            example:
              {
                "code": "test4",
                "name": "name for test 4",
                "structureCode": "structure-1234567891011",
                "groupParent": "test3",
                "attributes": {
                  "vatNumber": 63826383
                },
                "roles": [
                  {
                    "code": "role-673f20jvsklwh",
                    "type": "ACCESS"
                  },
                  {
                    "code": "role-63nso3bs9ln",
                    "type": "ADMIN"
                  }
                ]
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "configuration": {
                    "isNested": true,
                    "structureType": "STATIC"
                  },
                  "code": "structure-1234567891011",
                  "name": "home",
                  "description": "test description",
                  "status": "ACTIVE",
                  "hasCustomAttributes": true,
                  "hasRolesPerGroup": true,
                  "structureGroups": [
                    {
                      "name": "name for test 3",
                      "code": "test3",
                      "attributes": {
                        "vatNumber": 63826382
                      },
                      "children": [
                        {
                          "name": "name for test 4",
                          "code": "test4",
                          "attributes": {
                            "vatNumber": 63826383
                          },
                          "roles": [
                            {
                              "code": "role-673f20jvsklwh",
                              "type": "ACCESS"
                            },
                            {
                              "code": "role-63nso3bs9ln",
                              "type": "ADMIN"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "createdBy": "8d90b808-1e93-11eb-adc1-0242ac120002",
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
                Missing name:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.create.empty.displayName"
                      data:
                        field: "name"
                      status: 400
                Missing code:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.create.empty.code"
                      data:
                        field: "status"
                      status: 400
                Missing structureCode:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.empty.structureCode"
                      data:
                        field: "structureCode"
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorised to create group:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to create group"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "403":
          description: "Forbidden"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Group already exists:
                  value:
                    error:
                      code: "FORBIDDEN"
                      ns: "GLOBAL"
                      message: "error.group.create.exist.code"
                      status: 403
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                The provided value for structureCode is not valid:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.structure.notFound"
                      status: 404
                The provided value for groupParent is not valid:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.parentGroup.notFound"
                      status: 404
        "422":
          description: "Invalid data"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Used group attribute code is not configured for the structure:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.groups.attribute.not.configured"
                      status: 422
                All roles need to have a code:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.code"
                      status: 422
                All roles need to have a type:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.roleType"
                      status: 422
                The added role does not exist or is outside of scope:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.role.invalid"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /groups:
    get:
      tags:
        - Data - Groups
      summary: Search for existing groups
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve groups using this API.
      parameters:
        - in: query
          name: name
          description: |-
            The name of the group. Case-sensitive and exact match.
          schema:
            type: string
            example: Organisational chart
          required: false
        - in: query
          name: code
          description: |-
            The code corresponding to the group being retrieved. Case-sensitive and exact match.
          schema:
            type: string
            example: group-1234567891011
          required: false
        - in: query
          name: structureCode
          description: |-
            The code corresponding to the structure that the group belongs to. Case-sensitive and exact match.
          schema:
            type: string
            example: structure-1234567891011
          required: true
        - in: query
          name: groupParent
          description: |-
            If the case, code of the parent group. Case-sensitive and exact match.
          schema:
            type: string
            example: group-26382930263820
          required: false
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "totalItems": 79,
                  "limit": 10,
                  "page": 1,
                  "pageCount": 8,
                  "result": [
                    {
                      "code": "test11",
                      "name": "test11",
                      "attributes": {
                        "vatNumber": 6383982
                      },
                      "children": [
                        {
                          "children": [],
                          "code": "test21",
                          "name": "test21",
                          "attributes": {
                            "vatNumber": 63826382
                          },
                          "roles": [
                            {
                              "code": "role-673f20jvsklwh",
                              "type": "ACCESS"
                            },
                            {
                              "code": "role-63nso3bs9ln",
                              "type": "ADMIN"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "code": "test01",
                      "name": "test01",
                      "children": []
                    },
                    {
                      "code": "test02",
                      "name": "group test 21",
                      "attributes": {
                        "vatNumber": 1425361
                      },
                      "children": []
                    },
                    {
                      "code": "test03",
                      "name": "group test 31",
                      "attributes": {
                        "vatNumber": 62839263
                      },
                      "children": []
                    }
                  ]
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
                Missing structureCode:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.empty.structureCode"
                      data:
                        field: "structureCode"
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "AUTH.EXPIRED"
                  ns: "AUTH"
                  message: "Authorized access_code is expired"
                  status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /group/{code}:
    get:
      tags:
        - Data - Groups
      summary: Retrieve an existing group
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve a specific group by code.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: group-1234567891011
        - in: query
          name: structureCode
          required: true
          schema:
            type: string
            example: structure-1234567891011
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "test12",
                  "name": "test12",
                  "attributes": {
                    "vatNumber": 63826382
                  },
                  "children": [],
                  "roles": [
                    {
                      "code": "role-673f20jvsklwh",
                      "type": "ACCESS"
                    },
                    {
                      "code": "role-63nso3bs9ln",
                      "type": "ADMIN"
                    }
                  ]
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
                Missing structureCode:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.empty.structureCode"
                      data:
                        field: "structureCode"
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "AUTH.EXPIRED"
                  ns: "AUTH"
                  message: "Authorized access_code is expired"
                  status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Structure not found:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.structure.notFound"
                      status: 404
                Group not found:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.group.notFound"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
    patch:
      tags:
        - Data - Groups
      summary: Update an existing group
      description: |-
        Users with RITM Admin roles and with the correct platform access can update a specific group by code.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: group-1234567891011
        - in: query
          name: moveTo
          description: |-
            **moveTo** is an optional filter that allows you to move a group to another parent group, in static, nested structures. Cannot be used in combination with the **moveToLevel1** parameter.
          required: false
          schema:
            type: string
            example: group-1234567891011
        - in: query
          name: moveToLevel1
          description: |-
            **moveToLevel1** is an optional filter that allows you to move a group to level 1, in static, nested structures. Cannot be used in combination with the **moveTo** parameter.
          required: false
          schema:
            type: boolean
            example: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/groupEditRequest"
            example:
              {
                "name": "new name for group",
                "structureCode": "structure-1234567891011",
                "groupParent": "test3",
                "attributes": {
                  "vatNumber": 63826382
                },
                "roles": [
                  {
                    "code": "role-673f20jvsklwh",
                    "type": "ACCESS"
                  },
                  {
                    "code": "role-63nso3bs9ln",
                    "type": "ADMIN"
                  }
                ]
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "name": "new name for group",
                  "code": "group-1234567891011",
                  "attributes": {
                    "vatNumber": 63826382
                  },
                  "children": [],
                  "roles": [
                    {
                      "code": "role-673f20jvsklwh",
                      "type": "ACCESS"
                    },
                    {
                      "code": "role-63nso3bs9ln",
                      "type": "ADMIN"
                    }
                  ]
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "TRANSPORT.INVALID_PAYLOAD"
                  ns: "TRANSPORT"
                  message: "Invalid payload."
                  status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorised to update group:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "UNAUTHORIZED"
                      message: "Not authorized to update group"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message": "Authorized access_code is expired"
                      status": 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Structure not found:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.structure.notFound"
                      status: 404
                Group to be changed does not exist:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.group.notFound"
                      status: 404
                Parent to move to does not exist:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.group.notFound"
                      status: 404                
        "422":
          description: "Invalid data"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                moveTo and moveToLevel1 cannot be used together:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "'error.group.provide.both.moveTo.parameters"
                      status: 422                
                All roles need to have a code:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.code"
                      status: 422
                All roles need to have a type:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.roles.empty.roleType"
                      status: 422
                The added role does not exist or is outside of scope:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.structure.group.role.invalid"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
    delete:
      tags:
        - Data - Groups
      summary: Delete an existing group
      description: |-
        Users with RITM Admin roles and with the correct platform access can delete a specific group by code.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: group-1234567891011
        - in: query
          name: structureCode
          required: true
          schema:
            type: string
            example: structure-1234567891011
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example: {}
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
                Missing structureCode:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.group.empty.structureCode"
                      data:
                        field: "structureCode"
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorised to delete group:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "UNAUTHORIZED"
                      message: "Not authorized to delete group"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Group not found:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message: "error.group.notFound"
                      status: 404
                Structure not found:
                  value:
                    error:
                      code: "GROUP.NOT_FOUND"
                      ns: "GROUP"
                      message": "error.structure.notFound"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /user:
    post:
      tags:
        - Users
      summary: Create a new user
      description: |-
        A user with a RITM Admin role with the appropriate rights has the ability to create users. These can either be so-called ACTIVE users where all profile information is passed or INACTIVE users that are created to trigger an invitation flow that could allow for profile enrichment.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/userCreateRequest"
            examples:
              Minimal inactive user (non multi-company):
                value:
                  {
                    "profileInformation": {
                      "name": {
                        "givenName": "Firstname",
                        "familyName": "Lastname"
                      },
                      "emails": [
                        {
                          "value": "firstname.lastname@mailinator.com",
                          "type": "work",
                          "primary": true
                        }
                      ],
                      "urn:scim:schemas:extension:iwelcome:1.0": {
                        "state": "INACTIVE"
                      },
                    },
                    "structureMemberships": [
                      {
                        "code": "structure-t04wu2fQbnEk",
                        "groupMemberships": [
                          {
                            "code": "my_code_for_group1"
                          }
                        ]
                      }
                    ],
                    "roleAssignments": [
                      {
                        "code": "role-LJxdruuzjERF"
                      }
                    ]
                  }
              Minimal inactive user (multi-company):
                value:
                  {
                    "profileInformation": {
                      "name": {
                        "givenName": "Firstname",
                        "familyName": "Lastname"
                      },
                      "emails": [
                        {
                          "value": "firstname.lastname@mailinator.com",
                          "type": "work",
                          "primary": true
                        }
                      ],
                      "urn:scim:schemas:extension:iwelcome:1.0": {
                        "state": "INACTIVE"
                      },
                    },
                    "structureMemberships": [
                      {
                        "code": "structure-t04wu2fQbnEk",
                        "groupMemberships": [
                          {
                            "code": "my_code_for_group1"
                          }
                        ]
                      }
                    ],
                    "roleAssignments": [
                      {
                        "code": "role-LJxdruuzjERF"
                      },
                      {
                        "code": "role-JgvpFeGFykyd",
                        "assignedStructureCode": "structure-t04wu2fQbnEk",
                        "assignedStructureGroup": "my_code_for_group1"
                      }
                    ]
                  }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/userCreateResponse"
              examples:
                Full response (non multi-company):
                  value:
                    {
                      "profileInformation": {
                        "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                        "name": {
                          "givenName": "Firstname",
                          "familyName": "Lastname"
                        },
                        "emails": [
                          {
                            "value": "firstname.lastname@mailinator.com",
                            "type": "work",
                            "primary": true
                          }
                        ],
                        "urn:scim:schemas:extension:iwelcome:1.0": {
                          "state": "INACTIVE"
                        }
                      },
                      "roleAssignments": {
                        "adminRoles": [],
                        "personalRoles": [
                          {
                            "code": "role-LJxdruuzjERF",
                            "name": "Self Service",
                            "startDate": "2021-01-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z"
                          }
                        ],
                        "accessRoles": []
                      },
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1"
                            }
                          ]
                        }
                      ]
                    }
                Full response (multi-company):
                  value:
                    {
                      "profileInformation": {
                        "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                        "name": {
                          "givenName": "Firstname",
                          "familyName": "Lastname"
                        },
                        "emails": [
                          {
                            "value": "firstname.lastname@mailinator.com",
                            "type": "work",
                            "primary": true
                          }
                        ],
                        "urn:scim:schemas:extension:iwelcome:1.0": {
                          "state": "INACTIVE"
                        }
                      },
                      "roleAssignments": {
                        "adminRoles": [],
                        "personalRoles": [
                          {
                            "code": "role-LJxdruuzjERF",
                            "name": "Self Service",
                            "startDate": "2021-01-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z"
                          }
                        ],
                        "accessRoles": [
                          {
                            "code": "role-JgvpFeGFykyd",
                            "name": "Drift - Account Owner",
                            "startDate": "2021-04-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z",
                            "assignedStructureCode": "structure-t04wu2fQbnEk",
                            "assignedStructureGroup": "my_code_for_group1",
                            "applications": [
                              {
                                "code": "drift",
                                "name": "Drift",
                                "applicationRoles": [
                                  "Account Owner"
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1"
                            }
                          ]
                        }
                      ]
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing profile information:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "profileInformation is required"
                      data:
                        field: "profileInformation"
                      status: 400
                Missing structure information:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "structureMemberships is required"
                      data:
                        field: "structureMemberships"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorized to manage attribute:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to set attribute emails"
                      status: 401
                Not authorized to manage structure/group:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign groups from structure structure-t04wu2fQbnEk"
                      status: 401
                Not authorized to manage role:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign to assign role with code role-CKfZPizVqakt"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Role context is not allowed for the user:
                  value:
                    error:
                      code: FORBIDDEN
                      ns: GLOBAL
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 cannot assign the role role-LJxdruuzjERF for context structure-t04wu2fQbnEk/my_code_for_group1 (no group membership for user)"
                      status: 403              
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Pattern mismatch:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute givenName value (Firstname1) doesn't match ^[a-zA-Z_\\.\\-' À-ɏ]+$"
                      status: 422
                Canonical value not correct:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute state value (ACTIVATE) doesn't match ^INACTIVE|ACTIVE|GRACE|WITHDRAWN|BLOCKED$"
                      status: 422
                Attribute required:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute givenName must have a value"
                      status: 422
                Incorrect structureMembership object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "structureMembership requires a structure code, got {}"
                      status: 422
                Missing groupMembership object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "structureMembership must have at least 1 groupMembership"
                      status: 422
                Incorrect groupMembership object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "groupMembership requires a group code, got {}"
                      status: 422
                Incorrect role object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Role assignment requires a role code, got {}."
                      status: 422
                Missing structureCode for contextual role:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Role assignment requires a structure code on role code: role-LJxdruuzjERF."
                      status: 422
                Missing structureGroup for contextual role:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Role assignment requires a structure group code on role code: role-LJxdruuzjERF."
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /user/{uid}:
    patch:
      tags:
        - Users
      summary: Edit a user
      description: |-
        A user with a RITM Admin role with the appropriate rights has the ability to edit his managed identities. The group and role management options for these users depend on the specific entitlements this admin user has on the affected user.
        Any user with the appropriate RITM Personal role and attribute entitlements is able to edit their profile. Group memberships and role assignments fpr these users can only be managed by an admin user.
      parameters:
        - in: path
          name: uid
          required: true
          schema:
            $ref: "#/components/schemas/uid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/userEditRequest"
            examples:
              Change profile information:
                value:
                  profileInformation:
                    { "name": { "givenName": "OtherFirstname" } }
              Change group memberships:
                value:
                  {
                    structureMemberships: [
                      {
                        "code": "structure-DA9dPBPncmyB",
                        "groupMemberships": [
                          {
                            "code": "my_code_for_group1",
                            "operation": "delete"
                          }
                        ]
                      },
                      {
                        "code": "structure-fsLsscQThkcx",
                        "groupMemberships": [
                          {
                            "code": "my_code_for_group2",
                            "operation": "add"
                          }
                        ]
                      }
                    ]
                  }
              Delete and add a role assignment (non multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-o9ccF3opKQUL",
                        "operation": "delete"
                      },
                      {
                        "code": "role-CKfZPizVqakt",
                        "startDate": "2021-01-01T00:00:00.000Z",
                        "endDate": "2022-01-01T00:00:00:000Z",
                        "operation": "add"
                      }
                    ]
                  }
              Change the dates for a role assignment (non multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-o9ccF3opKQUL",
                        "operation": "delete"
                      },
                      {
                        "code": "role-o9ccF3opKQUL",
                        "startDate": "2021-01-01T00:00:00.000Z",
                        "endDate": "2022-01-01T00:00:00:000Z",
                        "operation": "add"
                      }
                    ]
                  }
              Delete a non-contextual role assignment (multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-o9ccF3opKQUL",
                        "operation": "delete"
                      }
                    ]
                  }
              Delete a contextual role assignment (multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-CKfZPizVqakt",
                        "assignedStructureCode": "structure-t04wu2fQbnEk",
                        "assignedStructureGroup": "my_code_for_group1",
                        "operation": "delete"
                      }
                    ]
                  }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/userEditResponse"
              examples:
                Full response (non multi-company):
                  value:
                    {
                      "profileInformation": {
                        "uid": "65b7a29080f545eb9720f771f054b6e4",
                        "name": {
                          "givenName": "OtherFirstname",
                          "familyName": "Lastname"
                        },
                        "emails": [
                          {
                            "value": "firstname.lastname@mailinator.com",
                            "type": "work",
                            "primary": true
                          }
                        ],
                        "urn:scim:schemas:extension:iwelcome:1.0": {
                          "state": "INACTIVE"
                        }
                      },
                      "roleAssignments": {
                        "adminRoles": [],
                        "personalRoles": [
                          {
                            "code": "role-LJxdruuzjERF",
                            "name": "Self Service",
                            "startDate": "2021-01-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z"
                          }
                        ],
                        "accessRoles": [
                          {
                            "code": "role-JgvpFeGFykyd",
                            "name": "Drift - Account Owner",
                            "startDate": "2021-04-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z",
                            "applications": [
                              {
                                "code": "drift",
                                "name": "Drift",
                                "applicationRoles": [
                                  "Account Owner"
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1"
                            }
                          ]
                        }
                      ]
                    }
                Full response (multi-company):
                  value:
                    {
                      "profileInformation": {
                        "uid": "65b7a29080f545eb9720f771f054b6e4",
                        "name": {
                          "givenName": "OtherFirstname",
                          "familyName": "Lastname"
                        },
                        "emails": [
                          {
                            "value": "firstname.lastname@mailinator.com",
                            "type": "work",
                            "primary": true
                          }
                        ],
                        "urn:scim:schemas:extension:iwelcome:1.0": {
                          "state": "INACTIVE"
                        }
                      },
                      "roleAssignments": {
                        "adminRoles": [],
                        "personalRoles": [
                          {
                            "code": "role-LJxdruuzjERF",
                            "name": "Self Service",
                            "startDate": "2021-01-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z"
                          }
                        ],
                        "accessRoles": [
                          {
                            "code": "role-JgvpFeGFykyd",
                            "name": "Drift - Account Owner",
                            "startDate": "2021-04-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z",
                            "assignedStructureCode": "structure-t04wu2fQbnEk",
                            "assignedStructureGroup": "my_code_for_group1",
                            "applications": [
                              {
                                "code": "drift",
                                "name": "Drift",
                                "applicationRoles": [
                                  "Account Owner"
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1"
                            }
                          ]
                        }
                      ]
                    }
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorized to manage attribute:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to set attribute name.middleName"
                      status: 401
                Not authorized to manage structure/group:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign groups from structure structure-t04wu2fQbnEk"
                      status: 401
                Not authorized to manage role:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign to assign role with code role-CKfZPizVqakt"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "403":
          description: "Forbidden"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No roles:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_ROLES"
                      ns: "PERMISSION"
                      message: "The account has neither admin, nor personal roles assigned"
                      status: 403
                Role context is not allowed for the user:
                  value:
                    error:
                      code: FORBIDDEN
                      ns: GLOBAL
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 cannot assign the role role-LJxdruuzjERF for context structure-t04wu2fQbnEk/my_code_for_group1 (no group membership for user)"
                      status: 403   
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No managed identity found:
                  value:
                    error:
                      code: "AUTHORIZED_PROFILE_NOT_FOUND"
                      ns: "GLOBAL"
                      message: "Searching for user 6410dcb2346b4030babe3db53b5f4051 by user john.p.doe@example.com/org insurgroup/seg insurgroup returned 0 users"
                      status: 404
        "422":
          description: "Unprocessable Entity"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Pattern mismatch:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute givenName value (Firstname1) doesn't match ^[a-zA-Z_\\.\\-' À-ɏ]+$"
                      status: 422
                Canonical value not correct:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute state value (ACTIVATE) doesn't match ^INACTIVE|ACTIVE|GRACE|WITHDRAWN|BLOCKED$"
                      status: 422
                Attribute required:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute givenName must have a value"
                      status: 422
                Incorrect structureMembership object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "structureMembership requires a structure code, got {}"
                      status: 422
                Incorrect groupMembership object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "groupMembership requires a group code, got {}"
                      status: 422
                Unknown group membership operation:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Unknown structureMembership operation remove"
                      status: 422
                Unknown roles operation:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Unknown roleAssignment operation remove"
                      status: 422
                Incorrect role object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Updating a user's role(s) requires a role code, got {}"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /user-update:
    post:
      tags:
        - Users
      summary: Edit a user
      description: |-
        A user with a RITM Admin role with the appropriate rights has the ability to edit his managed identities. The group and role management options for these users depend on the specific entitlements this admin user has on the affected user.
        Any user with the appropriate RITM Personal role and attribute entitlements is able to edit their profile. Group memberships and role assignments fpr these users can only be managed by an admin user.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/userEditRequestPost"
            examples:
              Change profile information:
                value:
                  uid: "8d90b808-1e93-11eb-adc1-0242ac120002"
                  profileInformation:
                    { "name": { "givenName": "OtherFirstname" } }
              Change group membership information:
                value:
                  {
                    "uid": "8d90b808-1e93-11eb-adc1-0242ac120002",
                    "structureMemberships": [
                      {
                        "code": "structure-DA9dPBPncmyB",
                        "groupMemberships": [
                          {
                            "code": "my_code_for_group1",
                            "operation": "delete"
                          }
                        ]
                      },
                      {
                        "code": "structure-fsLsscQThkcx",
                        "groupMemberships": [
                          {
                            "code": "my_code_for_group2",
                            "operation": "add"
                          }
                        ]
                      }
                    ]
                  }
              Delete and add a role assignment (non multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-o9ccF3opKQUL",
                        "operation": "delete"
                      },
                      {
                        "code": "role-CKfZPizVqakt",
                        "startDate": "2021-01-01T00:00:00.000Z",
                        "endDate": "2022-01-01T00:00:00:000Z",
                        "operation": "add"
                      }
                    ]
                  }
              Change the dates for a role assignment (non multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-o9ccF3opKQUL",
                        "operation": "delete"
                      },
                      {
                        "code": "role-o9ccF3opKQUL",
                        "startDate": "2021-01-01T00:00:00.000Z",
                        "endDate": "2022-01-01T00:00:00:000Z",
                        "operation": "add"
                      }
                    ]
                  }
              Delete a non-contextual role assignment (multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-o9ccF3opKQUL",
                        "operation": "delete"
                      }
                    ]
                  }
              Delete a contextual role assignment (multi-company):
                value:
                  {
                    roleAssignments: [
                      {
                        "code": "role-CKfZPizVqakt",
                        "assignedStructureCode": "structure-t04wu2fQbnEk",
                        "assignedStructureGroup": "my_code_for_group1",
                        "operation": "delete"
                      }
                    ]
                  }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/userEditResponse"
              examples:
                Full response (non multi-company):
                  value:
                    {
                      "profileInformation": {
                        "uid": "65b7a29080f545eb9720f771f054b6e4",
                        "name": {
                          "givenName": "OtherFirstname",
                          "familyName": "Lastname"
                        },
                        "emails": [
                          {
                            "value": "firstname.lastname@mailinator.com",
                            "type": "work",
                            "primary": true
                          }
                        ],
                        "urn:scim:schemas:extension:iwelcome:1.0": {
                          "state": "INACTIVE"
                        }
                      },
                      "roleAssignments": {
                        "adminRoles": [],
                        "personalRoles": [
                          {
                            "code": "role-LJxdruuzjERF",
                            "name": "Self Service",
                            "startDate": "2021-01-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z"
                          }
                        ],
                        "accessRoles": [
                          {
                            "code": "role-JgvpFeGFykyd",
                            "name": "Drift - Account Owner",
                            "startDate": "2021-04-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z",
                            "applications": [
                              {
                                "code": "drift",
                                "name": "Drift",
                                "applicationRoles": [
                                  "Account Owner"
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1"
                            }
                          ]
                        }
                      ]
                    }
                Full response (multi-company):
                  value:
                    {
                      "profileInformation": {
                        "uid": "65b7a29080f545eb9720f771f054b6e4",
                        "name": {
                          "givenName": "OtherFirstname",
                          "familyName": "Lastname"
                        },
                        "emails": [
                          {
                            "value": "firstname.lastname@mailinator.com",
                            "type": "work",
                            "primary": true
                          }
                        ],
                        "urn:scim:schemas:extension:iwelcome:1.0": {
                          "state": "INACTIVE"
                        }
                      },
                      "roleAssignments": {
                        "adminRoles": [],
                        "personalRoles": [
                          {
                            "code": "role-LJxdruuzjERF",
                            "name": "Self Service",
                            "startDate": "2021-01-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z"
                          }
                        ],
                        "accessRoles": [
                          {
                            "code": "role-JgvpFeGFykyd",
                            "name": "Drift - Account Owner",
                            "startDate": "2021-04-01T00:00:00.000Z",
                            "endDate": "2021-12-31T00:00:00.000Z",
                            "assignedStructureCode": "structure-t04wu2fQbnEk",
                            "assignedStructureGroup": "my_code_for_group1",
                            "applications": [
                              {
                                "code": "drift",
                                "name": "Drift",
                                "applicationRoles": [
                                  "Account Owner"
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      "structureMemberships": [
                        {
                          "code": "structure-t04wu2fQbnEk",
                          "name": "Structure 1",
                          "groupMemberships": [
                            {
                              "code": "my_code_for_group1",
                              "name": "Group 1"
                            }
                          ]
                        }
                      ]
                    }
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Not authorized to manage attribute:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to set attribute name.middleName"
                      status: 401
                Not authorized to manage structure/group:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign groups from structure structure-t04wu2fQbnEk"
                      status: 401
                Not authorized to manage role:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign to assign role with code role-CKfZPizVqakt"
                      status: 401
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
        "403":
          description: "Forbidden"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No roles:
                  value:
                    error:
                      code: "PERMISSION.NOT_ENOUGH_ROLES"
                      ns: "PERMISSION"
                      message: "The account has neither admin, nor personal roles assigned"
                      status: 403
                Role context is not allowed for the user:
                  value:
                    error:
                      code: FORBIDDEN
                      ns: GLOBAL
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 cannot assign the role role-LJxdruuzjERF for context structure-t04wu2fQbnEk/my_code_for_group1 (no group membership for user)"
                      status: 403   
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No managed identity found:
                  value:
                    error:
                      code: "AUTHORIZED_PROFILE_NOT_FOUND"
                      ns: "GLOBAL"
                      message: "Searching for user 6410dcb2346b4030babe3db53b5f4051 by user john.p.doe@example.com/org insurgroup/seg insurgroup returned 0 users"
                      status: 404
        "422":
          description: "Unprocessable Entity"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Pattern mismatch:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute givenName value (Firstname1) doesn't match ^[a-zA-Z_\\.\\-' À-ɏ]+$"
                      status: 422
                Canonical value not correct:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute state value (ACTIVATE) doesn't match ^INACTIVE|ACTIVE|GRACE|WITHDRAWN|BLOCKED$"
                      status: 422
                Attribute required:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute givenName must have a value"
                      status: 422
                Incorrect structureMembership object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "structureMembership requires a structure code, got {}"
                      status: 422
                Incorrect groupMembership object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "groupMembership requires a group code, got {}"
                      status: 422
                Unknown group membership operation:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Unknown structureMembership operation remove"
                      status: 422
                Unknown roles operation:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Unknown roleAssignment operation remove"
                      status: 422
                Incorrect role object:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Updating a user's role(s) requires a role code, got {}"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /user/apiSendInvitation:
    post:
      tags:
        - Users
      summary: Send an invitation to a user
      description: |-
        A user with a RITM Admin role with the appropriate rights has the ability to send invitations to users. This API can only be used with an access token and the required scope **workflow:invitation:admin:post**.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sendInvitationRequest"
            examples:
              Full send invitation with all information (non multi-company):
                value:
                  {
                    "email": "firstname.lastname@mailinator.com",
                    "phone": "+31612345678",
                    "language": "en_GB",
                    "note": "You have been invited to join Company",
                    "name": {
                      "givenName": "Firstname",
                      "familyName": "Lastname"
                    },
                    "urn:scim:schemas:extension:iwelcome:1.0": {
                      "birthDate": "01/01/1985"
                    },
                    "urn:scim:schemas:extension:custom:1.0": {
                      "customAttribute1": "value1",
                      "customAttribute2": 12345,
                      "customAttribute3": true,
                      "customAttribute4": [
                        "arrayValue1",
                        "arrayValue2"
                      ],
                      "customAttribute5": {
                        "subAttribute1": "subValue1",
                        "subAttribute2": 12345,
                        "subAttribute3": false
                      },
                      "customAttribute6": [
                        {
                          "subAttribute1": "subValue1",
                          "subAttribute2": 12345,
                          "subAttribute3": false
                        }
                      ]
                    },
                    "structureMemberships": [
                      {
                        "code": "structure-jgw373i938y3",
                        "groupMemberships": [
                          {
                            "code": "uk"
                          }
                        ]
                      }
                    ],
                    "roleAssignments": [
                      {
                        "code": "role-673f20jvsklwh",
                        "startDate": "2021-01-01T00:00:00.000Z",
                        "endDate": "2023-01-01T00:00:00.000Z"
                      }
                    ]
                  }
              Full send invitation with all information (multi-company):
                value:
                  {
                    "email": "firstname.lastname@mailinator.com",
                    "phone": "+31612345678",
                    "language": "en_GB",
                    "note": "You have been invited to join Company",
                    "name": {
                      "givenName": "Firstname",
                      "familyName": "Lastname"
                    },
                    "urn:scim:schemas:extension:iwelcome:1.0": {
                      "birthDate": "01/01/1985"
                    },
                    "urn:scim:schemas:extension:custom:1.0": {
                      "customAttribute1": "value1",
                      "customAttribute2": 12345,
                      "customAttribute3": true,
                      "customAttribute4": [
                        "arrayValue1",
                        "arrayValue2"
                      ],
                      "customAttribute5": {
                        "subAttribute1": "subValue1",
                        "subAttribute2": 12345,
                        "subAttribute3": false
                      },
                      "customAttribute6": [
                        {
                          "subAttribute1": "subValue1",
                          "subAttribute2": 12345,
                          "subAttribute3": false
                        }
                      ]
                    },
                    "structureMemberships": [
                      {
                        "code": "structure-jgw373i938y3",
                        "groupMemberships": [
                          {
                            "code": "uk"
                          }
                        ]
                      }
                    ],
                    "roleAssignments": [
                      {
                        "code": "role-673f20jvsklwh",
                        "startDate": "2021-01-01T00:00:00.000Z",
                        "endDate": "2023-01-01T00:00:00.000Z",
                        "assignedStructureCode": "structure-jgw373i938y3",
                        "assignedStructureGroup": "uk"
                      }
                    ]
                  }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sendInvitationResponse"
              examples:
                Response:
                  value:
                    result:
                      {
                        "email": "firstname.lastname@mailinator.com",
                        "phone": "+31612345678",
                        "language": "en_GB",
                        "note": "You have been invitated to join Company",
                        "name": {
                          "givenName": "Firstname",
                          "familyName": "Lastname"
                        },
                        "urn:scim:schemas:extension:iwelcome:1.0": {
                          "birthDate": "01/01/1985"
                        },
                        "urn:scim:schemas:extension:custom:1.0": {
                          "customAttribute1": "value1",
                          "customAttribute2": 12345,
                          "customAttribute3": true,
                          "customAttribute4": [
                            "arrayValue1",
                            "arrayValue2"
                          ],
                          "customAttribute5": {
                            "subAttribute1": "subValue1",
                            "subAttribute2": 12345,
                            "subAttribute3": false
                          },
                          "customAttribute6": [
                            {
                              "subAttribute1": "subValue1",
                              "subAttribute2": 12345,
                              "subAttribute3": false
                            }
                          ]
                        },
                        "structureMemberships": [
                          {
                            "code": "structure-jgw373i938y3",
                            "groupMemberships": [
                              {
                                "code": "uk"
                              }
                            ]
                          }
                        ],
                        "roleAssignments": [
                          {
                            "code": "role-87398hjhvsn",
                            "startDate": "2021-01-01T00:00:00.000Z",
                            "endDate": "2023-01-01T00:00:00.000Z",
                            "assignedStructureCode": "structure-jgw373i938y3",
                            "assignedStructureGroup": "uk"
                          }
                        ]
                      }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing email information:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Please provide an email address."
                      data:
                        field: "email"
                      status: 400
                Missing phone information:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Please provide a phone number."
                      data:
                        field: "phone"
                      status: 400
                Missing structure information:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Please provide structureMemberships."
                      data:
                        field: "structureMemberships"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "UNAUTHORIZED"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Access token is required (API Key can't be used):
                  value:
                    error:
                      code: "AUTH.NOT_SUPPORTED"
                      ns: "AUTH"
                      message: "Missing access token from authorization header"
                      status: 401                
                User is not allowed to send invitations:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "User is not allowed to send invitations"
                      status: 401
                Not authorized to set attribute:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to set attribute attributeName"
                      status: 401
                Not authorized to set attribute value:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to set attribute attributeName.value"
                      status: 401
                Not authorised to assign role:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign role with code role-87398hjhvsn"
                      status: 401
                Not authorised to assign groups in structure:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign groups from structure struct-jgw373i938y3"
                      status: 401
                Not authorised to assign specific group:
                  value:
                    error:
                    code: "UNAUTHORIZED"
                    ns: "GLOBAL"
                    message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 is not authorized to assign group with itemCode UK from structure struct-jgw373i938y3"
                    status: 401
                Not authorised to assign structure in role assignments:
                  value:
                    error:
                    code: "UNAUTHORIZED"
                    ns: "GLOBAL"
                    message: "User john.p.doe@example.com is not authorized to assign structure struct-jgw373i938y3 on roleAssignment role code: role-87398hjhvsn"
                    status: 401
                Not authorised to assign group in role assignments:
                  value:
                    error:
                    code: "UNAUTHORIZED"
                    ns: "GLOBAL"
                    message: "User john.p.doe@example.com is not authorized to assign group UK on roleAssignment role code: role-87398hjhvsn"
                    status: 401
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Role context is not allowed for the user:
                  value:
                    error:
                      code: FORBIDDEN
                      ns: GLOBAL
                      message: "User john.p.doe@example.com from org 60703cdea6193500171a1198 cannot assign the role role-LJxdruuzjERF for context structure-t04wu2fQbnEk/my_code_for_group1 (no group membership for user)"
                      status: 403  
        "422":
          description: Data Invalid
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Email pattern mismatch:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute email value (test@testcom) doesn't match ^([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+(?:[a-zA-Z]{2,6})\\b)$"
                      status: 422
                Phone number pattern mismatch:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "Attribute phone number value (123123) doesn't match ^(tel:)?(\\+|(0{2}))(\\d)?((\\(\\d{1,3}\\))|(\\d{1,3}))(\\.|\\-|\\/|\\s)?((\\(\\d{1,}\\))|(\\d{1,}))(\\.|\\-|\\/|\\s)?((\\(\\d{1,4}\\))|(\\d{1,4}))(\\.|\\-|\\/|\\s)?(((\\(\\d{1,4}\\))|(\\d{1,4}))(\\.|\\-|\\/|\\s)?((\\(\\d{1,4}\\))|(\\d{1,4}))?)(;(phone-context|ext|isub)=[^-])?(\\S)$"
                      status: 422
                Empty structure membership structure code:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: 'structureMembership requires a structure code, got {"groupMemberships":[{"code":"UK"}]}'
                      status: 422
                Empty group membership:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "structureMembership must have at least 1 groupMembership"
                      status: 422
                Empty structure membership group code:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: "groupMembership requires a group code, got {}"
                      status: 422
                Role assignment empty role code:
                  value:
                    error:
                      code: DATA.INVALID
                      ns: DATA
                      message: 'Role assignment requires a role code, got {"startDate":"2021-01-01T00:00:00.000Z","endDate":"2023-01-01T00:00:00.000Z","assignedStructureCode":"structure-da13dadw23","assignedStructureGroup":"UK"}'
                      status: 422
                Empty groups:
                  value:
                    error:
                      code: EMPTY_GROUPS
                      ns: DATA
                      message: "User must have at least 1 group"
                      status: 422
      security:
        - OAuth2:
          - workflow:invitation:admin:post
  /third-party-applications/application:
    post:
      tags:
        - Applications
      summary: Create a new application (3rd party)
      description: |-
        Users with RITM Admin roles and with the correct platform access can create a new 3rd party application.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/applicationCreateRequest"
            example:
              {
                "name": "Drift",
                "description": "Conversational Marketing platform that combines chat, email, video, and automation to remove the friction from business buying",
                "protocol": "OAuth/OIDC",
                "identifier": "drift",
                "url": "https://start.drift.com/login",
                "applicationRoles": [
                  "Account Owner",
                  "Admin",
                  "User"
                ],
                "applicationCategories": [
                  "thirdpartyappcategory-RGupzjTTQSBl"
                ],
                "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAA8CAYAAAAjW/WRAAAAjElEQVR42u3TIQEAMAgAsNPxnihkpgEFMPitw6Lz1wNWIQgIAoKAICAICAKCgCAgCAgCCAKCgCAgCAgCgoAgIAgIAoIIAoKAICAICAKCgCAgCAgCggCCgCAgCAgCgoAgIAgIAoKAIIAgIAgIAoKAICAICAKCgCCAICAICAKCgCAgCAgCgoAgIAggCFwMcz2AcT/1oYUAAAAASUVORK5CYII=",
                "smallLogo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABACAYAAACTDsCFAAAAdElEQVR42u3QIQEAMAgAsNPxnihkpgGaAqgtwqLz1+NciBcvHvHiES8e8eIRLx7x4sWLFy8e8eIRLx7x4hEvHvHixYsXLx7x4hEvHvHiES8e8eLFixcvHvHiES8e8eIRLx7x4sVrEC8e8eIRLx7x4hEvnm0AtTOJAXB2hPAAAAAASUVORK5CYII=",
                "status": "ACTIVE"
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "thirdpartyapp-sKUkb2QhmWLS",
                  "name": "Drift",
                  "applicationCategories": [
                    "thirdpartyappcategory-RGupzjTTQSBl"
                  ],
                  "protocol": "OAuth/OIDC",
                  "identifier": "drift",
                  "status": "ACTIVE",
                  "description": "Conversational Marketing platform that combines chat, email, video, and automation to remove the friction from business buying",
                  "applicationRoles": [
                    "Account Owner",
                    "Admin",
                    "User"
                  ],
                  "url": "https://start.drift.com/login",
                  "smallLogo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABACAYAAACTDsCFAAAAdElEQVR42u3QIQEAMAgAsNPxnihkpgGaAqgtwqLz1+NciBcvHvHiES8e8eIRLx7x4sWLFy8e8eIRLx7x4hEvHvHixYsXLx7x4hEvHvHiES8e8eLFixcvHvHiES8e8eIRLx7x4sVrEC8e8eIRLx7x4hEvnm0AtTOJAXB2hPAAAAAASUVORK5CYII=",
                  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAA8CAYAAAAjW/WRAAAAjElEQVR42u3TIQEAMAgAsNPxnihkpgEFMPitw6Lz1wNWIQgIAoKAICAICAKCgCAgCAgCCAKCgCAgCAgCgoAgIAgIAoIIAoKAICAICAKCgCAgCAgCggCCgCAgCAgCgoAgIAgIAoKAIIAgIAgIAoKAICAICAKCgCCAICAICAKCgCAgCAgCgoAgIAggCFwMcz2AcT/1oYUAAAAASUVORK5CYII="
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing name parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.application.create.empty.name"
                      data:
                        field: "name"
                      status: 400
                Missing url parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.application.create.empty.url"
                      data:
                        field: "url"
                      status: 400
                Invalid logo/smallLogo:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "The selected image is not valid. Image must be jpg, jpeg, png or ico"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to create applications:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to create thrdPartyApplication"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No application found:
                  value:
                    error:
                      code: "THIRD_PARTY_APP_APPLICATION_CATEGORY.NOT_EXIST"
                      ns: "THIRD_PARTY_APP_APPLICATION_CATEGORY"
                      message: "The requested third party app category not exist"
                      status: 404
        "422":
          description: "Unprocessable Entity"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid URL:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.application.create.invalid.url"
                      status: 422 
      security:
        - OAuth2: []
        - APIKey: []
  /third-party-applications/applications:
    get:
      tags:
        - Applications
      summary: Search for existing applications
      description: |-
        Users with RITM Admin roles and with the correct platform access can search for existing 3rd party applications.
      parameters:
        - in: query
          name: code
          schema:
            type: string
          description: |-
            The code of the application. Case-sensitive and exact match.
        - in: query
          name: name
          schema:
            type: string
          description: |-
            The name of the application. Case-sensitive and exact match.
        - in: query
          name: identifier
          schema:
            type: boolean
          description: |-
            The identifier of the application. Case-sensitive and exact match.
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              examples:
                One or more applications found:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "code": "thirdpartyapp-sKUkb2QhmWLS",
                          "name": "Drift",
                          "applicationCategories": [
                            "thirdpartyappcategory-RGupzjTTQSBl"
                          ],
                          "protocol": "OAuth/OIDC",
                          "identifier": "drift",
                          "status": "ACTIVE",
                          "description": "Conversational Marketing platform that combines chat, email, video, and automation to remove the friction from business buying",
                          "applicationRoles": [
                            "Account Owner",
                            "Admin",
                            "User"
                          ],
                          "url": "https://start.drift.com/login",
                          "smallLogo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABACAYAAACTDsCFAAAAdElEQVR42u3QIQEAMAgAsNPxnihkpgGaAqgtwqLz1+NciBcvHvHiES8e8eIRLx7x4sWLFy8e8eIRLx7x4hEvHvHixYsXLx7x4hEvHvHiES8e8eLFixcvHvHiES8e8eIRLx7x4sVrEC8e8eIRLx7x4hEvnm0AtTOJAXB2hPAAAAAASUVORK5CYII=",
                          "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAA8CAYAAAAjW/WRAAAAjElEQVR42u3TIQEAMAgAsNPxnihkpgEFMPitw6Lz1wNWIQgIAoKAICAICAKCgCAgCAgCCAKCgCAgCAgCgoAgIAgIAoIIAoKAICAICAKCgCAgCAgCggCCgCAgCAgCgoAgIAgIAoKAIIAgIAgIAoKAICAICAKCgCCAICAICAKCgCAgCAgCgoAgIAggCFwMcz2AcT/1oYUAAAAASUVORK5CYII="
                        }
                      ]
                    }
                No applications found:
                  value:
                    {
                      "totalItems": 0,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 0,
                      "result": []
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to create applications:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to find thrdPartyApplication"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /third-party-applications/application/{code}:
    get:
      tags:
        - Applications
      summary: Retrieve an existing application
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve a specific existing 3rd party application.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: thirdpartyapp-sKUkb2QhmWLS
          description: |-
            The code of the application.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "thirdpartyapp-sKUkb2QhmWLS",
                  "name": "Drift",
                  "applicationCategories": [
                    "thirdpartyappcategory-RGupzjTTQSBl"
                  ],
                  "protocol": "OAuth/OIDC",
                  "identifier": "drift",
                  "status": "ACTIVE",
                  "description": "Conversational Marketing platform that combines chat, email, video, and automation to remove the friction from business buying",
                  "applicationRoles": [
                    "Account Owner",
                    "Admin",
                    "User"
                  ],
                  "url": "https://start.drift.com/login",
                  "smallLogo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABACAYAAACTDsCFAAAAdElEQVR42u3QIQEAMAgAsNPxnihkpgGaAqgtwqLz1+NciBcvHvHiES8e8eIRLx7x4sWLFy8e8eIRLx7x4hEvHvHixYsXLx7x4hEvHvHiES8e8eLFixcvHvHiES8e8eIRLx7x4sVrEC8e8eIRLx7x4hEvnm0AtTOJAXB2hPAAAAAASUVORK5CYII=",
                  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAA8CAYAAAAjW/WRAAAAjElEQVR42u3TIQEAMAgAsNPxnihkpgEFMPitw6Lz1wNWIQgIAoKAICAICAKCgCAgCAgCCAKCgCAgCAgCgoAgIAgIAoIIAoKAICAICAKCgCAgCAgCggCCgCAgCAgCgoAgIAgIAoKAIIAgIAgIAoKAICAICAKCgCCAICAICAKCgCAgCAgCgoAgIAggCFwMcz2AcT/1oYUAAAAASUVORK5CYII="
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to read applications:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to read thrdPartyApplication"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No application found:
                  value:
                    error:
                      code: "APPLICATION.NOT_FOUND"
                      ns: "APPLICATION"
                      message: "error.thirdPartyApp.notFound"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
    patch:
      tags:
        - Applications
      summary: Update an existing application
      description: |-
        Users with RITM Admin roles and with the correct platform access can update a specific existing 3rd party application.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: thirdpartyapp-sKUkb2QhmWLS
          description: |-
            The code of the application.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/applicationEditRequest"
            examples:
              Change the name:
                value:
                  {
                    "name": "Drift V2"
                  }
              Change the protocol:
                value:
                  {
                    "protocol": "SAML",
                    "identifier": "driftsaml"
                  }
              Change all application roles:
                value:
                  {
                    "applicationRoles": [
                      "Writer",
                      "Reader"
                    ]
                  }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "thirdpartyapp-sKUkb2QhmWLS",
                  "name": "Drift V2",
                  "applicationCategories": [
                    "thirdpartyappcategory-RGupzjTTQSBl"
                  ],
                  "protocol": "SAML",
                  "identifier": "drifsaml",
                  "status": "ACTIVE",
                  "description": "Conversational Marketing platform that combines chat, email, video, and automation to remove the friction from business buying",
                  "applicationRoles": [
                    "Writer",
                    "Reader"
                  ],
                  "url": "https://start.drift.com/login",
                  "smallLogo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABACAYAAACTDsCFAAAAdElEQVR42u3QIQEAMAgAsNPxnihkpgGaAqgtwqLz1+NciBcvHvHiES8e8eIRLx7x4sWLFy8e8eIRLx7x4hEvHvHixYsXLx7x4hEvHvHiES8e8eLFixcvHvHiES8e8eIRLx7x4sVrEC8e8eIRLx7x4hEvnm0AtTOJAXB2hPAAAAAASUVORK5CYII=",
                  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAA8CAYAAAAjW/WRAAAAjElEQVR42u3TIQEAMAgAsNPxnihkpgEFMPitw6Lz1wNWIQgIAoKAICAICAKCgCAgCAgCCAKCgCAgCAgCgoAgIAgIAoIIAoKAICAICAKCgCAgCAgCggCCgCAgCAgCgoAgIAgIAoKAIIAgIAgIAoKAICAICAKCgCCAICAICAKCgCAgCAgCgoAgIAggCFwMcz2AcT/1oYUAAAAASUVORK5CYII="
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to update applications:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to update thrdPartyApplication"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No application found:
                  value:
                    error:
                      code: "APPLICATION.NOT_FOUND"
                      ns: "APPLICATION"
                      message: "error.thirdPartyApp.notFound"
                      status: 404
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid attributesOf parameter:
                  value:
                    error:
                      code: ERROR
                      ns: GLOBAL
                      message: "error.application.create.invalid.identifier"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
    delete:
      tags:
        - Applications
      summary: Delete an existing application
      description: |-
        Users with RITM Admin roles and with the correct platform access can delete a specific existing 3rd party application.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: thirdpartyapp-sKUkb2QhmWLS
          description: |-
            The code of the application.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example: {}
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to read applications:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to read thrdPartyApplication"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /third-party-applications/category:
     post:
      tags:
        - Applications - Application categories
      summary: Create a new application category
      description: |-
        Users with RITM Admin roles and with the correct platform access can create a new application category using this API.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/applicationCategoryCreateRequest"
            example:
              {
                "name": "Marketing & Sales",
                "description": "All marketing and sales related applications",
                "visible": true
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "thirdpartyappcategory-63x3P26TZKj2",
                  "name": "Marketing & Sales",
                  "description": "All marketing and sales related applications",
                  "visible": true
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing name parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.thirdPartyAppCategory.create.empty.name"
                      data:
                        field: "name"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to create application categories:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to create thirdPartyAppCategory"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /third-party-applications/categories:
    get:
      tags:
        - Applications - Application categories
      summary: Search for existing application categories
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve application categories using this API. The search parameters are AND-ed.
      parameters:
        - in: query
          name: code
          schema:
            type: string
          description: |-
            The code of the application category. Case-sensitive and exact match.
        - in: query
          name: name
          schema:
            type: string
          description: |-
            The name of the application category. Case-sensitive and exact match.
        - in: query
          name: visible
          schema:
            type: boolean
          description: |-
            If the application category is shown on the self-services pages.
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              examples:
                One or more application categories found:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "code": "thirdpartyappcategory-63x3P26TZKj2",
                          "name": "Marketing & Sales",
                          "description": "All marketing and sales related applications",
                          "visible": true
                        }
                      ]
                    }
                No application categories found:
                  value:
                    {
                      "totalItems": 0,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 0,
                      "result": []
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to search for application categories:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to find thirdPartyAppCategory"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /third-party-applications/category/{code}:
    get:
      tags:
        - Applications - Application categories
      summary: Retrieve an existing application category
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve a specific application category.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: thirdpartyappcategory-63x3P26TZKj2
          description: |-
            The code of the application category.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "thirdpartyappcategory-63x3P26TZKj2",
                  "name": "Marketing & Sales",
                  "description": "All marketing and sales related applications",
                  "visible": true
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to read application categories:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to read thirdPartyAppCategory"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "THIRD_PARTY_APP_CATEGORY.NOT_FOUND"
                  ns: "THIRD_PARTY_APP_CATEGORY"
                  message: "error.thirdPartyAppCategory.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: [] 
    patch:
      tags:
        - Applications - Application categories
      summary: Update an existing application category
      description: |-
        Users with RITM Admin roles and with the correct platform access can update a specific application category.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: thirdpartyappcategory-63x3P26TZKj2
          description: |-
            The code of the application category.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/applicationCategoryEditRequest"
            examples:
              Change the name:
                value:
                  {
                    "name": "Sales & Marketing"
                  }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "thirdpartyappcategory-63x3P26TZKj2",
                  "name": "Marketing & Sales",
                  "description": "All marketing and sales related applications",
                  "visible": true
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to update application categories:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to update thirdPartyAppCategory"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "THIRD_PARTY_APP_CATEGORY.NOT_FOUND"
                  ns: "THIRD_PARTY_APP_CATEGORY"
                  message: "error.thirdPartyAppCategory.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: [] 
    delete:
      tags:
        - Applications - Application categories
      summary: Delete an existing application category
      description: |-
        Users with RITM Admin roles and with the correct platform access can delete a specific application category.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: thirdpartyappcategory-63x3P26TZKj2
          description: |-
            The code of the application category.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example: {}
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to delete application categories:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to delete thirdPartyAppCategory"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: [] 
  /resourceTypeData:
    post:
      tags:
        - Applications - Resource types
      summary: Create a new resource type
      description: |-
        Users with RITM Admin roles and with the correct platform access can create a new resource type using this API.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/resourceTypeCreateRequest"
            example:
              {
                "name": "Resource type 1",
                "description": "A description for resource type 1",
                "status": "ACTIVE"
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "resourcestype-jdTYKbEPTmZO",
                  "name": "Resource type 1",
                  "description": "A description for resource type 1",
                  "status": "ACTIVE"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing name parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.resourcesType.create.empty.name"
                      data:
                        field: "name"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to create access roles:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to create resourceType"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /resourceTypesData:
    get:
      tags:
        - Applications - Resource types
      summary: Search for existing resource types
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve resource types using this API.
      parameters:
        - in: query
          name: code
          schema:
            type: string
          description: |-
            The code of the resource type. Case-sensitive and exact match.
        - in: query
          name: name
          schema:
            type: string
          description: |-
            The name of the resource type. Case-sensitive and exact match.
        - in: query
          name: status
          schema:
            type: string
            enum:
              - ACTIVE
              - INACTIVE
            example: INACTIVE
          description: |-
            The status of the resource type. Case-insensitive and partial match.
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              examples:
                One or more resource types found:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "code": "resourcestype-jdTYKbEPTmZO",
                          "name": "Resource type 1",
                          "description": "A description for resource type 1",
                          "status": "ACTIVE"
                        }
                      ]
                    }
                No resource types found:
                  value:
                    {
                      "totalItems": 0,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 0,
                      "result": []
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to find resource types:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to find resourceType"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /resourceTypeData/{code}:
    get:
      tags:
        - Applications - Resource types
      summary: Retrieve an existing resource type
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve a specific resource type using this API.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: resourcestype-jdTYKbEPTmZO
          description: |-
            The code of the resource type.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "resourcestype-jdTYKbEPTmZO",
                  "name": "Resource type 1",
                  "description": "A description for resource type 1",
                  "status": "ACTIVE"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to read resource types:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to read resourceType"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "RESOURCETYPE.NOT_FOUND"
                  ns: "RESOURCETYPE"
                  message: "error.resourceType.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: []
    patch:
      tags:
        - Applications - Resource types
      summary: Update an existing resource type
      description: |-
        Users with RITM Admin roles and with the correct platform access can update a specific resource type using this API.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: resourcestype-jdTYKbEPTmZO
          description: |-
            The code of the resource type.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/resourceTypeEditRequest"
            examples:
              Change the name:
                value:
                  {
                    "name": "New name for resource type 1"
                  }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                    "code": "resourcestype-jdTYKbEPTmZO",
                    "name": "New name for resource type 1",
                    "description": "A description for resource type 1",
                    "status": "ACTIVE"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to update resource types:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to update resourceType"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "RESOURCETYPE.NOT_FOUND"
                  ns: "RESOURCETYPE"
                  message: "error.resourceType.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: []
    delete:
      tags:
        - Applications - Resource types
      summary: Delete an existing resource type
      description: |-
        Users with RITM Admin roles and with the correct platform access can delete a specific resource type using this API.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: resourcestype-jdTYKbEPTmZO
          description: |-
            The code of the resource type.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to read resource types:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to delete resourceType"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "RESOURCETYPE.NOT_FOUND"
                  ns: "RESOURCETYPE"
                  message: "error.resourceType.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /resourceData:
    post:
      tags:
        - Applications - Resources
      summary: Create a new resource
      description: |-
        Users with RITM Admin roles and with the correct platform access can create a new resource using this API.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/resourceCreateRequest"
            examples:
              All information passed:
                value:
                  {
                    "name": "Resource 1",
                    "description": "A description for resource 1",
                    "identifier": "ID12345678",
                    "privileges": [
                      "verify",
                      "change"
                    ],
                    "resourceTypes": [
                      "resourcestype-UOoPGYOaHzkR"
                    ],
                    "status": "ACTIVE"
                  }
              No resource types and privileges:
                value:
                  {
                    "name": "Resource 1",
                    "description": "A description for resource 1",
                    "identifier": "ID12345678",
                    "status": "ACTIVE"
                  }                
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "resources-phyC7DOOteRG",
                  "name": "Resource 1",
                  "description": "A description for resource 1",
                  "identifier": "ID12345678",
                  "privileges": [
                    "verify",
                    "change"
                  ],
                  "resourceTypes": [
                    "resourcestype-UOoPGYOaHzkR"
                  ],
                  "status": "ACTIVE"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing name parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.resources.create.empty.name"
                      data:
                        field: "name"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to create resource:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to create resource"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Passed resource type(s) not found:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.resourcesType.notFound"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /resourcesData:
    get:
      tags:
        - Applications - Resources
      summary: Search for existing resources
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve resource using this API.
      parameters:
        - in: query
          name: code
          schema:
            type: string
          description: |-
            The code of the resource. Case-sensitive and exact match.
        - in: query
          name: name
          schema:
            type: string
          description: |-
            The name of the resource. Case-sensitive and exact match.
        - in: query
          name: identifier
          schema:
            type: string
          description: |-
            The identifier of the resource. Case-insensitive and exact match.
        - in: query
          name: status
          schema:
            type: string
            enum:
              - ACTIVE
              - INACTIVE
            example: INACTIVE
          description: |-
            The status of the resource. Case-sensitive and exact match.
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              examples:
                One or more resources found:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "code": "resources-phyC7DOOteRG",
                          "name": "Resource 1",
                          "description": "A description for resource 1",
                          "identifier": "ID12345678",
                          "privileges": [
                            "verify",
                            "change"
                          ],
                          "resourceTypes": [
                            "resourcestype-UOoPGYOaHzkR"
                          ],
                          "status": "ACTIVE"
                        }
                      ]
                    }
                No resources:
                  value:
                    {
                      "totalItems": 0,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 0,
                      "result": []
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to search for resources:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to find resource"
                      status: 401
      security:
        - OAuth2: []
        - APIKey: []
  /resourceData/{code}:
    get:
      tags:
        - Applications - Resources
      summary: Retrieve an existing resource
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve a specific resource using this API.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: resources-phyC7DOOteRG
          description: |-
            The code of the resource.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "resources-phyC7DOOteRG",
                  "name": "Resource 1",
                  "description": "A description for resource 1",
                  "identifier": "ID12345678",
                  "privileges": [
                    "verify",
                    "change"
                  ],
                  "resourceTypes": [
                    "resourcestype-UOoPGYOaHzkR"
                  ],
                  "status": "ACTIVE"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to read a resource:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to read resource"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "RESOURCE.NOT_FOUND"
                  ns: "RESOURCE"
                  message: "error.resource.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: []
    patch:
      tags:
        - Applications - Resources
      summary: Update an existing resource
      description: |-
        Users with RITM Admin roles and with the correct platform access can update a specific resource using this API.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: resources-phyC7DOOteRG
          description: |-
            The code of the resource.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/resourceEditRequest"
            examples:
              Change the identifier:
                value:
                  {
                    "identifier": "ID87654321"
                  }
              Replace all privileges:
                value:
                  {
                    "privileges": [
                      "read",
                      "write"
                    ]
                  } 
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "resources-phyC7DOOteRG",
                  "name": "Resource 1",
                  "description": "A description for resource 1",
                  "identifier": "ID12345678",
                  "privileges": [
                    "verify",
                    "change"
                  ],
                  "resourceTypes": [
                    "resourcestype-UOoPGYOaHzkR"
                  ],
                  "status": "ACTIVE"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to update a resource:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to update resource"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "RESOURCE.NOT_FOUND"
                  ns: "RESOURCE"
                  message: "error.resource.notFound"
                  status: 404
                Passed resource type(s) not found:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.resourcesType.notFound"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
    delete:
      tags:
        - Applications - Resources
      summary: Delete an existing resource
      description: |-
        Users with RITM Admin roles and with the correct platform access can delete a specific resource using this API.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: resources-phyC7DOOteRG
          description: |-
            The code of the resource.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to delete a resource:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to upddeleteate resource"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              example:
                error:
                  code: "RESOURCE.NOT_FOUND"
                  ns: "RESOURCE"
                  message: "error.resource.notFound"
                  status: 404
      security:
        - OAuth2: []
        - APIKey: []
  /accessRole:
    post:
      tags:
        - Access - Access roles
      summary: Create a new access role
      description: |-
        Users with RITM Admin roles and with the correct platform access can create a new access role using this API.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/accessRoleCreateRequest"
            example:
              {
                "name": "Drift - Admin",
                "description": "An admin has access to everything in Drift.",
                "status": "ACTIVE",
                "customAttributes": [
                  {
                    "code": "appIdentifier",
                    "value": "12345678"
                  },
                  {
                    "code": "appLicense",
                    "value": "Commercial"
                  }
                ],
                "applications": [
                  {
                    "applicationCode": "thirdpartyapp-BayOJOgTTQCM",
                    "applicationRoles": [
                      "Admin"
                    ]
                  }
                ],
                "resources": [
                  {
                    "resourceCode": "resources-phyC7DOOteRG",
                    "privileges": [
                      "read"
                    ]
                  }
                ]
              }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "role-TNtOQ4fB6aq6",
                  "name": "Drift - Admin",
                  "type": "ACCESS",
                  "status": "ACTIVE",
                  "description": "An admin has access to everything in Drift.",
                  "customAttributes": [
                    {
                      "code": "appIdentifier",
                      "value": "12345678"
                    },
                    {
                      "code": "appLicense",
                      "value": "Commercial"
                    }
                  ],
                  "applications": [
                    {
                      "applicationCode": "thirdpartyapp-BayOJOgTTQCM",
                      "applicationName": "Drift",
                      "applicationRoles": [
                        "Admin"
                      ]
                    }
                  ],
                  "resources": [
                    {
                      "resourceCode": "resources-phyC7DOOteRG",
                      "privileges": [
                        "read"
                      ]
                    }
                  ]
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Missing name parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.role.create.empty.name"
                      data:
                        field: "name"
                      status: 400
                Missing status parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "error.role.create.empty.status"
                      data:
                        field: "status"
                      status: 400
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to create access roles:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to create accessRole"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                applicationCode not passed or not found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested application does not exist"
                      status: 404
                applicationRole not found for the passed applicationCode:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested application role does not exist"
                      status: 404
                resourceCode not passed or not found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested resource does not exist"
                      status: 404
                privilege(s) not found for the passed resourceCode:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested privilege does not exist"
                      status: 404
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No code given for custom attribute:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Attribute code is empty"
                      status: 422
                No value given for custom attribute:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Attribute value is empty"
                      status: 422
                Duplicate custom attribute is passed:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Attribute code: appIdentifier is duplicated"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /accessRoles:
    get:
      tags:
        - Access - Access roles
      summary: Search for existing access roles
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve access roles using this API. The search parameters are AND-ed.
      parameters:
        - in: query
          name: code
          schema:
            type: string
          description: |-
            The code of the access role. Case-sensitive and exact match.
        - in: query
          name: name
          schema:
            type: string
          description: |-
            The name of the access role. By default, case-insensitive and partial match (see nameMatch parameter to overwrite).
        - in: query
          name: nameMatch
          schema:
            type: string
            enum:
              - EXACT
              - PARTIAL
            example: EXACT
            default: PARTIAL
          description: |-
            The way that searches are done. PARTIAL is the default and will use a case-insensitive and partial search. EXACT will use an exact, case-sensitive, search.
        - in: query
          name: status
          schema:
            type: string
            enum:
              - ACTIVE
              - INACTIVE
            example: INACTIVE
          description: |-
            The status of the access role.
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/pageParam"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              examples:
                One or more access roles found:
                  value:
                    {
                      "totalItems": 1,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 1,
                      "result": [
                        {
                          "code": "role-TNtOQ4fB6aq6",
                          "name": "Drift - Admin",
                          "description": "An admin has access to everything in Drift. The Account Owner is by default an Admin.",
                          "applications": [
                            {
                              "applicationCode": "thirdpartyapp-BayOJOgTTQCM",
                              "applicationName": "Drift",
                              "applicationRoles": [
                                "Admin"
                              ]
                            }
                          ],
                          "status": "ACTIVE",
                          "customAttributes": [],
                          "resources": [],
                          "type": "ACCESS"
                        }
                      ]
                    }
                No access roles found:
                  value:
                    {
                      "totalItems": 0,
                      "limit": 10,
                      "page": 1,
                      "pageCount": 0,
                      "result": []
                    }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to search for access roles:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to find accessRole"
                      status: 401
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid nameMatch parameter:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "The requested nameMatch does not exist"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
  /accessRole/{code}:
    get:
      tags:
        - Access - Access roles
      summary: Retrieve an existing access role
      description: |-
        Users with RITM Admin roles and with the correct platform access can retrieve a specific access role.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: role-TNtOQ4fB6aq6
          description: |-
            The code of the access role.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "role-TNtOQ4fB6aq6",
                  "name": "Drift - Admin",
                  "description": "An admin has access to everything in Drift. The Account Owner is by default an Admin.",
                  "applications": [
                    {
                      "applicationCode": "thirdpartyapp-BayOJOgTTQCM",
                      "applicationName": "Drift",
                      "applicationRoles": [
                        "Admin"
                      ]
                    }
                  ],
                  "status": "ACTIVE",
                  "customAttributes": [],
                  "resources": [],
                  "type": "ACCESS"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to create access roles:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to read accessRole"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No application found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "error.role.notFound"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
    patch:
      tags:
        - Access - Access roles
      summary: Update an existing access role
      description: |-
        Users with RITM Admin roles and with the correct platform access can update a specific access role.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: role-TNtOQ4fB6aq6
          description: |-
            The code of the access role.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/accessRoleEditRequest"
            examples:
              Change the name:
                value:
                  {
                    "name": "Drift - Full admin access"
                  }
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example:
                {
                  "code": "role-TNtOQ4fB6aq6",
                  "name": "Drift - Full admin access",
                  "description": "An admin has access to everything in Drift. The Account Owner is by default an Admin.",
                  "applications": [
                    {
                      "applicationCode": "thirdpartyapp-BayOJOgTTQCM",
                      "applicationName": "Drift",
                      "applicationRoles": [
                        "Admin"
                      ]
                    }
                  ],
                  "status": "ACTIVE",
                  "customAttributes": [],
                  "resources": [
                    {
                      "resourceCode": "resources-phyC7DOOteRG",
                      "privileges": [
                        "read"
                      ]
                    }
                  ],
                  "type": "ACCESS"
                }
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to update access roles:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to update accessRole"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No application found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "error.role.notFound"
                      status: 404
                applicationCode not passed or not found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested application does not exist"
                      status: 404
                applicationRole not found for the passed applicationCode:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested application role does not exist"
                      status: 404
                resourceCode not passed or not found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested resource does not exist"
                      status: 404
                privilege(s) not found for the passed resourceCode:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "The requested privilege does not exist"
                      status: 404
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No code given for custom attribute:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Attribute code is empty"
                      status: 422
                No value given for custom attribute:
                  value:
                    error:
                      code: "DATA.INVALID"
                      ns: "DATA"
                      message: "Attribute value is empty"
                      status: 422
      security:
        - OAuth2: []
        - APIKey: []
    delete:
      tags:
        - Access - Access roles
      summary: Update an existing access role
      description: |-
        Users with RITM Admin roles and with the correct platform access can delete a specific access role.
      parameters:
        - in: path
          name: code
          required: true
          schema:
            type: string
            example: role-TNtOQ4fB6aq6
          description: |-
            The code of the access role.
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                type: object
              example: {}
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid payload:
                  value:
                    error:
                      code: "TRANSPORT.INVALID_PAYLOAD"
                      ns: "TRANSPORT"
                      message: "Invalid payload."
                      status: 400
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                Invalid/expired access token:
                  value:
                    error:
                      code: "AUTH.EXPIRED"
                      ns: "AUTH"
                      message: "Authorized access_code is expired"
                      status: 401
                Not authorised to delete access roles:
                  value:
                    error:
                      code: "UNAUTHORIZED"
                      ns: "GLOBAL"
                      message: "Not authorized to delete accessRole"
                      status: 401
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/genericErrorSchema"
              examples:
                No application found:
                  value:
                    error:
                      code: "ERROR"
                      ns: "GLOBAL"
                      message: "error.role.notFound"
                      status: 404
      security:
        - OAuth2: []
        - APIKey: []
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth2/OIDC authentication at the AS/OP that is integrated with RITM
      flows:
        authorizationCode:
          authorizationUrl: https://example-domain-uri.com/auth/oauth2.0/v1/authorize
          tokenUrl: https://example-domain-uri.com/auth/oauth2.0/v1/token
          scopes:
            workflow:invitation:admin:post: Allows to start invitation flow
    APIKey:
      type: http
      scheme: bearer
      bearerFormat: APIKey
  schemas:
    # SCIM 1.1 related schemas
    nameSCIM1.1:
      type: object
      properties:
        givenName:
          type: string
        middleName:
          type: string
        familyName:
          type: string
    emailsSCIM1.1:
      type: object
      properties:
        type:
          type: string
          enum: [home, work, other]
          description: "Type of email address"
        value:
          type: string
        primary:
          type: boolean
    addressesSCIM1.1:
      type: object
      properties:
        type:
          type: string
          enum: [home, work, other]
          description: "Type of address"
        iwelcome_street:
          type: string
        iwelcome_houseNumber:
          type: string
        iwelcome_additional:
          type: string
        iwelcome_zone:
          type: string
        iwelcome_area:
          type: string
        country:
          type: string
    phoneNumbersSCIM1.1:
      type: object
      properties:
        type:
          type: string
          enum: [work, home, mobile, fax, pager, other]
          description: "Type of phone number"
        value:
          type: string
        primary:
          type: boolean
    iwelcomeExtensionSCIM1.1:
      type: object
      properties:
        state:
          type: string
          enum: [INACTIVE, ACTIVE, GRACE, WITHDRAWN, BLOCKED]
          description: "State/status of the user"
          default: INACTIVE
    ritmExtensionSCIM1.1:
      type: object
      properties:
        access:
          type: object
          properties:
            startDate:
              type: string
            endDate:
              type: string
        landingPage:
          type: object
          properties:
            platform:
              type: string
            profile:
              type: string
        profileAvatar:
          type: string
    ritmExtensionFullSCIM1.1:
      type: object
      properties:
        access:
          type: object
          properties:
            startDate:
              type: string
            endDate:
              type: string
        groups:
          type: array
          items:
            type: object
            properties:
              structureCode:
                type: string
              itemCode:
                type: string
        landingPage:
          type: object
          properties:
            platform:
              type: string
            profile:
              type: string
        profileAvatar:
          type: string
        roles:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
              startDate:
                type: string
              endDate:
                type: string
              assignedType:
                type: string
              assignedProcessor:
                type: string
              assignedStructureCode:
                type: string
              assignedStructureGroup:
                type: string
    customExtensionSCIM1.1:
      type: object
      properties:
        customAttribute1:
          type: string
        customAttribute2:
          type: integer
        customAttribute3:
          type: boolean
        customAttribute4:
          type: array
          items:
            type: string
        customAttribute5:
          type: object
          properties:
            subAttribute1:
              type: string
            subAttribute2:
              type: integer
            subAttribute3:
              type: boolean
        customAttribute6:
          type: array
          items:
            type: object
            properties:
              subAttribute1:
                type: string
              subAttribute2:
                type: integer
              subAttribute3:
                type: boolean
    # Regular schemas
    genericErrorSchema:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            ns:
              type: string
            message:
              type: string
            data:
              type: object
              properties:
                field:
                  type: string
            status:
              type: integer
    profile:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/nameSCIM1.1"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/addressesSCIM1.1"
        emails:
          type: array
          items:
            $ref: "#/components/schemas/emailsSCIM1.1"
        phoneNumbers:
          type: array
          items:
            $ref: "#/components/schemas/phoneNumbersSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:
          $ref: "#/components/schemas/iwelcomeExtensionSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:ritm:
          $ref: "#/components/schemas/ritmExtensionSCIM1.1"
        urn:scim:schemas:extension:custom:1.0:
          $ref: "#/components/schemas/customExtensionSCIM1.1"
    rolesAssignableResponse:
      type: object
      properties:
        uid:
          type: string
        cascadableAdminRoles:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              name:
                type: string
        cascadablePersonalRoles:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              name:
                type: string
        cascadableAccessRoles:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              name:
                type: string
    sendInvitationRequest:
      type: object
      properties:
        email:
          type: string
          description: Email-address of the user that is invited
        phone:
          type: string
          description: Phone number of the user that is invited
        note:
          type: string
          description: An optional note to the user that is invited
        language:
          type: string
          description: Preferred language of the user that is invited
        name:
          $ref: "#/components/schemas/nameSCIM1.1"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/addressesSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:
          $ref: "#/components/schemas/iwelcomeExtensionSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:ritm:
          $ref: "#/components/schemas/ritmExtensionSCIM1.1"
        urn:scim:schemas:extension:custom:1.0:
          $ref: "#/components/schemas/customExtensionSCIM1.1"
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                  required:
                    - code
            required:
              - code
              - groupMemberships
        roleAssignments:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              startDate:
                type: string
              endDate:
                type: string
              assignedStructureCode:
                type: string
              assignedStructureGroup:
                type: string
            required:
              - code
      required:
        - email
        - phone
        - structureMemberships
    sendInvitationResponse:
      type: object
      properties:
        email:
          type: string
        phone:
          type: string
          description: Phone number of the user that is invited
        note:
          type: string
          description: An optional note to the user that is invited
        language:
          type: string
          description: Preferred language of the user that is invited
        name:
          $ref: "#/components/schemas/nameSCIM1.1"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/addressesSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:
          $ref: "#/components/schemas/iwelcomeExtensionSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:ritm:
          $ref: "#/components/schemas/ritmExtensionSCIM1.1"
        urn:scim:schemas:extension:custom:1.0:
          $ref: "#/components/schemas/customExtensionSCIM1.1"
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                  required:
                    - code
            required:
              - code
              - groupMemberships
        roleAssignments:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              startDate:
                type: string
              endDate:
                type: string
              assignedStructureCode:
                type: string
              assignedStructureGroup:
                type: string
            required:
              - code
      required:
        - email
        - phone
        - structureMemberships
    structureAuthorizedResponse:
      type: object
      properties:
        uid:
          type: string
        managedStructures:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              name:
                type: string
              managedGroups:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    children:
                      type: array
                      description: Nested array of children
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          children:
                            type: array
                            items:
                              example: []
                          roles:
                            type: array
                            items:
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - ACCESS
                                    - ADMIN
                                    - PERSONAL
                                code:
                                  type: string
                                name:
                                  type: string
                          attributes:
                            type: object
                            properties:
                              code:
                                type: string
                              value:
                                type: string
                    roles:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - ACCESS
                              - ADMIN
                              - PERSONAL
                          code:
                            type: string
                          name:
                            type: string
                    attributes:
                      type: object
                      properties:
                        code:
                          type: string
                        value:
                          type: string
    structureMembershipsResponse:
      type: object
      properties:
        uid:
          type: string
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              name:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    attributes:
                      type: object
                      properties:
                        code:
                          type: string
                        value:
                          type: string
    thirdPartyApplicationsRolesResponse:
      type: object
      properties:
        uid:
          type: string
        application:
          type: string
        applicationRoles:
          type: array
          items:
            type: string
    uid:
      type: string
      example: 8d90b808-1e93-11eb-adc1-0242ac120002
    userCreateRequest:
      type: object
      properties:
        profileInformation:
          $ref: "#/components/schemas/profile"
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                  required:
                    - code
            required:
              - code
              - groupMemberships
        roleAssignments:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              startDate:
                type: string
              endDate:
                type: string
              assignedStructureCode:
                type: string
              assignedStructureGroup:
                type: string
            required:
              - code
      required:
        - profileInformation
        - structureMemberships
    userCreateResponse:
      type: object
      properties:
        profileInformation:
          type: object
          properties:
            uid:
              type: string
            name:
              $ref: "#/components/schemas/nameSCIM1.1"
            addresses:
              type: array
              items:
                $ref: "#/components/schemas/addressesSCIM1.1"
            emails:
              type: array
              items:
                $ref: "#/components/schemas/emailsSCIM1.1"
            phoneNumbers:
              type: array
              items:
                $ref: "#/components/schemas/phoneNumbersSCIM1.1"
            urn:scim:schemas:extension:iwelcome:1.0:
              $ref: "#/components/schemas/iwelcomeExtensionSCIM1.1"
            urn:scim:schemas:extension:custom:1.0:
              $ref: "#/components/schemas/customExtensionSCIM1.1"
        roleAssignments:
          type: array
          items:
            type: object
            properties:
              adminRoles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    startDate:
                      type: string
                    endDate:
                      type: string
                    assignedStructureCode:
                      type: string
                    assignedStructureGroup:
                      type: string
              personalRoles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    startDate:
                      type: string
                    endDate:
                      type: string
                    assignedStructureCode:
                      type: string
                    assignedStructureGroup:
                      type: string
              accessRoles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    startDate:
                      type: string
                    endDate:
                      type: string
                    assignedStructureCode:
                      type: string
                    assignedStructureGroup:
                      type: string
                    applications:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          applicationRoles:
                            type: array
                            items:
                              type: string
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              name:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    attributes:
                      type: object
                      properties:
                        code:
                          type: string
                        value:
                          type: string
    structureCreateRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the structure.
        description:
          type: string
          description: A short description of the structure, of maximum 250 characters.
        isNested:
          type: boolean
          description: Determines whether the groups configured within the structure can be configured in a flat layout, or in a branching one.
        structureType:
          type: string
          enum:
            - STATIC
          default: STATIC
          description: The type corresponding to the structure being created.
        hasCustomAttributes:
          type: boolean
          description: Indicates whether custom attributes will be used for the groups in the structure.
        attributes:
          type: array
          description: Array of code/name combinations
          items:
            type: object
            properties:
              code:
                type: string
                description: A unique code to identify a group attribute
              name:
                type: string
                description: The display name of the group attribute
            required:
              - code
        hasRolesPerGroup:
          type: boolean
          description: Indicates whether roles per group will be used for the groups in the structure.
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          description: The status of the new structure. Can be active or inactive.
        structureGroups:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: The group code.
              name:
                type: string
                description: The group name.
              attributes:
                type: object
                additionalProperties:
                  type: string
                  description: The code(s) for the attributes as defined for the structure
              roles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    type:
                      type: string
                  required:
                    - code
                    - type
              children:
                type: array
                description: Optional nested array of children
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    attributes:
                      type: object
                      additionalProperties:
                        type: string
                    roles:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          type:
                            type: string
                        required:
                          - code
                          - type
                    children:
                      type: array
                      items:
                        example: []
                  required:
                    - code
                    - name
            required:
              - code
              - name
          description: The groups within the structure.
      required:
        - name
        - status
        - isNested
    structureEditRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the structure.
        description:
          type: string
          description: A short description of the structure, of maximum 250 characters.
        isNested:
          type: boolean
          description: Determines whether the groups configured within the structure can be configured in a flat layout, or in a branching one.
        structureType:
          type: string
          enum:
            - STATIC
          default: STATIC
          description: The type corresponding to the structure being created.
        hasCustomAttributes:
          type: boolean
          description: Indicates whether custom attributes will be used for the groups in the structure.
        attributes:
          type: array
          description: Array of code/name combinations
          items:
            type: object
            properties:
              code:
                type: string
                description: A unique code to identify a group attribute
              name:
                type: string
                description: The display name of the group attribute
            required:
              - code
        hasRolesPerGroup:
          type: boolean
          description: Indicates whether roles per group will be used for the groups in the structure.
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          description: The status of the new structure. Can be active or inactive.
        structureGroups:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: The group code.
              name:
                type: string
                description: The group name.
              attributes:
                type: object
                additionalProperties:
                  type: string
                  description: The code(s) for the attributes as defined for the structure
              roles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    type:
                      type: string
                  required:
                    - code
                    - type
              children:
                type: array
                description: Optional nested array of children
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    attributes:
                      type: object
                      additionalProperties:
                        type: string
                    roles:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          type:
                            type: string
                        required:
                          - code
                          - type
                    children:
                      type: array
                      items:
                        example: []
                  required:
                    - code
                    - name
            required:
              - code
              - name
          description: The groups within the structure.
      required:
        - name
        - status
        - isNested
    groupCreateRequest:
      type: object
      properties:
        code:
          type: string
          description: The code corresponding to the group being created.
        name:
          type: string
          description: The name of the group.
        structureCode:
          type: string
          description: The code corresponding to the structure that the group belongs to.
        groupParent:
          type: string
          description: If there is a parent, the code of the parent group.
        attributes:
          type: object
          additionalProperties:
            type: string
            description: The code(s) for the attributes as defined for the structure
        roles:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              type:
                type: string
            required:
              - code
              - type
      required:
        - code
        - name
        - structureCode
    groupEditRequest:
      type: object
      properties:
        name:
          type: string
          description: The new name of the group.
        structureCode:
          type: string
          description: The code corresponding to the structure that the group belongs to.
        groupParent:
          type: string
          description: If there is a parent, the code of the parent group.
        attributes:
          type: object
          additionalProperties:
            type: string
            description: The code(s) for the attributes as defined for the structure
        roles:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              type:
                type: string
            required:
              - code
              - type
      required:
        - structureCode
    userEditRequest:
      type: object
      properties:
        profileInformation:
          $ref: "#/components/schemas/profile"
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    operation:
                      type: string
                      enum:
                        - add
                        - delete
                      default: add
                      description: "Type of operation"
                  required:
                    - code
            required:
              - code
              - groupMemberships
        roleAssignments:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              startDate:
                type: string
              endDate:
                type: string
              operation:
                type: string
                enum:
                  - add
                  - delete
                default: add
                description: "Type of operation"
            required:
              - code
    userEditRequestPost:
      type: object
      properties:
        uid:
          $ref: "#/components/schemas/uid"
        profileInformation:
          $ref: "#/components/schemas/profile"
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    operation:
                      type: string
                      enum:
                        - add
                        - delete
                      default: add
                      description: "Type of operation"
                  required:
                    - code
            required:
              - code
              - groupMemberships
        roleAssignments:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              startDate:
                type: string
              endDate:
                type: string
              operation:
                type: string
                enum:
                  - add
                  - delete
                default: add
                description: "Type of operation"
            required:
              - code
      required:
        - uid
    userEditResponse:
      type: object
      properties:
        profileInformation:
          type: object
          properties:
            uid:
              type: string
            name:
              $ref: "#/components/schemas/nameSCIM1.1"
            addresses:
              type: array
              items:
                $ref: "#/components/schemas/addressesSCIM1.1"
            emails:
              type: array
              items:
                $ref: "#/components/schemas/emailsSCIM1.1"
            phoneNumbers:
              type: array
              items:
                $ref: "#/components/schemas/phoneNumbersSCIM1.1"
            urn:scim:schemas:extension:iwelcome:1.0:
              $ref: "#/components/schemas/iwelcomeExtensionSCIM1.1"
            urn:scim:schemas:extension:custom:1.0:
              $ref: "#/components/schemas/customExtensionSCIM1.1"
        roleAssignments:
          type: array
          items:
            type: object
            properties:
              adminRoles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    startDate:
                      type: string
                    endDate:
                      type: string
                    assignedStructureCode:
                      type: string
                    assignedStructureGroup:
                      type: string
              personalRoles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    startDate:
                      type: string
                    endDate:
                      type: string
                    assignedStructureCode:
                      type: string
                    assignedStructureGroup:
                      type: string
              accessRoles:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    startDate:
                      type: string
                    endDate:
                      type: string
                    assignedStructureCode:
                      type: string
                    assignedStructureGroup:
                      type: string
                    applications:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          applicationRoles:
                            type: array
                            items:
                              type: string
        structureMemberships:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              name:
                type: string
              groupMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    attributes:
                      type: object
                      properties:
                        code:
                          type: string
                        value:
                          type: string
    usersManagedIdentitiesResponse:
      type: object
      properties:
        totalItems:
          type: integer
        limit:
          type: integer
        page:
          type: integer
        pageCount:
          type: integer
        result:
          type: array
          items:
            type: object
            properties:
              profileInformation:
                type: object
                properties:
                  uid:
                    type: string
                  name:
                    $ref: "#/components/schemas/nameSCIM1.1"
                  addresses:
                    type: array
                    items:
                      $ref: "#/components/schemas/addressesSCIM1.1"
                  emails:
                    type: array
                    items:
                      $ref: "#/components/schemas/emailsSCIM1.1"
                  phoneNumbers:
                    type: array
                    items:
                      $ref: "#/components/schemas/phoneNumbersSCIM1.1"
                  urn:scim:schemas:extension:iwelcome:1.0:
                    $ref: "#/components/schemas/iwelcomeExtensionSCIM1.1"
                  urn:scim:schemas:extension:custom:1.0:
                    $ref: "#/components/schemas/customExtensionSCIM1.1"
              roleAssignments:
                type: array
                items:
                  type: object
                  properties:
                    adminRoles:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          startDate:
                            type: string
                          endDate:
                            type: string
                          assignedStructureCode:
                            type: string
                          assignedStructureGroup:
                            type: string
                    personalRoles:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          startDate:
                            type: string
                          endDate:
                            type: string
                          assignedStructureCode:
                            type: string
                          assignedStructureGroup:
                            type: string
                    accessRoles:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          startDate:
                            type: string
                          endDate:
                            type: string
                          assignedStructureCode:
                            type: string
                          assignedStructureGroup:
                            type: string
                          applications:
                            type: array
                            items:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                                applicationRoles:
                                  type: array
                                  items:
                                    type: string
              structureMemberships:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    name:
                      type: string
                    groupMemberships:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          attributes:
                            type: object
                            properties:
                              code:
                                type: string
                              value:
                                type: string
    userMeResponse:
      type: object
      properties:
        uid:
          type: string
        name:
          $ref: "#/components/schemas/nameSCIM1.1"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/addressesSCIM1.1"
        emails:
          type: array
          items:
            $ref: "#/components/schemas/emailsSCIM1.1"
        phoneNumbers:
          type: array
          items:
            $ref: "#/components/schemas/phoneNumbersSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:
          $ref: "#/components/schemas/iwelcomeExtensionSCIM1.1"
        urn:scim:schemas:extension:iwelcome:1.0:ritm:
          $ref: "#/components/schemas/ritmExtensionSCIM1.1"
        urn:scim:schemas:extension:custom:1.0:
          $ref: "#/components/schemas/customExtensionSCIM1.1"
      required:
        - uid
    applicationCreateRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the application
        description:
          type: string
          description: A short description of the application
        protocol:
          type: string
          enum:
            - NONE
            - OAuth/OIDC
            - SAML
          default: NONE
          description: The protocol if integrated with the IdP
        identifier:
          type: string
          description: The identifier (ClientID or entityID) as specified at the integrated Identity Provider
        url:
          type: string
          description: The url that the user is redirected to in the RITM UI if the application tile is clicked
        applicationRoles:
          type: array
          items:
            type: string
            description: Application role of the 3rd party application
        applicationCategories:
          type: array
          items:
            type: string
            description: Application category code
        logo:
          type: string
          description: Base64 encoded picture
        smallLogo:
          type: string
          description: Base64 encoded picture
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the new application. Can be ACTIVE or INACTIVE.
      required:
        - name
        - url
    applicationEditRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the application
        description:
          type: string
          description: A short description of the application
        protocol:
          type: string
          enum:
            - NONE
            - OAuth/OIDC
            - SAML
          default: NONE
          description: The protocol if integrated with the IdP
        identifier:
          type: string
          description: The identifier (ClientID or entityID) as specified at the integrated Identity Provider. Mandatory if protocol is not "NONE"
        url:
          type: string
          description: The url that the user is redirected to in the RITM UI if the application tile is clicked
        applicationRoles:
          type: array
          items:
            type: string
            description: Application role of the 3rd party application
        applicationCategories:
          type: array
          items:
            type: string
            description: Application category code
        logo:
          type: string
          description: Base64 encoded picture
        smallLogo:
          type: string
          description: Base64 encoded picture
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the new application. Can be ACTIVE or INACTIVE.
    applicationCategoryCreateRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the application category
        description:
          type: string
          description: A short description of the application category
        visible:
          type: boolean
          description: If the application category should be shown on the self-service pages of users
          default: true
      required:
        - name
    applicationCategoryEditRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the application category
        description:
          type: string
          description: A short description of the application category
        visible:
          type: boolean
          description: If the application category should be shown on the self-service pages of users
    resourceCreateRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the resource
        description:
          type: string
          description: A short description of the resource
        identifier:
          type: string
          description: An internal customer identifier
        privileges:
          type: array
          items:
            type: string
            description: Privileges for a resource (fine-grained access)
        resourceTypes:
          type: array
          items:
            type: string
            description: Resource types
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the new resource. Can be ACTIVE or INACTIVE.
      required:
        - name
    resourceEditRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the resource
        description:
          type: string
          description: A short description of the resource
        identifier:
          type: string
          description: An internal customer identifier
        privileges:
          type: array
          items:
            type: string
            description: Privileges for a resource (fine-grained access)
        resourceTypes:
          type: array
          items:
            type: string
            description: Resource types
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the resource. Can be ACTIVE or INACTIVE.
    resourceTypeCreateRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the resource type
        description:
          type: string
          description: A short description of the resource type
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the new resource type. Can be ACTIVE or INACTIVE.
      required:
        - name   
    resourceTypeEditRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the resource type
        description:
          type: string
          description: A short description of the resource type
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the resource type. Can be ACTIVE or INACTIVE.     
    accessRoleCreateRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the access role
        description:
          type: string
          description: A short description of the access role
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the new access role. Can be ACTIVE or INACTIVE.
        customAttributes:
          type: array
          description: Array of code/value combinations
          items:
            type: object
            properties:
              code:
                type: string
                description: A unique code to identify an access role attribute
              value:
                type: string
                description: The value of the access role attribute
            required:
              - code
              - value
        applications:
          type: array
          description: Array of 3rd party application and potentially application roles
          items:
            type: object
            properties:
              applicationCode:
                type: string
                description: The application code of an already defined 3rd party application
              applicationRoles:
                type: array
                items:
                  type: string
                  description: Application role of the 3rd party application
            required:
              - applicationCode
        resources:
          type: array
          description: Array of resources and potentially privileges
          items:
            type: object
            properties:
              resourceCode:
                type: string
                description: The resource code of an already defined resource
              privileges:
                type: array
                items:
                  type: string
                  description: Privilege(s) for the resource
            required:
              - resourceCode
      required:
        - name
        - status
    accessRoleEditRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the access role
        description:
          type: string
          description: A short description of the access role
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
          description: The status of the access role. Can be ACTIVE or INACTIVE.
        customAttributes:
          type: array
          description: Array of code/value combinations
          items:
            type: object
            properties:
              code:
                type: string
                description: A unique code to identify an access role attribute
              value:
                type: string
                description: The value of the access role attribute
            required:
              - code
              - value
        applications:
          type: array
          description: Array of 3rd party application and potentially application roles
          items:
            type: object
            properties:
              applicationCode:
                type: string
                description: The application code of an already defined 3rd party application
              applicationRoles:
                type: array
                items:
                  type: string
                  description: Application role of the 3rd party application
            required:
              - applicationCode
        resources:
          type: array
          description: Array of resources and potentially privileges
          items:
            type: object
            properties:
              resourceCode:
                type: string
                description: The resource code of an already defined resource
              privileges:
                type: array
                items:
                  type: string
                  description: Privilege(s) for the resource
            required:
              - resourceCode
  parameters:
    limitParam:
      in: query
      name: limit
      description: |-
        The number of items to return per page. Zero (0) means the highest allowed limit (currently not restricted)
      required: false
      schema:
        type: integer
        default: 10
    pageParam:
      in: query
      name: page
      description: |-
        This is the page number for a paginated response (where typically the number of pages is the total amount of items divided by the **limit** parameter)
      required: false
      schema:
        type: integer
        default: 1
