Skip to main content
GET
/
work-orders
/
Get Work Order List
curl --request GET \
  --url https://{company}.datatruck.io/api/v1/openapi/work-orders/ \
  --header 'Authorization: <api-key>'
{
  "count": 50,
  "next": "/work-orders/?page=2",
  "previous": null,
  "results": [
    {
      "id": 1001,
      "number": "WO-2025-001",
      "reference_number": "REF-12345",
      "status": "Pending",
      "vendor": "ABC Auto Repair",
      "assigned_to": "John Doe",
      "attachments": [
        {
          "id": 1,
          "name": "Invoice scan",
          "document": {
            "id": 123,
            "created_datetime": "2023-11-07T05:31:56Z",
            "file": "https://storage.example.com/docs/scan.pdf",
            "format": "pdf",
            "name": "scan.pdf"
          }
        }
      ],
      "mc_number": "MC-123456",
      "truck": "Truck-45",
      "trailer": "Trailer-22",
      "approved_by": "Jane Smith",
      "custom_payment_method": "Wire Transfer",
      "total_price": "1200.50",
      "paid_amount": "500.00",
      "balance": "700.50",
      "work_order_tasks": [
        {
          "id": 1,
          "number": "TASK-1001",
          "custom_task": "Brake replacement",
          "parts_price": "200.00",
          "parts_quantity": 2,
          "total_parts_price": "400.00",
          "labor_price": "100.00",
          "labor_hours": 2,
          "total_labor_price": "200.00",
          "total_price": "600.00"
        }
      ],
      "tags": [
        {
          "id": 10,
          "name": "Urgent"
        }
      ],
      "work_order_payments": [
        {
          "id": 5,
          "amount": "500.00",
          "note": "Partial payment received",
          "payment_date": "2025-03-10"
        }
      ],
      "scheduled_on_date": "2025-03-10T08:00:00Z",
      "procedure_name": "TRK Accident Damage / Repair"
    }
  ]
}

Authorizations

Authorization
string
header
required

Query Parameters

from_date
string<date>
required

Start date filter (inclusive). Format: YYYY-MM-DD.

Example:

"2025-01-01"

to_date
string<date>
required

End date filter (inclusive). Format: YYYY-MM-DD. Must be after from_date.

Example:

"2025-01-31"

page
integer

Page number for paginated results.

Example:

1

page_size
integer

Number of results per page (max 25, default 10).

Required range: x <= 25
Example:

10

ordering
string

ORM field path to order by. Prefix with - for descending.

Example:

"-created_datetime"

filter
string

JSON-encoded array of filter objects. Each object has column, value, and contains (operator). Supported operators: is, is_not, is_in, is_not_in, contains, before, after, greater_than, less_than, between, between_datetime, isnull, today, exclude, exclude_in.

Example:

"[{\"column\":\"status\",\"value\":\"Pending\",\"contains\":\"is\"}]"

Response

List of work orders retrieved successfully

count
integer

Total number of work orders

Example:

50

next
string | null

URL to the next page of results

Example:

"/work-orders/?page=2"

previous
string | null

URL to the previous page of results

Example:

null

results
object[]