openapi: 3.1.0
servers:
  - url: 'https://openapi.sine.co/v1/api'
    description: Sine Public API
info:
  title: Sine API Documentation
  description: |
    This is the specification for the Sine by Honeywell Public API.
    The resources listed here can be used to interact with Sine.

    ## Rate Limiting

    This API enforces strict rate limits to ensure the safety and stability of the system for all users.
    <!-- TODO: Document 429 shape. -->
  version: v1.4
  x-logo:
    url: 'https://docs-static.sine.co/api-docs/logo.png'
x-readme:
  explorer-enabled: true
  samples-languages:
    - curl
    - node
    - javascript
    - python
tags:
  - name: Authentication
    description: Manage Authentication
  - name: Host Groups
    description: Create and manage host groups
  - name: Invitations
    description: Send and manage invitations
  - name: Sites
    description: Retrieve sites and site details
  - name: Workflow Responses
    description: Retrieve workflow responses
  - name: Companies
    description: Retrieve companies
  - name: Passes
    description: Retrieve passes
paths:
  /oauth2/token:
    post:
      summary: Authenticate
      description: Generate Access Token
      tags:
        - Authentication
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Authentication body
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  example: client_credentials
                  description: OAuth2 grant type
                client_id:
                  type: string
                  example: ffTUyNO8fkHR0a5on8QRBL3GVl33cs9U
                  description: client id
                client_secret:
                  type: string
                  example: zbhLZofqv7OxhTrimY8ph8RDFDJyHxat
                  description: client secret
      security: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  token_type:
                    type: string
                    example: Bearer
                    description: token type
                  access_token:
                    type: string
                    example: SHJcJf76hWBjoW3FMywUZ2xKMQ7rYQ6e
                    description: access token
                  expires_in:
                    type: number
                    example: 120
                    description: token time-to-live in seconds
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: Invalid client authentication
                    description: Custom Error Message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  /sites:
    get:
      summary: Returns a list of Sites for a Team
      description: 'Fetches Sites with summary information, sorted by Site name'
      operationId: get-sine-v1-sites
      tags:
        - Sites
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: limit
          description: Maximum number of records to be returned
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
          example: 10
        - name: next
          description: The 'next page token' required to fetch the next page of Sites in a subsequent request
          in: query
          required: false
          schema:
            type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjIwMjEwOTEyNCJ9.eyJuZXh0IjoyLCJzZXJ2aWNlIjoiZ2V0U2l0ZXMiLCJpYXQiOjE2MzI3MjE2OTAsImV4cCI6MTYzMjgwODA5MH0.puXUEpDhCTbAEC8b9LOi90qF68I-HXerLBxvJfymJx0
      responses:
        '200':
          description: OK - Sites returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                          description: Unique identifier for a Site
                        name:
                          type: string
                          example: Sine
                          description: name of the Site
                        address:
                          type: string
                          example: '100 Pirie St, Adelaide SA 5000'
                          description: the address (physical location) of the Site
                        latitude:
                          type: number
                          format: float
                          example: -34.925
                          description: location coordinates of the Site
                        longitude:
                          type: number
                          format: float
                          example: 138.604
                          description: location coordinates of the Site
                      example:
                        id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        name: Sine
                        address: '100 Pirie St, Adelaide SA 5000'
                        latitude: -34.925
                        longitude: 138.604
                  next:
                    type: string
                    description: Optional 'next page token' which can be used to fetch the next page of Sites in a subsequent request
                    example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjIwMjEwOTEyNCJ9.eyJuZXh0IjoyLCJzZXJ2aWNlIjoiZ2V0U2l0ZXMiLCJpYXQiOjE2MzI3MjE2OTAsImV4cCI6MTYzMjgwODA5MH0.puXUEpDhCTbAEC8b9LOi90qF68I-HXerLBxvJfymJx0
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/sites/{siteId}':
    get:
      summary: Returns Site details
      description: Fetches the details of the Site specified by the provided siteId parameter
      operationId: get-sine-v1-sites-siteid
      tags:
        - Sites
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: siteId
          description: Unique identifier for a Site
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 85543775-dad8-40de-8be4-7ac29dd7d466
      responses:
        '200':
          description: OK - Site details returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  visitorTypes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                          description: Unique identifier for a Visitor Type
                        name:
                          type: string
                          example: Visitor
                        hostRequired:
                          type: boolean
                          example: true
                          description: 'If true, specification of a valid host is required upon check-in for this visitor type'
                      example:
                        id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        name: Visitor
                        hostRequired: true
                  id:
                    type: string
                    format: uuid
                    example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    description: Unique identifier for a Site
                  name:
                    type: string
                    example: Sine
                    description: name of the Site
                  address:
                    type: string
                    example: '100 Pirie St, Adelaide SA 5000'
                    description: the address (physical location) of the Site
                  latitude:
                    type: number
                    format: float
                    example: -34.925
                    description: location coordinates of the Site
                  longitude:
                    type: number
                    format: float
                    example: 138.604
                    description: location coordinates of the Site
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/sites/{siteId}/hosts':
    get:
      summary: Returns a list of Hosts registered for a Site
      description: Fetches high level information about hosts of given site sorted by hosts' name
      operationId: get-sine-v1-sites-siteid-hosts
      tags:
        - Sites
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: siteId
          description: Unique identifier for a Site
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 85543775-dad8-40de-8be4-7ac29dd7d466
        - name: limit
          description: Maximum number of records to be returned
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
          example: 10
        - name: next
          description: The 'next page token' required to fetch the next page of Hosts in a subsequent request
          in: query
          required: false
          schema:
            type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjIwMjEwOTEyNCJ9.eyJuZXh0IjoiaG9zdCAxM2dyb3VwIDI2OWRhZWRiMC02NzQ5LTQ0NGEtOWMzYS05ZjM2MDE0MGZkZjciLCJzZXJ2aWNlIjoiZ2V0U2l0ZUhvc3RzIiwiaWF0IjoxNjMyNzIyMTU0LCJleHAiOjE2MzI4MDg1NTR9.DR7xq5szOqxw7vu6Boa0--jA5Ti6-hDg-jtmHiaFzZA
      responses:
        '200':
          description: OK - Hosts returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                          description: Unique identifier of the Host
                        firstName:
                          type: string
                          example: Example
                          description: Host first name
                        lastName:
                          type: string
                          example: Person
                          description: Host last name
                        hostGroupName:
                          type: string
                          example: Staff
                          description: Group name of the host (if available)
                        email:
                          type: string
                          example: e.person@example.com
                          description: Host email address
                      example:
                        id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        firstName: Example
                        lastName: Person
                        hostGroupName: Staff
                        email: e.person@example.com
                  next:
                    type: string
                    example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjIwMjEwOTEyNCJ9.eyJuZXh0IjoiaG9zdCAxM2dyb3VwIDI2OWRhZWRiMC02NzQ5LTQ0NGEtOWMzYS05ZjM2MDE0MGZkZjciLCJzZXJ2aWNlIjoiZ2V0U2l0ZUhvc3RzIiwiaWF0IjoxNjMyNzIyMTU0LCJleHAiOjE2MzI4MDg1NTR9.DR7xq5szOqxw7vu6Boa0--jA5Ti6-hDg-jtmHiaFzZA
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  /invitations:
    post:
      summary: Creates an Invitation
      description: Creates an Invitation for a guest to a specific Site
      operationId: post-sine-v1-invitations
      tags:
        - Invitations
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: suppressEmail
          description: 'Determines if a guest should get an email notification on Invitation creation (default:false)'
          in: query
          required: false
          schema:
            type: boolean
          example: true
      requestBody:
        description: Invitation request details
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - required:
                    - visitorTypeName
                    - firstName
                    - lastName
                    - startDate
                    - endDate
                    - siteId
                - required:
                    - visitorTypeId
                    - firstName
                    - lastName
                    - startDate
                    - endDate
                    - siteId
              properties:
                firstName:
                  type: string
                  description: Guest first name
                  example: James
                lastName:
                  type: string
                  description: Guest last name
                  example: Bond
                visitorTypeName:
                  type: string
                  example: Delivery
                  description: Visitor type name
                visitorTypeId:
                  type: string
                  format: uuid
                  example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  description: Unique identifier for the visitor type
                startDate:
                  type: string
                  description: Invitation start date and time
                  format: date-time
                  example: '2021-09-20T11:00:00.000Z'
                endDate:
                  type: string
                  description: Invitation end date and time
                  format: date-time
                  example: '2021-09-22T09:00:00.000Z'
                siteId:
                  type: string
                  format: uuid
                  example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  description: Unique identifier for a Site
                hostGroupName:
                  description: 'If it is not provided, the first host group will be selected in case the host belongs to multiple host group.'
                  type: string
                  example: Staff
                hostEmail:
                  type: string
                  format: email
                  example: alex@host.com
                  description: Should only be populated when the specified Site and Visitor Type combination requires Host
                email:
                  type: string
                  description: Email address of the guest
                  format: email
                  example: james.bond@sine.co
                mobile:
                  type: string
                  description: Contact mobile phone number of the guest
                  example: '+61405107480'
                companyName:
                  type: string
                  description: Guest company name
                  example: Sine
                subject:
                  type: string
                  description: A subject for invitation
                  example: Invitation Subject
                adminNotes:
                  type: string
                  description: An optional note for the Site or Team Admin
                  example: A message for admin
                  maxLength: 1000
                visitorNotes:
                  type: string
                  description: An optional note for the guest which will appear on the Invitation
                  example: A message to guest
                  maxLength: 4000
              example:
                firstName: James
                lastName: Bond
                visitorTypeName: Delivery
                visitorTypeId: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                startDate: '2021-09-20T11:00:00.000Z'
                endDate: '2021-09-22T09:00:00.000Z'
                siteId: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                email: james.bond@sine.co
                mobile: '+61405107480'
                companyName: Sine
                subject: Invitation Subject
                hostGroupName: Staff
                hostEmail: alex@host.com
                adminNotes: A message for admin
                visitorNotes: A message to guest
      responses:
        '201':
          description: Created - Invitation created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the Invitation
                    format: uuid
                    example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  firstName:
                    type: string
                    description: Guest first name
                    example: James
                  lastName:
                    type: string
                    description: Guest last name
                    example: Bond
                  visitorType:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier for the visitor type
                      name:
                        type: string
                        example: Delivery
                        description: Visitor type name
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Delivery
                  startDate:
                    type: string
                    description: Invitation start date and time
                    format: date-time
                    example: '2021-09-20T11:00:00.000Z'
                  endDate:
                    type: string
                    description: Invitation end date and time
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  site:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier for a Site
                      name:
                        type: string
                        example: Sine
                        description: name of the Site
                      address:
                        type: string
                        example: '100 Pirie St, Adelaide SA 5000'
                        description: the address (physical location) of the Site
                      latitude:
                        type: number
                        format: float
                        example: -34.925
                        description: location coordinates of the Site
                      longitude:
                        type: number
                        format: float
                        example: 138.604
                        description: location coordinates of the Site
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Sine
                      address: '100 Pirie St, Adelaide SA 5000'
                      latitude: -34.925
                      longitude: 138.604
                  email:
                    type: string
                    description: Email address of the guest
                    format: email
                    example: james.bond@sine.co
                  mobile:
                    type: string
                    description: Contact mobile phone number of the guest
                    example: '+61405107480'
                  subject:
                    type: string
                    description: A subject for the invitation
                    example: Invitation Subject
                  host:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier of the Host
                      firstName:
                        type: string
                        example: Example
                        description: Host first name
                      lastName:
                        type: string
                        example: Person
                        description: Host last name
                      hostGroupName:
                        type: string
                        example: Staff
                        description: Group name of the host (if available)
                      email:
                        type: string
                        example: e.person@example.com
                        description: Host email address
                    example:
                      id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      firstName: Example
                      lastName: Person
                      hostGroupName: Staff
                      email: e.person@example.com
                  adminNotes:
                    type: string
                    description: An optional note for the Site or Team Admin
                    example: A message for admin
                    maxLength: 1000
                  visitorNotes:
                    type: string
                    description: An optional note for the guest which will appear on the Invitation
                    example: A message to guest
                    maxLength: 4000
                  updated:
                    type: string
                    description: Invitation updated date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  fastTrackCode:
                    type: number
                    description: 'True if the site has fast track codes enabled, false otherwise'
                    example: '12332'
                  emailSent:
                    type: boolean
                    description: True if an email has been sent to the guest
                    example: true
                  emailReminderTime:
                    type: string
                    description: Invitation reminder sent date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  created:
                    type: string
                    description: Invitation created date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  cancelled:
                    type: string
                    description: Invitation cancelled date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  actioned:
                    type: boolean
                    description: Guest has been checked in
                    example: false
                  activePassCount:
                    type: number
                    example: 1
                    description: number of passes that are active for an invitation id
                  company:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier for the company
                      name:
                        type: string
                        description: Name of the company
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Sine
                example:
                  id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  firstName: James
                  lastName: Bond
                  visitorType:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Delivery
                  startDate: '2021-09-20T11:00:00.000Z'
                  endDate: '2021-09-22T09:00:00.000Z'
                  site:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Sine
                    address: '100 Pirie St, Adelaide SA 5000'
                    latitude: -34.925
                    longitude: 138.604
                  email: james.bond@sine.co
                  mobile: '+61405107480'
                  subject: Invitation Subject
                  host:
                    id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    firstName: Example
                    lastName: Person
                    hostGroupName: Staff
                    email: e.person@example.com
                  adminNotes: A message for admin
                  visitorNotes: A message to guest
                  updated: '2021-09-22T09:00:00.000Z'
                  fastTrackCode: '12332'
                  emailSent: true
                  emailReminderTime: '2021-09-22T09:00:00.000Z'
                  created: '2021-09-22T09:00:00.000Z'
                  cancelled: '2021-09-22T09:00:00.000Z'
                  actioned: false
                  activePassCount: 1
                  company:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Sine
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  /invitations/search/host:
    post:
      summary: Search Invitations by host email
      description: Search for existing invitations by host email. The results are paginated.
      operationId: post-sine-v1-invitations-searchbyhostemail
      tags:
        - Invitations
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: limit
          description: Limit the amount of items returned
          in: query
          required: false
          schema:
            type: number
            default: 10
            example: 20
        - name: offset
          description: offset is optional clause to skip then take some number of values from the query
          in: query
          required: false
          schema:
            type: number
            default: 0
          example: 10
        - name: sort
          description: sort the fetched data in either ascending or descending according
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
          example: DESC
        - name: order
          description: column to sort the query by
          in: query
          required: false
          schema:
            type: string
            enum:
              - startDate
              - endDate
              - created
              - updated
            default: startDate
          example: created
      requestBody:
        description: Host details to search by
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: Host email to search by
                  example: host-email@sine.co
      responses:
        '200':
          description: Active invitations that matched host email
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: response meta
                    properties:
                      totalResults:
                        type: number
                        description: Total of invitations matching query
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the Invitation
                          format: uuid
                          example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        firstName:
                          type: string
                          description: Guest first name
                          example: James
                        lastName:
                          type: string
                          description: Guest last name
                          example: Bond
                        visitorType:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                              description: Unique identifier for the visitor type
                            name:
                              type: string
                              example: Delivery
                              description: Visitor type name
                          example:
                            id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                            name: Delivery
                        startDate:
                          type: string
                          description: Invitation start date and time
                          format: date-time
                          example: '2021-09-20T11:00:00.000Z'
                        endDate:
                          type: string
                          description: Invitation end date and time
                          format: date-time
                          example: '2021-09-22T09:00:00.000Z'
                        site:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                              description: Unique identifier for a Site
                            name:
                              type: string
                              example: Sine
                              description: name of the Site
                            address:
                              type: string
                              example: '100 Pirie St, Adelaide SA 5000'
                              description: the address (physical location) of the Site
                            latitude:
                              type: number
                              format: float
                              example: -34.925
                              description: location coordinates of the Site
                            longitude:
                              type: number
                              format: float
                              example: 138.604
                              description: location coordinates of the Site
                          example:
                            id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                            name: Sine
                            address: '100 Pirie St, Adelaide SA 5000'
                            latitude: -34.925
                            longitude: 138.604
                        email:
                          type: string
                          description: Email address of the guest
                          format: email
                          example: james.bond@sine.co
                        mobile:
                          type: string
                          description: Contact mobile phone number of the guest
                          example: '+61405107480'
                        subject:
                          type: string
                          description: A subject for the invitation
                          example: Invitation Subject
                        host:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              example: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                              description: Unique identifier of the Host
                            firstName:
                              type: string
                              example: Example
                              description: Host first name
                            lastName:
                              type: string
                              example: Person
                              description: Host last name
                            hostGroupName:
                              type: string
                              example: Staff
                              description: Group name of the host (if available)
                            email:
                              type: string
                              example: e.person@example.com
                              description: Host email address
                          example:
                            id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                            firstName: Example
                            lastName: Person
                            hostGroupName: Staff
                            email: e.person@example.com
                        adminNotes:
                          type: string
                          description: An optional note for the Site or Team Admin
                          example: A message for admin
                          maxLength: 1000
                        visitorNotes:
                          type: string
                          description: An optional note for the guest which will appear on the Invitation
                          example: A message to guest
                          maxLength: 4000
                        updated:
                          type: string
                          description: Invitation updated date
                          format: date-time
                          example: '2021-09-22T09:00:00.000Z'
                        fastTrackCode:
                          type: number
                          description: 'True if the site has fast track codes enabled, false otherwise'
                          example: '12332'
                        emailSent:
                          type: boolean
                          description: True if an email has been sent to the guest
                          example: true
                        emailReminderTime:
                          type: string
                          description: Invitation reminder sent date
                          format: date-time
                          example: '2021-09-22T09:00:00.000Z'
                        created:
                          type: string
                          description: Invitation created date
                          format: date-time
                          example: '2021-09-22T09:00:00.000Z'
                        cancelled:
                          type: string
                          description: Invitation cancelled date
                          format: date-time
                          example: '2021-09-22T09:00:00.000Z'
                        actioned:
                          type: boolean
                          description: Guest has been checked in
                          example: false
                        activePassCount:
                          type: number
                          example: 1
                          description: number of passes that are active for an invitation id
                        company:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Unique identifier for the company
                            name:
                              type: string
                              description: Name of the company
                          example:
                            id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                            name: Sine
                      example:
                        id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        firstName: James
                        lastName: Bond
                        visitorType:
                          id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                          name: Delivery
                        startDate: '2021-09-20T11:00:00.000Z'
                        endDate: '2021-09-22T09:00:00.000Z'
                        site:
                          id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                          name: Sine
                          address: '100 Pirie St, Adelaide SA 5000'
                          latitude: -34.925
                          longitude: 138.604
                        email: james.bond@sine.co
                        mobile: '+61405107480'
                        subject: Invitation Subject
                        host:
                          id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                          firstName: Example
                          lastName: Person
                          hostGroupName: Staff
                          email: e.person@example.com
                        adminNotes: A message for admin
                        visitorNotes: A message to guest
                        updated: '2021-09-22T09:00:00.000Z'
                        fastTrackCode: '12332'
                        emailSent: true
                        emailReminderTime: '2021-09-22T09:00:00.000Z'
                        created: '2021-09-22T09:00:00.000Z'
                        cancelled: '2021-09-22T09:00:00.000Z'
                        actioned: false
                        activePassCount: 1
                        company:
                          id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                          name: Sine
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/invitations/{invitationId}':
    put:
      summary: Updates an existing Invitation
      description: Updates Invitation details
      operationId: put-sine-v1-invitations-invitationid
      tags:
        - Invitations
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: invitationId
          description: Unique identifier for an Invitation
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for the Invitation
            format: uuid
            example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
        - name: suppressEmail
          description: 'Determines if a guest should get an email notification on Invitation creation (default:false)'
          in: query
          required: false
          schema:
            type: boolean
          example: true
      requestBody:
        description: Invitation request details
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - required:
                    - visitorTypeName
                    - firstName
                    - lastName
                    - startDate
                    - endDate
                    - siteId
                - required:
                    - visitorTypeId
                    - firstName
                    - lastName
                    - startDate
                    - endDate
                    - siteId
              properties:
                firstName:
                  type: string
                  description: Guest first name
                  example: James
                lastName:
                  type: string
                  description: Guest last name
                  example: Bond
                visitorTypeName:
                  type: string
                  example: Delivery
                  description: Visitor type name
                visitorTypeId:
                  type: string
                  format: uuid
                  example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  description: Unique identifier for the visitor type
                startDate:
                  type: string
                  description: Invitation start date and time
                  format: date-time
                  example: '2021-09-20T11:00:00.000Z'
                endDate:
                  type: string
                  description: Invitation end date and time
                  format: date-time
                  example: '2021-09-22T09:00:00.000Z'
                siteId:
                  type: string
                  format: uuid
                  example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  description: Unique identifier for a Site
                hostGroupName:
                  description: 'If it is not provided, the first host group will be selected in case the host belongs to multiple host group.'
                  type: string
                  example: Staff
                hostEmail:
                  type: string
                  format: email
                  example: alex@host.com
                  description: Should only be populated when the specified Site and Visitor Type combination requires Host
                email:
                  type: string
                  description: Email address of the guest
                  format: email
                  example: james.bond@sine.co
                mobile:
                  type: string
                  description: Contact mobile phone number of the guest
                  example: '+61405107480'
                companyName:
                  type: string
                  description: Guest company name
                  example: Sine
                subject:
                  type: string
                  description: A subject for invitation
                  example: Invitation Subject
                adminNotes:
                  type: string
                  description: An optional note for the Site or Team Admin
                  example: A message for admin
                  maxLength: 1000
                visitorNotes:
                  type: string
                  description: An optional note for the guest which will appear on the Invitation
                  example: A message to guest
                  maxLength: 4000
              example:
                firstName: James
                lastName: Bond
                visitorTypeName: Delivery
                visitorTypeId: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                startDate: '2021-09-20T11:00:00.000Z'
                endDate: '2021-09-22T09:00:00.000Z'
                siteId: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                email: james.bond@sine.co
                mobile: '+61405107480'
                companyName: Sine
                subject: Invitation Subject
                hostGroupName: Staff
                hostEmail: alex@host.com
                adminNotes: A message for admin
                visitorNotes: A message to guest
      responses:
        '200':
          description: OK - Invitation updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the Invitation
                    format: uuid
                    example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  firstName:
                    type: string
                    description: Guest first name
                    example: James
                  lastName:
                    type: string
                    description: Guest last name
                    example: Bond
                  visitorType:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier for the visitor type
                      name:
                        type: string
                        example: Delivery
                        description: Visitor type name
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Delivery
                  startDate:
                    type: string
                    description: Invitation start date and time
                    format: date-time
                    example: '2021-09-20T11:00:00.000Z'
                  endDate:
                    type: string
                    description: Invitation end date and time
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  site:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier for a Site
                      name:
                        type: string
                        example: Sine
                        description: name of the Site
                      address:
                        type: string
                        example: '100 Pirie St, Adelaide SA 5000'
                        description: the address (physical location) of the Site
                      latitude:
                        type: number
                        format: float
                        example: -34.925
                        description: location coordinates of the Site
                      longitude:
                        type: number
                        format: float
                        example: 138.604
                        description: location coordinates of the Site
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Sine
                      address: '100 Pirie St, Adelaide SA 5000'
                      latitude: -34.925
                      longitude: 138.604
                  email:
                    type: string
                    description: Email address of the guest
                    format: email
                    example: james.bond@sine.co
                  mobile:
                    type: string
                    description: Contact mobile phone number of the guest
                    example: '+61405107480'
                  subject:
                    type: string
                    description: A subject for the invitation
                    example: Invitation Subject
                  host:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier of the Host
                      firstName:
                        type: string
                        example: Example
                        description: Host first name
                      lastName:
                        type: string
                        example: Person
                        description: Host last name
                      hostGroupName:
                        type: string
                        example: Staff
                        description: Group name of the host (if available)
                      email:
                        type: string
                        example: e.person@example.com
                        description: Host email address
                    example:
                      id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      firstName: Example
                      lastName: Person
                      hostGroupName: Staff
                      email: e.person@example.com
                  adminNotes:
                    type: string
                    description: An optional note for the Site or Team Admin
                    example: A message for admin
                    maxLength: 1000
                  visitorNotes:
                    type: string
                    description: An optional note for the guest which will appear on the Invitation
                    example: A message to guest
                    maxLength: 4000
                  updated:
                    type: string
                    description: Invitation updated date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  fastTrackCode:
                    type: number
                    description: 'True if the site has fast track codes enabled, false otherwise'
                    example: '12332'
                  emailSent:
                    type: boolean
                    description: True if an email has been sent to the guest
                    example: true
                  emailReminderTime:
                    type: string
                    description: Invitation reminder sent date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  created:
                    type: string
                    description: Invitation created date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  cancelled:
                    type: string
                    description: Invitation cancelled date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  actioned:
                    type: boolean
                    description: Guest has been checked in
                    example: false
                  activePassCount:
                    type: number
                    example: 1
                    description: number of passes that are active for an invitation id
                  company:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier for the company
                      name:
                        type: string
                        description: Name of the company
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Sine
                example:
                  id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  firstName: James
                  lastName: Bond
                  visitorType:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Delivery
                  startDate: '2021-09-20T11:00:00.000Z'
                  endDate: '2021-09-22T09:00:00.000Z'
                  site:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Sine
                    address: '100 Pirie St, Adelaide SA 5000'
                    latitude: -34.925
                    longitude: 138.604
                  email: james.bond@sine.co
                  mobile: '+61405107480'
                  subject: Invitation Subject
                  host:
                    id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    firstName: Example
                    lastName: Person
                    hostGroupName: Staff
                    email: e.person@example.com
                  adminNotes: A message for admin
                  visitorNotes: A message to guest
                  updated: '2021-09-22T09:00:00.000Z'
                  fastTrackCode: '12332'
                  emailSent: true
                  emailReminderTime: '2021-09-22T09:00:00.000Z'
                  created: '2021-09-22T09:00:00.000Z'
                  cancelled: '2021-09-22T09:00:00.000Z'
                  actioned: false
                  activePassCount: 1
                  company:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Sine
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
    get:
      summary: Returns Invitation details
      description: Returns Invitation details by id
      operationId: get-sine-v1-invitations-invitationid
      tags:
        - Invitations
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: invitationId
          description: Unique identifier for an Invitation
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for the Invitation
            format: uuid
            example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
      responses:
        '200':
          description: OK - Invitation received successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the Invitation
                    format: uuid
                    example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  firstName:
                    type: string
                    description: Guest first name
                    example: James
                  lastName:
                    type: string
                    description: Guest last name
                    example: Bond
                  visitorType:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier for the visitor type
                      name:
                        type: string
                        example: Delivery
                        description: Visitor type name
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Delivery
                  startDate:
                    type: string
                    description: Invitation start date and time
                    format: date-time
                    example: '2021-09-20T11:00:00.000Z'
                  endDate:
                    type: string
                    description: Invitation end date and time
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  site:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier for a Site
                      name:
                        type: string
                        example: Sine
                        description: name of the Site
                      address:
                        type: string
                        example: '100 Pirie St, Adelaide SA 5000'
                        description: the address (physical location) of the Site
                      latitude:
                        type: number
                        format: float
                        example: -34.925
                        description: location coordinates of the Site
                      longitude:
                        type: number
                        format: float
                        example: 138.604
                        description: location coordinates of the Site
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Sine
                      address: '100 Pirie St, Adelaide SA 5000'
                      latitude: -34.925
                      longitude: 138.604
                  email:
                    type: string
                    description: Email address of the guest
                    format: email
                    example: james.bond@sine.co
                  mobile:
                    type: string
                    description: Contact mobile phone number of the guest
                    example: '+61405107480'
                  subject:
                    type: string
                    description: A subject for the invitation
                    example: Invitation Subject
                  host:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                        description: Unique identifier of the Host
                      firstName:
                        type: string
                        example: Example
                        description: Host first name
                      lastName:
                        type: string
                        example: Person
                        description: Host last name
                      hostGroupName:
                        type: string
                        example: Staff
                        description: Group name of the host (if available)
                      email:
                        type: string
                        example: e.person@example.com
                        description: Host email address
                    example:
                      id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      firstName: Example
                      lastName: Person
                      hostGroupName: Staff
                      email: e.person@example.com
                  adminNotes:
                    type: string
                    description: An optional note for the Site or Team Admin
                    example: A message for admin
                    maxLength: 1000
                  visitorNotes:
                    type: string
                    description: An optional note for the guest which will appear on the Invitation
                    example: A message to guest
                    maxLength: 4000
                  updated:
                    type: string
                    description: Invitation updated date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  fastTrackCode:
                    type: number
                    description: 'True if the site has fast track codes enabled, false otherwise'
                    example: '12332'
                  emailSent:
                    type: boolean
                    description: True if an email has been sent to the guest
                    example: true
                  emailReminderTime:
                    type: string
                    description: Invitation reminder sent date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  created:
                    type: string
                    description: Invitation created date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  cancelled:
                    type: string
                    description: Invitation cancelled date
                    format: date-time
                    example: '2021-09-22T09:00:00.000Z'
                  actioned:
                    type: boolean
                    description: Guest has been checked in
                    example: false
                  activePassCount:
                    type: number
                    example: 1
                    description: number of passes that are active for an invitation id
                  company:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier for the company
                      name:
                        type: string
                        description: Name of the company
                    example:
                      id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                      name: Sine
                example:
                  id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                  firstName: James
                  lastName: Bond
                  visitorType:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Delivery
                  startDate: '2021-09-20T11:00:00.000Z'
                  endDate: '2021-09-22T09:00:00.000Z'
                  site:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Sine
                    address: '100 Pirie St, Adelaide SA 5000'
                    latitude: -34.925
                    longitude: 138.604
                  email: james.bond@sine.co
                  mobile: '+61405107480'
                  subject: Invitation Subject
                  host:
                    id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    firstName: Example
                    lastName: Person
                    hostGroupName: Staff
                    email: e.person@example.com
                  adminNotes: A message for admin
                  visitorNotes: A message to guest
                  updated: '2021-09-22T09:00:00.000Z'
                  fastTrackCode: '12332'
                  emailSent: true
                  emailReminderTime: '2021-09-22T09:00:00.000Z'
                  created: '2021-09-22T09:00:00.000Z'
                  cancelled: '2021-09-22T09:00:00.000Z'
                  actioned: false
                  activePassCount: 1
                  company:
                    id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
                    name: Sine
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
    delete:
      summary: Deletes Invitation
      description: Deletes Invitation by id - the Invitation is cancelled permanently and the effect cannot be undone
      operationId: delete-sine-v1-invitations-invitationid
      tags:
        - Invitations
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: invitationId
          description: Unique identifier for an Invitation
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for the Invitation
            format: uuid
            example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
      responses:
        '200':
          description: OK - Invitation cancelled successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  /hosts/groups:
    get:
      summary: List host groups
      tags:
        - Host Groups
      description: Returns a list of all host groups.
      operationId: list-host-groups
      parameters:
        - name: limit
          description: Maximum number of records to be returned
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
          example: 10
        - name: next
          description: The 'next page token' required to fetch the next page of host groups in a subsequent request
          in: query
          required: false
          schema:
            type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjIwMjEwOTEyNCJ9.eyJuZXh0IjoyLCJzZXJ2aWNlIjoiZ2V0U2l0ZXMiLCJpYXQiOjE2MzI3MjE2OTAsImV4cCI6MTYzMjgwODA5MH0.puXUEpDhCTbAEC8b9LOi90qF68I-HXerLBxvJfymJx0
        - name: nameIncludes
          description: Search for host groups by name.
          in: query
          required: false
          schema:
            type: string
        - name: siteId
          description: Search for host groups by site id.
          in: query
          required: false
          schema:
            type: string
            format: uuid
            example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
      responses:
        '200':
          description: OK - Request completed successfully. The first page of host groups matching the query parameters (if specified) will be included in the response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  records:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: ecbc5ca7-d6e1-4133-90a0-e7070d993f18
                        name:
                          type: string
                          example: Host Group Name
                          description: The display name of the host group. It must be unique for each site and for team-scoped host groups on the same team.
                        private:
                          type: boolean
                        site:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                              example: Site Name
                  next:
                    type: string
                    example: dGhpcyB0b2tlbiBpcyBvcGFxdWUsIGRvbid0IHRyeSB0byBkZWNvZGUgaXQ=
                    description: An opaque token that can be used to retrieve the next page of results
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
    post:
      summary: Create a new host group
      tags:
        - Host Groups
      description: |
        Create a new host group.

        This method is used to create both team-scoped and site-scoped host groups.
      operationId: create-host-group
      requestBody:
        description: Initial data for the created host group
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  example: Host Group Name
                  description: The display name of the host group. It must be unique for each site and for team-scoped host groups on the same team.
                siteId:
                  type: string
                  format: uuid
                  description: The ID of the site for which this host group should be created. If unspecified this method will create a team-scoped host group.
                  example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
      responses:
        '201':
          description: OK - Host group has been created successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                properties:
                  id:
                    type: string
                    format: uuid
                    example: ecbc5ca7-d6e1-4133-90a0-e7070d993f18
                  name:
                    type: string
                    example: Host Group Name
                    description: The display name of the host group. It must be unique for each site and for team-scoped host groups on the same team.
                  private:
                    type: boolean
                  site:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                        example: Site Name
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                  message:
                    type: string
              examples:
                BadRequest:
                  value:
                    id: BAD_REQUEST
                    message: The request is invalid
                HostGroupNameTaken:
                  value:
                    id: HOST_GROUP_NAME_TAKEN
                    message: A host group with this name already exists for this site or team
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/hosts/groups/{id}':
    get:
      summary: Get a host group by ID
      tags:
        - Host Groups
      description: Returns host group details by ID.
      operationId: get-host-group
      parameters:
        - in: path
          name: id
          example: ecbc5ca7-d6e1-4133-90a0-e7070d993f18
          required: true
          description: the UUID of the resource
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK - Host group returned successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                properties:
                  id:
                    type: string
                    format: uuid
                    example: ecbc5ca7-d6e1-4133-90a0-e7070d993f18
                  name:
                    type: string
                    example: Host Group Name
                    description: The display name of the host group. It must be unique for each site and for team-scoped host groups on the same team.
                  private:
                    type: boolean
                  site:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                        example: Site Name
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
    put:
      summary: Update a host group
      tags:
        - Host Groups
      description: Updates the name of an existing host group.
      operationId: update-host-group
      parameters:
        - in: path
          name: id
          example: ecbc5ca7-d6e1-4133-90a0-e7070d993f18
          required: true
          description: the UUID of the resource
          schema:
            type: string
            format: uuid
      requestBody:
        description: The new data for the updated host group
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Updated Host Group Name
      responses:
        '200':
          description: OK - Host group updated successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                properties:
                  id:
                    type: string
                    format: uuid
                    example: ecbc5ca7-d6e1-4133-90a0-e7070d993f18
                  name:
                    type: string
                    example: Host Group Name
                    description: The display name of the host group. It must be unique for each site and for team-scoped host groups on the same team.
                  private:
                    type: boolean
                  site:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                        example: Site Name
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
    delete:
      summary: Delete a host group
      tags:
        - Host Groups
      description: Delete an existing host group
      operationId: delete-host-group
      parameters:
        - in: path
          name: id
          example: ecbc5ca7-d6e1-4133-90a0-e7070d993f18
          required: true
          description: the UUID of the resource
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: OK - the host group has been deleted
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/workflows/response/{responseId}/form-response/{formResponseId}':
    get:
      summary: Get a form response by its ID
      description: Fetches the details of a form response using its id
      operationId: get-sine-form-byformid-v1
      tags:
        - Workflow Responses
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: responseId
          in: path
          required: true
          schema:
            oneOf:
              - type: string
                format: uuid
                example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
              - type: string
                pattern: '^[0-9a-fA-F]{24}$'
                example: 5ac705fa211700000539cb25
        - name: formResponseId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: id for the form response
      responses:
        '200':
          description: Successful retrieval of form response details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the form response
                  answers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the answer
                        value:
                          oneOf:
                            - type: string
                            - type: array
                            - type: object
                            - type: number
                            - type: boolean
                          description: 'The value of the answer, can be of various types'
                        type:
                          type: string
                          description: Type of the answer field
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/workflows/response/{responseId}':
    get:
      summary: Get a response by response ID
      description: Fetches individual response details by its id
      operationId: get-sine-responses-byresponseid-v1
      tags:
        - Workflow Responses
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: responseId
          in: path
          required: true
          schema:
            oneOf:
              - type: string
                format: uuid
                example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
              - type: string
                pattern: '^[0-9a-fA-F]{24}$'
                example: 5ac705fa211700000539cb25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  responseId:
                    type: string
                    format: uuid
                    example: 5ac705fa211700000539cb25
                  responseUUID:
                    type: string
                    format: uuid
                    example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                  workflowId:
                    type: string
                    format: uuid
                    example: 5ac705fa211700000539cb25
                  workflowUUID:
                    type: string
                    format: uuid
                    example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                  teamId:
                    type: string
                    format: uuid
                  uniqueIdentifier:
                    type: string
                  state:
                    type: string
                    enum:
                      - pending
                      - accepted
                      - rejected
                      - invalidated
                      - expired
                    example: accepted
                  startDate:
                    type: string
                    format: date-time
                    example: 2020-12-30T04:48:51.438Z
                  endDate:
                    type: string
                    format: date-time
                    nullable: true
                    example: 2020-12-30T04:48:51.438Z
                  expiryDate:
                    type: string
                    format: date-time
                    nullable: true
                    example: 2020-12-30T04:48:51.438Z
                  workflowName:
                    type: string
                  isAutoApproved:
                    type: boolean
                  companyDetails:
                    type: object
                    properties:
                      name:
                        type: string
                  approvedBy:
                    type: array
                    items:
                      type: object
                      properties:
                        action:
                          type: string
                        state:
                          type: string
                          enum:
                            - pending
                            - accepted
                            - rejected
                            - invalidated
                            - expired
                        firstName:
                          type: string
                        lastName:
                          type: string
                        email:
                          type: string
                          format: email
                        date:
                          type: string
                          format: date-time
                          nullable: true
                        message:
                          type: string
                  rejectedBy:
                    type: array
                    items:
                      type: object
                      properties:
                        action:
                          type: string
                        state:
                          type: string
                          enum:
                            - pending
                            - accepted
                            - rejected
                            - invalidated
                            - expired
                        firstName:
                          type: string
                        lastName:
                          type: string
                        email:
                          type: string
                          format: email
                        date:
                          type: string
                          format: date-time
                          nullable: true
                        message:
                          type: string
                  note:
                    type: string
                    nullable: true
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                  applicants:
                    type: array
                    items:
                      type: object
                      properties:
                        isPrimaryApplicant:
                          type: boolean
                        firstName:
                          type: string
                        lastName:
                          type: string
                        email:
                          type: string
                          format: email
                        mobile:
                          type: string
                        company:
                          type: string
                  sites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        address:
                          type: string
                  forms:
                    type: array
                    items:
                      type: object
                      properties:
                        formResponseId:
                          type: string
                          format: uuid
                        type:
                          type: string
                        userDetails:
                          type: object
                          nullable: true
                          properties:
                            firstName:
                              type: string
                            lastName:
                              type: string
                            email:
                              type: string
                              format: email
                            mobile:
                              type: string
                            company:
                              type: string
                  createdAt:
                    type: string
                    format: date-time
                    example: 2020-12-30T04:48:51.438Z
                  updatedAt:
                    type: string
                    format: date-time
                    example: 2020-12-30T04:48:51.438Z
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/workflows/response/workflow/{workflowId}':
    get:
      summary: Get responses by workflow ID
      description: 'Fetches responses from a workflow, sort by response updated date'
      operationId: get-sine-responses-byworkflowid-v1
      tags:
        - Workflow Responses
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: workflowId
          in: path
          required: true
          schema:
            oneOf:
              - type: string
                format: uuid
                example: 85543775-dad8-40de-8be4-7ac29dd7d466
              - type: string
                pattern: '^[0-9a-fA-F]{24}$'
                example: 654e4e7f9b6ac4a9a7e8a1b2
        - name: next
          in: query
          required: false
          schema:
            type: string
          description: Token for pagination
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 200
          description: Number of results per page
        - name: updatedAfter
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter responses created after this date
        - name: updatedBefore
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter responses created before this date
        - name: includeSites
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Whether to include site details in response
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        responseId:
                          type: string
                          format: uuid
                          example: 5ac705fa211700000539cb25
                        responseUUID:
                          type: string
                          format: uuid
                          example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                        workflowId:
                          type: string
                          format: uuid
                          example: 5ac705fa211700000539cb25
                        workflowUUID:
                          type: string
                          format: uuid
                          example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                        teamId:
                          type: string
                          format: uuid
                        uniqueIdentifier:
                          type: string
                        state:
                          type: string
                          enum:
                            - pending
                            - accepted
                            - rejected
                            - invalidated
                            - expired
                          example: accepted
                        startDate:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                        endDate:
                          type: string
                          format: date-time
                          nullable: true
                          example: 2020-12-30T04:48:51.438Z
                        expiryDate:
                          type: string
                          format: date-time
                          nullable: true
                          example: 2020-12-30T04:48:51.438Z
                        workflowName:
                          type: string
                        isAutoApproved:
                          type: boolean
                        companyDetails:
                          type: object
                          properties:
                            name:
                              type: string
                        approvedBy:
                          type: array
                          items:
                            type: object
                            properties:
                              action:
                                type: string
                              state:
                                type: string
                                enum:
                                  - pending
                                  - accepted
                                  - rejected
                                  - invalidated
                                  - expired
                              firstName:
                                type: string
                              lastName:
                                type: string
                              email:
                                type: string
                                format: email
                              date:
                                type: string
                                format: date-time
                                nullable: true
                              message:
                                type: string
                        rejectedBy:
                          type: array
                          items:
                            type: object
                            properties:
                              action:
                                type: string
                              state:
                                type: string
                                enum:
                                  - pending
                                  - accepted
                                  - rejected
                                  - invalidated
                                  - expired
                              firstName:
                                type: string
                              lastName:
                                type: string
                              email:
                                type: string
                                format: email
                              date:
                                type: string
                                format: date-time
                                nullable: true
                              message:
                                type: string
                        note:
                          type: string
                          nullable: true
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                        applicants:
                          type: array
                          items:
                            type: object
                            properties:
                              isPrimaryApplicant:
                                type: boolean
                              firstName:
                                type: string
                              lastName:
                                type: string
                              email:
                                type: string
                                format: email
                              mobile:
                                type: string
                              company:
                                type: string
                        sites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              address:
                                type: string
                        forms:
                          type: array
                          items:
                            type: object
                            properties:
                              formResponseId:
                                type: string
                                format: uuid
                              type:
                                type: string
                              userDetails:
                                type: object
                                nullable: true
                                properties:
                                  firstName:
                                    type: string
                                  lastName:
                                    type: string
                                  email:
                                    type: string
                                    format: email
                                  mobile:
                                    type: string
                                  company:
                                    type: string
                        createdAt:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                        updatedAt:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                  next:
                    type: string
                    nullable: true
                    description: Token for retrieving the next page of results
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/workflows/response/team/{teamId}':
    get:
      summary: Get responses by team ID
      description: Fetches paginated responses associated with a team
      operationId: get-sine-responses-byteamid-v1
      tags:
        - Workflow Responses
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: teamId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 85543775-dad8-40de-8be4-7ac29dd7d466
        - name: next
          in: query
          required: false
          schema:
            type: string
          description: Token for pagination
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 200
          description: Number of results per page
        - name: updatedAfter
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter responses created after this date
        - name: updatedBefore
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter responses created before this date
        - name: includeSites
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Whether to include site details in response
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        responseId:
                          type: string
                          format: uuid
                          example: 5ac705fa211700000539cb25
                        responseUUID:
                          type: string
                          format: uuid
                          example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                        workflowId:
                          type: string
                          format: uuid
                          example: 5ac705fa211700000539cb25
                        workflowUUID:
                          type: string
                          format: uuid
                          example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                        teamId:
                          type: string
                          format: uuid
                        uniqueIdentifier:
                          type: string
                        state:
                          type: string
                          enum:
                            - pending
                            - accepted
                            - rejected
                            - invalidated
                            - expired
                          example: accepted
                        startDate:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                        endDate:
                          type: string
                          format: date-time
                          nullable: true
                          example: 2020-12-30T04:48:51.438Z
                        expiryDate:
                          type: string
                          format: date-time
                          nullable: true
                          example: 2020-12-30T04:48:51.438Z
                        workflowName:
                          type: string
                        isAutoApproved:
                          type: boolean
                        companyDetails:
                          type: object
                          properties:
                            name:
                              type: string
                        approvedBy:
                          type: array
                          items:
                            type: object
                            properties:
                              action:
                                type: string
                              state:
                                type: string
                                enum:
                                  - pending
                                  - accepted
                                  - rejected
                                  - invalidated
                                  - expired
                              firstName:
                                type: string
                              lastName:
                                type: string
                              email:
                                type: string
                                format: email
                              date:
                                type: string
                                format: date-time
                                nullable: true
                              message:
                                type: string
                        rejectedBy:
                          type: array
                          items:
                            type: object
                            properties:
                              action:
                                type: string
                              state:
                                type: string
                                enum:
                                  - pending
                                  - accepted
                                  - rejected
                                  - invalidated
                                  - expired
                              firstName:
                                type: string
                              lastName:
                                type: string
                              email:
                                type: string
                                format: email
                              date:
                                type: string
                                format: date-time
                                nullable: true
                              message:
                                type: string
                        note:
                          type: string
                          nullable: true
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                        applicants:
                          type: array
                          items:
                            type: object
                            properties:
                              isPrimaryApplicant:
                                type: boolean
                              firstName:
                                type: string
                              lastName:
                                type: string
                              email:
                                type: string
                                format: email
                              mobile:
                                type: string
                              company:
                                type: string
                        sites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              address:
                                type: string
                        forms:
                          type: array
                          items:
                            type: object
                            properties:
                              formResponseId:
                                type: string
                                format: uuid
                              type:
                                type: string
                              userDetails:
                                type: object
                                nullable: true
                                properties:
                                  firstName:
                                    type: string
                                  lastName:
                                    type: string
                                  email:
                                    type: string
                                    format: email
                                  mobile:
                                    type: string
                                  company:
                                    type: string
                        createdAt:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                        updatedAt:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                  next:
                    type: string
                    nullable: true
                    description: Token for retrieving the next page of results
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/companies/company/{companyId}':
    get:
      summary: Get a company by company ID
      description: Fetches individual company details by its ID
      operationId: get-sine-company-bycompanyid-v1
      tags:
        - Companies
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: companyId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the company
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 5ac705fa211700000539cb25
                  teamId:
                    type: string
                    format: uuid
                    example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                  name:
                    type: string
                    example: Acme Corporation
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                      - pending
                      - blocked
                    example: active
                  identifierDetails:
                    type: object
                    nullable: true
                    properties:
                      type:
                        type: string
                      value:
                        type: string
                  address:
                    type: string
                    example: '123 Business Street, Business City, BC 12345'
                  contactName:
                    type: string
                    example: John Doe
                  contactEmail:
                    type: string
                    format: email
                    example: john.doe@acme.com
                  contactPhoneNumber:
                    type: string
                    example: +1-555-123-4567
                  website:
                    type: string
                    example: 'https://www.acme.com'
                  adminNotes:
                    type: string
                    example: Important client - handle with priority
                  created:
                    type: string
                    format: date-time
                    example: 2020-12-30T04:48:51.438Z
                  updated:
                    type: string
                    format: date-time
                    example: 2020-12-30T04:48:51.438Z
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                  additionalFields:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        value:
                          type: string
                        type:
                          type: string
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/companies/team/{teamId}':
    get:
      summary: Get companies by team ID
      description: Fetches paginated companies associated with a team
      operationId: get-sine-companies-byteamid-v1
      tags:
        - Companies
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: teamId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 85543775-dad8-40de-8be4-7ac29dd7d466
          description: The unique identifier of the team
        - name: next
          in: query
          required: false
          schema:
            type: string
          description: Token for pagination
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 200
          description: Number of results per page
        - name: updatedAfter
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter companies updated after this date
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 5ac705fa211700000539cb25
                        teamId:
                          type: string
                          format: uuid
                          example: f03cd429-9e80-4fdd-bd9a-d9dcbb2417fb
                        name:
                          type: string
                          example: Acme Corporation
                        status:
                          type: string
                          enum:
                            - active
                            - inactive
                            - pending
                            - blocked
                          example: active
                        identifierDetails:
                          type: object
                          nullable: true
                          properties:
                            type:
                              type: string
                            value:
                              type: string
                        address:
                          type: string
                          example: '123 Business Street, Business City, BC 12345'
                        contactName:
                          type: string
                          example: John Doe
                        contactEmail:
                          type: string
                          format: email
                          example: john.doe@acme.com
                        contactPhoneNumber:
                          type: string
                          example: +1-555-123-4567
                        website:
                          type: string
                          example: 'https://www.acme.com'
                        adminNotes:
                          type: string
                          example: Important client - handle with priority
                        created:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                        updated:
                          type: string
                          format: date-time
                          example: 2020-12-30T04:48:51.438Z
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                        additionalFields:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              value:
                                type: string
                              type:
                                type: string
                  next:
                    type: string
                    nullable: true
                    description: Token for retrieving the next page of results
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  '/companies/document/company/{companyId}':
    get:
      summary: Get documents by company ID
      description: Fetches all documents associated with a company
      operationId: get-sine-documents-bycompanyid-v1
      tags:
        - Companies
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: x-sine-team-id
          description: The UUID of the Team
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: companyId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the company
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      example: 5ac705fa211700000539cb25
                    description:
                      type: string
                      example: Company Insurance Certificate
                    documentType:
                      type: string
                      example: Insurance Certificate
                    status:
                      type: string
                      enum:
                        - active
                        - expired
                        - pending
                        - rejected
                        - requested
                      example: active
                    revisions:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          status:
                            type: string
                            enum:
                              - active
                              - expired
                              - pending
                              - rejected
                              - requested
                          created:
                            type: string
                            format: date-time
                            example: 2020-12-30T04:48:51.438Z
                          expiryDate:
                            type: string
                            format: date-time
                            example: 2023-12-30T04:48:51.438Z
                          files:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                url:
                                  type: string
                                  format: uri
                                size:
                                  type: integer
                                mimeType:
                                  type: string
                          additionalFields:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                value:
                                  type: string
                                type:
                                  type: string
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
  /passes/:
    post:
      summary: Get inactive passes for a team
      description: Get inactive (checked-out or expired) passes from a team with an optional date range and list of site IDs
      operationId: post-sine-v1-passes-getpublicpasses
      tags:
        - Passes
      security:
        - oAuth2ClientCredentials: []
      parameters:
        - name: limit
          description: Number of results per page
          in: query
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 1000
        - name: next
          description: Token for pagination
          in: query
          required: false
          schema:
            type: string
      requestBody:
        description: Optional filters for the request
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                startDate:
                  type: string
                  format: date-time
                  example: 2025-09-01T06:00:00.000Z
                  description: Only return passes created after this date. This can be up to 1 year in the past. Defaults to 2 weeks ago if not specified.
                endDate:
                  type: string
                  format: date-time
                  example: 2025-10-01T18:00:00.000Z
                  description: Only return passes created before this date. Defaults to now if not specified.
                siteIds:
                  type: array
                  items:
                    type: uuid
                    example: 751211ab-9d92-4603-bbe8-9a3501ec9f13
                  description: Filter passes to specific sites. Defaults to all sites for the team if not specified.
                includeFormResponses:
                  type: boolean
                  default: false
                  description: Include check-in and sign-out form responses for each pass. Defaults to false.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        firstName:
                          type: string
                          example: Example
                        lastName:
                          type: string
                          example: Person
                        email:
                          type: string
                          example: e.person@example.com
                        mobile:
                          type: string
                          example: +61 491 570 006
                        company:
                          type: string
                          example: ExampleCo
                        passType:
                          type: string
                          example: Visitor
                        entryType:
                          type: string
                          example: SineWeb
                        site:
                          type: string
                          example: ExampleCo HQ
                        duration:
                          type: integer
                          example: 452
                        issuedTime:
                          type: string
                          format: time
                          example: '08:35:02'
                        issuedDate:
                          type: string
                          format: date
                          example: 21/12/2025
                        status:
                          type: string
                          example: checked out
                        pendingTime:
                          type: integer
                          example: 60
                        acceptedOrRejectedTime:
                          type: string
                          format: time
                          example: '09:35:02'
                        acceptedOrRejectedBy:
                          type: string
                          example: a.person@example.com
                        checkoutTime:
                          type: string
                          format: time
                          example: '17:06:54'
                        checkoutDate:
                          type: string
                          format: date
                          example: 21/12/2025
                        hostFirstName:
                          type: string
                          example: Example
                        hostLastName:
                          type: string
                          example: Host
                        hostGroup:
                          type: string
                          example: Management
                        zone:
                          type: string
                          example: GN.1
                        notes:
                          type: string
                          example: Swipe card provided
                        checkInFormResponses:
                          type: array
                          items:
                            type: object
                            properties:
                              label:
                                type: string
                              value:
                                type: string
                        signOutFormResponses:
                          type: array
                          items:
                            type: object
                            properties:
                              label:
                                type: string
                              value:
                                type: string
                  next:
                    type: string
                    nullable: true
                    example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjIwMjEwOTEyNCJ9.eyJzY29wZSI6IjZOb0pidnFzQ0xvVnRTQjM5QVgweW04S1FhQT0iLCJ2YWx1ZSI6eyJtb2RlIjoia2V5c2V0IiwibmV4dCI6IkpUZENKVEl5YkdsdGFYUWxNaklsTTBFeEpUSkRKVEl5YTJWNVEyOXNkVzF1VG1GdFpYTWxNaklsTTBFbE5VSWxNakp6ZEdGeWRFUmhkR1VsTWpJbE1rTWxNakpwWkNVeU1pVTFSQ1V5UXlVeU1tdGxlVlpoYkhWbGN5VXlNaVV6UVNVMVFpVXlNakl3TWpVdE1UQXRNakpVTURNbE0wRXhNeVV6UVRVeUxqUTBPVm9sTWpJbE1rTWxNakl6T1RZeE9UZzVOQzFoWmpFM0xUUXdPR1l0WVdSaE1TMWxPRGs1WTJGaE5EWmxaVGNsTWpJbE5VUWxNa01sTWpKdmNHVnlZWFJ2Y2lVeU1pVXpRU1V5TW14MEpUSXlKVEpESlRJeWMyOXlkRVJwY21WamRHbHZiaVV5TWlVelFTVXlNa1JGVTBNbE1qSWxOMFE9In0sImlhdCI6MTc2MTEwMzIxMiwiZXhwIjoxNzYxMTg5NjEyfQ.Gatx-pBB9jsiDlkMnTVsPNGlLbTmpUBCo-bAQpxA_fI
                    description: Token for retrieving the next page of results
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: BAD_REQUEST
                    description: HTTP status code
                  message:
                    type: string
                    example: The request is invalid
                    description: Custom Error Message
                example:
                  code: BAD_REQUEST
                  message: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                    description: HTTP status code
                  message:
                    type: string
                    example: The access token is invalid or has expired
                    description: Custom error message
                example:
                  code: UNAUTHORIZED
                  message: The access token is invalid or has expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                    description: HTTP status code
                  message:
                    type: string
                    example: You are not allowed to access this information
                    description: Custom error message
                example:
                  code: FORBIDDEN
                  message: You are not allowed to access this information
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTE_NOT_FOUND
                    description: HTTP status code
                  message:
                    type: string
                    example: No route matched with those values
                    description: Custom error message
                example:
                  code: ROUTE_NOT_FOUND
                  message: No route matched with those values
        '424':
          description: Service dependency failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONSUMER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Unexpected error while communicating with downstream service, please try again'
                    description: Custom error message
                example:
                  code: CONSUMER_ERROR
                  message: 'Unexpected error while communicating with downstream service, please try again'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                    description: HTTP status code
                  message:
                    type: string
                    example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                    description: Custom error message
                example:
                  code: TOO_MANY_REQUESTS
                  message: API Calling rate limit exceeded! Please try again later or contact Sine support team
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                    description: HTTP status code
                  message:
                    type: string
                    example: 'Something went wrong, please try again later'
                    description: Custom error message
                example:
                  code: INTERNAL_SERVER_ERROR
                  message: 'Something went wrong, please try again later'
