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

# Get an operation

GET /operations/{key}

Serves one of your own operations by its `Idempotency-Key` — the `202` response's `Location` — with its phase and, once concluded, the outcome a synchronous caller would have read. Another caller's key, an unknown one, or a member restarted since is 404 `UNKNOWN_OPERATION`: poll the member that carried the request.

Reference: https://docs.immix.xyz/api-reference/rest-api/operations/get

## Authentication

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

## Request

### Path parameters

- `key` (string, required) — The operation's `Idempotency-Key`, as sent.

## Response

### 200

The journaled operation.

- `key` (string, required) — The `Idempotency-Key` as you sent it.
- `phase` (enum, required)
  - Allowed values: `PENDING`, `COMMITTED`, `CONCLUDED`
- `origin` (OperationRecordOrigin, required) — The gateway member and instance that carried the request — the journal is member-local.
- `createdTimestampNs` (string, required) — When the operation was journaled, epoch nanoseconds.
- `commandGlobalSequence` (string, optional) — The command's position once committed; absent while pending.
- `concludedTimestampNs` (string, optional) — When the answer landed, epoch nanoseconds; absent until concluded.
- `outcome` (OperationRecordOutcome, optional) — The stored outcome — what a retry of the key replays; absent until concluded.

## Errors

### 400 Get Operations Request Bad Request Error

Refused at the door — nothing reached the platform and the key was not journaled: a missing or malformed `Idempotency-Key` or `If-Match`, malformed JSON, a body `userId`, a body restating the path or `If-Match` differently, a money string off its `pattern` (an exponent, a plus sign, a bare point, surrounding whitespace) or past its `maxLength`, or one no value here can state (over 18 fractional digits, or past a 64-bit integer at its own scale), or any other value outside the schema.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 401 Get Operations Request Unauthorized Error

No bearer token, or one that does not verify.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 403 Get Operations Request Forbidden Error

Authenticated, but not admitted. `FORBIDDEN_PRINCIPAL`: a token with no `org_id`, a non-ASCII `org_id` or `sub`, a disabled user, or a local binding with no user. `AWAITING_ADMISSION`: your user is not yet admitted — every route but `GET /me` answers this until an administrator admits you. `ORG_NOT_ACTIVE`: your organisation is suspended, pending activation, retired or unregistered. The record owners' 403s (`CAPABILITY_DENIED`, `SELF_APPROVAL`, `NOT_PROPOSER`, …) are refusals on the platform's stream: they carry the position header, and a retried key replays them with `Idempotent-Replay`.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 404 Get Operations Request Not Found Error

No such operation for you on this member (`UNKNOWN_OPERATION`): a key never used here, another caller's, or one evicted from the journal.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 503 Get Operations Request Service Unavailable Error

This member is still catching up; retry shortly.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

## Types

### OperationRecordOrigin

The gateway member and instance that carried the request — the journal is member-local.

- `memberId` (integer, required)
- `instanceId` (string, required)

### OperationRecordOutcome

The stored outcome — what a retry of the key replays; absent until concluded.

- `httpStatus` (integer, required)
- `code` (string, required) — `OK` on an accepted write; otherwise the `Error.code` the refusal carried.
- `globalSequence` (string, required) — The answer's position; `0` when the outcome came from no change (a refusal at the door or in transit).
- `message` (string, optional) — The `error.message` a synchronous caller would have read (an order refusal's observed value against its limit, and the governing policy); absent when the outcome stated none. For humans; never parse it.
- `family` (enum, optional) — The resource the operation targeted — where its `entityId` (or, for orders, `orderId`) reads; a refused address declaration names the account it referred to, under `accounts`.
  - Allowed values: `orgs`, `users`, `credentials`, `accounts`, `account-addresses`, `portfolios`, `asset-policies`, `chain-policies`, `trading-policies`, `orders`
- `entityId` (integer, optional) — The record the outcome names: the id minted on an accepted create, the path's id otherwise, the referred account on a refused address declaration; absent when none. An orders operation names its order in `orderId` instead.
- `orderId` (string, optional) — On an orders operation, the order the outcome names — minted on an accepted submit, the path's on a cancel; absent when none. A 64-bit integer, so a decimal string.

### ErrorError

- `code` (string, required) — The code to branch on — stable and append-only: treat one you do not know by its HTTP status. The gateway's own: - 400: `MALFORMED_REQUEST`, `MISSING_IDEMPOTENCY_KEY`, `INVALID_IDEMPOTENCY_KEY`, `INVALID_IF_MATCH` - 401: `UNAUTHENTICATED` - 403: `FORBIDDEN_PRINCIPAL`, `AWAITING_ADMISSION`, `ORG_NOT_ACTIVE`, `CAPABILITY_DENIED` (the credential intake) - 404: `NOT_FOUND`, `UNKNOWN_OPERATION` - 409: `IDEMPOTENCY_KEY_REUSED`, `INTAKE_KEY_REUSED` - 413: `TOO_LARGE`, `PAYLOAD_TOO_LARGE` - 422: `INSTRUMENT_NOT_LIVE` and `ACCOUNT_NOT_ACTIVE` (`POST /orders`: a symbol or an account name nothing here holds — the orders owner answers the same codes to an unheld id), `VENUE_UNSUPPORTED`; `SCALE_UNKNOWN` (retired: only a member below `0.3.4` answers it) - 429: `INBOX_FULL`, `IN_FLIGHT_FULL`, `RATE_LIMITED` - 500: `INTERRUPTED`, `INTERNAL_ERROR`, `PROJECTION_MISS` - 503: `NOT_PRIMED`, `NOT_SERVING`, `OWNER_ABSENT`, `INTAKE_UNAVAILABLE`, `BALANCES_UNAVAILABLE`, `LOST`, `REJECTED_NOT_REGISTERED`, `REJECTED_NOT_ACTIVE` The record owners' refusals ride verbatim — `OrgRegisterRejected.reason` and `OrderRejected.reason` list them, and the guide's Errors section maps each to its status.
- `message` (string, optional) — Free text for humans; may change without notice — never parse it.

## Examples

**Response**

```json
{
  "key": "key",
  "phase": "PENDING",
  "origin": {
    "memberId": 1,
    "instanceId": "instanceId"
  },
  "createdTimestampNs": "createdTimestampNs",
  "commandGlobalSequence": "commandGlobalSequence",
  "concludedTimestampNs": "concludedTimestampNs",
  "outcome": {
    "httpStatus": 1,
    "code": "code",
    "globalSequence": "globalSequence",
    "message": "message",
    "family": "orgs",
    "entityId": 1,
    "orderId": "orderId"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/operations/key"

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

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

print(response.json())
```

```javascript
const url = 'https://api.example.com/operations/key';
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.example.com/operations/key"

	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.example.com/operations/key")

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.example.com/operations/key")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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