JSON API » vouchers » vouchers/available/check

Checks whether there are any vouchers available for the given customer to use.

Input parameters

Requires authentication and the payment role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
customerIntegerID of customer to check for.NoCustomer of authentication user.

Responses

CodeDescription
200Success.
400Invalid customer specified.
401The authentication details provided are invalid.
402Your role does not allow this.

Data returned

1 if the parent has any vouchers available, 0 if not.

Example: With required parameters

http://enswitch.example.com/api/json/vouchers/available/check/?auth_username=user;auth_password=password

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "found":1 }, }

Change history

VersionChanges
3.13Function added.