> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.prividium.com/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# asset-instructions

Asset instruction endpoints

## List assets

`GET /asset-instructions/assets`

The assets this deployment serves.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_: Assets this deployment serves.
  - `id` `string` _(required)_: Asset ID used in the asset-scoped paths.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets
```

```ts
fetch('/api/asset-instructions/assets')
```

## List instructions

`GET /asset-instructions/assets/{assetId}/operations`

Instruction records, including pending and failed work, newest first.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.

### Query parameters

- `account` `string`: Only instructions for this account code.
- `kind` `string`: Only ordinary instructions (OPERATION) or only corrections (CORRECTION).
- `state` `string`: Only instructions in this lifecycle state.
- `sequence` `integer`: Only the instruction at this sequence.
- `sourceSystem` `string`: Only instructions from this source system.
- `sourceEventId` `string`: Only instructions with this source event ID.
- `transactionId` `string <uuid>`: Only the instruction with this transaction ID.
- `transactionHash` `string`: Only the instruction whose broadcast transaction has this hash.
- `limit` `integer`: Maximum number of records to return.
- `offset` `integer`: Number of records to skip.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_: Instruction records, newest first.
  - `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
  - `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
  - `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
  - `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
  - `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
  - `instruction` `object` _(required)_: Instruction as accepted, with its kind.
    - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
    - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
    - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
    - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
    - `source` `object` _(required)_: Source system event the instruction comes from.
      - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
      - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
      - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
      - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
    - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
    - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
    - `operationId` `string` _(required)_: Operation ID recorded on chain.
    - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
    - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
    - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
    - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
    - `account` `object` _(required)_: Account the operation changed.
      - `name` `string` _(required)_: Account code from the asset's profile.
      - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
      - `wallet` `string` _(required)_: Wallet address recorded in the event.
    - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
    - `operator` `string` _(required)_: Address that called the contract to execute the operation.
    - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
    - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
    - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
    - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
    - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
    - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
    - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
  - `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
  - `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
  - `updatedAt` `string <date-time>` _(required)_: Time the record last changed.
- `total` `integer` _(required)_: Number of records matching the filters, before limit and offset.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl '/api/asset-instructions/assets/string/operations?account=string&kind=OPERATION&state=RECEIVED&sequence=0&sourceSystem=string&sourceEventId=string&transactionId=00000000-0000-0000-0000-000000000000&transactionHash=string&limit=100&offset=0'
```

```ts
fetch('/api/asset-instructions/assets/string/operations?account=string&kind=OPERATION&state=RECEIVED&sequence=0&sourceSystem=string&sourceEventId=string&transactionId=00000000-0000-0000-0000-000000000000&transactionHash=string&limit=100&offset=0')
```

## Submit an instruction

`POST /asset-instructions/assets/{assetId}/operations`

Durably accept an instruction for controlled execution.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.

### Request body (required) (`application/json`)

- `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
- `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
- `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
- `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
- `source` `object` _(required)_: Source system event the instruction comes from.
  - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
  - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
  - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
  - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
- `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
- `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
- `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
- `instruction` `object` _(required)_: Instruction as accepted, with its kind.
  - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
  - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
  - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
  - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
  - `source` `object` _(required)_: Source system event the instruction comes from.
    - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
    - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
    - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
    - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
  - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
- `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
  - `operationId` `string` _(required)_: Operation ID recorded on chain.
  - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
  - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
  - `account` `object` _(required)_: Account the operation changed.
    - `name` `string` _(required)_: Account code from the asset's profile.
    - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
    - `wallet` `string` _(required)_: Wallet address recorded in the event.
  - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
  - `operator` `string` _(required)_: Address that called the contract to execute the operation.
  - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
  - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
  - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
  - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
  - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
  - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
  - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
- `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
- `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
- `updatedAt` `string <date-time>` _(required)_: Time the record last changed.

#### `202`: Default Response

Body (`application/json`):

- `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
- `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
- `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
- `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
- `instruction` `object` _(required)_: Instruction as accepted, with its kind.
  - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
  - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
  - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
  - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
  - `source` `object` _(required)_: Source system event the instruction comes from.
    - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
    - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
    - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
    - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
  - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
- `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
  - `operationId` `string` _(required)_: Operation ID recorded on chain.
  - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
  - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
  - `account` `object` _(required)_: Account the operation changed.
    - `name` `string` _(required)_: Account code from the asset's profile.
    - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
    - `wallet` `string` _(required)_: Wallet address recorded in the event.
  - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
  - `operator` `string` _(required)_: Address that called the contract to execute the operation.
  - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
  - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
  - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
  - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
  - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
  - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
  - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
