JSON API » customers » customers/unused/prefix

Gets an unused customer prefix.

Input parameters

Requires authentication and the commerce role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
accountStringOptional account number of customer.NoEmpty string.

Responses

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

Data returned

The prefix, or empty string if none could be found.

Example: With required parameters

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

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

Example: No prefix could be found

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

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

Change history

VersionChanges
3.13Function added.