> ## 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.

> ## Agent Instructions
> Trackstar is a unified REST API for WMS, cart, and carrier systems. Base URL: https://production.trackstarhq.com. There is no SDK; call the API with plain HTTP.
> Send x-trackstar-api-key on every request. Endpoints scoped to one connection also need x-trackstar-access-token. Read both from environment variables and never print them.
> Reads return data Trackstar has already synced from the connected system. Writes (POST, PUT, PATCH, DELETE) are forwarded to the connected system immediately.
> A new connection has no data until its initial sync finishes. Wait for the connection.historical-sync-completed webhook, or poll GET /connections/{connection_id} and check historical_sync_completed.
> List endpoints page with page_token and next_token (limit is capped at 1000). Repeat every filter on every page. Filters use field[operator]=value, for example created_date[gte]=2026-01-01T00:00:00Z.
> Write bodies must not contain null or empty strings; omit the field instead. Call GET /integrations/{integration_type}/{integration_name}/write-info first to learn the exact fields an integration accepts.
> To test without real credentials, POST /sandbox/generate-sandbox/{wms|cart|carrier} with the API key returns a sandbox access token. Start at https://docs.trackstarhq.com/how-to-guides/build-with-ai.md and install the skills with: npx skills add https://docs.trackstarhq.com

# List Carrier Files

> Returns raw invoice files (CSV, PDF, etc.) from the carrier connection, each with
a presigned download URL. Filter with created_date to select a time range.
Subscribe to the carrier-file.created webhook to be notified when a new file is
available, then fetch that file from /carrier/files/{id} for a fresh URL instead
of polling.



