Allocating a bad reference
Video Recording
Get reference
Fetch the correct reference with GET /api/wallet/reference/:ref
The response should looks something like this:
{
"result": {
"accountId": "4e38479b-a67b-4ab2-aaea-a9afada67ca2",
"agencyId": "8a1f1a5c-3849-4137-bb82-f7a7adff30ca",
"partyId": "ae55d127-b217-4226-a8f0-8e6178be8468",
"accountType": "Tenant",
"reference": "8366526930",
"portfolioId": "4a198266-26eb-4545-af27-3e6d9ee4b9cb",
"propertyAddress": "...",
"walletRef": "...@uuid_.agency"
}
}
Check if the wallet exists
GET /api/wallet/:partyId/balances
with the partyId
param being the walletRef
from the above step. If globalBalance.exists = true
and globalBalance.assets
array is not empty then the party has a wallet and the following step can be skipped. If the party doesn't have a wallet you'll need to create it first.
Create wallet if it doesn't exist
POST /api/wallet/create
with the body below. These UUIDs can be taken from the correct reference lookup GET /api/wallet/reference/:ref
{
"account": "string",
"agency": "string",
"party": "string"
}
Check wallet was created before transferring the funds
Only transfer funds once the globalBalance.exists
is true
and globalBalance.assets
array is not empty. There could be a delay, so if it isn't reflecting try again in a few seconds.
Transfer funds
POST /api/wallet/transfer
{
"height": 0,
"asset": "zar#phoenix.coin",
"fromAccount": "badreference@phoenix.coin",
"amount": 0,
"description": "theCorrectReference",
// the following comes from wallet lookup "accountId" => "toAccount", "agencyId" => "agency", "partyId" => "toParty"
"toAccount": "UUID",
"toParty": "UUID",
"agency": "UUID"
}
Add txId to Clickup story
This is so we can trace the transaction if there was a mistake.