security:
  - oAuth2ClientCredentials: []
components:
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      description: The Sine Public API uses OAuth2 with the client_credentials grant flow.
      flows:
        clientCredentials:
          tokenUrl: /oauth2/token
          scopes: {}
  parameters:
    x-sine-team-id:
      name: x-sine-team-id
      description: The UUID of the Team
      in: header
      required: true
      schema:
        type: string
        format: uuid
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: BAD_REQUEST
                description: HTTP status code
              message:
                type: string
                example: The request is invalid
                description: Custom Error Message
            example:
              code: BAD_REQUEST
              message: The request is invalid
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: UNAUTHORIZED
                description: HTTP status code
              message:
                type: string
                example: The access token is invalid or has expired
                description: Custom error message
            example:
              code: UNAUTHORIZED
              message: The access token is invalid or has expired
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: FORBIDDEN
                description: HTTP status code
              message:
                type: string
                example: You are not allowed to access this information
                description: Custom error message
            example:
              code: FORBIDDEN
              message: You are not allowed to access this information
    '404':
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: ROUTE_NOT_FOUND
                description: HTTP status code
              message:
                type: string
                example: No route matched with those values
                description: Custom error message
            example:
              code: ROUTE_NOT_FOUND
              message: No route matched with those values
    '424':
      description: Service dependency failed
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: CONSUMER_ERROR
                description: HTTP status code
              message:
                type: string
                example: 'Unexpected error while communicating with downstream service, please try again'
                description: Custom error message
            example:
              code: CONSUMER_ERROR
              message: 'Unexpected error while communicating with downstream service, please try again'
    '429':
      description: Too many requests
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: TOO_MANY_REQUESTS
                description: HTTP status code
              message:
                type: string
                example: API Calling rate limit exceeded! Please try again later or contact Sine support team
                description: Custom error message
            example:
              code: TOO_MANY_REQUESTS
              message: API Calling rate limit exceeded! Please try again later or contact Sine support team
    '500':
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: INTERNAL_SERVER_ERROR
                description: HTTP status code
              message:
                type: string
                example: 'Something went wrong, please try again later'
                description: Custom error message
            example:
              code: INTERNAL_SERVER_ERROR
              message: 'Something went wrong, please try again later'
    '503':
      description: Service unavailable
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: SERVICE_UNAVAILABLE
              message:
                type: string
                example: Service is not currently available
            example:
              code: SERVICE_UNAVAILABLE
              message: Service is not currently available
  schemas:
    SiteSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
          description: Unique identifier for a Site
        name:
          type: string
          example: Sine
          description: name of the Site
        address:
          type: string
          example: '100 Pirie St, Adelaide SA 5000'
          description: the address (physical location) of the Site
        latitude:
          type: number
          format: float
          example: -34.925
          description: location coordinates of the Site
        longitude:
          type: number
          format: float
          example: 138.604
          description: location coordinates of the Site
      example:
        id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
        name: Sine
        address: '100 Pirie St, Adelaide SA 5000'
        latitude: -34.925
        longitude: 138.604
    InvitationDetails:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the Invitation
          format: uuid
          example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
        firstName:
          type: string
          description: Guest first name
          example: James
        lastName:
          type: string
          description: Guest last name
          example: Bond
        visitorType:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
              description: Unique identifier for the visitor type
            name:
              type: string
              example: Delivery
              description: Visitor type name
          example:
            id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
            name: Delivery
        startDate:
          type: string
          description: Invitation start date and time
          format: date-time
          example: '2021-09-20T11:00:00.000Z'
        endDate:
          type: string
          description: Invitation end date and time
          format: date-time
          example: '2021-09-22T09:00:00.000Z'
        site:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
              description: Unique identifier for a Site
            name:
              type: string
              example: Sine
              description: name of the Site
            address:
              type: string
              example: '100 Pirie St, Adelaide SA 5000'
              description: the address (physical location) of the Site
            latitude:
              type: number
              format: float
              example: -34.925
              description: location coordinates of the Site
            longitude:
              type: number
              format: float
              example: 138.604
              description: location coordinates of the Site
          example:
            id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
            name: Sine
            address: '100 Pirie St, Adelaide SA 5000'
            latitude: -34.925
            longitude: 138.604
        email:
          type: string
          description: Email address of the guest
          format: email
          example: james.bond@sine.co
        mobile:
          type: string
          description: Contact mobile phone number of the guest
          example: '+61405107480'
        subject:
          type: string
          description: A subject for the invitation
          example: Invitation Subject
        host:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
              description: Unique identifier of the Host
            firstName:
              type: string
              example: Example
              description: Host first name
            lastName:
              type: string
              example: Person
              description: Host last name
            hostGroupName:
              type: string
              example: Staff
              description: Group name of the host (if available)
            email:
              type: string
              example: e.person@example.com
              description: Host email address
          example:
            id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
            firstName: Example
            lastName: Person
            hostGroupName: Staff
            email: e.person@example.com
        adminNotes:
          type: string
          description: An optional note for the Site or Team Admin
          example: A message for admin
          maxLength: 1000
        visitorNotes:
          type: string
          description: An optional note for the guest which will appear on the Invitation
          example: A message to guest
          maxLength: 4000
        updated:
          type: string
          description: Invitation updated date
          format: date-time
          example: '2021-09-22T09:00:00.000Z'
        fastTrackCode:
          type: number
          description: 'True if the site has fast track codes enabled, false otherwise'
          example: '12332'
        emailSent:
          type: boolean
          description: True if an email has been sent to the guest
          example: true
        emailReminderTime:
          type: string
          description: Invitation reminder sent date
          format: date-time
          example: '2021-09-22T09:00:00.000Z'
        created:
          type: string
          description: Invitation created date
          format: date-time
          example: '2021-09-22T09:00:00.000Z'
        cancelled:
          type: string
          description: Invitation cancelled date
          format: date-time
          example: '2021-09-22T09:00:00.000Z'
        actioned:
          type: boolean
          description: Guest has been checked in
          example: false
        activePassCount:
          type: number
          example: 1
          description: number of passes that are active for an invitation id
        company:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the company
            name:
              type: string
              description: Name of the company
          example:
            id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
            name: Sine
      example:
        id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
        firstName: James
        lastName: Bond
        visitorType:
          id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
          name: Delivery
        startDate: '2021-09-20T11:00:00.000Z'
        endDate: '2021-09-22T09:00:00.000Z'
        site:
          id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
          name: Sine
          address: '100 Pirie St, Adelaide SA 5000'
          latitude: -34.925
          longitude: 138.604
        email: james.bond@sine.co
        mobile: '+61405107480'
        subject: Invitation Subject
        host:
          id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
          firstName: Example
          lastName: Person
          hostGroupName: Staff
          email: e.person@example.com
        adminNotes: A message for admin
        visitorNotes: A message to guest
        updated: '2021-09-22T09:00:00.000Z'
        fastTrackCode: '12332'
        emailSent: true
        emailReminderTime: '2021-09-22T09:00:00.000Z'
        created: '2021-09-22T09:00:00.000Z'
        cancelled: '2021-09-22T09:00:00.000Z'
        actioned: false
        activePassCount: 1
        company:
          id: 019fe2b4-f2ee-4a19-873d-ddb4f014dfce
          name: Sine
    HostSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
          description: Unique identifier of the Host
        firstName:
          type: string
          example: Example
          description: Host first name
        lastName:
          type: string
          example: Person
          description: Host last name
        hostGroupName:
          type: string
          example: Staff
          description: Group name of the host (if available)
        email:
          type: string
          example: e.person@example.com
          description: Host email address
      example:
        id: 079fe2b4-f2ee-4a19-873d-ddb4f014dfce
        firstName: Example
        lastName: Person
        hostGroupName: Staff
        email: e.person@example.com
