Skip to content

Introduction

The Hypatos API is organized around REST. The majority of the endpoints provide CRUD functionality for resources. The API is also exposing Intent Resources which mimic user intents or actions.

The Hypatos API uses OAuth 2.0 Client Credential Grant to authenticate requests. Before making any requests to any endpoint a client must authenticate with the authorization server and requests an access token from the token endpoint.

  POST /auth/token HTTP/1.1
  Host: api.cloud.hypatos.ai
  Content-Type: application/x-www-form-urlencoded
  Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

  grant_type=client_credentials

Authorization header contains client_id:client_secret encoded as explained in RFC Client Password section.

If the authorization server authenticated the client successfully, an access token is issued. Here is an example successful response:

  HTTP/1.1 200 OK
  Content-Type: application/json;charset=UTF-8
  Cache-Control: no-store
  Pragma: no-cache

  {
    "access_token": "mF_9.B5f-4.1JqM",
    "expires_in": 86400,
    "scope": "enrichment.write files.read",
    "token_type": "Bearer",
  }

This token can be used to authenticate the requests to API endpoints by sending a Bearer token in the Authorization HTTP header. The following example demonstrates how to use the access token to retrieve a list of documents.

  GET /v2/documents HTTP/1.1
  Host: api.cloud.hypatos.ai
  Authorization: Bearer mF_9.B5f-4.1JqM

Versioning

Changes to this API are released regularly. We use Semantic Versioning 2.0.0 scheme for versioning so that the clients can identify any backward-incompatible changes easily. Briefly summarized one can say, if the MAJOR version of the new API version didn't change you can expect the new version to be backward-compatible.

Rate limits

In order to maximise the stability of our API, we institue rate limits for all of API endpoints. Clients who send too many requests over a given period of time will see error responses that show up as status code 429 Too Many Requests.

When you see error responses with status code 429, it means you exhausted your current quota and need to withhold from sending further requests until the quota is reset. We encourage you not to wait until you get a 429 error but to monitor your quota in each request. In each response you receive from the API, you will find HTTP headers providing the details about your current quota. Here is the list of the HTTP headers:

  • x-ratelimit-limit: Indicates the quota associated to the client in the current time-window followed by the description of the quota policy.
  • x-ratelimit-remaining: Indicates the number of remaining requests in the current time-window
  • x-ratelimit-reset: Indicates the number of seconds until quota reset of the current time-window

Please note that IETF is currently in the process of publishing a standard for these headers. Please explore the draft for more details.

A basic technique to gracefully handle rate limits is watch for your quota permanently and increase the time between your request as the quota is decreasing. To recover from a 429 error you need a retry mechanism following an exponential backoff schedule.

Download OpenAPI description
Overview
License
Languages
Servers
API EU
https://api.cloud.hypatos.ai/v2
API US
https://api.cloud.hypatos.com/v2
Mock server
https://hypatos.redocly.app/_mock/openapi
Operations

Endpoints for management of files

Operations

Endpoints for document management

Operations

Endpoints for case management

Operations

Endpoints for data enrichment

Operations

Endpoints for company management

Operations

Endpoints for project management

Operations

Endpoints for e-invoices

Operations

Endpoints serving project-scoped documents as XML

Operations

Endpoints for managing agents and agent workflows

Operations
Operations
Operations
Operations

Get all enrichment workflow definitions

Request

Security
OAuth2(Required scopes:
enrichment-workflows.read
)
Query
offsetinteger>= 0

A zero-based offset of the first item in the data collection to return.

Default 0
limitinteger[ 0 .. 50 ]

Limit the amount of items returned. Values above the maximum are capped.

Default 20
curl -i -X GET \
  'https://api.cloud.hypatos.ai/v2/enrichment-workflows?offset=0&limit=20' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
dataArray of objects(WorkflowDefinition)required
data[].​idstringrequired

Unique ID of the workflow definition

data[].​namestringrequired

Name of the workflow

data[].​descriptionstring
data[].​companyIdstring
data[].​createdAtstring(date-time)
data[].​updatedAtstring(date-time)
data[].​definitionstringrequired

YAML definition of the workflow

data[].​projectIdsArray of strings
data[].​versioninteger
data[].​versionStringstring
data[].​updatedBystring
data[].​createdByIdstring
data[].​updatedByIdstring
totalCountinteger(int64)required

The total number of workflow definitions available.

limitintegerrequired

The limit used for this page of results.

offsetintegerrequired

The zero-based offset used for this page of results.

Response
application/json
{ "data": [ {} ], "totalCount": 0, "limit": 0, "offset": 0 }

Create enrichment workflow definition

Request

Security
OAuth2(Required scopes:
enrichment-workflows.write
)
Bodyapplication/jsonrequired
namestringrequired

Name of the workflow

definitionstringrequired

