JSON API » customers » customers/get

Gets the fields of a customer.

Input parameters

Requires authentication and the user role privilege, unless check=1. If you don't have the callshop or commerce role privileges, you may only get your own customer.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes, unless check=1.
auth_passwordStringAuthentication password.Yes, unless check=1.
checkInteger1 to just check if the customer exists, 0 to return full data.No0
emailStringEmail address of customer to get.NoEmpty string.
idIntegerID of customer to get.No0
nameStringName of customer to get.NoEmpty string.
paymentInteger1 to get payment settings, 0 to get fields of customer.No0

One of email, id, or name must be specified. If the system is not configured to require unique email addresses, use of the email parameter is not recommended.

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
404The customer does not exist, or you do not have permission to view it.

Data returned

Fields of customer.

Example: With required parameters

http://enswitch.example.com/api/json/customers/get/?auth_username=user;auth_password=password;id=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123, "name":"example", ... } }

Change history

VersionChanges
3.13Function added.