- `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
- `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
- `updatedAt` `string <date-time>` _(required)_: Time the record last changed.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/operations \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "operation": "mint",
  "account": "string",
  "amount": "string",
  "sequence": 0,
  "source": {
    "system": "string",
    "eventId": "string",
    "eventType": "string",
    "timestamp": "1970-01-01T00:00:00.000Z"
  }
}'
```

```ts
fetch('/api/asset-instructions/assets/string/operations', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    operation: 'mint',
    account: 'string',
    amount: 'string',
    sequence: 0,
    source: {
      system: 'string',
      eventId: 'string',
      eventType: 'string',
      timestamp: '1970-01-01T00:00:00.000Z'
    }
  })
})
```

## Submit a correction

`POST /asset-instructions/assets/{assetId}/corrections`

Durably accept an instruction for controlled execution.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.

### Request body (required) (`application/json`)

- `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
- `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
- `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
- `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
- `source` `object` _(required)_: Source system event the instruction comes from.
  - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
  - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
  - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
  - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
- `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
- `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
- `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
- `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
- `instruction` `object` _(required)_: Instruction as accepted, with its kind.
  - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
  - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
  - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
  - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
  - `source` `object` _(required)_: Source system event the instruction comes from.
    - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
    - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
    - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
    - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
  - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
- `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
  - `operationId` `string` _(required)_: Operation ID recorded on chain.
  - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
  - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
  - `account` `object` _(required)_: Account the operation changed.
    - `name` `string` _(required)_: Account code from the asset's profile.
    - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
    - `wallet` `string` _(required)_: Wallet address recorded in the event.
  - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
  - `operator` `string` _(required)_: Address that called the contract to execute the operation.
  - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
  - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
  - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
  - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
  - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
  - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
  - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
- `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
- `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
- `updatedAt` `string <date-time>` _(required)_: Time the record last changed.

#### `202`: Default Response

Body (`application/json`):

- `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
- `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
- `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
- `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
- `instruction` `object` _(required)_: Instruction as accepted, with its kind.
  - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
  - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
  - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
  - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
  - `source` `object` _(required)_: Source system event the instruction comes from.
    - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
    - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
    - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
    - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
  - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
- `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
  - `operationId` `string` _(required)_: Operation ID recorded on chain.
  - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
  - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
  - `account` `object` _(required)_: Account the operation changed.
    - `name` `string` _(required)_: Account code from the asset's profile.
    - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
    - `wallet` `string` _(required)_: Wallet address recorded in the event.
  - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
  - `operator` `string` _(required)_: Address that called the contract to execute the operation.
  - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
  - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
  - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
  - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
  - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
  - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
  - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
- `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
- `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
- `updatedAt` `string <date-time>` _(required)_: Time the record last changed.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/corrections \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "operation": "mint",
  "account": "string",
  "amount": "string",
  "sequence": 0,
  "source": {
    "system": "string",
    "eventId": "string",
    "eventType": "string",
    "timestamp": "1970-01-01T00:00:00.000Z"
  },
  "correctedOperationId": "string"
}'
```

```ts
fetch('/api/asset-instructions/assets/string/corrections', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    operation: 'mint',
    account: 'string',
    amount: 'string',
    sequence: 0,
    source: {
      system: 'string',
      eventId: 'string',
      eventType: 'string',
      timestamp: '1970-01-01T00:00:00.000Z'
    },
    correctedOperationId: 'string'
  })
})
```

## Get an instruction

`GET /asset-instructions/assets/{assetId}/operations/{operationId}`

Read an instruction by its stable source-derived operation ID.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
- `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
- `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
- `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
- `instruction` `object` _(required)_: Instruction as accepted, with its kind.
  - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
  - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
  - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
  - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
  - `source` `object` _(required)_: Source system event the instruction comes from.
    - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
    - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
    - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
    - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
  - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
- `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
  - `operationId` `string` _(required)_: Operation ID recorded on chain.
  - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
  - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
  - `account` `object` _(required)_: Account the operation changed.
    - `name` `string` _(required)_: Account code from the asset's profile.
    - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
    - `wallet` `string` _(required)_: Wallet address recorded in the event.
  - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
  - `operator` `string` _(required)_: Address that called the contract to execute the operation.
  - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
  - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
  - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
  - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
  - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
  - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
  - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
