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

# List Attendances

> Returns a paginated list of all `Attendances` in your organization.



## OpenAPI

````yaml https://api.meitner.se/data-export/v1/openapi.json get /attendance
openapi: 3.1.0
info:
  title: DataExport API
  description: Generated API documentation
  contact:
    name: Meitner
    url: https://meitner.se
    email: support@meitner.se
  license:
    name: Proprietary - Licensed to Authorized Customers Only
    url: https://meitner.se
  version: v1
servers:
  - url: https://api.meitner.se/data-export/v1
    description: Server to use in production
    x-speakeasy-server-id: production
  - url: https://api.staging.meitner.se/data-export/v1
    description: Server to use when building and testing the API
    x-speakeasy-server-id: staging
security:
  - ClientCredentials: []
    ClientSecret: []
  - OAuth2: []
tags:
  - name: CriterionResult
    description: >
      Exports criterion-based assessment results for students. Criterion results
      track whether students have met specific learning criteria within courses,
      enabling analysis of student achievement against curriculum standards.


      Default sorting: Results are sorted by student date of birth in descending
      order (youngest students first).


      Maximum limit: 1000 items per request. If a higher limit is specified, it
      will be capped to 1000.
  - name: Attendance
    description: >
      Exports current attendance records for students across lessons. Provides
      detailed attendance data including presence status, lesson duration, and
      absence duration for analyzing attendance patterns and compliance
      reporting.


      Default sorting: Records are sorted by report date in ascending order
      (oldest first).


      Maximum limit: 1000 items per request. If a higher limit is specified, it
      will be capped to 1000.
  - name: AttendanceArchive
    description: >
      Exports archived historical attendance records from previous academic
      terms. Contains the same attendance data as the Attendance endpoint but
      for completed terms, enabling longitudinal analysis of attendance trends
      across school years.


      Default sorting: Records are sorted by report date in ascending order
      (oldest first).


      Maximum limit: 1000 items per request. If a higher limit is specified, it
      will be capped to 1000.
  - name: ElementaryGrade
    description: >
      Exports grades for students in compulsory school (grundskola, years 0-9).
      Includes subject grades, final grades, and grade history with archive
      information for comprehensive academic performance analysis.


      Default sorting: Grades are sorted by grade date in ascending order
      (oldest first).


      Maximum limit: 1000 items per request. If a higher limit is specified, it
      will be capped to 1000.
  - name: ElementaryGradeMerit
    description: >
      Exports calculated merit points (meritvärde) for compulsory school
      students. Merit points are aggregated grade values used for upper
      secondary school admissions. Includes eligibility indicators for
      vocational (yrkes) and academic (högskola) programs.


      Default sorting: Records are sorted by merit points in descending order
      (highest merit points first).


      Maximum limit: 1000 items per request. If a higher limit is specified, it
      will be capped to 1000.
  - name: UpperSecondaryGrade
    description: >
      Exports grades for students in upper secondary school (gymnasium).
      Includes course grades with program, orientation, and specialization
      details for comprehensive tracking of student progress through gymnasium
      programs.


      Default sorting: Grades are sorted by grade date in ascending order
      (oldest first).


      Maximum limit: 1000 items per request. If a higher limit is specified, it
      will be capped to 1000.
  - name: Student
    description: >
      Exports comprehensive student data including demographics, language
      information, and special education indicators. Provides key attributes for
      student segmentation and cohort analysis in BI systems.


      Default sorting: Students are sorted by last name in ascending order
      (A-Z), then by first name in ascending order (A-Z).


      Maximum limit: 1000 items per request. If a higher limit is specified, it
      will be capped to 1000.
paths:
  /attendance:
    get:
      tags:
        - Attendance
      summary: List Attendances
      description: Returns a paginated list of all `Attendances` in your organization.
      operationId: AttendanceList
      parameters:
        - name: limit
          in: query
          description: >-
            The maximum number of Attendances to return (default: 50) when
            listing Attendances
          required: false
          schema:
            type: integer
            examples:
              - 1
            default: 50
        - name: offset
          in: query
          description: >-
            The number of Attendances to skip before starting to return results
            (default: 0) when listing Attendances
          required: false
          schema:
            type: integer
            examples:
              - 0
            default: 0
      responses:
        '200':
          $ref: '#/components/responses/AttendanceList'
          description: >-
            Response for Attendance List operation - returns a paginated list of
            Attendance
        '400':
          $ref: '#/components/responses/Error400ResponseBody'
          description: >-
            Bad Request error for Attendance List operation - request contains
            invalid parameters
        '401':
          $ref: '#/components/responses/Error401ResponseBody'
          description: >-
            Unauthorized error for Attendance List operation - authentication
            required
        '403':
          $ref: '#/components/responses/Error403ResponseBody'
          description: >-
            Forbidden error for Attendance List operation - insufficient
            permissions
        '404':
          $ref: '#/components/responses/Error404ResponseBody'
          description: >-
            Not Found error for Attendance List operation - resource does not
            exist
        '409':
          $ref: '#/components/responses/Error409ResponseBody'
          description: >-
            Conflict error for Attendance List operation - request conflicts
            with current state
        '429':
          $ref: '#/components/responses/Error429ResponseBody'
          description: Rate Limit error for Attendance List operation - too many requests
        '500':
          $ref: '#/components/responses/Error500ResponseBody'
          description: >-
            Internal Server error for Attendance List operation - unexpected
            server error
