The balance resource allows you to set account balance. This resource using Account **external_id** as primary key.
| Name | Description |
|---|---|
| data[type] | Resource type (balances) |
| data[id] | Account External ID |
| data[attributes][balance] | Balance |
Accept: application/vnd.api+json Content-Type: application/vnd.api+json Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQ3LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzcyMjEyMDAwfQ.Xi_TdAVz1uNu4OaIFI_h7QfzvhkCRo_KoamnRnxu9ZQ Host: example.org Cookie:
PUT /api/rest/admin/accounts/9/balance
{"data":{"type":"balances","id":9,"attributes":{"balance":"21"}}}
x-frame-options: SAMEORIGIN x-xss-protection: 0 x-content-type-options: nosniff x-permitted-cross-domain-policies: none referrer-policy: strict-origin-when-cross-origin content-type: application/vnd.api+json vary: Accept etag: W/"316d7af160507a782c9882e889b037f9" cache-control: max-age=0, private, must-revalidate x-request-id: eb48bb53-1240-4d88-87f8-6736aff87e90 x-runtime: 0.011102 content-length: 131
200 OK
{
"data": {
"id": "9",
"type": "balances",
"links": {
"self": "http://example.org/api/rest/admin/balances"
},
"attributes": {
"balance": "21.0"
}
}
}