JSON API » cards » cards/groups/update
Updates an existing card group.
Input parameters
Requires authentication and the cards role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
id | Integer | ID of card group to update. | Yes | |
allow_balance | Integer | 1 to allow the caller to hear their balance, 0 not to. | No | Current value. |
balance | Decimal | Default balance for new cards. | No | Current value. |
callerid | String | The callerid to send on outbound calls. | No | Current value. |
card_length | Integer | Length of new card numbers. | No | Current value. |
change_pin | Integer | 1 if users may change their PIN, 0 if they may not. | No | Current value. |
charge | Decimal | Amount to charge all cards each charge_period period. | No | Current value. |
charge_after | String | After which event the cards are charged. "create" or "firstuse". | No | Current value. |
charge_locked | Integer | 1 to charge locked card, 0 not to. | No | Current value. |
charge_period | String | How often to charge. "daily", "weekly", "monthly", "annually", or empty string for never. | No | Current value. |
clock | Integer | Percent of real time to give card users. | No | Current value. |
credit | Decimal | Default credit limit for new cards. | No | Current value. |
currency | String | Currency costs are in. | No | Current value. |
description | String | Description. | No | Current value. |
dialplan | String | Dial plan for outbound calls. Empty string for default. | No | Current value. |
dnumber | String | Always dial this number. | No | Current value. |
expires | String | The number of days after which cards expire. 0 for never. | No | Current value. |
expires_after | String | After which event the cards expire. "create" or "firstuse". | No | Current value. |
hide_expired | Integer | 1 if expired cards seem not to exist, else 0. | No | Current value. |
hide_locked | Integer | 1 if locked cards seem not to exist, else 0. | No | Current value. |
language | String | Language to play menus in. | No | Current value. |
locked | Integer | 1 if all cards in group are locked, 0 if not. | No | Current value. |
method | String | Method for allocating card numbers. "random" or "sequential". | No | Current value. |
name | String | Name. | No | Current value. |
pin_maximum | Integer | Maximum PIN length. | No | Current value. |
pin_minimum | Integer | Minimum PIN length. | No | Current value. |
plan | Integer | ID of rate plan for pricing outbound calls. | No | Current value. |
play_balance | Integer | 1 to always play balance to callers, 0 not to. | No | Current value. |
play_time | Integer | 1 to play time available to callers, 0 not to. | No | Current value. |
warn_called | Integer | 1 to warn called party before call is cut off. | No | Current value. |
warn_caller | Integer | 1 to warn caller before call is cut off. | No | Current value. |
warn_repeat | Integer | Repeats cutoff warning this number of seconds. 0 to disable. | No | Current value. |
warn_time | Integer | Number of seconds before cutoff to play first warning. 0 to disable. | No | Current value. |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
201 | Input passed validation. Only returned if validation=1. |
204 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan does not allow this. |
404 | The card group does not exist, or you do not have permission to update it. |
Data returned
No data is returned.
Example: Changing the name
http://enswitch.example.com/api/json/cards/groups/update/?auth_username=user;auth_password=password;id=123;name=example{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |