curl --request POST \
--url http://localhost:55001/api/ledger/v2/{ledger}/transactions/{id}/revert \
--header 'Authorization: Bearer <token>'
{
"data": {
"insertedAt": "2023-11-07T05:31:56Z",
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"reference": "ref:001",
"metadata": {
"admin": "true"
},
"id": 1,
"reverted": true,
"revertedAt": "2023-11-07T05:31:56Z",
"preCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"postCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"preCommitEffectiveVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"postCommitEffectiveVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
}
}
}
curl --request POST \
--url http://localhost:55001/api/ledger/v2/{ledger}/transactions/{id}/revert \
--header 'Authorization: Bearer <token>'
{
"data": {
"insertedAt": "2023-11-07T05:31:56Z",
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"reference": "ref:001",
"metadata": {
"admin": "true"
},
"id": 1,
"reverted": true,
"revertedAt": "2023-11-07T05:31:56Z",
"preCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"postCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"preCommitEffectiveVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"postCommitEffectiveVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
}
}
}
The access token received from the authorization server in the OAuth 2.0 flow.
Name of the ledger.
"ledger001"
Transaction ID.
x >= 0
1234
Force revert
Revert transaction at effective date of the original tx
Set the dryRun mode. dry run mode doesn't add the logs to the database or publish a message to the message broker.
true
OK
The response is of type object
.