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 data enrichment

Operations

Request

Security
OAuth2(Required scopes:
enrichment.write
)
Path
externalIdstringrequired

Previously sent externalId

Bodyapplication/merge-patch+jsonrequired
externalIdstring^\S+$required

External id of the company that is globally unique across the provided company data

Example: "DE01"
externalClientIdstring

Identifier of the client entity in the source system which can be used to separate data

Example: "EXTERNAL_CLIENT_ID"
codestring

Code of the company in the source system (not unique across clients)

Example: "CODE1"
namestring^[\S ]*\S[\S ]*$required

Name of the company

Example: "Acmne Corp."
nameAlternative1string

Alternative name of the company

Example: "Acmne Corp."
nameAlternative2string

Alternative name of the company

Example: "Acmne Corp."
nameAlternative3string

Alternative name of the company

Example: "Acmne Corp."
nameAlternative4string

Alternative name of the company

Example: "Acmne Corp."
streetstring

Street and street number where the company is located

Example: "Hauptstr. 1"
addressAdditionalstring

Additional address data (e.g. apartment or suite)

Example: "Eingang B"
postcodestring

Postcode where the company is located

Example: "10001"
citystring

City where the company is located

Example: "Berlin"
statestring

State where the company is located

Example: "Berlin"
countryCodestring or null(CountryCode)

Two letter country code as defined in ISO 3166-1 alpha-2

Enum"AF""AX""AL""DZ""AS""AD""AO""AI""AQ""AG"
Example: "DE"
vatIdsArray of objects(vatId)

List of VAT IDs assigned to the company

Example: [{"id":"DE123456789","countryCode":"DE"}]
taxIdsArray of objects(taxId)

List of Tax IDs assigned to the company

Example: [{"id":"123-456-789","type":"TIN"}]
customFieldsobject(customFields)

List of key value pairs containing custom fields from the source system

customMetadataobject(JsonObject)

Any nested structure with metadata that source system needs to send

Example: {"someTopLevelProperty":"value1","someNestedProperty":{"nestedProperty":"value2"},"someArrayProperty":["value3","value4"]}
curl -i -X PATCH \
  'https://api.cloud.hypatos.ai/v2/enrichment/companies/{externalId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '{
    "externalId": "DE01",
    "externalClientId": "EXTERNAL_CLIENT_ID",
    "code": "CODE1",
    "name": "Acmne Corp.",
    "nameAlternative1": "Acmne Corp.",
    "nameAlternative2": "Acmne Corp.",
    "nameAlternative3": "Acmne Corp.",
    "nameAlternative4": "Acmne Corp.",
    "street": "Hauptstr. 1",
    "addressAdditional": "Eingang B",
    "postcode": "10001",
    "city": "Berlin",
    "state": "Berlin",
    "countryCode": "DE",
    "vatIds": [
      {
        "id": "DE123456789",
        "countryCode": "DE"
      }
    ],
    "taxIds": [
      {
        "id": "123-456-789",
        "type": "TIN"
      }
    ],
    "customFields": {
      "property1": "string",
      "property2": "string"
    },
    "customMetadata": {
      "someTopLevelProperty": "value1",
      "someNestedProperty": {
        "nestedProperty": "value2"
      },
      "someArrayProperty": [
        "value3",
        "value4"
      ]
    }
  }'

Responses

Successfully updated

Bodyapplication/json
externalIdstring^\S+$required

External id of the company that is globally unique across the provided company data

Example: "DE01"
externalClientIdstring

Identifier of the client entity in the source system which can be used to separate data

Example: "EXTERNAL_CLIENT_ID"
codestring

Code of the company in the source system (not unique across clients)

Example: "CODE1"
namestring^[\S ]*\S[\S ]*$required

Name of the company

Example: "Acmne Corp."
nameAlternative1string

Alternative name of the company

Example: "Acmne Corp."
nameAlternative2string

Alternative name of the company

Example: "Acmne Corp."
nameAlternative3string

Alternative name of the company

Example: "Acmne Corp."
nameAlternative4string

Alternative name of the company