- `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
- `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
- `updatedAt` `string <date-time>` _(required)_: Time the record last changed.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/operations/string
```

```ts
fetch('/api/asset-instructions/assets/string/operations/string')
```

## Get the stream overview

`GET /asset-instructions/assets/{assetId}/overview`

Report the asset's next expected sequence, instruction counts per state, the instruction at that sequence and any execution hold.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `nextExpected` `integer` _(required)_: Next sequence to execute, one above the highest completed or released sequence.
- `states` `object[]` _(required)_: Instruction counts for each lifecycle state present in the asset's stream.
  - `state` `string` _(required)_: Lifecycle state.
  - `count` `integer` _(required)_: Number of the asset's instructions in that state.
- `cursor` `object`: Instruction at nextExpected, present once it has arrived.
  - `operationId` `string` _(required)_: Operation ID of the instruction at the cursor.
  - `state` `string` _(required)_: Lifecycle state of the instruction at the cursor.
  - `stage` `string` _(required)_: Execution step behind the state, or the reason the instruction stopped.
  - `error` `string`: Last recorded failure or wait reason.
  - `updatedAt` `string <date-time>` _(required)_: Time the record last changed.
- `hold` `object`: Execution hold over every asset of the deployment, present while placed.
  - `since` `string <date-time>` _(required)_: Time the hold was placed.
  - `reason` `string` _(required)_: Why the operator placed the hold.
  - `heldBy` `string`: Operator attribution, in the form asset-instructions:operator:<actorType>:<actorId>:<requestId>.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/overview
```

```ts
fetch('/api/asset-instructions/assets/string/overview')
```

## Place an execution hold

`PUT /asset-instructions/assets/{assetId}/execution-hold`

Stop starting new instructions for every asset of this deployment. New instructions are still accepted, and a transaction already broadcast still confirms.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.

### Request body (required) (`application/json`)

- `reason` `string` _(required)_: Why the operator placed the hold or closed the instruction, recorded with the change.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `since` `string <date-time>` _(required)_: Time the hold was placed.
- `reason` `string` _(required)_: Why the operator placed the hold.
- `heldBy` `string`: Operator attribution, in the form asset-instructions:operator:<actorType>:<actorId>:<requestId>.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/execution-hold \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "reason": "string"
}'
```

```ts
fetch('/api/asset-instructions/assets/string/execution-hold', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    reason: 'string'
  })
})
```

## Release the execution hold

`DELETE /asset-instructions/assets/{assetId}/execution-hold`

Release the execution hold. The executor resumes on its next pass.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.

### Responses

#### `204`: Default Response

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/execution-hold \
  --request DELETE
```

```ts
fetch('/api/asset-instructions/assets/string/execution-hold', {
  method: 'DELETE'
})
```

## Retry a halted instruction

`POST /asset-instructions/assets/{assetId}/operations/{operationId}/retry`

Start a halted instruction over with a new authorization, signing attempt and transaction.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.

### Request body (`application/json`)

- `confirmCustodyCallAbsent` `boolean`: True once the operator checked the Fireblocks console and found no call for the signing attempt.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
- `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
- `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
- `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
- `instruction` `object` _(required)_: Instruction as accepted, with its kind.
  - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
  - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
  - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
  - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
  - `source` `object` _(required)_: Source system event the instruction comes from.
    - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
    - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
    - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
    - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
  - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
- `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
  - `operationId` `string` _(required)_: Operation ID recorded on chain.
  - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
  - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
  - `account` `object` _(required)_: Account the operation changed.
    - `name` `string` _(required)_: Account code from the asset's profile.
    - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
    - `wallet` `string` _(required)_: Wallet address recorded in the event.
  - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
  - `operator` `string` _(required)_: Address that called the contract to execute the operation.
  - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
  - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
  - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
  - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
  - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
  - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
  - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
