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[attributes][invoice-period-id] Invoice period id
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.eyJzdWIiOjIwLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzcyMjExOTk4fQ.enGKHGPrFgCu0kt-MimuFubM3wn_hoAYsCXReBCfYCo
Host: example.org
Cookie: 

Route

PUT /api/rest/admin/accounts/24

Body

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

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/"d44d62e73e35ce056f45ddbe6453e34a"
cache-control: max-age=0, private, must-revalidate
x-request-id: ed0439a5-71c1-485d-82e8-5eb0828d1061
x-runtime: 0.021398
content-length: 996

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": "486e0e46-13fd-11f1-94d1-cacc5eb17c13",
      "origination-capacity": null,
      "termination-capacity": null,
      "total-capacity": null,
      "send-invoices-to": null,
      "invoice-period-id": 3,
      "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
      }
    }
  }
}