> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goteal.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Latest Term for User



## OpenAPI

````yaml GET /authorisations/terms/latest
openapi: 3.0.1
info:
  title: Payroll API
  description: A full flagged payroll api provided by Teal
  version: 1.0.0
servers:
  - url: https://api.sandbox.goteal.co
    description: Sandbox server for experiments
  - url: https://api.goteal.co
    description: Production server
security:
  - ApiKeyAuth: []
  - MemberBearerAuth: []
paths:
  /authorisations/terms/latest:
    description: >-
      Get the latest active authorisation term for a user based on their
      recurring check configuration.
    get:
      summary: Returns the latest active authorisation term for a user.
      parameters:
        - in: query
          name: user_id
          schema:
            type: string
            format: uuid
          required: true
          description: ID of the user to get the latest term for
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedAuthorisationTerm'
        '401':
          $ref: '#/components/responses/UnauthorizedApiKey'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
components:
  schemas:
    CreatedAuthorisationTerm:
      allOf:
        - required:
            - id
            - created_at
            - is_active
            - is_system_term
            - authorisation_version
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the authorisation term
              example: 550e8400-e29b-41d4-a716-446655440000
            is_active:
              type: boolean
              description: >-
                Whether this authorisation term is currently active and can be
                accepted
              default: true
              example: true
            is_system_term:
              type: boolean
              description: True for Teal's default terms, false for client-created terms
              readOnly: true
              example: false
            authorisation_version:
              type: integer
              format: int32
              description: Auto-incremented version number for the authorisation term
              readOnly: true
              example: 1
            created_at:
              $ref: '#/components/schemas/Date'
              description: When the authorisation term was created
        - $ref: '#/components/schemas/AuthorisationTerm'
    Date:
      type: string
      format: date-time
      example: '2019-05-17T00:00:00.000Z'
    AuthorisationTerm:
      type: object
      required:
        - name
        - authorisation_text
        - authorisation_category
      properties:
        name:
          type: string
          description: Human-readable name for the authorisation term
          example: Data Sharing Agreement
        authorisation_text:
          type: string
          description: The legal authorisation text that users will accept
          example: >-
            I agree to share my payroll data with the lender for the purpose of
            income verification.
        authorisation_category:
          $ref: '#/components/schemas/AuthorisationCategory'
        deactivate_previous:
          type: boolean
          description: >-
            If true, deactivates any existing active term for the same category.
            Defaults to false.
          default: false
          example: true
          writeOnly: true
    Unauthorized:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the errors
          example:
            - No X-API-KEY header provided or wrong value
    NotFound:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the not found errors
          example:
            - >-
              The resource with id [8be3bb60-5ab4-4bd2-90e6-3b015691a827] does
              not exist
    AuthorisationCategory:
      type: string
      description: The category of authorisation
      enum:
        - one_time
        - recurring
      example: one_time
  responses:
    UnauthorizedApiKey:
      description: Unauthorized if the X-API-KEY is not provided or is wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    ResourceNotFound:
      description: Resource not found
      content:
        applcation/json:
          schema:
            $ref: '#/components/schemas/NotFound'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    MemberBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token for authentication. The token should be the one returned by
        the "/members/signin"

````