Operations
An operation is a unit of work with the client's money: create it, read its state, list the active ones and submit a decision on it.
List active operationsGET/api/v1/operations
listActiveOperationsToken required
Returns the caller's operations that have not reached a final status (COMPLETED, PARTIALLY_COMPLETED, FAILED, CANCELLED) with their current phase, the action expected from the client and open timeout events. Pages are cursor-based: pass nextCursor from the previous page as cursor.
Query parameters
| Field | Type | Description |
|---|---|---|
cursor | string | |
limit | integer (int32) |
|
Responses
200OKListActiveOperationsResponse
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
itemsrequired | array (object ActiveOperationSummaryResponse) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nextCursor | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Errors
Error codes are not described in the contract.
Create an operationPOST/api/v1/operations
createOperationToken required
Accepts a business operation — a sequence of money actions (payment, payout, refund) with execution policies — and starts executing it. The request is accepted as a whole and frozen at acceptance: later changes to settings do not affect it. Retrying with the same context.idempotencyKey and identical content returns the same operation; the same key with different content is rejected. The response carries operationId, the current status and phase, and the action expected from the client, if any.
Request bodyrequiredCreateOperationRequest
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settlementAccountIdrequired | string | Settlement account ID that owns the operation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
typerequired | string |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
controls | object CreateOperationControlsRequest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
moneyrequired | array (One of) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of — The variant is selected by the kind field value
Await decision intent (business gate, ADR-0100)
Payment intent
Payout intent (ADR-0114)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
contextrequired | object CreateOperationContextRequest | Operation context | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
201CreatedCreateOperationResponse
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationIdrequired | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
typerequired | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
statusrequired | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
phaserequired | string | Client-facing operational phase (ADR-0052). Distinct from
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
message | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiredAction | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiredActionSince | string (date and time, ISO 8601) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiredActionPayload | object OperationRequiredActionPayloadResponse | Payload for required action | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
linksrequired | array (object LinkResponse) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Errors
Error codes are not described in the contract.
Get an operationGET/api/v1/operations/{operationId}
getOperationToken required
Returns the current state of an operation: status, phase, the action expected from the client with its payload (payments to perform or the decision to submit), the money actions with their outcomes, and open timeout events.
Path parameters
| Field | Type | Description |
|---|---|---|
operationIdrequired | string |
Responses
200OKOperationViewResponse
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationIdrequired | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
statusrequired | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
typerequired | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
phaserequired | string | Client-facing operational phase (ADR-0052). Distinct from
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | string (date and time, ISO 8601) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
finalizedAt | string (date and time, ISO 8601) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
deadlineAt | string (date and time, ISO 8601) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
finalizationReason | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
finalizationMode | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiredAction | string |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiredActionSince | string (date and time, ISO 8601) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiredActionPayload | object OperationRequiredActionPayloadResponse | Payload for required action | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
links | array (object LinkResponse) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
activeTimeoutEvents | array (object ActiveTimeoutEventResponse) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payments | array (object OperationPaymentResponse) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paymentsRevision | integer (int64) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Errors
Error codes are not described in the contract.
Submit a decision on an operationPOST/api/v1/operations/{operationId}/decisions
submitOperationDecisionToken required
Submits the client's decision for an operation of type EXTERNAL_DECISION that is waiting for it (requiredAction = SUBMIT_DECISION): FINALIZE_AS_IS, ADJUST or COMPENSATE_AND_FINALIZE. decisionVersion must equal expectedDecisionVersion from the required-action payload; a repeated submission with the same version and content is idempotent. Responds with 202: the decision is accepted and executed asynchronously — follow the operation state or webhooks for the outcome. An operation that is not waiting for a decision rejects the request with OPERATION_NOT_WAITING_FOR_DECISION.
Path parameters
| Field | Type | Description |
|---|---|---|
operationIdrequired | string |
Request bodyrequiredSubmitDecisionRequest
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
decisionVersionrequired | integer (int32) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
decisionrequired | One of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of — The variant is selected by the kind field value
Денежная корректировка решения (ADR-0111)
Компенсировать исполненные денежные действия и финализировать операцию (ADR-0111)
Закрыть операцию в текущем финансовом состоянии (ADR-0111)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
context | map (string) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
202AcceptedSubmitDecisionResponse
| Field | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationIdrequired | string | |||||||||||||
statusrequired | string |
| ||||||||||||
phaserequired | string | Client-facing operational phase (ADR-0052). Distinct from
| ||||||||||||
decisionrequired | object DecisionStatusResponse | Decision status in response | ||||||||||||
| ||||||||||||||
linksrequired | array (object LinkResponse) | |||||||||||||
| ||||||||||||||
Errors
Error codes are not described in the contract.