Get Started with Dryfta API

 

With Dryfta API 1.0, you can fetch contacts, roles including attendees, authors, reviewers etc, their information including custom fields and subscribers and subscribers lists from your event platform created on Dryfta.

Getting Started

The Dryfta API is designed for developers, or anyone else who’s comfortable creating custom-coded solutions or integrating with RESTful APIs. If you need help integrating with Dryfta API, please go to our Support Desk and submit a support ticket.

The REST architectural style is an integral part of API. If you’d like to learn more about REST before using the API, check out the Introduction to REST guide.

Resources

Resources are typically nouns like ‘contacts’ or ‘role’ that you take actions on using supported HTTP verbs. The root directory for the API includes a map of all available resources and their subresources:

https://<sitename>.dryfta.com/api/v1
	

The <sitename> part of the URL is your domain name. For example, if your domain name is event360, all API endpoints for your account are available at https://event360.dryfta.com/api/v1.

Each resource is typically separated into a resource/{id} format, with sub-resources following the same pattern. For example, if you’re looking for information about contacts or users, make a GET request to https://<sitename>.dryfta.com/api/v1/contacts. To access an individual user, make a GET request to https://<sitename>.dryfta.com/api/v1/contacts/{user_id}.

Authentication

There are 2 authentication methods for the API: HTTP Basic authentication and OAuth2. The easiest way to authenticate is using HTTP Basic authentication. In HTTP Basic authentication curl uses the -u flag to pass basic auth credentials and the credentials passed in headers. Here, we will use an authentication header to authenticate the API key.

curl --request GET \
	--url 'https://<sitename>.dryfta.com/api/v1' \
	--header 'Authorization:<your_apikey>'
	

HTTP Methods

The Dryfta API 1.0 supports GET HTTP method for interacting with resources:

  • GET Make a GET request to retrieve data. GET requests will never cause an update or change to your data because they are safe.

Parameters

There are 4 main categories of parameters for each endpoint in the Dryfta API: path, query string, request body, and response body.

Path parameters

In an API URL, we include resource names and unique identifiers to help you figure out how to structure your requests. Resource names are immutable, but resource identifiers are required, so you need to replace them with real values from your Event data. Let’s look at an example:

https://event360.dryfta.com/api/v1/contacts/role/{role_id}
	

In that URL, there is 1 primary resource, contacts, and 1 subresources: role. There is also 1 path parameters that you need to replace with real values from your Event data: role_id. The role_id can be id of default/custom role. For example, role_id for reviewers is 2. When you replace the value with actual data, your final URL should look something like this:

https://event360.dryfta.com/api/v1/contacts/role/2
	

Query string parameters

We use query string parameters for filtering, pagination, and partial responses in the Dryfta API. The format for query string parameters is the full resource URL followed by a question mark, and the optional parameters:

https://event360.dryfta.com/api/v1/contacts/role/2?option1=foo&option2=bar
	

Pagination

Paginate your API requests to limit response results and make them easier to work with. We use offset and count in the URL query string to paginate because it provides greater control over how you view your data.

Offset defaults to 0, so if you use offset=1, you’ll miss the first element in the dataset. Count defaults to 50. For example, this URL includes query string parameters for pagination:

https://event360.dryfta.com/api/v1/contacts?offset=0&count=10
	

Partial responses

Use field parameters to cut down on data transfers by limiting which fields the Dryfta API returns. For example, you may not need the full details of a resource, and can instead pass specific fields you want to include.

The parameters for fields can be set like F1=FIRST_NAME, F2=LAST_NAME and so on. To get all the custom fields in response, set field parameter for custom fields like F3=CUSTOM_FIELDS. For example, the following URL uses the F1 query string parameter to only include the first name and email fields in the response for contacts:

https://event360.dryfta.com/api/v1/contacts?F1=FIRST_NAME&F2=EMAIL
	

Response body parameters

Every API call response includes headers and an optional JSON-formatted body.

An Introduction to REST

Background

When we talk about our API, we use terms like “REST” and “RESTful.” “REST” stands for Representational State Transfer. REST is an architecture style for designing networked applications.

