# List loadings

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /loadings:
    get:
      summary: List loadings
      deprecated: false
      description: |
        Returns paginated loadings within a date range (max 31 days).
        Both `date_from` and `date_to` are required.
      operationId: listLoadings
      tags:
        - LoadingCalendar API/Loadings
        - Loadings
      parameters:
        - name: date_from
          in: query
          description: Start date (YYYY-MM-DD)
          required: true
          schema:
            type: string
            format: date
            examples:
              - '2026-02-01'
        - name: date_to
          in: query
          description: End date (YYYY-MM-DD, max 31 days from date_from)
          required: true
          schema:
            type: string
            format: date
            examples:
              - '2026-02-28'
        - name: warehouse_id
          in: query
          description: ''
          required: false
          schema:
            type: integer
        - name: dock_id
          in: query
          description: ''
          required: false
          schema:
            type: integer
        - name: status
          in: query
          description: ''
          required: false
          schema:
            type: string
            enum:
              - new
              - arrived
              - in_progress
              - completed
            x-apidog-enum:
              - value: new
                name: ''
                description: ''
              - value: arrived
                name: ''
                description: ''
              - value: in_progress
                name: ''
                description: ''
              - value: completed
                name: ''
                description: ''
            examples:
              - new
        - name: direction
          in: query
          description: ''
          required: false
          schema:
            type: string
            enum:
              - inbound
              - outbound
            x-apidog-enum:
              - value: inbound
                name: ''
                description: ''
              - value: outbound
                name: ''
                description: ''
            examples:
              - inbound
        - name: registration_plate
          in: query
          description: Search by registration plate
          required: false
          schema:
            type: string
        - name: reference
          in: query
          description: Search by reference
          required: false
          schema:
            type: string
        - name: page
          in: query
          description: Page number (default 1, 25 results per page)
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        '200':
          description: Paginated list of loadings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadingsListResponse'
          headers: {}
          x-apidog-name: ''
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                      examples:
                        - Parameter is missing
                    examples:
                      - - Parameter is missing
                x-apidog-refs: {}
                x-apidog-orders:
                  - errors
                x-apidog-ignore-properties: []
              example:
                errors:
                  - Invalid or missing date parameter
          headers: {}
          x-apidog-name: BadRequest
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - Invalid API key
          headers: {}
          x-apidog-name: Unauthorized
      security: []
      x-apidog-folder: LoadingCalendar API/Loadings
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/361044/apis/api-4047024-run
components:
  schemas:
    LoadingsListResponse:
      type: object
      properties:
        loadings:
          type: array
          items:
            $ref: '#/components/schemas/Loading'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      x-apidog-orders:
        - loadings
        - meta
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
          examples:
            - 1
        per_page:
          type: integer
          examples:
            - 25
        total_count:
          type: integer
          examples:
            - 42
        total_pages:
          type: integer
          examples:
            - 2
      x-apidog-orders:
        - current_page
        - per_page
        - total_count
        - total_pages
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Loading:
      type: object
      properties:
        id:
          type: integer
        dock_id:
          type: integer
        dock_name:
          type: string
        warehouse_id:
          type: integer
        warehouse_name:
          type: string
        date:
          type: string
          format: date
          examples:
            - '2026-02-15'
        time_from:
          type: string
          format: time
          examples:
            - '09:00'
        time_to:
          type: string
          format: time
          examples:
            - '10:00'
        duration:
          type: integer
          description: Loading duration in minutes
          examples:
            - 60
          enum:
            - 15
            - 30
            - 45
            - 60
            - 90
            - 120
            - 180
            - 240
          x-apidog-enum:
            - value: 15
              name: ''
              description: ''
            - value: 30
              name: ''
              description: ''
            - value: 45
              name: ''
              description: ''
            - value: 60
              name: ''
              description: ''
            - value: 90
              name: ''
              description: ''
            - value: 120
              name: ''
              description: ''
            - value: 180
              name: ''
              description: ''
            - value: 240
              name: ''
              description: ''
        loading_duration_id:
          type: integer
          nullable: true
        reference:
          type: string
          examples:
            - ORD-2026-001
          nullable: true
        cargoson_reference:
          type: string
          description: Cargoson TMS reference
          nullable: true
        supplier:
          type: string
          nullable: true
        goods:
          type: string
          nullable: true
        carrier:
          type: string
          nullable: true
        direction:
          $ref: '#/components/schemas/LoadingDirection'
        status:
          $ref: '#/components/schemas/LoadingStatus'
        notes:
          type: string
          description: Notes for internal use
          nullable: true
        driver_name:
          type: string
          nullable: true
        driver_phone:
          type: string
          nullable: true
        registration_plate:
          type: string
          nullable: true
        carrier_email:
          type: string
          nullable: true
        author_email:
          type: string
        author_name:
          type: string
        arrived_at:
          type: string
          description: Truck arrived timestamp (YYYY-MM-DD HH:MM) in local time
          format: date-time
          examples:
            - 2026-01-25 11:00
          nullable: true
        started_at:
          type: string
          format: date-time
          examples:
            - 2026-01-25 12:00
          description: Loading started timestamp (YYYY-MM-DD HH:MM) in local time
          nullable: true
        finished_at:
          type: string
          format: date-time
          examples:
            - 2026-01-25 12:30
          description: Loading finished timestamp (YYYY-MM-DD HH:MM) in local time
          nullable: true
        actual_duration:
          type: integer
          description: Actual duration in minutes
          nullable: true
      x-apidog-orders:
        - id
        - dock_id
        - dock_name
        - warehouse_id
        - warehouse_name
        - date
        - time_from
        - time_to
        - duration
        - loading_duration_id
        - reference
        - cargoson_reference
        - supplier
        - goods
        - carrier
        - direction
        - status
        - notes
        - driver_name
        - driver_phone
        - registration_plate
        - carrier_email
        - author_email
        - author_name
        - arrived_at
        - started_at
        - finished_at
        - actual_duration
      required:
        - duration
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    LoadingStatus:
      type: string
      description: Loading status
      enum:
        - new
        - arrived
        - in_progress
        - completed
        - cancelled
      x-apidog-enum:
        - value: new
          name: ''
          description: ''
        - value: arrived
          name: ''
          description: ''
        - value: in_progress
          name: ''
          description: ''
        - value: completed
          name: ''
          description: ''
        - value: cancelled
          name: ''
          description: ''
      x-apidog-folder: ''
    LoadingDirection:
      type: string
      description: Loading direction
      enum:
        - inbound
        - outbound
      default: inbound
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          examples:
            - - Access forbidden
      x-apidog-orders:
        - errors
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    BearerAuth:
      type: bearer
      scheme: bearer
      description: API key obtained from the Developers section
servers:
  - url: https://loadingcalendar-staging.herokuapp.com/api/v1
    description: Testing Env
  - url: https://www.loadingcalendar.com/api/v1
    description: Prod Env
security: []

```