JSON API » cards » cards/groups/update

Updates an existing card group.

Input parameters

Requires authentication and the cards role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of card group to update.Yes
allow_balanceInteger1 to allow the caller to hear their balance, 0 not to.NoCurrent value.
balanceDecimalDefault balance for new cards.NoCurrent value.
calleridStringThe callerid to send on outbound calls.NoCurrent value.
card_lengthIntegerLength of new card numbers.NoCurrent value.
change_pinInteger1 if users may change their PIN, 0 if they may not.NoCurrent value.
chargeDecimalAmount to charge all cards each charge_period period.NoCurrent value.
charge_afterStringAfter which event the cards are charged. "create" or "firstuse".NoCurrent value.
charge_lockedInteger1 to charge locked card, 0 not to.NoCurrent value.
charge_periodStringHow often to charge. "daily", "weekly", "monthly", "annually", or empty string for never.NoCurrent value.
clockIntegerPercent of real time to give card users.NoCurrent value.
creditDecimalDefault credit limit for new cards.NoCurrent value.
currencyStringCurrency costs are in.NoCurrent value.
descriptionStringDescription.NoCurrent value.
dialplanStringDial plan for outbound calls. Empty string for default.NoCurrent value.
dnumberStringAlways dial this number.NoCurrent value.
expiresStringThe number of days after which cards expire. 0 for never.NoCurrent value.
expires_afterStringAfter which event the cards expire. "create" or "firstuse".NoCurrent value.
hide_expiredInteger1 if expired cards seem not to exist, else 0.NoCurrent value.
hide_lockedInteger1 if locked cards seem not to exist, else 0.NoCurrent value.
languageStringLanguage to play menus in.NoCurrent value.
lockedInteger1 if all cards in group are locked, 0 if not.NoCurrent value.
methodStringMethod for allocating card numbers. "random" or "sequential".NoCurrent value.
nameStringName.NoCurrent value.
pin_maximumIntegerMaximum PIN length.NoCurrent value.
pin_minimumIntegerMinimum PIN length.NoCurrent value.
planIntegerID of rate plan for pricing outbound calls.NoCurrent value.
play_balanceInteger1 to always play balance to callers, 0 not to.NoCurrent value.
play_timeInteger1 to play time available to callers, 0 not to.NoCurrent value.
warn_calledInteger1 to warn called party before call is cut off.NoCurrent value.
warn_callerInteger1 to warn caller before call is cut off.NoCurrent value.
warn_repeatIntegerRepeats cutoff warning this number of seconds. 0 to disable.NoCurrent value.
warn_timeIntegerNumber of seconds before cutoff to play first warning. 0 to disable.NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.
404The 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

VersionChanges
3.13Function added.