Most APIs aren’t fully RESTful, including the Dryfta API. But we follow most of the practices and common definitions of the style. For example, the Dryfta API has what we call “resources,” which are typically nouns like “contacts” or “role”. You take action on resources using the standard HTTP methods: POST, GET, PATCH, and DELETE. Dryfta API v1.0 only uses GET HTTP method.

RESTful HTTP Methods

You may see these standard HTTP methods referred to as CRUD, or Create, Read, Update, Delete. In Dryfta API v1.0., we are only reading data from the event database. So we will use GET method only. The GET request is used to read or retrieve a resource.

RESTful Features of the Dryfta API

Nouns

RESTful APIs are based on resources, and share a well-defined and uniform interface. URLs and URIs in the API don’t typically contain verbs because verbs can’t be resources. That’s why we try to limit verbs to the HTTP method part of your request.

We also refer to “endpoints” in our documentation. Endpoints are URIs (as opposed to URLs) for individual resources. For example, find users of a particular role by requesting the /contacts/role/{role_id} endpoint.

HTTP methods and response codes

We do our best to use standard HTTP methods with accurate and well-known status codes in the Dryfta API.

Self-Describing representations

We use JSON Schema to describe each representation. Schemas also contain validation and type information to help you error-check your requests.

Now that you know a bit more about the REST architecture and how we use it in the Dryfta API, be sure to check out the API Reference to start making requests.

Reference

Here are all the methods and parameters that can be used in Dryfta API 1.0.

Contacts

Contacts are the users, who registered for your event including attendees, authors and speakers. Use contacts API call to get contacts.

Get All Contacts

GET /contacts

Get all contacts registered for the event. It will not return administrator user types.

Query string parameters

count Type: Integer Title: Count Read only: true The number of records to return. Default value is 50.
offset Type: Integer Title: Offset Read only: false The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.
sort_field Type: String Title: Sort By Field Read only: false Returns records sorted by the specified field.

Possible Values:
  • registration_date
  • first_name
  • last_name
  • email
direction Type: String Title: Sort Direction Read only: false Determines the order direction for sorted results.

Possible Values:
  • ASC
  • DESC
Field Parameters

Possible Values:
  • F1
  • F2
  • F3
  • F4
  • F5
  • F6
  • F7
  • F8
Type: String Title: Field Name Read only: false Determines which fields have to be returned. FIRST_NAME, LAST_NAME, EMAIL will be returned if no field parameter is passed. To include custom fields, use CUSTOM_FIELDS parameter. Please note that this will return all custom fields whatsoever has been submitted by user in your event platform.

Possible Values:
  • FIRST_NAME
  • LAST_NAME
  • EMAIl
  • ROLE
  • ORGANIZATION
  • PHONE_NUMBER
  • PROFILE_IMAGE
  • CUSTOM_FIELDS

Response body parameters

contacts Type: Array Title: Contacts Read only: false An array of contacts.

An example for making GET Request


curl --request GET \
--url 'https://event360.dryfta.com/api/v1/contacts' \
--header 'Accept:application/vnd.api+json' \
--header 'Content-Type:application/vnd.api+json' \
--header 'Authorization:apikey' 

Get information about a specific contact

GET /contacts/{user_id}

Get information of a particular user. Replace {user_id} with id of the user who is registered for the event.

Path parameters

user_id The unique id for the user.

Query string parameters

Field Parameters

Possible Values:
  • F1
  • F2
  • F3
  • F4
  • F5
  • F6
  • F7
  • F8
Type: String Title: Field Name Read only: false Determines which fields have to be returned. FIRST_NAME, LAST_NAME, EMAIL will be returned if no field parameter is passed. To include custom fields, use CUSTOM_FIELDS parameter. Please note that this will return all custom fields whatsoever has been submitted by user in your event platform.

Possible Values:
  • FIRST_NAME
  • LAST_NAME
  • EMAIl
  • ROLE
  • ORGANIZATION
  • PHONE_NUMBER
  • PROFILE_IMAGE
  • CUSTOM_FIELDS

Response body parameters

Return an object having parameters passed in fields parameters. If no field parameter is passed, it will return first_name, last_name, email.