- `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
- `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
- `updatedAt` `string <date-time>` _(required)_: Time the record last changed.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/operations/string/retry \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "confirmCustodyCallAbsent": true
}'
```

```ts
fetch('/api/asset-instructions/assets/string/operations/string/retry', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    confirmCustodyCallAbsent: true
  })
})
```

## Close an instruction

`POST /asset-instructions/assets/{assetId}/operations/{operationId}/close`

Close the instruction at the cursor without executing it, releasing its sequence.

### Path parameters

- `assetId` `string` _(required)_: Asset ID, a lowercase slug from the list of assets this deployment serves.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.

### Request body (required) (`application/json`)

- `reason` `string` _(required)_: Why the operator placed the hold or closed the instruction, recorded with the change.
- `confirmCustodyCallAbsent` `boolean`: True once the operator checked the Fireblocks console and found no call for the signing attempt.

### Responses

#### `200`: Default Response

Body (`application/json`):

- `transactionId` `string <uuid>` _(required)_: Service-assigned UUID of the instruction record.
- `operationId` `string` _(required)_: Operation ID, the keccak256 hash of the organization, asset, source system and source event ID.
- `sequence` `integer` _(required)_: Position of the instruction in the asset's stream.
- `state` `string` _(required)_: Lifecycle state: RECEIVED waits for a policy decision or approval, READY_FOR_PROCESSING is authorized, PROCESSING is being signed, sent or confirmed, COMPLETED is confirmed on chain, and FAILED stopped without executing.
- `stage` `string` _(required)_: Execution step behind the state, such as AWAITING_POLICY, SIGNING or CONFIRMED, or the reason it stopped, such as POLICY_DENIED or CONTRACT_REVERT.
- `instruction` `object` _(required)_: Instruction as accepted, with its kind.
  - `operation` `string` _(required)_: Operation to execute: mint adds the amount to the account's wallet and burn removes it.
  - `account` `string` _(required)_: Account code from the asset's instruction profile, which maps it to a wallet.
  - `amount` `string` _(required)_: Positive integer amount in the asset's minor units, as a decimal string.
  - `sequence` `integer` _(required)_: Position in the asset's stream, consecutive from 1 across every source system and correction.
  - `source` `object` _(required)_: Source system event the instruction comes from.
    - `system` `string` _(required)_: Source system name, listed in the asset's profile and bound to the caller.
    - `eventId` `string` _(required)_: Event ID, unique within the source system, from which the operation ID is derived.
    - `eventType` `string` _(required)_: Event type, which the asset's profile maps to the operation.
    - `timestamp` `string <date-time> | string` _(required)_: Time of the event in the source system, as an ISO 8601 datetime.
  - `correctedOperationId` `string`: Operation ID of the completed ordinary operation this correction reverses, on the same account in the opposite direction, omitted for an aggregate adjustment.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
- `execution` `object`: Evidence read from the AssetOperationRecorded event, present once the operation is confirmed.
  - `operationId` `string` _(required)_: Operation ID recorded on chain.
  - `relatedOperationId` `string` _(required)_: Operation ID a correction reverses, the zero hash for every other operation.
  - `operation` `string` _(required)_: Operation recorded on chain, mint or burn.
  - `kind` `string` _(required)_: OPERATION for an ordinary instruction, CORRECTION for a correction.
  - `operationType` `string` _(required)_: ISSUANCE is an ordinary mint, REDEMPTION an ordinary burn, and CORRECTIVE_ISSUANCE and CORRECTIVE_REDEMPTION are their corrective forms.
  - `account` `object` _(required)_: Account the operation changed.
    - `name` `string` _(required)_: Account code from the asset's profile.
    - `walletId` `string` _(required)_: On-chain wallet ID, the bytes32 encoding of the wallet key.
    - `wallet` `string` _(required)_: Wallet address recorded in the event.
  - `amount` `string` _(required)_: Amount in the asset's minor units, as a decimal string.
  - `operator` `string` _(required)_: Address that called the contract to execute the operation.
  - `resultingBalance` `string` _(required)_: Wallet balance after the operation, in the asset's minor units.
  - `resultingSupply` `string` _(required)_: Total supply after the operation, in the asset's minor units.
  - `transactionHash` `string` _(required)_: Hash of the transaction that executed the operation.
  - `blockNumber` `string` _(required)_: Number of the block holding the transaction, as a decimal string.
  - `blockHash` `string` _(required)_: Hash of the block holding the transaction.
  - `logIndex` `integer` _(required)_: Index of the AssetOperationRecorded log in the block.
  - `timestamp` `string`: Block timestamp in Unix seconds as a decimal string, absent when the node does not report it.
- `error` `string`: Last recorded failure or wait reason, such as SIGNER_BUSY.
- `createdAt` `string <date-time>` _(required)_: Time the instruction was accepted.
- `updatedAt` `string <date-time>` _(required)_: Time the record last changed.

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_: Details of the error.
  - `code` `string` _(required)_: A machine-readable error code.
  - `message` `string` _(required)_: A human-readable description of the error.
  - `issues` `unknown[]`: Validation issues, present when the request failed validation.

### Example request

```bash
curl /api/asset-instructions/assets/string/operations/string/close \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "reason": "string",
  "confirmCustodyCallAbsent": true
}'
```

```ts
fetch('/api/asset-instructions/assets/string/operations/string/close', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    reason: 'string',
    confirmCustodyCallAbsent: true
  })
})
```
