Update a Customer
Update details of a specific Customer
Request
| Endpoint: | /api/customers/{customer_id} |
| Example: | /api/customers/915 |
| Method: | PATCH |
| Headers: | Accept: application/vnd.cloudlx.v1+json |
| Authorization: Bearer <access_token> |
JSON Request
{
"name": "Abra Level 3 v3",
"currency_iso": "GBP",
"country_iso": "GB",
"realms": [
1,
2
],
"shown_sub_realms": [
313,
328
],
"enabled_sub_realms": [
313
]
}
JSON Parameters
| name | Description | A name for the customer |
| Type | String | |
| Example | Customer 1 | |
| realms | Description | An array of IDs for the realms the customer can access |
| Type | Array[Integer] | |
| Example | [1,2,7] | |
| shown_sub_realms | Description | An array of IDs for the sub-realms the customer can see |
| Type | Array[Integer] | |
| Example | [313,328] | |
| enabled_sub_realms | Description | An array of IDs for the sub-realms the customer can access. |
| Type | Array[Integer] | |
| Example | [313] |
Response
The customer model is returned in it's modified state with a 200 HTTP response code.
Example:
{
"id": 3,
"name": "Abra Level 3 v3",
"currency": {
"name": "GBP - British Pound",
"iso_2": "GB",
"iso_3": "GBP"
},
"country": {
"iso_2": "GB",
"name": "United Kingdom"
},
"realms": [
{
"id": 1,
"name": "Default",
"description": "Default"
},
{
"id": 2,
"name": "Networking",
"description": "Cloud Link Exchange"
}
],
"sub_realms": [
{
"id": 313,
"name": "SD WAN",
"description": null,
"has_access": true
},
{
"id": 328,
"name": "Cloud SBC & Conversion",
"description": null,
"has_access": false
}
]
}