JSON API » cards » cards/update

Updates an existing card.

Input parameters

Requires authentication and the cards role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
cardStringCard to update.Yes
balanceDecimalCard balance.NoCurrent value.
callerStringCallerid to allow.NoCurrent value.
cardgroupIntegerID of the card group to move the card to.NoCurrent value.
currencyStringCurrency.NoCurrent value.
lockedInteger1 to lock the card, 0 to unlock.NoCurrent value.
pinStringCard PIN.NoCurrent value.
serialStringCard serial number.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.
404The card does not exist, or you do not have permission to update it.

Data returned

No data is returned.

Example: Locking a card

http://enswitch.example.com/api/json/cards/update/?auth_username=user;auth_password=password;id=123;card=1234567890;locked=1

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.