• Register

Custom Fields

Contents

Overview

Create Custom Fields

Update Custom Fields

Delete Custom Fields

List Custom Fields

Overview

VR provides users 20 additional fields to use as custom fields. In addition to the standard contact fields like first_name, last_name, email_address, company etc, VR allows users to create fields that are unique to their business. The custom fields API are used to create, update, delete and list custom fields for a give user account. Custom fields have a name attribute and within the context of each contact a value for that name. Custom fields exist within the user’s account and are associated with each contact. A custom field’s URI contains its name and is uniquely identified by its name.

Create

The create API is used to create new custom fields. Every user has a limit of 20 custom fields. If users go beyond this limit, they cannot create any more new custom fields. Any existing custom fields have to be deleted or updated to create new ones. Custom fields can also be created using the contact create API. Custom field names cannot contain special characters other than spaces and underscores. On success, the URI of the newly created custom field is returned.

Error

If the user exceeds the limit of 20 custom fields/ account, the API returns an error.If the custom fields already exist, the API returns an error.

URL

https://vrapi.verticalresponse.com/api/v1/custom_fields

Method

POST

Sample Request

Sample Response

Update

The update API updates the custom field’s name. On success it returns the modified URI. If the name of the custom field to be updated already exists as either another custom field or a standard field, the API returns an error.

E.g. Attempting to update a custom field name with “website” will result in an error because “Website” is already a standard contact field returns an error.

URL

https://vrapi.verticalresponse.com/api/v1/custom_fields/:name

Method

PUT

Sample Request

Delete

Deletes the given custom field. Deleting a custom field, will also delete its corresponding value for a particular contact.

URL

https://vrapi.verticalresponse.com/api/v1/custom_fields/:id

Method

DELETE

Sample Request

List

This API lists all the custom fields for a given user.

URL

https://vrapi.verticalresponse.com/api/v1/custom_fields

Method

GET

Sample Request

Sample Response