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[attributes][currency] Currency
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.eyJzdWIiOjIwLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzc2MzY1NzMxfQ.8waQSEuMYu9utM4qdEDCRv9r4-R4Ns3t5XfVSTpe6mg
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/"0fb99b184309478aa8e1dc632fccf2a3"
cache-control: max-age=0, private, must-revalidate
x-request-id: a86ff674-aa7b-452b-98ad-75de6bc9d3bf
x-runtime: 0.020895
content-length: 1013

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": "724cd70a-39c4-11f1-8c50-82ad38f4dd55",
      "origination-capacity": null,
      "termination-capacity": null,
      "total-capacity": null,
      "send-invoices-to": null,
      "invoice-period-id": 3,
      "timezone": "UTC",
      "currency": "USD"
    },
    "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
      }
    }
  }
}