openapi: 3.0.0
info:
  title: Security Center Web SDK
  description: |-
    Genetec is used as physical access control system for buildings, printers, lockers, key cabinets etc, allowing integration of various security functions, including video management, ANPR, intrusion and alert system etc.
    The Security Center Web SDK is an API that enables interaction with Genetec Security Center.
  termsOfService: https://developer.fil.com/legal
  version: 1.0.0
servers:
  - url: https://sandbox.api.fil.com/partner/genetec/security-center/v1

security:
  - OAuth2: []

paths:
  /health:
    get:
      summary: Basic connectivity test
      description: Basic connectivity test to verify API availability
      operationId: connectivityTest
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
      responses:
        "200":
          description: Successful connectivity - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /entity:
    get:
      summary: Get entity information
      description: Query entity information with various filters
      operationId: getEntity
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: q
          in: query
          required: false
          schema:
            type: string
          description: Query string for entity operations (e.g., entity={GUID},Credentials to get cardholder credentials)
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              example: |
                <rsp status="ok">
                  <entity>
                    <ActiveDirectoryOverride>False</ActiveDirectoryOverride>
                    <ActivationDate>2024-01-01T08:10:00</ActivationDate>
                    <ActivationMode>
                      <DateTime>2027-01-01T08:10:00</DateTime>
                    </ActivationMode>
                    <ActiveDirectoryDomainName></ActiveDirectoryDomainName>
                    <CanEscort>False</CanEscort>
                    <AntipassbackExemption>False</AntipassbackExemption>
                    <Credentials>
                      <item>
                        <Guid>f7ffea7ee7b4475391c9a564f00c7da9</Guid>
                      </item>
                    </Credentials>
                    <EmailAddress>First11@email.com</EmailAddress>
                    <MobilePhoneNumber></MobilePhoneNumber>
                    <LastName>Last11</LastName>
                    <Status>
                      <ActivationDate>2024-01-01T08:10:00</ActivationDate>
                      <ActivationType>SpecificDate</ActivationType>
                      <ExpirationDate>2027-01-01T08:10:00</ExpirationDate>
                      <ExpirationType>SpecificDate</ExpirationType>
                      <ExpirationDuration></ExpirationDuration>
                      <State>Active</State>
                    </Status>
                    <UseExtendedGrantTime>False</UseExtendedGrantTime>
                    <Application>00000000000000000000000000000000</Application>
                    <Synchronised>False</Synchronised>
                  </entity>
                </rsp>
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
    post:
      summary: Create or update entity
      description: Create new entity (Cardholder, Credential) or update existing entity
      operationId: createOrUpdateEntity
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: |
            Query string for entity operations. Examples:
            - entity=NewEntity(Cardholder) - Create new cardholder
            - entity={user_Guid} - Update existing cardholder/delimit user
            - entity={user_Guid},Status.Deactivate(),Guid - Lock user
            - entity={user_Guid},Status.Activate(),Guid - Unlock user
            - entity={user_Guid},Status.Activate({validFrom},{validTo}),Guid - Unlock with validity
            - entity=NewEntity(Credential) - Create badge and assign to user
            - entity={card_Guid} - Update badge
            - entity={card_Guid},Status.Activate(),Guid - Activate badge
            - entity={card_Guid},Status.Activate({validFrom},{validTo}),Guid - Activate badge with validity
            - entity={card_Guid},Status.Deactivate(),Guid - Deactivate badge
            - entity={user_Guid},Credentials-{card_Guid} - Un-assign badge from user
            - entity=NewEntity(Credential),Cardholder={user_Guid},Format=KeypadCredentialFormat({card_Pin}) - Create PIN
            - entity={user_Guid},Credentials@{card_Pin_Guid} - Assign PIN
            - entity={card_Pin_Guid} - Update PIN
            - Entity={GUID},InsertIntoPartition({partitionGuid}) - Assign partition
            - Entity={GUID},RemoveFromPartition({partitionGuid}) - Remove partition
            - entity={cardHolderGroup},AddCardholderIntoGroup({user_Guid}) - Add cardholder to group
            - entity={cardHolderGroup},RemoveCardholderFromGroup({user_Guid}) - Remove cardholder from group
            - entity={accessRule_Guid},Members@{user_Guid} - Add access rule to cardholder
            - entity={accessRule_Guid},Members-{user_Guid} - Remove access rule from cardholder
      responses:
        "200":
          description: Entity created or updated successfully
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              example: |
                <rsp status="ok">
                </rsp>
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /entity/{entityId}:
    get:
      summary: Get specific entity by ID
      description: Retrieve entity details by GUID (credential, cardholder, etc.)
      operationId: getEntityById
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: entityId
          in: path
          required: true
          schema:
            type: string
          description: Entity GUID
      responses:
        "200":
          description: Entity details
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
    delete:
      summary: Delete entity
      description: Delete cardholder, badge, or PIN by GUID
      operationId: deleteEntity
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: entityId
          in: path
          required: true
          schema:
            type: string
          description: Entity GUID (user_Guid, card_Guid, card_Pin_Guid)
      responses:
        "200":
          description: Entity deleted successfully
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              examples:
                Entity:
                  summary: Entity response
                  value: |
                    <rsp status="ok">
                    </rsp>
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /customField/{entityId}/{name}/{value}:
    put:
      summary: Set the value of a custom field
      description: |-
        Set a custom field value.
        Note: It's not possible to assign a value to an image custom field.
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: entityId
          in: path
          required: true
          schema:
            type: string
          description: Entity GUID to which the custom field belongs
        - name: name
          in: path
          required: true
          schema:
            type: string
          description: Name of the custom field
        - name: value
          in: path
          required: true
          schema:
            type: string
          description: Value to assign to the custom field
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              examples:
                customField:
                  summary: Custom field response
                  value: |
                    <rsp status="ok">
                    </rsp>
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /events/RaiseCustomEvent/{customEventId}/{entityId}/{message}:
    post:
      summary: Raise a custom event with message
      description: Raise a custom event with its Id, source, and an optional message.
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: customEventId
          in: path
          required: true
          schema:
            type: string
          description: Custom event GUID
        - name: entityId
          in: path
          required: true
          schema:
            type: string
          description: Source entity GUID
        - name: message
          in: path
          required: true
          schema:
            type: string
          description: Message to include with the event
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              example: |
                <rsp status="ok">
                </rsp>
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /report/CredentialActivity:
    get:
      summary: Get credential activity report
      description: Get credential activity report in the response.
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: q
          in: query
          description: "**maximumResultCount:** Maximum number of results to return"
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              example: |
                <rsp status="ok">
                    <QueryResult>
                        <HeaderRow>
                            <Cell>
                                <HeaderColumnName>Timestamp</HeaderColumnName>
                                <Type>System.DateTime</Type>
                            </Cell>
                            <Cell>
                                <HeaderColumnName>EventType</HeaderColumnName>
                                <Type>System.Int32</Type>
                            </Cell>
                        </HeaderRow>
                    </QueryResult>
                </rsp>
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /report/CardholderActivity:
    get:
      summary: Get cardholder activity report
      description: Get cardholder activity report in the response.
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: q
          in: query
          description: "**maximumResultCount:** Maximum number of results to return"
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              example: |
                <rsp status="ok">
                    <QueryResult>
                        <HeaderRow>
                            <Cell>
                                <HeaderColumnName>Timestamp</HeaderColumnName>
                                <Type>System.DateTime</Type>
                            </Cell>
                            <Cell>
                                <HeaderColumnName>EventType</HeaderColumnName>
                                <Type>System.Int32</Type>
                            </Cell>
                        </HeaderRow>
                    </QueryResult>
                </rsp>
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /report/EntityConfiguration:
    get:
      summary: Get threat levels
      description: Get all threat levels.
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: q
          in: query
          description: |-
            - **page:** (optional) The page number to retrieve in the paginated results.
            - **pageSize:** (optional) The number of results to include per page.
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
              example: |
                <rsp status="ok">
                  <QueryResult>
                      <HeaderRow>
                          <Cell>
                              <HeaderColumnName>Guid</HeaderColumnName>
                              <Type>System.Guid</Type>
                          </Cell>
                      </HeaderRow>
                      <Row>
                          <Cell name="Guid">6a3e6247f8684223bc5309a33bea2672</Cell>
                      </Row>
                      <Row>
                          <Cell name="Guid">abd1ca9d8dc244478f47ef9eb7452682</Cell>
                      </Row>
                    </QueryResult>
                </rsp>
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /report/DoorActivity:
    get:
      summary: Get door activity report
      description: Retrieves door activity and allows limiting the number of results in the response.
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: q
          in: query
          description: |-
            - **doors:** (Required) One or more door GUIDs or logical IDs separated by '@'
            - **maximumResultCount:** Maximum number of results to return
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.

  /report/AuditTrail:
    get:
      summary: Get Audit Trail Report
      description: Retrieves audit trail records within a specified time range
      operationId: getAuditTrail
      parameters:
        - name: requestId
          in: header
          schema:
            type: string
            pattern: '[a-zA-Z0-9\-_]+'
            maxLength: 36
          description: >-
            requestId is supplied by the caller and should be a unique
            identifier for this call only. If not provided FIL will generate one and display it in the response header
        - name: q
          in: query
          required: true
          description: Query string containing time range, result count, and sort order
          schema:
            type: string
          example: "timerange.settimerange(2026-01-01T00:00:00Z,2026-01-19T23:59:59Z),MaximumResultCount=100,SortOrder=Descending"
        - name: From
          in: query
          required: true
          description: Start date/time in ISO 8601 format
          schema:
            type: string
            format: date-time
          example: "2026-01-01T00:00:00Z"
        - name: To
          in: query
          required: true
          description: End date/time in ISO 8601 format
          schema:
            type: string
            format: date-time
          example: "2026-01-19T23:59:59Z"
        - name: Count
          in: query
          required: false
          description: Maximum number of results to return
          schema:
            type: integer
            minimum: 1
            default: 100
          example: 100
        - name: SortOrder
          in: query
          required: false
          description: Sort order for results
          schema:
            type: string
            enum:
              - Ascending
              - Descending
            default: Descending
      responses:
        "200":
          description: Successful response
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Success"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "403":
          description: Forbidden - No response body
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
        "500":
          description: There was an internal issue calling the service. This is likely to be a permanent error. Please contact FIL for support.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            requestId:
              schema:
                type: string
                maxLength: 36
                pattern: '[a-zA-Z0-9\-_]+'
              description: requestId is supplied by the caller and should be a unique identifier for this call only.