components:
  responses:
    AttendanceList:
      description: >-
        Response for Attendance List operation - returns a paginated list of
        Attendance
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                examples:
                  - - school:
                        id: 12345678-1234-1234-1234-123456789012
                        displayName: Meitner Grundskola
                      student:
                        id: 12345678-1234-1234-1234-123456789012
                        identityNumber: 20000101-1234
                        firstName: John
                        lastName: Doe
                        dateOfBirth: '2000-01-01'
                        gender: Male
                        schoolType: GR
                        schoolYear: '9'
                        class: Klass 9A
                      subject:
                        title: Matematik
                        code: MAT
                      course:
                        title: Matematik 2b
                        code: MATMAT02B
                      report:
                        status: Attendance
                        date: '2024-01-01'
                        week: '1'
                        lessonDurationMinutes: 45
                        absenceDurationMinutes: 15
                items:
                  allOf:
                    - $ref: '#/components/schemas/Attendance'
                description: Array of Attendance objects
              pagination:
                allOf:
                  - $ref: '#/components/schemas/Pagination'
                examples:
                  - offset: 0
                    limit: 1
                    total: 100
                description: Pagination information
          examples:
            responseExample:
              summary: Response body example
              value:
                data:
                  - school:
                      id: 12345678-1234-1234-1234-123456789012
                      displayName: Meitner Grundskola
                    student:
                      id: 12345678-1234-1234-1234-123456789012
                      identityNumber: 20000101-1234
                      firstName: John
                      lastName: Doe
                      dateOfBirth: '2000-01-01'
                      gender: Male
                      schoolType: GR
                      schoolYear: '9'
                      class: Klass 9A
                    subject:
                      title: Matematik
                      code: MAT
                    course:
                      title: Matematik 2b
                      code: MATMAT02B
                    report:
                      status: Attendance
                      date: '2024-01-01'
                      week: '1'
                      lessonDurationMinutes: 45
                      absenceDurationMinutes: 15
                pagination:
                  offset: 0
                  limit: 1
                  total: 100
    Error400ResponseBody:
      description: Bad Request - The request was malformed or contained invalid parameters
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                allOf:
                  - $ref: '#/components/schemas/Error'
                examples:
                  - code: BadRequest
                    message: The request contains invalid parameters or malformed data
                    requestID: 550e8400-e29b-41d4-a716-446655440000
            required:
              - error
          examples:
            errorExample:
              summary: Bad Request error example
              value:
                error:
                  code: BadRequest
                  message: The request contains invalid parameters or malformed data
                  requestID: 550e8400-e29b-41d4-a716-446655440000
    Error401ResponseBody:
      description: Unauthorized - The request is missing valid authentication credentials
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                allOf:
                  - $ref: '#/components/schemas/Error'
                examples:
                  - code: BadRequest
                    message: The request contains invalid parameters or malformed data
                    requestID: 550e8400-e29b-41d4-a716-446655440000
            required:
              - error
          examples:
            errorExample:
              summary: Unauthorized error example
              value:
                error:
                  code: Unauthorized
                  message: Authentication credentials are missing or invalid
                  requestID: 550e8400-e29b-41d4-a716-446655440000
    Error403ResponseBody:
      description: >-
        Forbidden - Request is authenticated, but the user is not allowed to
        perform the operation
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                allOf:
                  - $ref: '#/components/schemas/Error'
                examples:
                  - code: BadRequest
                    message: The request contains invalid parameters or malformed data
                    requestID: 550e8400-e29b-41d4-a716-446655440000
            required:
              - error
          examples:
            errorExample:
              summary: Forbidden error example
              value:
                error:
                  code: Forbidden
                  message: You do not have permission to perform this operation
                  requestID: 550e8400-e29b-41d4-a716-446655440000
    Error404ResponseBody:
      description: Not Found - The requested resource does not exist
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                allOf:
                  - $ref: '#/components/schemas/Error'
                examples:
                  - code: BadRequest
                    message: The request contains invalid parameters or malformed data
                    requestID: 550e8400-e29b-41d4-a716-446655440000
            required:
              - error
          examples:
            errorExample:
              summary: Not Found error example
              value:
                error:
                  code: NotFound
                  message: The requested resource could not be found
                  requestID: 550e8400-e29b-41d4-a716-446655440000
    Error409ResponseBody:
      description: Conflict - The request could not be completed due to a conflict
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                allOf:
                  - $ref: '#/components/schemas/Error'
                examples:
                  - code: BadRequest
                    message: The request contains invalid parameters or malformed data
                    requestID: 550e8400-e29b-41d4-a716-446655440000
            required:
              - error
          examples:
            errorExample:
              summary: Conflict error example
              value:
                error:
                  code: Conflict
                  message: The request conflicts with the current state of the resource
                  requestID: 550e8400-e29b-41d4-a716-446655440000
    Error429ResponseBody:
      description: Too Many Requests - When the rate limit has been exceeded
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                allOf:
                  - $ref: '#/components/schemas/Error'
                examples:
                  - code: BadRequest
                    message: The request contains invalid parameters or malformed data
                    requestID: 550e8400-e29b-41d4-a716-446655440000
            required:
              - error
          examples:
            errorExample:
              summary: Rate Limited error example
              value:
                error:
                  code: RateLimited
                  message: Too many requests - rate limit exceeded
                  requestID: 550e8400-e29b-41d4-a716-446655440000
    Error500ResponseBody:
      description: Internal Server Error - An unexpected server error occurred
      headers:
        RateLimit-Limit:
          description: >-
            The maximum number of API requests you're permitted to make per
            hour.
          schema:
            type: integer
            examples:
              - 5000
        RateLimit-Remaining:
          description: >-
            The number of API requests remaining in the current rate limit
            window.
          schema:
            type: integer
            examples:
              - 4999
        RateLimit-Reset:
          description: >-
            The time at which the current rate limit window resets in UTC epoch
            milliseconds.
          schema:
            type: string
            examples:
              - '1728316800000'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                allOf:
                  - $ref: '#/components/schemas/Error'
                examples:
                  - code: BadRequest
                    message: The request contains invalid parameters or malformed data
                    requestID: 550e8400-e29b-41d4-a716-446655440000
            required:
              - error
          examples:
            errorExample:
              summary: Internal Server error example
              value:
                error:
                  code: Internal
                  message: An unexpected server error occurred
                  requestID: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    Attendance:
      type: object
      properties:
        school:
          allOf:
            - $ref: '#/components/schemas/School'
          examples:
            - id: 12345678-1234-1234-1234-123456789012
              displayName: Meitner Grundskola
          description: The school that the attendance report belongs to
        student:
          allOf:
            - $ref: '#/components/schemas/StudentPreview'
          examples:
            - id: 12345678-1234-1234-1234-123456789012
              identityNumber: 20000101-1234
              firstName: John
              lastName: Doe
              dateOfBirth: '2000-01-01'
              gender: Male
              schoolType: GR
              schoolYear: '9'
              class: Klass 9A
          description: The student that the attendance report belongs to
        subject:
          allOf:
            - $ref: '#/components/schemas/Subject'
          examples:
            - title: Matematik
              code: MAT
          description: The subject that the attendance report belongs to
        course:
          allOf:
            - $ref: '#/components/schemas/Course'
          examples:
            - title: Matematik 2b
              code: MATMAT02B
          description: The course that the attendance report belongs to
        report:
          allOf:
            - $ref: '#/components/schemas/AttendanceReport'
          examples:
            - status: Attendance
              date: '2024-01-01'
              week: '1'
              lessonDurationMinutes: 45
              absenceDurationMinutes: 15
          description: The attendance report
      description: >
        Exports current attendance records for students across lessons. Provides
        detailed attendance data including presence status, lesson duration, and
        absence duration for analyzing attendance patterns and compliance
        reporting.


        Default sorting: Records are sorted by report date in ascending order
        (oldest first).


        Maximum limit: 1000 items per request. If a higher limit is specified,
        it will be capped to 1000.
    Pagination:
      type: object
      properties:
        offset:
          type: integer
          examples:
            - 0
          description: Number of items to skip from the beginning of the result set
        limit:
          type: integer
          examples:
            - 1
          description: Maximum number of items to return in the result set
        total:
          type: integer
          examples:
            - 100
          description: Total number of items available for pagination
      required:
        - offset
        - limit
        - total
      description: Pagination parameters for controlling result sets in list operations
    Error:
      type: object
      properties:
        code:
          allOf:
            - $ref: '#/components/schemas/ErrorCode'
          description: The specific error code indicating the type of error
        message:
          type: string
          examples:
            - example
          description: Human-readable error message providing additional details
        requestID:
          type: string
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          description: >-
            Unique identifier for the request that generated this error, used
            for logging and debugging
      required:
        - code
        - message
        - requestID
      description: >-
        Standard error response object containing error code, message, and
        request ID
    School:
      type: object
      properties:
        id:
          type: string
          examples:
            - 12345678-1234-1234-1234-123456789012
          format: uuid
          description: The ID of the school
        displayName:
          type: string
          examples:
            - Meitner Grundskola
          description: The display name of the school
      required:
        - id
        - displayName
      description: >-
        Identifies a school within the organization. Provides the unique school
        ID and display name for aggregating and filtering data in BI reports.
    StudentPreview:
      type: object
      properties:
        id:
          type: string
          examples:
            - 12345678-1234-1234-1234-123456789012
          format: uuid
          description: The ID of the student
        identityNumber:
          type: string
          examples:
            - 20000101-1234
            - null
          description: >-
            The identity number (personnummer) of the student in the format
            YYYYMMDD-NNNN
          nullable: true
        firstName:
          type: string
          examples:
            - John
          description: The first name of the student
        lastName:
          type: string
          examples:
            - Doe
          description: The last name of the student
        dateOfBirth:
          type: string
          examples:
            - '2000-01-01'
          format: date
          description: The date of birth of the student
        gender:
          allOf:
            - $ref: '#/components/schemas/Gender'
          examples:
            - Male
          description: The gender of the student
        schoolType:
          allOf:
            - $ref: '#/components/schemas/SchoolType'
          examples:
            - GR
          description: The type of school the student is attending
        schoolYear:
          allOf:
            - $ref: '#/components/schemas/SchoolYear'
          examples:
            - '9'
          description: The school year the student is attending
        class:
          type: string
          examples:
            - Klass 9A
            - null
          description: >-
            The name of the class that the student belongs to. A student can
            only belong to one class at a time. Null if the student is not
            assigned to any class.
          nullable: true
      required:
        - id
        - firstName
        - lastName
        - dateOfBirth
        - gender
        - schoolType
        - schoolYear
      description: >-
        A summary view of student demographic data including name, date of
        birth, gender, and current school placement. Used to identify and
        segment students in exported records.
    Subject:
      type: object
      properties:
        title:
          type: string
          examples:
            - Matematik
          description: The title of the subject
        code:
          type: string
          examples:
            - MAT
          description: The code of the subject
      required:
        - title
        - code
      description: >-
        Represents an academic subject in the Swedish education system. Contains
        the subject title and national subject code used for reporting and
        analysis.
    Course:
      type: object
      properties:
        title:
          type: string
          examples:
            - Matematik 2b
          description: The title of the course
        code:
          type: string
          examples:
            - MATMAT02B
          description: The code of the course
      required:
        - title
        - code
      description: >-
        Represents a course within the Swedish education system. Courses are
        typically used in upper secondary school (gymnasium) and contain a title
        and a national course code.
    AttendanceReport:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/AttendanceReportStatus'
          examples:
            - Attendance
          description: The status of the attendance report
        date:
          type: string
          examples:
            - '2024-01-01'
          format: date
          description: The date of the attendance report
        week:
          type: string
          examples:
            - '1'
          description: The week of the attendance report
        lessonDurationMinutes:
          type: integer
          examples:
            - 45
          description: The duration of the lesson in minutes
        absenceDurationMinutes:
          type: integer
          examples:
            - 15
          description: The duration that the student was absent in minutes
      required:
        - status
        - date
        - week
        - lessonDurationMinutes
        - absenceDurationMinutes
      description: >-
        Represents a single attendance record for a student lesson. Contains the
        attendance status, lesson duration, and any absence duration for BI
        analysis of student attendance patterns.
    ErrorCode:
      type: string
      enum:
        - BadRequest
        - Unauthorized
        - Forbidden
        - NotFound
        - Conflict
        - UnprocessableEntity
        - RateLimited
        - Internal
      description: Standard error codes used in API responses
    Gender:
      type: string
      enum:
        - Female
        - Male
        - Other
      description: The gender of the person
    SchoolType:
      type: string
      enum:
        - GR
        - GRAN
        - GY
        - GYAN
        - FS
      description: The type of schooling the student is attending
    SchoolYear:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
        - '8'
        - '9'
      description: The school year the student is attending
    AttendanceReportStatus:
      type: string
      enum:
        - Attendance
        - AbsenceReported
        - AbsenceUnreported
        - AbsencePartialUnreported
        - AbsencePartialReported
      description: The status of the attendance report
  securitySchemes:
    ClientCredentials:
      type: apiKey
      name: Client-ID
      in: header
    ClientSecret:
      type: apiKey
      name: Client-Secret
      in: header
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes: {}

````