Example: "Acmne Corp."
streetstring

Street and street number where the company is located

Example: "Hauptstr. 1"
addressAdditionalstring

Additional address data (e.g. apartment or suite)

Example: "Eingang B"
postcodestring

Postcode where the company is located

Example: "10001"
citystring

City where the company is located

Example: "Berlin"
statestring

State where the company is located

Example: "Berlin"
countryCodestring or null(CountryCode)

Two letter country code as defined in ISO 3166-1 alpha-2

Enum"AF""AX""AL""DZ""AS""AD""AO""AI""AQ""AG"
Example: "DE"
vatIdsArray of objects(vatId)

List of VAT IDs assigned to the company

Example: [{"id":"DE123456789","countryCode":"DE"}]
taxIdsArray of objects(taxId)

List of Tax IDs assigned to the company

Example: [{"id":"123-456-789","type":"TIN"}]
customFieldsobject(customFields)

List of key value pairs containing custom fields from the source system

customMetadataobject(JsonObject)

Any nested structure with metadata that source system needs to send

Example: {"someTopLevelProperty":"value1","someNestedProperty":{"nestedProperty":"value2"},"someArrayProperty":["value3","value4"]}
Response
application/json
{ "externalId": "DE01", "externalClientId": "EXTERNAL_CLIENT_ID", "code": "CODE1", "name": "Acmne Corp.", "nameAlternative1": "Acmne Corp.", "nameAlternative2": "Acmne Corp.", "nameAlternative3": "Acmne Corp.", "nameAlternative4": "Acmne Corp.", "street": "Hauptstr. 1", "addressAdditional": "Eingang B", "postcode": "10001", "city": "Berlin", "state": "Berlin", "countryCode": "DE", "vatIds": [ { … } ], "taxIds": [ { … } ], "customFields": { "property1": "string", "property2": "string" }, "customMetadata": { "someTopLevelProperty": "value1", "someNestedProperty": { … }, "someArrayProperty": [ … ] } }

Request

Security
OAuth2(Required scopes:
enrichment.delete
)
Path
externalIdstringrequired

Previously sent externalId

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

Responses

Successfully deleted

Response
No content

Insert supplier including related subsidiaries

Request

Security
OAuth2(Required scopes:
enrichment.write
)
Bodyapplication/jsonrequired
defaultAccountAssignmentobject
externalIdstring^\S+$required

External id of the supplier that is globally unique across the provided supplier data

Example: "0000100000"
externalClientIdstring

Identifier of the client entity in the source system which can be used to separate data

Example: "EXTERNAL_CLIENT_ID"
codestring

Code of the supplier in the source system (not unique across clients)

Example: "CODE1"
namestring^[\S ]*\S[\S ]*$required

Name of the supplier

Example: "Acmne Corp."
nameAlternative1string

Alternative name of the supplier

Example: "Acmne Corp."
nameAlternative2string

Alternative name of the supplier

Example: "Acmne Corp."
nameAlternative3string

Alternative name of the supplier

Example: "Acmne Corp."
nameAlternative4string

Alternative name of the supplier

Example: "Acmne Corp."
alternativePayeestring^\S+$

externalId of the supplier which is the alternative payee for this supplier

streetstring

Street and street number where the supplier is located

Example: "Hauptstr. 1"
addressAdditionalstring

Additional address data (e.g. apartment or suite)

Example: "Eingang B"
postcodestring

Postcode where the supplier is located

Example: "10001"
citystring

City where the supplier is located

Example: "Berlin"
statestring

State where the company is located

Example: "Berlin"
countryCodestring or null(CountryCode)

Two letter country code as defined in ISO 3166-1 alpha-2

Enum"AF""AX""AL""DZ""AS""AD""AO""AI""AQ""AG"
Example: "DE"
vatIdsArray of objects(vatId)

List of VAT IDs assigned to the supplier

Example: [{"id":"DE123456789","countryCode":"DE"}]
taxIdsArray of objects(taxId)

List of Tax IDs assigned to the supplier

Example: [{"id":"123-456-789","type":"TIN"}]
blockedForPostingboolean

