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

# Get Load

> Fetch details of a specific order by its ID.



## OpenAPI

````yaml Get /orders/{pk}
openapi: 3.0.1
info:
  title: OpenAPI Datatruck
  description: >-
    To be able to use Datatruck OpenAPI you should create tokens from your
    dashboard. Go to your dashboard and create token with appropriate scopes and
    expiration. Expiration and scopes are optional as well as description for
    your token, but remember name is required.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://{company}.datatruck.io/api/v1/openapi/
security: []
paths:
  /orders/{pk}:
    get:
      summary: Retrieve an Order
      description: Fetch details of a specific order by its ID.
      operationId: getOrder
      parameters:
        - name: pk
          in: path
          required: true
          schema:
            type: integer
          description: The unique identifier of the order
      responses:
        '200':
          description: Successfully retrieved the order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '404':
          description: Order not found
components:
  schemas:
    Order:
      type: object
      required:
        - id
        - status
        - created_datetime
        - tags
        - equipment_type
        - equipment_type_child
        - estimated_mile
        - estimated_time
        - eta_detail
        - trip
        - batch_orders
        - assigned_driver_n_truck
        - assigned_carrier
        - is_flagged
        - documents
        - stops
      properties:
        id:
          type: integer
          example: 12345
          description: Unique order ID
        load_id:
          type: string
          nullable: true
          example: LD-987654
          description: Load identifier
        shipment_id:
          type: string
          nullable: true
          example: SHIP-123456
          description: Shipment identifier
        status:
          type: string
          example: In Progress
          description: Current status of the load
        load_pay:
          type: string
          format: decimal
          nullable: true
          example: '5000.00'
          description: Total payment amount for the load
        total_miles:
          type: string
          format: decimal
          nullable: true
          example: '1500.75'
          description: Total miles covered for the load
        created_datetime:
          type: string
          format: date-time
          example: '2025-02-06T12:00:00Z'
          description: Order creation timestamp
        created_by__full_name:
          type: string
          nullable: true
          example: John Doe
          description: Full name of the order creator
        total_other_pay:
          type: string
          format: decimal
          nullable: true
          example: '200.00'
          description: Additional payments related to the order
        total_pay:
          type: string
          format: decimal
          nullable: true
          example: '5200.00'
          description: Total payout for the order
        per_mile_revenue:
          type: string
          format: decimal
          nullable: true
          example: '3.25'
          description: Revenue per mile (optional)
        tags:
          type: array
          description: List of tags associated with the order
          items:
            $ref: '#/components/schemas/Tag'
        dispatcher__full_name:
          type: string
          nullable: true
          example: Alice Johnson
          description: Full name of the dispatcher
        customer__company_name:
          type: string
          nullable: true
          example: ABC Logistics
          description: Customer's company name
        mc_number__company_name:
          type: string
          nullable: true
          example: XYZ Carriers
          description: Motor carrier company name
        office__office_name:
          type: string
          nullable: true
          example: Dallas Office
          description: Office handling the order
        pickup_appointment_time:
          type: string
          format: date-time
          nullable: true
          example: '2025-02-06T08:30:00Z'
          description: Scheduled pickup appointment time
        delivery_appointment_time:
          type: string
          format: date-time
          nullable: true
          example: '2025-02-07T15:00:00Z'
          description: Scheduled delivery appointment time
        pickup_time:
          type: string
          format: date-time
          nullable: true
          example: '2025-02-06T09:00:00Z'
          description: Actual pickup time
        delivery_time:
          type: string
          format: date-time
          nullable: true
          example: '2025-02-07T16:30:00Z'
          description: Actual delivery time
        stops:
          type: array
          description: Stops along the order route
          items:
            $ref: '#/components/schemas/OrderStopLocation'
        equipment_type:
          type: string
          example: Refrigerated
          description: Equipment type used for transportation
        equipment_type_child:
          type: array
          description: List of child equipment types
          items:
            type: string
            example: Chilled Storage
        transportation_mode:
          type: string
          nullable: true
          example: Truckload
          description: Mode of transportation
        driver_requirements:
          type: array
          items:
            type: string
          description: Driver-specific requirements
        additional_equipments:
          type: array
          items:
            type: string
          description: Additional equipment required
        freight_requirements:
          type: array
          items:
            type: string
          description: Freight-specific requirements
        freight_requirements_min_temperature:
          type: string
          format: decimal
          nullable: true
          example: '2.0'
          description: Minimum temperature requirement
        freight_requirements_max_temperature:
          type: string
          format: decimal
          nullable: true
          example: '8.0'
          description: Maximum temperature requirement
        estimated_mile:
          type: string
          format: decimal
          example: '1200.50'
          description: Estimated miles for the trip
        estimated_time:
          type: integer
          example: 10
          description: Estimated travel time in hours
        eta_detail:
          $ref: '#/components/schemas/ETADetail'
        trip:
          $ref: '#/components/schemas/TripOrder'
        batch_orders:
          $ref: '#/components/schemas/OrderFullBatchOrder'
        assigned_driver_n_truck:
          type: object
          properties:
            driver_full_name:
              type: string
              nullable: true
            truck_unit_number:
              type: string
              nullable: true
        assigned_carrier:
          type: string
          nullable: true
        is_flagged:
          type: boolean
          example: false
          description: Whether the order has been flagged for attention.
        flagging_reason:
          type: string
          nullable: true
          example: null
          description: Reason the order was flagged, if applicable.
        documents:
          type: array
          description: >-
            Documents attached to the order (rate confirmation, bill of lading,
            proof of delivery, commercial invoice).
          items:
            $ref: '#/components/schemas/OrderDocument'
    Tag:
      type: object
      properties:
        name:
          type: string
          example: Urgent
          description: Tag name associated with the order
    OrderStopLocation:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the stop.
        order:
          type: integer
          description: ID of the parent order.
        stop_type:
          type: string
          example: pickup
          description: 'Type of stop: pickup or delivery.'
        location:
          $ref: '#/components/schemas/StopLocation'
          nullable: true
        reference_id:
          type: string
          nullable: true
          example: REF-001
        proof_of_delivery:
          type: string
          nullable: true
        ready_time_start_date:
          type: string
          format: date-time
          nullable: true
        ready_time_end_date:
          type: string
          format: date-time
          nullable: true
        note:
          type: string
          nullable: true
    ETADetail:
      type: object
      properties:
        on_time:
          type: boolean
        eta_datetime:
          type: string
          format: date-time
          nullable: true
    TripOrder:
      type: object
      nullable: true
      properties:
        id:
          type: integer
        status:
          type: string
          example: assigned
        trip_id:
          type: string
          nullable: true
          example: TR-002489-01
        mile:
          type: string
          format: decimal
          nullable: true
          example: '574.31'
        empty_mile:
          type: string
          format: decimal
          nullable: true
          example: '0.00'
        total_load_pay:
          type: string
          format: decimal
          nullable: true
          example: '148.17'
        carrier__name:
          type: string
          nullable: true
        driver__full_name:
          type: string
          nullable: true
        team_driver__full_name:
          type: string
          nullable: true
        truck__unit_number:
          type: string
          nullable: true
        pickup:
          $ref: '#/components/schemas/StopLocation'
          nullable: true
        delivery:
          $ref: '#/components/schemas/StopLocation'
          nullable: true
        settlement:
          type: object
          nullable: true
          properties:
            settlement__status:
              type: string
              nullable: true
            settlement__settlement_number:
              type: string
              nullable: true
            settlement__is_sent:
              type: boolean
              nullable: true
    OrderFullBatchOrder:
      type: object
      nullable: true
      properties:
        invoice_number:
          type: string
          nullable: true
        is_sent:
          type: boolean
          nullable: true
        batch:
          type: object
          nullable: true
          properties:
            batch_number:
              type: string
              nullable: true
            status:
              type: string
              nullable: true
    OrderDocument:
      type: object
      properties:
        file_type:
          type: string
          example: rate_confirmation
          description: >-
            Type of document: rate_confirmation, bill_of_lading,
            proof_of_delivery, commercial_invoice.
        file_link:
          type: string
          format: uri
          example: https://storage.example.com/docs/rc-12345.pdf
          description: URL to the document file.
        uploaded_by:
          type: string
          nullable: true
          example: John Doe
          description: Full name of the user who uploaded the document.
        uploaded_at:
          type: string
          format: date-time
          example: '2025-02-06T12:00:00Z'
          description: Timestamp when the document was uploaded.
      required:
        - file_type
        - file_link
        - uploaded_at
    StopLocation:
      type: object
      properties:
        id:
          type: integer
        company:
          type: string
          nullable: true
        address1:
          type: string
          nullable: true
        address2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        zip_code:
          type: string
          nullable: true
        contact_name:
          type: string
          nullable: true
        place_name:
          type: string
          nullable: true
        latitude:
          type: number
          format: float
          nullable: true
          example: 33.749
        longitude:
          type: number
          format: float
          nullable: true
          example: -84.388
        is_active:
          type: boolean

````