JSON API » fields » fields/values/get

Gets the value of a custom field for a given object.

Input parameters

Requires authentication and the user role privilege. In addition, access to the object specified is required.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
fieldIntegerID of field.Yes
stypeStringObject type. See below.Yes
snumberStringObject number.Yes
customerIntegerID of customer object is in.NoCustomer of authentication user.

stypes "customer" and "phone" are currently supported. Other types may be added in future versions.

Responses

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

Data returned

Value of custom field.

Example: With required parameters

http://enswitch.example.com/api/json/fields/values/get/?auth_username=user;auth_password=password;field=1;stype=phone;snumber=1234567

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

Change history

VersionChanges
4.0Function added.