JSON API » customers » customers/unused/account
Gets an unused customer account number.
Input parameters
Requires authentication and the commerce role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
prefix | String | Optional prefix for account number. | No | Empty string. |
Responses
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your 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
Version | Changes |
---|---|
3.13 | Function added. |