components:
  schemas:
    Success:
      type: object
      properties:
        rsp:
          type: object
          properties:
            status:
              type: string
              example: "ok"
      xml:
        name: rsp

    Error:
      type: object
      required:
        - moreInfo
      properties:
        moreInfo:
          $ref: "#/components/schemas/MoreInfo"
    MoreInfo:
      type: object
      required:
        - code
        - userMessage
      properties:
        code:
          type: string
          description: An FIL error code.
          maxLength: 50
          example: "1005"
        developerMessage:
          type: array
          description: Technical message for developers.
          items:
            type: string
            maxLength: 200
            example: Failed to connect to the database.
        userMessage:
          type: string
          description: User-facing message, as close to plain English as possible. Can be used to populate a user interface.
          maxLength: 100
          example: We are currently experiencing technical difficulties. Please try again later.
        moreInfo:
          type: string
          description: URL to documentation providing more information about this error.
          example: https://developer.fil.com/errors/1005
        errorMessages:
          type: array
          description: Additional validation error messages.
          items:
            $ref: "#/components/schemas/ErrorMessage"
    ErrorMessage:
      type: object
      required:
        - code
        - message
      properties:
        argument:
          $ref: "#/components/schemas/Argument"
        code:
          type: string
          description: FIL error code.
          maxLength: 50
          example: "3010"
        userMessage:
          type: string
          description: User-facing message, as close to plain English as possible. Can be used to populate a user interface.
          maxLength: 100
          example: The account number you entered is not valid.
    Argument:
      type: object
      required:
        - key
      properties:
        key:
          type: string
          description: The key of the argument.
          maxLength: 50
          example: accountNumber
        value:
          type: string
          description: The value of the argument.
          maxLength: 200
          example: "12345678"
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://sandbox.api.fil.com/identity/v1/tokens?grant_type=client_credentials
          scopes:
            read: Grants read access