Indicator if the supplier is blocked for posting

Example: false
blockedForPaymentboolean

Indicator if the supplier is blocked for payment

Example: false
supplierSubsidiariesArray of objects(subsidiary)
supplierBankAccountsArray of objects(bankAccount)
customFieldsobject(customFields)

List of key value pairs containing custom fields from the source system

customMetadataobject(JsonObject)

Any nested structure with metadata that source system needs to send

Example: {"someTopLevelProperty":"value1","someNestedProperty":{"nestedProperty":"value2"},"someArrayProperty":["value3","value4"]}
curl -i -X POST \
  https://api.cloud.hypatos.ai/v2/enrichment/suppliers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "defaultAccountAssignment": {
      "glAccountCode": "0000100GL1",
      "costCenterCode": "0000100CC1",
      "externalApproverId": "MMUSTERMANN",
      "externalProjectId": "PROJ1234",
      "externalOrderId": "ORDER1234"
    },
    "externalId": "0000100000",
    "externalClientId": "EXTERNAL_CLIENT_ID",
    "code": "CODE1",
    "name": "Acmne Corp.",
    "nameAlternative1": "Acmne Corp.",
    "nameAlternative2": "Acmne Corp.",
    "nameAlternative3": "Acmne Corp.",
    "nameAlternative4": "Acmne Corp.",
    "alternativePayee": "string",
    "street": "Hauptstr. 1",
    "addressAdditional": "Eingang B",
    "postcode": "10001",
    "city": "Berlin",
    "state": "Berlin",
    "countryCode": "DE",
    "vatIds": [
      {
        "id": "DE123456789",
        "countryCode": "DE"
      }
    ],
    "taxIds": [
      {
        "id": "123-456-789",
        "type": "TIN"
      }
    ],
    "blockedForPosting": false,
    "blockedForPayment": false,
    "supplierSubsidiaries": [
      {
        "defaultAccountAssignment": {
          "glAccountCode": "0000100GL1",
          "costCenterCode": "0000100CC1",
          "externalApproverId": "MMUSTERMANN",
          "externalProjectId": "PROJ1234",
          "externalOrderId": "ORDER1234"
        },
        "externalCompanyId": "DE01",
        "paymentTerms": {
          "paymentTermKey": "T10",
          "descriptions": [
            {
              "text": "Please pay us",
              "language": "en"
            }
          ]
        },
        "blockedForPosting": false,
        "blockedForPayment": false,
        "enabledForAutoPosting": true,
        "withholdingTaxInfo": [
          {
            "key": "WHT-432",
            "descriptions": [
              {
                "text": "Some very deep description of the type of withholding tax",
                "language": "en"
              }
            ]
          }
        ]
      }
    ],
    "supplierBankAccounts": [
      {
        "externalId": "12341234",
        "countryCode": "DE",
        "bankAccountNumber": "78090",
        "bankAccountHolder": "Maximilian Mustermann",
        "iban": "DE91100000000123456789",
        "bic": "CHASUS33XXX",
        "bankName": "Deutsche Bank",
        "bankStreet": "Hauptstr. 1",
        "bankPostcode": "10001",
        "bankCity": "Berlin",
        "isActive": true,
        "type": "SAVINGS",
        "bankKey": "60-16-13"
      }
    ],
    "customFields": {
      "property1": "string",
      "property2": "string"
    },
    "customMetadata": {
      "someTopLevelProperty": "value1",
      "someNestedProperty": {
        "nestedProperty": "value2"
      },
      "someArrayProperty": [
        "value3",
        "value4"
      ]
    }
  }'

Responses

Successfully inserted

Bodyapplication/json
idstringrequired
Example: "3a429dc8-56d4-42ef-a4cf-2ebc9ad1ef38"
Response
application/json
{ "id": "3a429dc8-56d4-42ef-a4cf-2ebc9ad1ef38" }

Endpoints for company management

Operations

Endpoints for project management

Operations

Endpoints for e-invoices

Operations

Endpoints serving project-scoped documents as XML

Operations
Operations
Operations
Operations