openapi: 3.0.0
info:
  title: Xporter Identity
  description: Xporter Identity API
  version: 1.0.0
servers:
- url: https://virtserver.swaggerhub.com/CommunityBrands/XporterIdentity/1.0.0
  description: SwaggerHub API Auto Mocking
- url: https://xporter.groupcall.com/
  description: ""
security:
- IdaasSTSToken: []
paths:
  /Identity/ResetPassword:
    get:
      tags: []
      summary: ResetPassword
      description: "Performs a password reset on an existing user. \r\n\r\nRequires authorisation with a school secret. The specified user must exist within the authenticated establishment"
      operationId: ResestPassword
      parameters:
      - name: username
        in: query
        description: Username of the existing user
        required: true
        schema:
          type: string
      - name: password
        in: query
        description: Password to use (optional - one will be generated if omitted)
        required: false
        schema:
          type: string
      - name: ChangeAtNextLogin
        in: query
        description: Force password reset on next login
        required: false
        schema:
          type: boolean
      - name: UnlockLogin
        in: query
        description: Unlock login if currently locked
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                  Password:
                    type: string
                x-examples:
                  Example 1:
                    Success: true
                    Password: noodle#purple
        default:
          description: Default
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                  Password:
                    type: string
                x-examples:
                  Example 1:
                    Success: true
                    Password: 12345.abcde
  /Identity/GetUsers:
    get:
      tags: []
      summary: GetUsers
      description: Retreive a list of users for the authenticated establishment
      operationId: GetUsers
      parameters:
      - name: presenceType
        in: query
        description: Type of presence to return
        required: false
        schema:
          type: string
          enum:
          - Learners
          - Teach
          - NonTeach
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                x-examples:
                  Example 1:
                  - Id: PL-13309
                    DisplayName: Lukas Powell (secnext)
                    FirstName: Lukas
                    Surname: Powell
                    UserName: 20-powell-l@teamtest.groupcall.com
                    PresenceType: Learners
                    WorkEmail: 20-powell-l@teamtest.groupcall.com
                  - Id: PC-11206
                    DisplayName: Armitage Simon
                    PresenceType: Contacts
                  - Id: PC-11207
                    DisplayName: Armitage Julia
                    PresenceType: Contacts
                items:
                  type: object
                  properties:
                    Id:
                      type: string
                    DisplayName:
                      type: string
                    FirstName:
                      type: string
                    Surname:
                      type: string
                    LastLoggedIn:
                      type: string
                      format: datetime
                    UserName:
                      type: string
                    Roles:
                      type: string
                      format: csv
                    PresenceType:
                      type: string
                    WorkEmail:
                      type: string
                    Email:
                      type: string
  /identity/AddQRCode:
    get:
      tags: []
      summary: AddQRCode
      description: Add a QRCode for a user - allows user to login with a QR code in addition to username and password
      operationId: AddQRCode
      parameters:
      - name: username
        in: query
        required: true
        schema:
          type: string
      - name: expires
        in: query
        description: QR expiry date
        required: true
        schema:
          type: string
          example: 2025-07-20
      responses:
        "200":
          description: OK
          content:
            image/png: {}
  /Identity/GenerateQRCode:
    get:
      tags: []
      summary: GenerateQRCode
      description: Generates QR code images with custom payload. Authenticated with a Management secret
      operationId: GenerateQRCode
      parameters:
      - name: text
        in: query
        description: payload
        required: true
        schema:
          type: string
      - name: centerImagePercent
        in: query
        description: Center image percentage size
        required: false
        schema:
          type: number
      - name: centerImageUrl
        in: query
        description: publicly accessible URL for center/background image
        required: false
        schema:
          type: string
      - name: QRType
        in: query
        description: "QR code type - QRCode for standard, ArtCode for \"artistic\" codes"
        required: false
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            image/png: {}
  /Identity/SSOApplications:
    get:
      tags: []
      summary: SSOApplications
      operationId: SSOApplications
      parameters:
      - name: estab
        in: query
        required: false
        schema:
          type: string
      - name: email
        in: query
        required: false
        schema:
          type: string
      - name: includesuggested
        in: query
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: OK
  /identity/CreateLogin:
    post:
      tags: []
      summary: CreateLogin
      description: "Create a login for an existing presence ands sends a registration email to the workemail address of the presence. \r\n\r\nAuthenticated with a school secret. Presence must be a member of the authenticated establishment"
      operationId: CreateLogin
      parameters:
      - name: OrgId
        in: query
        description: Estab local id
        required: true
        schema:
          type: string
      - name: PresenceId
        in: query
        description: Presence local id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                OrgId:
                  type: string
                PresenceId:
                  type: string
              x-examples:
                Example 1:
                  OrgId: estab-123456
                  PresenceId: pwt-1234
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                x-examples:
                  Example 1:
                  - id: PWT-15085
                    displayName: TestSixThree TestSixThreeL (secnext)
                    firstName: TestSixThree
                    surname: TestSixThreeL
                    userName: 15085.TestSixThreeL.3287731@teamtest.groupcall.com|15085.TestSixThreeL.3287731@teamtest.groupcall.com
                    roles: SSO User
                    presenceType: Non-Teaching
                    workEmail: 15085.TestSixThreeL.3287731@teamtest.groupcall.com
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    displayName:
                      type: string
                    firstName:
                      type: string
                    surname:
                      type: string
                    lastLoggedIn:
                      type: string
                    userName:
                      type: string
                    roles:
                      type: string
                    presenceType:
                      type: string
                    workEmail:
                      type: string
                    email:
                      type: string
  /identity/CreateUser:
    post:
      tags: []
      summary: CreateUser
      description: Create a manual presence with login and sends registration email to user
      operationId: CreateUser
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                orgId:
                  type: string
                partnerId:
                  type: string
                manualUser:
                  type: array
                  items:
                    type: object
                    properties:
                      title:
                        type: string
                      firstName:
                        type: string
                      lastName:
                        type: string
                      displayName:
                        type: string
                      email:
                        type: string
                      mobile:
                        type: string
                authProcessFlow:
                  type: boolean
              x-examples:
                Example 1:
                  orgId: estab-12345
                  partnerId: dev.groupcall.com
                  manualUser:
                  - title: Mr
                    firstName: Test
                    lastName: User
                    displayName: Test User
                    email: test.user@test.test
                    mobile: "071234567890"
                  authProcessFlow: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  manualUser:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        firstName:
                          type: string
                        lastName:
                          type: string
                        displayName:
                          type: string
                        email:
                          type: string
                        mobile:
                          type: string
                x-examples:
                  Example 1:
                    manualUser:
                    - title: Mr
                      firstName: Test
                      lastName: User
                      displayName: Test User
                      email: test.user@test.test
                      mobile: "071234567890"
components:
  securitySchemes:
    IdaasSTSToken:
      type: apiKey
      description: |-
        See [/STS/GetToken](#tag/Authentication/operation/Retrieve%20school%20token) for details on how to generate a token

        Prefix the value with \"Idaas\" to indicate the custom authorization type
      name: Authorization
      in: header
