JSON API » customers » customers/unused/prefix
Gets an unused customer prefix.
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 | |
account | String | Optional account number of customer. | 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 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
Version | Changes |
---|---|
3.13 | Function added. |