> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.hindsiteind.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.hindsiteind.com/_mcp/server.

# Get Assets Id Work Orders

GET https://app.hindsiteind.com/api/v2/assets/{id}/work_orders

Lists the work orders on an asset that are not cancelled, each with the tasks on it that are on this asset, for any user who can access the asset. Paged, 25 work orders per page.

Reference: https://api-docs.hindsiteind.com/hindsite-api/assets/get-assets-id-work-orders

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 Client Credentials Flow. To obtain an access token: 1. Request API credentials from HINDSITE support to receive your `client_id` and `client_secret` 2. Make a POST request to obtain an access token: ``` POST https://app.hindsiteind.com/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET ``` 3. The response will contain your access token: ```json { "access_token": "your_access_token_here", "token_type": "Bearer", "expires_in": 7200, "created_at": 1234567890 } ``` 4. Include the token in subsequent API requests: ``` Authorization: Bearer your_access_token_here ```

## Request

### Path parameters

- `id` (string, required)

### Query parameters

- `search` (string, optional) — Only return work orders whose title (or custom field values) match this text, plus work orders with a task on this asset whose title (or custom field values) match it. Nested tasks are narrowed the same way.
- `page` (integer, optional) — Page number, starting at 1.

## Response

### 200

Paginated AssetWorkOrder(s)

- `work_orders` (list of AssetWorkOrder, optional)
- `meta` (ApiV2AssetsIdWorkOrdersGetResponsesContentApplicationJsonSchemaMeta, optional)

## Errors

### 404 Not Found Error

The asset does not exist or the caller cannot access it

- `error` (string, optional)

## Types

### AssetWorkOrder

A work order on an asset, grouping the tasks on it that are on the asset.

- `id` (string, optional) — ULID
- `title` (string, optional)
- `status` (enum, optional)
  - Allowed values: `to_do`, `scheduled`, `backlog`, `in_progress`, `on_hold`, `completed`, `cancelled`
- `flagged` (boolean, optional)
- `actioned_on` (string, optional) — When the work order was last actioned, formatted for display (e.g. "Thursday, 2 March 2017"); empty string when not yet actioned
- `actioned_by` (list of User, optional) — Users assigned to the work order
- `tasks` (list of AssetWorkOrderTask, optional) — The work order's tasks that are on this asset, in status order. Tasks on a work order that carries the asset inherit it, so all of that work order's tasks appear; a work order that carries the asset but has no tasks yet has an empty list.
- `created_at` (long, optional) — Unix timestamp (seconds since epoch)
- `updated_at` (long, optional) — Unix timestamp (seconds since epoch)

### ApiV2AssetsIdWorkOrdersGetResponsesContentApplicationJsonSchemaMeta

- `page` (integer, optional)
- `per_page` (integer, optional)
- `total_pages` (integer, optional)
- `total_count` (integer, optional)

### User

- `id` (string, optional) — ULID
- `email` (string, optional)
- `name` (string, optional)
- `is_admin` (boolean, optional)
- `location_manager` (boolean, optional)
- `last_active_at` (long, optional) — Unix timestamp (seconds since epoch)
- `archived` (boolean, optional)
- `organisation_id` (string, optional) — ULID
- `created_at` (long, optional) — Unix timestamp (seconds since epoch) when the record was created
- `updated_at` (long, optional) — Unix timestamp (seconds since epoch) when the record was last updated

### AssetWorkOrderTask

A task on the asset, nested under its work order in GET /api/v2/assets/\{id}/work\_orders.

- `id` (string, optional) — ULID
- `title` (string, optional)
- `status` (enum, optional)
  - Allowed values: `not_started`, `scheduled`, `in_progress`, `completed`, `incomplete`
- `flagged` (boolean, optional)
- `actioned_on` (string, optional) — When the task was last actioned, formatted for display (e.g. "Thursday, 2 March 2017"); empty string when not yet actioned
- `actioned_by` (list of User, optional) — Contributors to the task's form for instructed tasks; the user who started and the user who completed it for uninstructed tasks
- `instruction_id` (string, optional, nullable) — ULID. Null for uninstructed tasks.
- `form_id` (string, optional, nullable) — ULID. null when no form has been started for the task.
- `created_at` (long, optional) — Unix timestamp (seconds since epoch)
- `updated_at` (long, optional) — Unix timestamp (seconds since epoch)

## Examples

**Response**

```json
{
  "work_orders": [
    {
      "id": "string",
      "title": "string",
      "status": "to_do",
      "flagged": true,
      "actioned_on": "string",
      "actioned_by": [
        {
          "id": "string",
          "email": "string",
          "name": "string",
          "is_admin": true,
          "location_manager": true,
          "last_active_at": 1,
          "archived": true,
          "organisation_id": "string",
          "created_at": 1,
          "updated_at": 1
        }
      ],
      "tasks": [
        {
          "id": "string",
          "title": "string",
          "status": "not_started",
          "flagged": true,
          "actioned_on": "string",
          "actioned_by": [
            {
              "id": "string",
              "email": "string",
              "name": "string",
              "is_admin": true,
              "location_manager": true,
              "last_active_at": 1,
              "archived": true,
              "organisation_id": "string",
              "created_at": 1,
              "updated_at": 1
            }
          ],
          "instruction_id": "string",
          "form_id": "string",
          "created_at": 1,
          "updated_at": 1
        }
      ],
      "created_at": 1,
      "updated_at": 1
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 1,
    "total_pages": 1,
    "total_count": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.hindsiteind.com/api/v2/assets/id/work_orders"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.hindsiteind.com/api/v2/assets/id/work_orders';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.hindsiteind.com/api/v2/assets/id/work_orders"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.hindsiteind.com/api/v2/assets/id/work_orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.hindsiteind.com/api/v2/assets/id/work_orders")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.hindsiteind.com/api/v2/assets/id/work_orders', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.hindsiteind.com/api/v2/assets/id/work_orders");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.hindsiteind.com/api/v2/assets/id/work_orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```