YAML definition of the workflow

descriptionstring
projectIdsArray of strings
curl -i -X POST \
  https://api.cloud.hypatos.ai/v2/enrichment-workflows \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "definition": "string",
    "description": "string",
    "projectIds": [
      "string"
    ]
  }'

Responses

Workflow definition created

Bodyapplication/json
idstringrequired

Unique ID of the workflow definition

namestringrequired

Name of the workflow

descriptionstring
companyIdstring
createdAtstring(date-time)
updatedAtstring(date-time)
definitionstringrequired

YAML definition of the workflow

projectIdsArray of strings
versioninteger
versionStringstring
updatedBystring
createdByIdstring
updatedByIdstring
Response
application/json
{ "id": "string", "name": "string", "description": "string", "companyId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "definition": "string", "projectIds": [ "string" ], "version": 0, "versionString": "string", "updatedBy": "string", "createdById": "string", "updatedById": "string" }

Get enrichment workflow definition by ID

Request

Security
OAuth2(Required scopes:
enrichment-workflows.read
)
Path
workflowIdstring(uuid)required

ID of the workflow to be read

curl -i -X GET \
  'https://api.cloud.hypatos.ai/v2/enrichment-workflows/{workflowId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
idstringrequired

Unique ID of the workflow definition

namestringrequired

Name of the workflow

descriptionstring
companyIdstring
createdAtstring(date-time)
updatedAtstring(date-time)
definitionstringrequired

YAML definition of the workflow

projectIdsArray of strings
versioninteger
versionStringstring
updatedBystring
createdByIdstring
updatedByIdstring
Response
application/json
{ "id": "string", "name": "string", "description": "string", "companyId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "definition": "string", "projectIds": [ "string" ], "version": 0, "versionString": "string", "updatedBy": "string", "createdById": "string", "updatedById": "string" }

Update existing enrichment workflow definition

Request

Security
OAuth2(Required scopes:
enrichment-workflows.write
)
Path
workflowIdstring(uuid)required

ID of the workflow to be updated

Bodyapplication/jsonrequired
namestringrequired

Name of the workflow

definitionstringrequired

YAML definition of the workflow

descriptionstring
projectIdsArray of strings
curl -i -X PUT \
  'https://api.cloud.hypatos.ai/v2/enrichment-workflows/{workflowId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "definition": "string",
    "description": "string",
    "projectIds": [
      "string"
    ]
  }'

Responses

Workflow definition updated

Bodyapplication/json
idstringrequired

Unique ID of the workflow definition

namestringrequired

Name of the workflow

descriptionstring
companyIdstring
createdAtstring(date-time)
updatedAtstring(date-time)
definitionstringrequired

YAML definition of the workflow

projectIdsArray of strings
versioninteger
versionStringstring
updatedBystring
createdByIdstring
updatedByIdstring
Response
application/json
{ "id": "string", "name": "string", "description": "string", "companyId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "definition": "string", "projectIds": [ "string" ], "version": 0, "versionString": "string", "updatedBy": "string", "createdById": "string", "updatedById": "string" }

Delete enrichment workflow definition by ID

Request

Security
OAuth2(Required scopes:
enrichment-workflows.write
)
Path
workflowIdstring(uuid)required

ID of the workflow to be deleted

curl -i -X DELETE \
  'https://api.cloud.hypatos.ai/v2/enrichment-workflows/{workflowId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Workflow definition deleted

Response
No content

Get enrichment workflow definition history

Request

Security
OAuth2(Required scopes:
enrichment-workflows.read
)
Path
workflowIdstring(uuid)required

ID of the workflow to read history for

Query
offsetinteger>= 0

A zero-based offset of the first item in the data collection to return.

Default 0
limitinteger[ 0 .. 50 ]

Limit the amount of items returned. Values above the maximum are capped.

Default 20
curl -i -X GET \
  'https://api.cloud.hypatos.ai/v2/enrichment-workflows/{workflowId}/history?offset=0&limit=20' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
dataArray of objects(WorkflowDefinition)required
data[].​idstringrequired

Unique ID of the workflow definition

data[].​namestringrequired

Name of the workflow

data[].​descriptionstring
data[].​companyIdstring
data[].​createdAtstring(date-time)
data[].​updatedAtstring(date-time)
data[].​definitionstringrequired

YAML definition of the workflow

data[].​projectIdsArray of strings
data[].​versioninteger
data[].​versionStringstring
data[].​updatedBystring
data[].​createdByIdstring
data[].​updatedByIdstring
totalCountinteger(int64)required

The total number of workflow definitions available.

limitintegerrequired

The limit used for this page of results.

offsetintegerrequired

The zero-based offset used for this page of results.

Response
application/json
{ "data": [ {} ], "totalCount": 0, "limit": 0, "offset": 0 }
Operations