For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Customer Operation Tree

Retrieves a hierarchical view of a customer operation, including the main (parent) operation and all its related child operations.

This provides a complete picture of complex transaction chains, such as multi-step transfers, exchanges with commissions, or operations that spawn additional sub-operations.

Endpoint

GET/v2/billing/operation/{id}/tree

Link

Request

Path Parameters

Parameter
Type
Description
Required
Example

id

string

Operation ID to retrieve tree for.

Yes

"op_12345"

Headers

Key
Value
Required

Authorization

Bearer <JWT>

Yes

Accept

application/json

Yes


Response (200 OK)

Returns a hierarchical structure containing the main operation and all its child operations.

Response Fields

1. General Object (Parent Operation)

Contains the main operation details with the same structure as individual operations, plus additional provider information.

Field
Type
Description
Example

opid

string

Unique operation ID.

"op_12345"

isVisible

boolean

Visibility status.

true

status

string

Current status.

"SUCCESS"

type

string

Operation type.

"EXCHANGE"

paymentType

string

Payment method.

"EMPTY"

createdAt

string

Creation timestamp.

"2024-05-20T10:30:00Z"

updatedAt

string

Last update timestamp.

"2024-05-20T14:45:00Z"

source

object

Source details with provider info.

-

destination

object

Destination details with provider info.

-

sourceAmount

object

Source amount.

-

destinationAmount

object

Destination amount.

-

commissionAmount

object

Commission amount.

-

currentBalanceAmount

object

Current balance.

-

comment

string

Operation comment.

"Currency exchange"

reference

string

Reference number.

"REF202405201234"

isParent

boolean

Parent operation flag.

true

customer

object

Customer details.

-

documents

array

Associated documents.

-

2. Source/Destination Provider Objects

Enhanced source/destination objects with provider information:

Field
Type
Description
Example

account

string

Account ID.

"acc_12345"

beneficiar

string

Beneficiary ID.

"benef_abc"

accountProvider

string

Account provider: UNSET, LAYER2.

"LAYER2"

beneficiarProvider

string

Beneficiary provider: UNSET, LAYER2.

"LAYER2"

cuid

string

Customer ID.

"cust_12345"

3. Childs Array

Array of child operations with the same structure as the parent operation. Child operations are typically:

  • Commission operations

  • Fee operations

  • Related sub-transactions

  • Split payments

4. Money Object

Same structure as individual operations for all amount fields.

Example Response (Exchange Operation with Commission Child):

Example Response (Complex Transfer with Multiple Children):


Examples

Request


Error Responses

  1. Operation Not Found:

  2. Unauthorized:


Notes

  • Hierarchical View: Provides complete transaction chain visibility

  • Provider Information: Includes account/beneficiary provider details for multi-provider environments

  • Child Operations: Automatically generated operations (commissions, fees) appear as children

  • Status Aggregation: Child operations may have different statuses than parent

  • Audit Trail: Complete picture of all related financial movements

Common Parent-Child Relationships:

  • Exchange → Commission (fee for currency conversion)

  • Transfer → Commission (transfer fee)

  • Withdrawal → Commission (withdrawal fee)

  • Complex transfers with multiple legs

Provider Types:

  • UNSET: Standard internal accounts

  • LAYER2: External layer 2 providers or partner systems

Request sample

Response sample

Last updated