-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Entase offers web API via HTTPS protocol which is following the REST pattern with resource oriented URLs. It accepts form-encoded
requests and returns JSON
responses.
Every request to the API must be authenticated with an API key. API keys are either public (to be used on front-end) or secret (to be used on the back-end). Keys are passed via Bearer or Basic authentication scheme.
Bearer auth example:
Authorization: Bearer your_api_key
Basic auth example (api key as username with blank password):
Authorization: Basic eW91cl9hcGlfa2V5Og==
Curl example:
$ curl -G https://api.entase.com/v2/productions -u your_api_key:
# With column on the end
Note: Currently API keys are retrieved by requesting the support.
Response of type OK
is always alongside HTTP response code 200
and resource
property.
{
"status": "ok",
"resource": {
"::": "Production",
"id": "63217c55cb925f6f3d0c11e7"
...
}
}
Response of type ERR
is coming with HTTP response code different than 200
alongside code
and msg
property.
{
"status": "err",
"code": "not_found",
"msg": "Unknown resource"
}
As resource oriented, the API is returning standard HTTP errors codes.
-
200
- OK. -
400
- General error. -
401
- Unauthorized. Invalid API key. -
403
- Unauthorized. No permissions. -
404
- Resource not found. -
5xx
- Internal server error. Very unusual.
ObjectCollection is type of resource which is usually returned when querying API endpoints returning lists. It contains data
and cursor
properties.
Example response of querying /v2/productions
:
{
"status": "ok",
"resource": {
"::": "ObjectCollection",
"data": [
{
"::": "Production",
"id": "63217c55cb925f6f3d0c11e7"
...
}
...
],
"cursor": {
"hasMore": true,
"nextURL": "https://api.entase.com/v2/productions?after=63217c55cb925f6f3d0c11e7"
}
}
}
Properties
-
data
- JSON array containing all resources inside the result set -
cursor
- Paging object which indicates if there are more resources available for the current filter and the next query URL.
Some important notes about returning values.
All price amounts across the API are returned in cents. This means that value of $100.50
is returned as 10050
. In order to convert it to 100.50
you need to divide it by 100
and vice versa.
All dates are returned as timestamps unless other specified. Event locations are having property for local timezone. In order to get the event`s local time you need to convert the date timestamp to the local timezone.
Browse the available endpoints here.