## 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 raw invoice files (CSV, PDF, etc.) from the carrier connection,
        each with

        a presigned download URL. Filter with created_date to select a time
        range.

        Subscribe to the carrier-file.created webhook to be notified when a new
        file is

        available, then fetch that file from /carrier/files/{id} for a fresh URL
        instead

        of polling.
      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: page_token
          description: >-
            The page token to use to retrieve the next page of results. If this
            field is omitted, there are no subsequent pages.
          schema:
            type:
              - string
              - 'null'
            example: page_token
          required: false
        - in: query
          name: limit
          description: The maximum number of items to return. The default is 1000.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            example: 1000
          required: false
        - in: query
          name: ids
          schema:
            $ref: '#/components/schemas/CarrierFileIdsQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: created_date
          description: >-
            Use this parameter to retrieve items filtered to a specific date
            range. For example, to get all items between 2023-03-10 and
            2023-03-22, you would send
            `created_date[gte]=2023-03-10T00:00:00Z&created_date[lte]=2023-03-22T00:00:00Z.`
            See the [filtering docs](/how-to-guides/about-the-api#filtering) for
            more. The date format must always be YYYY-MM-DDTHH:MM:SSZ. 
             Note: it is much more efficient to use a combination of `gte`/`lte` than it is to use `gt`/`lt`.
          schema:
            $ref: '#/components/schemas/CarrierFileCreated_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: updated_date
          description: Same syntax as `created_date`.
          schema:
            $ref: '#/components/schemas/CarrierFileUpdated_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: trackstar_created_date
          description: Same syntax as `created_date`.
          schema:
            $ref: '#/components/schemas/CarrierFileTrackstar_Created_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: trackstar_updated_date
          description: Same syntax as `created_date`.
          schema:
            $ref: '#/components/schemas/CarrierFileTrackstar_Updated_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: file_name
          description: |-
            Filter by file name (matches names containing the value). 
             This filter is not indexed. Pair it with an indexed filter (`updated_date`, `created_date`, `trackstar_updated_date`, `trackstar_created_date`) using eq, gt, gte, lt or lte for faster, fuller pages. See [filtering docs](/how-to-guides/about-the-api#filtering).
          schema:
            $ref: '#/components/schemas/CarrierFileFile_NameQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: file_type
          description: |-
            Filter by the file extension. 
             This filter is not indexed. Pair it with an indexed filter (`updated_date`, `created_date`, `trackstar_updated_date`, `trackstar_created_date`) using eq, gt, gte, lt or lte for faster, fuller pages. See [filtering docs](/how-to-guides/about-the-api#filtering).
          schema:
            $ref: '#/components/schemas/CarrierFileFile_TypeQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: start_time
          description: 'Deprecated: use created_date[gte] instead.'
          schema:
            type: string
            format: date-time
            example: '2023-03-15T13:45:30Z'
          required: false
        - in: query
          name: end_time
          description: 'Deprecated: use created_date[lte] instead.'
          schema:
            type: string
            format: date-time
            example: '2023-03-15T13:45:30Z'
          required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarrierFilesListEndpoint'
          description: Successful response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
components:
  schemas:
    CarrierFileIdsQueryParam:
      type: object
      properties:
        in:
          type: array
          description: >-
            A comma-separated list of resource IDs. If provided, all other query
            params are ignored.
          example: resource_id_1,resource_id_2
          items:
            type: string
            description: ''
            example: _in
      required:
        - in
      additionalProperties: false
      title: CarrierFileIdsQueryParam
    CarrierFileCreated_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        gt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        gte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
      additionalProperties: false
      title: CarrierFileCreated_DateQueryParam
    CarrierFileUpdated_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        gt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        gte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
      additionalProperties: false
      title: CarrierFileUpdated_DateQueryParam
    CarrierFileTrackstar_Created_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        gt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        gte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
      additionalProperties: false
      title: CarrierFileTrackstar_Created_DateQueryParam
    CarrierFileTrackstar_Updated_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
            example: '2023-03-15T13:45:30Z'
        gt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        gte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lt:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        lte:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
      additionalProperties: false
      title: CarrierFileTrackstar_Updated_DateQueryParam
    CarrierFileFile_NameQueryParam:
      type: object
      properties:
        eq:
          type: string
          description: ''
          example: invoice.csv
        neq:
          type: string
          description: ''
          example: neq
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
            example: _in
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
            example: nin
        contains:
          type: string
          description: ''
          example: contains
        not_contains:
          type: string
          description: ''
          example: not_contains
      additionalProperties: false
      title: CarrierFileFile_NameQueryParam
    CarrierFileFile_TypeQueryParam:
      type: object
      properties:
        eq:
          type: string
          description: ''
          example: csv
        neq:
          type: string
          description: ''
          example: neq
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
            example: _in
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
            example: nin
        contains:
          type: string
          description: ''
          example: contains
        not_contains:
          type: string
          description: ''
          example: not_contains
      additionalProperties: false
      title: CarrierFileFile_TypeQueryParam
    CarrierFilesListEndpoint:
      type: object
      properties:
        data:
          type: array
          description: ''
          items:
            $ref: '#/components/schemas/CarrierFileWithUrlSchema'
        next_token:
          type:
            - string
            - 'null'
          description: >-
            See [pagination](/how-to-guides/about-the-api#pagination) for more
            details.
          example: next_token
        total_count:
          type: integer
          description: The number of items returned.
          example: 1
      required:
        - data
        - next_token
        - total_count
      additionalProperties: false
      title: CarrierFilesListEndpoint
    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
    CarrierFileWithUrlSchema:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the file.
          example: 2025-11-15T00:00:00/crawl_id/invoice.csv
        created_date:
          type: string
          format: date-time
          description: The date the file was created.
          example: '2022-01-01T00:00:00Z'
        updated_date:
          type: string
          format: date-time
          description: The date the file was last updated.
          example: '2022-01-02T05:05:05Z'
        file_name:
          type: string
          description: The file name.
          example: invoice.csv
        file_type:
          type:
            - string
            - 'null'
          description: The file extension.
          example: csv
        trackstar_created_date:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        trackstar_updated_date:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        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:
        - created_date
        - download_url
        - download_url_expires_at
        - file_name
        - file_type
        - id
        - trackstar_created_date
        - trackstar_updated_date
        - updated_date
      additionalProperties: false
      title: CarrierFileWithUrlSchema

````

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