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[relationships][contractor] Contractor
data[relationships][timezone] Timezone
data[relationships][customer-invoice-period] Customer invoice period
data[relationships][vendor-invoice-period] Vendor invoice period
data[relationships][customer-invoice-template] Customer invoice template
data[relationships][vendor-invoice-template] Vendor invoice template

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NDYsInN1YiI6MTV9.kP5Pebjn7mCYAM7HS56xaEXUgGtZeHF6rR0VRHW2Jk8
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-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"0960c532fcdc8210ee5e21dd307d9c00"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 6bfae300-669e-428b-a322-c7dee6a50a46
X-Runtime: 0.027225
Content-Length: 1178

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": null,
      "uuid": "9eb9c1e8-a26e-11ef-a008-0242ac120003",
      "origination-capacity": 1,
      "termination-capacity": 2,
      "total-capacity": 5,
      "send-invoices-to": null,
      "invoice-period": null
    },
    "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"
        }
      },
      "timezone": {
        "links": {
          "self": "http://example.org/api/rest/admin/accounts/24/relationships/timezone",
          "related": "http://example.org/api/rest/admin/accounts/24/timezone"
        },
        "data": {
          "type": "timezones",
          "id": "1"
        }
      },
      "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
      }
    }
  }
}