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

# Get a user's course

> Returns the user's enrollment in one course, with every module of the course and the user's progress and active flag in each.



## OpenAPI

````yaml /openapi.yaml get /clients/users/{user_id}/routes/{route_id}/
openapi: 3.1.0
info:
  title: hackU Client API
  version: 1.2.0
  description: >
    Public API for hackU corporate clients. It lets a company manage its
    learners

    (create, update, deactivate), enroll them in courses (routes) and pensums,

    read their progress, and send WhatsApp / email communications.


    **Authentication.** Every request must send the header

    `Authorization: Api-Key <token>`. The key identifies the company; there is
    no

    company parameter in the URL except where noted.


    **Pagination.** List endpoints that are paginated use limit/offset

    (`limit` default 50, maximum 500) and return `{count, next, previous,
    results}`.


    **Errors.** A missing, invalid, revoked or expired key returns `403` with

    `{"detail": "..."}`. Validation errors return `400` with

    `{"<field>": ["<message>", ...]}` (or `non_field_errors`). Some messages are

    returned in Spanish.


    **Identifiers.** `user_id` in every path is the hackU user id, returned as

    `user_pk` by `POST /clients/users/` and as `id` by `GET /clients/users/`.
servers:
  - url: https://app.reinvented.education/api
    description: Production
  - url: https://qa-admin.hacku.co/api
    description: Test
security:
  - ApiKeyAuth: []
tags:
  - name: Users
    description: Create, read, update and deactivate the company's learners.
  - name: Enrollment
    description: Assign courses (routes), modules and pensums.
  - name: Progress
    description: >-
      Read learners' progress in courses, modules, pensums, evaluations, surveys
      and certificates.
  - name: Catalog
    description: The company's courses (routes) and their modules.
  - name: Extra fields
    description: Company-defined custom user fields.
  - name: Communications
    description: Send WhatsApp or email messages using approved templates.
paths:
  /clients/users/{user_id}/routes/{route_id}/:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/RouteId'
    get:
      tags:
        - Progress
      summary: Get a user's course
      description: >-
        Returns the user's enrollment in one course, with every module of the
        course and the user's progress and active flag in each.
      operationId: getUserRoute
      responses:
        '200':
          description: Course enrollment with module progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRouteDetail'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    UserId:
      name: user_id
      in: path
      required: true
      description: >-
        hackU user id, as returned by `POST /clients/users/` (`user_pk`) or `GET
        /clients/users/` (`id`).
      schema:
        type: integer
      example: 48213
    RouteId:
      name: route_id
      in: path
      required: true
      description: Course (route) id.
      schema:
        type: integer
      example: 731
  schemas:
    UserRouteDetail:
      type: object
      properties:
        id:
          type: integer
          description: Enrollment id.
        route:
          allOf:
            - $ref: '#/components/schemas/Route'
            - type: object
              properties:
                contentmoduleroute_set:
                  type: array
                  items:
                    type: object
                    properties:
                      ordering:
                        type: integer
                      content_module:
                        allOf:
                          - $ref: '#/components/schemas/Module'
                          - type: object
                            properties:
                              progress:
                                type: integer
                                description: >-
                                  User's progress in the module (0 if not
                                  started).
                              is_active:
                                type: boolean
        progress_percentage:
          type: number
        real_minutes_usage:
          type: number
        removed:
          type: boolean
    Route:
      type: object
      description: A course.
      properties:
        id:
          type: integer
        external_id:
          type:
            - string
            - 'null'
          description: Your own identifier for the course.
        name:
          type: string
        slug_name:
          type: string
        total_contents:
          type: integer
        minutes_duration:
          type: integer
        starting_date:
          type:
            - string
            - 'null'
          format: date
        rating:
          type: number
        language:
          $ref: '#/components/schemas/Language'
        finished:
          type: boolean
          description: The course content is complete.
        published:
          type: boolean
        automatic_advance:
          type: boolean
        alias:
          type:
            - string
            - 'null'
        test_trials_available:
          type:
            - integer
            - 'null'
          description: >-
            Evaluation attempts allowed; null or 0 means the company-wide value
            applies.
    Module:
      type: object
      properties:
        pk:
          type: integer
        slug_name:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        minutes_duration:
          type: integer
        total_contents:
          type: integer
        alias:
          type:
            - string
            - 'null'
          description: Alternative identifier for integrations.
    Error:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
    Language:
      type: string
      enum:
        - es
        - en
        - pt
  responses:
    Forbidden:
      description: Missing, invalid, revoked or expired API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Authentication credentials were not provided.
    NotFound:
      description: Not found (or not visible to this API key).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Not found.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Company API key. The header value must be `Api-Key <token>`, e.g.
        `Authorization: Api-Key AbCd1234.xxxxxxxx`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.