Update account
PATCH/clients/accounts/:id
clients.accounts.update
All parameters except id
are optional, only provided parameters will be
updated.
Request​
Path Parameters
Account ID.
- application/json
Bodyrequired
Client ID.
Name.
Possible values: <= 64 characters
Type of identification.
Possible values: [name
, ip
, ani
]
Notes.
null
Origination: tag(s) that are assigned to the event originated by the account.
[]
Termination: tag(s) that are assigned to the event terminated by the account.
[]
Technical prefix. Checked against the prefix of the
dst_party_id
in the xDR. Stripped from the dst_party_id
on successful match.
Possible values: <= 64 characters
null
Identification: ANI. Required when auth_type
is ani
.
Possible values: <= 64 characters
null
Identification: name. Required when auth_type
is name
.
Possible values: <= 128 characters
null
Identification: password. Used with name
auth type.
Should be supported by the equipment. Typically used when
registration of the account is done via billing system.
Possible values: <= 256 characters
null
Origination: if True
, the account is allowed to
originate events (calls).
false
Origination: concurrent channels capacity.
Possible values: >= 0
and <= 2147483647
null
Origination: rate table ID(s). If not given, the rate tables of the client are used.
null
Origination: routing plan ID. If not given, the routing plan of the client is used.
null
Termination: if True
, the account is allowed to
terminate events (calls).
false
Termination: concurrent channels capacity.
Possible values: >= 0
and <= 2147483647
null
Termination: rate table ID(s). If not given, the rate tables of the client are used.
null
Termination: protocol. Should be supported by the equipment.
Possible values: <= 64 characters
null
Termination: port. Should be supported by the equipment.
Possible values: <= 64 characters
null
Termination: proxy mode. Should be supported by the equipment.
Possible values: >= 0
and <= 7
1
Identification: IP address(es). Required when auth_type
is ip
.
[]
Identification: Equipment ID(s) on which the account is allowed to be used.
[]
Responses​
- 200
- 400
- 401
- 404
- 422
- 500
Number of the affected rows.
- application/json
- Schema
Schema
The request contains invalid arguments or is malformed
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "Invalid request",
"data": {
"name": "Empty value is not allowed",
"payment_terms_id": "Object \"payment_terms(123)\" was not found!"
}
}
}
Access is not authorized
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "utoken-auth-failed: Authentication Failed: IP 10.0.0.1 is not allowed",
"data": {
"code": "utoken-auth-failed",
"message": "Authentication Failed: IP 10.0.0.1 is not allowed"
}
}
}
Requested object was not found
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "not_found: Object \"clients(123)\" was not found!",
"data": {
"code": "not_found",
"message": "Object \"clients(123)\" was not found!",
"object_name": "clients",
"object_id": "123"
}
}
}
A logical error occurred, making the request unprocessable
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "invoices-zero-amount: Impossible to create an invoice with zero amount",
"data": {
"code": "invoices-zero-amount",
"message": "Impossible to create an invoice with zero amount"
}
}
}
An unexpected error occurred
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "An unexpected error occurred"
}
}
Authorization: X-Api-Key
name: X-Api-Keytype: apiKeyin: headerdescription: Token for API access
- curl
- python
- nodejs
- php
- CURL
curl -L -X PATCH 'https://docs.jerasoft.net/clients/accounts/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <X-Api-Key>'