API Starter Guide

Authentication

eDataSource's V4 API uses an API key authentication method. Send an email to partners@edatasource.com to obtain an API key and access to our API endpoints.

This email address is also used as the main contact point for any questions with the API.


CRUD Operations

HTTP verbs(GET, POST, PUT, DELETE) will be used in all circumstances.


The eDataSource V4 API attempts to comply with the best RESTful standards and practices.


Example of a simple GET request via curl:

$curl -H "Authorization: Basic <B64_ENCODED_KEY>" https://api.edatasource.com/v4/core/industries

b64EncodedKeyHere should be your Api key follow by a ":" and then encoded using Base 64.



Output

The results from all requests will always be in JSON format.


Example success result:

{
  "id": 1234,
  "name": "This is the name of the entity"
}

Example success result of a list of objects:

[
  {
	"id": 1234,
	"name": "This is the name of the entity"
  },
  {
	"id": 2345,
	"name": "This another great name"
  }
]


Errors will be returned in an error object containing the HTTP code.

Example error:

{
  "code": 400,
  "type": "INVALID_INPUT",
  "message": "Id input must be numerical"
}

Dates

The V4 API expects all dates to be in ISO-8601 format and in GMT time ie. yyyy-MM-ddTHH:mm:ss.SSSZ, we also will accept the standard without dashes and truncated to days yyyyMMddHHmmss and yyyyMMdd


Paging

The V4 API endpoints have large return lists, so these endpoints supply paged data using the parameters page, per_page, and order for purposes of paging and ordering. The return data will supply a link header that contains the available pages, and pages that are relative to the page that was just requested.


Example paging "Link" header:

<https://api.edatasource.com/v4/core/brands?page=0&per_page=10>; rel="first",
<https://api.edatasource.com/v4/core/brands?page=32&per_page=10>; rel="last",
<https://api.edatasource.com/v4/core/brands?page=2&per_page=10>; rel="prev",
<https://api.edatasource.com/v4/core/brands?page=4&per_page=10>; rel="next"

These simple paging headers are also included in response headers as well.

x-pageinfo-maxresults: 324
x-pageinfo-totalpages:  33
x-pageinfo-currentpage:  3
x-pageinfo-perpage:     10

Ordering

Endpoints that support ordering will list the order options. The default order is ASC. Adding a “-” to the front of any option will request DESC order.