★ Beta ★

Crelate API Developer Guide

Topics

Disclaimer

The Crelate API is currently in beta status. As such, it may change at any time without notice.

API Key Management

A Crelate API key can be aquired from the application under Settings -> My Settings & Preferences.

Your organization administrator will need to enable API access for non-admin users. Administrators can enable API access for other users by turning on the API access in Settings -> Advanced Settings -> User Roles.

You can turn off API access or regenerate your API key at any time. After disabling or regenerating your API key, existing API processes will begin to fail.

When making HTTP requests, the API key should be specified as a querystring paramter like so: https://app.crelate.com/api/pub/v1/contacts/2057720a-2e8e-4feb-8e44-d8dcf943be5a/?api_key=7e5b949f90924f64afa5c8fed81b6e41

Lookups

Crelate uses lookups in cases where one record needs to refer to another. For example, an account record can refer to a billing contact. In the API, these lookups are represented with Id, FirstName and LastName fields. The account record has three properties for billing contact: AdditionalContact_Billing_Id, AdditionalContact_Billing_FirstName and AdditionalContact_Billing_LastName.

When saving an account, Crelate decides how to handle the incoming data based on these rules:

  • If the Id field is specified, the contact record with the given Id is attached to the account record. In this case, the FirstName and LastName fields are ignored.
  • If the Id field is blank, and a FirstName and LastName is specified, a new contact record will be created with the given FirstName and LastName. This new contact record will be attached to the account as the billing contact.

The Crelate API handles all lookups based on the these rules. Lookup fields can be identified by the suffix _Id.

Required Attributes

When saving a record, the following attributes are required. If an invalid record is submitted an HTTP 500 status code will be returned with a list of the missing fields included in the body.

  • Company: Name
  • Job: Name
  • Note: Body
  • Task: Body

Tags

Tags are supported for various record types in the Crelate API. When saving a record, the tags object should contain keys that correspond to the names of each tag category in your Crelate organization. The tags for the default category can be specified with a key of "Default". If your Crelate organization had two tag categories, the default category and a category called Skills, the tags object would be:

{ ... other fields ... Tags: { "Default": [ "High Priority", "" ], "Skills": [ "Tech", ".NET", "SQL" ] } }

Date/Time handling

All dates are expected to be supplied as IS0 8601 format in the UTC timezone. For example, "2017-01-01T15:00:00Z". If dates are supplied in any other format or timezone, the operation may fail or you may encounter unpredictable results.

Zapier integration

Zapier is an online integration service which allow you to create business automation processes through a web interface. Zapier offers connectivity to a over 200 third party services including Crelate.

To get started with Zapier please email support@crelate.zendesk.com.

How to generate client code

Swagger is an document format which enables delivery of a portable service definition for REST API services. Crelate uses this format to describe our API services. To generate client code in your lanuage of choice:

  • Copy the Crelate service definition JSON
  • Generate client code. Visit swagger.io and paste the Crelate service definition JSON. (File -> Paste JSON)
  • Once the Crelate definition is imported, select "Generate Client" from the menu and select a lauguage. A zip file will be downloaded which contains the client code library.

    If you are using the .NET framework, NSwag can be used to generate a C# client library.