Get information about users with specific role

GET /contacts/role/{role_id}

Get information of users with particular role. Replace {role_id} with id of specific role.

Path parameters

role_id The unique id for the role.

Query string parameters

The query string parameters will be the same as for all contacts.

Response body parameters

users Type: Array Title: Users Read only: false An array of users of a particular role.

Get all Authors

GET /contacts/authors

Get all authors.

Query string parameters

The query string parameters will be same as for the all contacts.

Response body parameters

authors Type: Array Title: Authors Read only: false An array of authors.

Subscribers

Get All Subscribers

GET /subscribers

Get subscribers from the event.

Query string parameters

The query string parameters will be applied on the subscribers of the list, not on the lists itself. For example: If you set count parameter to 10, this will get 10 subscribers from each list.

count Type: Integer Title: Count Read only: true The number of records to return. Default value is 50.
offset Type: Integer Title: Offset Read only: false The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.
sort_field Type: String Title: Sort By Field Read only: false Returns records sorted by the specified field.

Possible Values:
  • created_on
  • name
direction Type: String Title: Sort Direction Read only: false Determines the order direction for sorted results.

Possible Values:
  • ASC
  • DESC

Response body parameters

subscribers Type: Array Title: subscribers Read only: false An array of lists including subscribers.

Get Subscribers of a specific list

GET /subscribers/{list_id}

Get subscribers of a particular list from the event. Replace {list_id} with id of the subscribers list from the event.

Path parameters

list_id The unique id for the list.

Query string parameters

count Type: Integer Title: Count Read only: true The number of records to return. Default value is 50.
offset Type: Integer Title: Offset Read only: false The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.
sort_field Type: String Title: Sort By Field Read only: false Returns records sorted by the specified field.

Possible Values:
  • created_on
  • name
direction Type: String Title: Sort Direction Read only: false Determines the order direction for sorted results.

Possible Values:
  • ASC
  • DESC

Response body parameters

subscribers Type: Array Title: subscribers Read only: false An array contains list detail and subscribers.

PHP developers can use Dryfta API library for integration

Download the library and include it manually. cURL support is required. Using the library, you have to include the library file and call the library functions. The function will return data in array form.

include('./DryftaApi.php'); Start by use-ing the class and creating an instance with your API key use \DryftaApi\DryftaApi; $DryftaApi = new DryftaApi($api_key);

Get All Contacts

$result = $DryftaApi->get(‘contacts’, $params, $fields);

Query Parameters

$params = array("count"=>50, "offset"=> 0, "sort_field" => "registration_date", "direction" => "DESC"); //default

count Type: Integer Title: Count Read only: true The number of records to return. Default value is 50.
offset Type: Integer Title: Offset Read only: false The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.
sort_field Type: String Title: Sort By Field Read only: false Returns records sorted by the specified field.

Possible Values:
  • registration_date
  • first_name
  • last_name
  • email
direction Type: String Title: Sort Direction Read only: false Determines the order direction for sorted results.

Possible Values:
  • ASC
  • DESC

Fields Parameters

$fields = array('FIRST_NAME', 'LAST_NAME', 'EMAIL'); // default

Possible Values:
  • FIRST_NAME
  • LAST_NAME
  • EMAIl
  • ROLE
  • ORGANIZATION
  • PHONE_NUMBER
  • PROFILE_IMAGE
  • CUSTOM_FIELDS

Response

Array of contacts.

Get a Specific Contact

$result = $DryftaApi->get(‘contacts/$user_id’, $params, $fields);

Replace $user_id with id of registered user.

Query Parameters

Query parameters not required for single contact, you need to pass a blank array.

$params = array(); //default

Fields Parameters

Fields parameters will be same as for contacts.

$fields = array('FIRST_NAME', 'LAST_NAME', 'EMAIL'); // default

Response

Array containing single contact detail.

Get contacts with a specific role

$result = $DryftaApi->get(‘contacts/role/$role_id’, $params, $fields);

Replace $role_id with id of role from event site.

Query Parameters

Query parameters will be same as for contacts.

