> This page is for version Prod (default).
> For other versions, use one of these documentation indexes:
> - Prod (default): https://docs.chrt.com/prod/llms.txt
> - Staging: https://docs.chrt.com/staging/llms.txt
> - Dev: https://docs.chrt.com/dev/llms.txt

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

# Get

GET https://api.chrt.com/operations/operations_tasks/v1/{task_id}

Retrieves a single OperationsTask by id. | authz: min_org_role=operator | () -> (OperationsTask1)

Reference: https://docs.chrt.com/api-reference/api-reference/operations/operations-tasks/get-v-1

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.chrt.com` (Production, default)
- `https://api.dev.chrt.com` (Development)
- `https://api.staging.chrt.com` (Staging)
- `https://localhost:8000` (Local)

## Request

### Path parameters

- `task_id` (string, required)

## Response

### 200

Successful Response

- `_id` (string, required)
- `description` (string, required)
- `order_id` (string, required)
- `order_short_id` (string, required)
- `org_id` (string, required) — Must be a string starting with `org_`
- `schema_version` (integer, required)
- `task_type` (enum, required) — Coarse functional buckets a dispatcher batch-processes (powers the per-type functional-queue index). Granular SOP specifics live in the Task's `title`/`description`, not here. Ordered roughly along the shipment lifecycle (review -> research -> book -> track/verify -> contact -> billing). The buckets are the distinct *modes of work* an operator sits down and batches; the exact SOP step (e.g. "Send Shipping Label", "CBC Call", "Get Pack Time") is captured in the title. Contact is split by *who* (customer, agent, airline, other), not by *channel* (call vs. email) — the recipient is what a dispatcher batches around, and the channel is captured in title/description detail.
  - Allowed values: `review_order_details`, `flight_check`, `facility_check`, `weather_check`, `book_cargo`, `customs`, `track_and_verify`, `contact_customer`, `contact_agent`, `contact_airline`, `contact_other`, `finalize_billing`, `custom`, `other`
- `title` (string, required)
- `assigned_user_ids` (list of string, optional)
- `comments` (list of OperationsTaskComment1, optional)
- `completed_at_timestamp` (datetime, optional)
- `completed_by_user_id` (string, optional) — Must be a string starting with `user_`
- `deadline_timestamp` (datetime, optional)
- `department_id` (string, optional)
- `entry_tag` (string, optional)
- `order_off_chrt_reference_id` (string, optional) — Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved).
- `source_task_list_id` (string, optional)
- `status` (enum, optional) — Operator-driven lifecycle of an operations task. Manually driven by operators for now (no automatic transitions). Kept structurally parallel to the Check status model in anticipation of the eventual Task \<-> Check merge.
  - Allowed values: `not_started`, `in_progress`, `blocked`, `completed`, `skipped`, `cancelled`

## Errors

### 422 Operations Tasks Get V1request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### OperationsTaskComment1

- `comment` (string, required)
- `timestamp` (datetime, required)
- `user_id` (string, required) — Must be a string starting with `user_`
- `id` (string, optional)

### ValidationError

- `loc` (list of LocationItem, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (map from string to any, optional)
- `input` (any, optional)

### LocationItem

- string
- integer

## Examples

**Response**

```json
{
  "_id": "_id",
  "description": "description",
  "order_id": "order_id",
  "order_short_id": "order_short_id",
  "org_id": "org_id",
  "schema_version": 1,
  "task_type": "review_order_details",
  "title": "title",
  "assigned_user_ids": [
    "assigned_user_ids"
  ],
  "comments": [
    {
      "comment": "comment",
      "timestamp": "2024-01-15T09:30:00Z",
      "user_id": "user_id",
      "id": "id"
    }
  ],
  "completed_at_timestamp": "2024-01-15T09:30:00Z",
  "completed_by_user_id": "completed_by_user_id",
  "deadline_timestamp": "2024-01-15T09:30:00Z",
  "department_id": "department_id",
  "entry_tag": "entry_tag",
  "order_off_chrt_reference_id": "order_off_chrt_reference_id",
  "source_task_list_id": "source_task_list_id",
  "status": "not_started"
}
```

**SDK Code**

```python
import requests

url = "https://api.chrt.com/operations/operations_tasks/v1/task_id"

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

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

print(response.json())
```

```javascript
const url = 'https://api.chrt.com/operations/operations_tasks/v1/task_id';
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://api.chrt.com/operations/operations_tasks/v1/task_id"

	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://api.chrt.com/operations/operations_tasks/v1/task_id")

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://api.chrt.com/operations/operations_tasks/v1/task_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.chrt.com/operations/operations_tasks/v1/task_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.chrt.com/operations/operations_tasks/v1/task_id");
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://api.chrt.com/operations/operations_tasks/v1/task_id")! 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()
```