Accounts API

update values

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

Parameters

Name Description
data[type] Resource type (accounts)
data[id] Account ID
data[attributes][name] Name
data[attributes][min-balance] Min balance
data[attributes][max-balance] Max balance
data[attributes][vat] Vat
data[attributes][origination-capacity] Origination capacity
data[attributes][termination-capacity] Termination capacity
data[attributes][total-capacity] Total capacity
data[attributes][send-invoices-to] Send invoices to
data[attributes][external-id] External id
data[attributes][balance-low-threshold] Balance low threshold
data[attributes][balance-high-threshold] Balance high threshold
data[attributes][send-balance-notifications-to] Send balance notifications to
data[attributes][invoice-period-id] Invoice period id
data[attributes][timezone] Timezone
data[relationships][contractor] Contractor
data[relationships][invoice-template] Invoice template

Request

Headers

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

Route

PUT /api/rest/admin/accounts/24

Body

{"data":{"type":"accounts","id":24,"attributes":{"name":"name","max-balance":20}}}

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/"b07b5858833f1ee86a21b2507a2e2c76"
cache-control: max-age=0, private, must-revalidate
x-request-id: df658b15-2302-4090-a5ff-9c78242a76bb
x-runtime: 0.022989
content-length: 999

Status

200 OK

Body

{
  "data": {
    "id": "24",
    "type": "accounts",
    "links": {
      "self": "http://example.org/api/rest/admin/accounts/24"
    },
    "attributes": {
      "name": "name",
      "balance": "0.0",
      "min-balance": "0.0",
      "max-balance": "20.0",
      "vat": "23.1",
      "balance-low-threshold": null,
      "balance-high-threshold": null,
      "send-balance-notifications-to": null,
      "destination-rate-limit": "0.3444",
      "max-call-duration": 36000,
      "external-id": 4,
      "uuid": "fd8aa880-e7d8-11f0-bf40-0a63caf27539",
      "origination-capacity": null,
      "termination-capacity": null,
      "total-capacity": null,
      "send-invoices-to": null,
      "invoice-period-id": null,
      "timezone": "UTC"
    },
    "relationships": {
      "contractor": {
        "links": {
          "self": "http://example.org/api/rest/admin/accounts/24/relationships/contractor",
          "related": "http://example.org/api/rest/admin/accounts/24/contractor"
        },
        "data": {
          "type": "contractors",
          "id": "5"
        }
      },
      "invoice-template": {
        "links": {
          "self": "http://example.org/api/rest/admin/accounts/24/relationships/invoice-template",
          "related": "http://example.org/api/rest/admin/accounts/24/invoice-template"
        },
        "data": null
      }
    }
  }
}