$params = array("count"=>50, "offset"=> 0, "sort_field" => "registration_date", "direction" => "DESC"); //default

Fields Parameters

Fields parameters will be same as for contacts.

$fields = array('FIRST_NAME', 'LAST_NAME', 'EMAIL'); // default

Response

Array of contacts of specific role.

Get Authors

$result = $DryftaApi->get(‘contacts/authors’, $params, $fields);

Replace role_id with id of role from event site.

Query Parameters

Query parameters will be same as for contacts.

$params = array("count"=>50, "offset"=> 0, "sort_field" => "registration_date", "direction" => "DESC"); //default

Fields Parameters

Fields parameters will be same as for contacts.

$fields = array('FIRST_NAME', 'LAST_NAME', 'EMAIL'); // default

Response

Array of authors.

Get Subscribers

$result = $DryftaApi->get(‘subscribers’, $params, $fields);

Replace role_id with id of the role.

Query Parameters

$params = array("count"=>50, "offset"=> 0, "sort_field" => "created_on", "direction" => "DESC"); //defaultAll parameters are same as for contacts, but the sort_field parameter value will be changed. Remember the query parameters will be applied on subscribers of the list. For example, if you set count parameter to 10, it will return all the list with 10 subscribers of each list.

Possible Values for sort_field:
  • created_on
  • name
  • email

Fields Parameters

Fields parameter not required, you need to pass blank array.

$fields = array(); // default

Response

Array containg subscriber lists and subscribers.

Get Subscribers of a Specific List

$result = $DryftaApi->get(‘subscribers/$list_id’, $params, $fields);

Replace $list_id with id of subscriber list from event site.

Query Parameters

$params = array("count"=>50, "offset"=> 0, "sort_field" => "created_on", "direction" => "DESC"); //defaultAll parameters are same as for contacts, but the sort_field parameter value will be changed. Remember the query parameters will be applied on subscribers of the list. For example, if you set count parameter to 10, it will return all the list with 10 subscribers of each list.

Possible Values for sort_field:
  • created_on
  • name
  • email

Fields Parameters

Fields parameter not required, you need to pass blank array.

$fields = array(); // default

Response

Array contains subscriber list detail and subscribers.

Error Response Codes

Response error codes and information.

Status: 400 Message: Bad Request Code: 602 User Message: Invalid path requested. Your request could not be processed. This is a generic error. The action requested was not valid for this resource. Kindly check your request parameters.
Status: 401 Message: Unauthorized Code: 601 User Message: Provided API key is not valid. Your API key may be invalid, or you have attempted to access the wrong data center.
Status: 429 Message: Too many requests Code: 658 User Message: You have reached maximum request limit for this API. You can not make further requests today. An API is allowed to make 100 requests per day, You have reached the limit.
Status: 429 Message: Too many requests Code: 659 User Message: You have reached maximum request limit for this API. Try after some time. An API is allowed to make 15 requests in a 15 minute window, You have reached the limit.
Status: 404 Message: Not Found Code: 604 User Message: User does not exist. The requested user is not exist. If the user id is correct, kindly check parameters.
Status: 404 Message: Not Found Code: 605 User Message: No user found. No contacts found in the database, or you have passed wrong parameters.
Status: 404 Message: Not Found Code: 606 User Message: No author exists. No authors found in the database, or you have passed wrong parameters.
Status: 404 Message: Not Found Code: 606 User Message: No author exists. No authors found in the database, or you have passed wrong parameters.
Status: 404 Message: Not Found Code: 609 User Message: Role not exist. No role found in with the passed role id, or you have passed wrong parameters.
Status: 404 Message: Not Found Code: 603 User Message: No contact exists with this role. No contact found with the passed role id, or you have passed wrong parameters.
Status: 404 Message: Not Found Code: 610 User Message: Subscriber list not exist. No list found with the passed list id, or you have passed wrong parameters.
Status: 404 Message: Not Found Code: 607 User Message: No subscriber list with this id. No subscribers found with the passed list id, or you have passed wrong parameters.
Status: 404 Message: Not Found Code: 608 User Message: No subscriber found. No subscribers found in the database, or you have passed wrong parameters.