Balances API

The balance resource allows you to set account balance. This resource using Account **external_id** as primary key.

update values

PUT /api/rest/admin/accounts/:id/balance

Parameters

Name Description
data[type] Resource type (balances)
data[id] Account External ID
data[attributes][balance] Balance

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQ3LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzcyMjEyMDAwfQ.Xi_TdAVz1uNu4OaIFI_h7QfzvhkCRo_KoamnRnxu9ZQ
Host: example.org
Cookie: 

Route

PUT /api/rest/admin/accounts/9/balance

Body

{"data":{"type":"balances","id":9,"attributes":{"balance":"21"}}}

Response

Headers

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

Status

200 OK

Body

{
  "data": {
    "id": "9",
    "type": "balances",
    "links": {
      "self": "http://example.org/api/rest/admin/balances"
    },
    "attributes": {
      "balance": "21.0"
    }
  }
}