JSON API » customers » customers/unused/account

Gets an unused customer account number.

Input parameters

Requires authentication and the commerce role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
prefixStringOptional prefix for account number.NoEmpty string.

Responses

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

Data returned

The account number, or empty string if none could be found.

Example: With required parameters

http://enswitch.example.com/api/json/customers/unused/account/?auth_username=user;auth_password=password

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "account":"12345678" } }

Example: No account number could be found

http://enswitch.example.com/api/json/customers/unused/account/?auth_username=user;auth_password=password

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

Change history

VersionChanges
3.13Function added.