> 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 instance's document

GET /algos/instances/{id}/configs/{seq}

Serves one document of the instance by its sequence number; any other instance or sequence number is 404. Documents carry no version and no `ETag`: a document is immutable once staged — its outcome is the only field that moves.

Reference: https://docs.immix.xyz/api-reference/rest-api/algos/get-instance-config

## Authentication

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

## Request

### Path parameters

- `id` (integer, required) — The instance's id — a positive 32-bit integer the platform minted; the value an algo's orders carry as `algoInstanceId`.
- `seq` (integer, required) — A document's sequence number on its instance: 1 for the document the instance was created with, one more for every accepted write.

## Response

### 200

One document of the instance as submitted — a name its author gave an account or an instrument reads as the id it named, the name beside it as a comment where it fits — with its outcome. Documents carry no version, so no `ETag`.

- `accountIds` (list of integer, required) — Every account the document references, once each, ascending — the accounts the instance may trade.
- `commandKey` (string, required) — The write's `Idempotency-Key`, as sent.
- `configSeq` (integer, required) — The document's sequence number on its instance: 1 for the document the instance was created with, one more for every accepted write.
- `detail` (string, required) — The engine's reason where it refused the document; empty otherwise.
- `document` (string, required) — The document as authored, comments included — at most 6144 bytes of UTF-8.
- `globalSequence` (string, required) — The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.
- `instanceId` (integer, required) — The instance the document belongs to.
- `instrumentIds` (list of string, required) — Every instrument the document references, once each, ascending — 64-bit ids as decimal strings.
- `orgId` (integer, required) — The organisation that owns the instance.
- `outcome` (enum, required) — `STAGED` until the engine answers, then `APPLIED` or `REFUSED`; `PENDING_APPROVAL` is reserved and never served today. The value set is append-only: read an unknown name as `UNKNOWN`.
  - Allowed values: `UNKNOWN`, `STAGED`, `APPLIED`, `REFUSED`, `PENDING_APPROVAL`
- `remark` (string, required) — The submitter's remark.
- `submittedAtNs` (string, required) — When it was submitted — epoch nanoseconds as a decimal string.
- `outcomeAtNs` (string, optional, nullable) — When the engine's verdict landed — epoch nanoseconds as a decimal string; null while staged.
- `pendingByUserId` (integer, optional, nullable) — Reserved; always null.
- `userId` (integer, optional, nullable) — The user who submitted it.
- `unscaled` (boolean, optional, deprecated) — Never present since 0.3.3: every money value on this API states its own scale on the wire — a policy amount or cap since 0.3.3, an order's and an execution's since 0.3.2, a balance's since 0.3.1 — so a row is never served raw, whether or not this member holds the asset or instrument it references. Kept, deprecated, so a client generated from 0.3.2 still compiles; it goes at the next major.

## Errors

### 400 Get Instance Config Algos Request Bad Request Error

The request's shape is wrong: a non-positive id, an unknown `view` or filter value. No position rides a refusal that consulted no state.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 401 Get Instance Config Algos Request Unauthorized Error

No bearer token, or one that does not verify.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 403 Get Instance Config Algos 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`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 404 Get Instance Config Algos Request Not Found Error

No such row in your organisation — another organisation's row is indistinguishable from an absent one. The position header says as of when.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 503 Get Instance Config Algos Request Service Unavailable Error

This member cannot serve the algos surface now: `NOT_PRIMED` — it is still catching up; retry shortly — or `ALGOS_UNAVAILABLE` — it is deployed without the surface, because the algos owner is not released into its environment yet, so no instance is readable or commandable here and a retry changes nothing; every other route is unaffected. On a write also `NOT_SERVING`, `OWNER_ABSENT`, or the platform's own outcome for a command lost in transit — nothing journaled; retry against a serving member.

- `error` (ErrorError, required)
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

## Types

### 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`, `DOCUMENT_TOO_LARGE` - 422: a name nothing here holds: `INSTRUMENT_NOT_LIVE`, `ACCOUNT_NOT_ACTIVE` (`POST /orders`), `REFERENCE_UNKNOWN_INSTRUMENT`, `REFERENCE_UNKNOWN_ACCOUNT` (an algo document); `VENUE_UNSUPPORTED`; `SCALE_UNKNOWN` (retired at `0.3.4`) - 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`, `ALGOS_UNAVAILABLE`, `LOST`, `REJECTED_NOT_REGISTERED`, `REJECTED_NOT_ACTIVE` The record owners' refusals ride verbatim — `OrgRegisterRejected.reason`, `OrderRejected.reason` and `AlgoRejected.reason` list them; the guide maps each to its status.
- `message` (string, optional) — Free text for humans; may change without notice — never parse it.

## Examples

**Response**

```json
{
  "accountIds": [
    1
  ],
  "commandKey": "commandKey",
  "configSeq": 1,
  "detail": "detail",
  "document": "document",
  "globalSequence": "globalSequence",
  "instanceId": 1,
  "instrumentIds": [
    "instrumentIds"
  ],
  "orgId": 1,
  "outcome": "UNKNOWN",
  "remark": "remark",
  "submittedAtNs": "submittedAtNs",
  "outcomeAtNs": "outcomeAtNs",
  "pendingByUserId": 1,
  "userId": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/algos/instances/1/configs/1"

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

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

print(response.json())
```

```javascript
const url = 'https://api.example.com/algos/instances/1/configs/1';
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/algos/instances/1/configs/1"

	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/algos/instances/1/configs/1")

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/algos/instances/1/configs/1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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