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.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
field | Integer | ID of field. | Yes | |
stype | String | Object type. See below. | Yes | |
snumber | String | Object number. | Yes | |
customer | Integer | ID of customer object is in. | No | Customer of authentication user. |
stypes "customer" and "phone" are currently supported. Other types may be added in future versions.
Responses
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The 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
Version | Changes |
---|---|
4.0 | Function added. |