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

# List Carrier Files

> Returns a list of raw invoice files (CSV, PDF, etc.) from the carrier connection.
Files are filtered by the time Trackstar generated them (defaults to last 24 hours).



## OpenAPI

````yaml get /carrier/files
openapi: 3.1.0
info:
  description: >

    Trackstar is a Unified API that provides standard endpoints for Supply Chain
    Logistics. We currently offer an API for Warehouse Management Systems (WMS).
  title: Trackstar API
  version: 0.1.0
servers:
  - description: Trackstar API
    url: https://production.trackstarhq.com
security: []
tags: []
externalDocs:
  description: Trackstar API Documentation
  url: https://docs.trackstarhq.com
paths:
  /carrier/files:
    get:
      tags:
        - carrier
        - Files
      summary: List Carrier Files
      description: >-
        Returns a list of raw invoice files (CSV, PDF, etc.) from the carrier
        connection.

        Files are filtered by the time Trackstar generated them (defaults to
        last 24 hours).
      operationId: get_carrier_get_files
      parameters:
        - in: header
          name: x-trackstar-api-key
          description: Your organization-level Trackstar API key.
          schema:
            type: string
            example: <x-trackstar-api-key>
          required: true
        - in: header
          name: x-trackstar-access-token
          description: >-
            Your user's access token for a specific integration (ShipHero,
            Extensiv, etc).
          schema:
            type: string
            example: <x-trackstar-access-token>
          required: true
        - in: query
          name: start_time
          description: >-
            Filter by the time Trackstar generated the file in ISO Format.
            Defaults to 24 hours ago.
          schema:
            type: string
            format: date-time
          required: false
        - in: query
          name: end_time
          description: >-
            Filter by the time Trackstar generated the file in ISO Format.
            Defaults to current time.
          schema:
            type: string
            format: date-time
          required: false
        - in: query
          name: limit
          description: Maximum number of files to return (max 1000).
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 1000
            example: 0
          required: false
        - in: query
          name: page_token
          description: Token for paginating results.
          schema:
            type: string
          required: false
        - in: query
          name: file_type
          description: Filter by file type (e.g., csv, pdf).
          schema:
            type: string
            example: csv
          required: false
        - in: query
          name: file_name
          description: Filter files by name (case-insensitive match).
          schema:
            type: string
            example: '0081234'
          required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarrierFilesResponseSchema'
          description: Successful response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
components:
  schemas:
    CarrierFilesResponseSchema:
      type: object
      properties:
        data:
          type: array
          description: List of carrier files
          items:
            $ref: '#/components/schemas/CarrierFile'
        total_count:
          type: integer
          description: Number of files in current page.
          example: 45
        next_token:
          type: string
          description: Token for next page, null if no more results.
          example: base64_token
      required:
        - data
        - next_token
        - total_count
      additionalProperties: false
      title: CarrierFilesResponseSchema
    ValidationError:
      properties:
        error:
          type: string
        detail:
          type: object
          properties:
            <location>:
              type: object
              properties:
                <field_name>:
                  type: array
                  items:
                    type: string
      required:
        - error
      type: object
      title: ValidationError
    CarrierFile:
      type: object
      properties:
        file_name:
          type: string
          description: File name.
          example: invoice.csv
        generated_time:
          type: string
          format: date-time
          description: Time the file was generated.
        file_type:
          type: string
          description: File extension.
          example: csv
        download_url:
          type: string
          description: Presigned download URL (valid for 20 minutes).
          example: https://s3.amazonaws.com/...
        download_url_expires_at:
          type: string
          format: date-time
          description: Expiration timestamp for the download URL.
          example: '2025-01-15T10:50:00Z'
      required:
        - download_url
        - download_url_expires_at
        - file_name
        - file_type
        - generated_time
      additionalProperties: false
      title: CarrierFile

````