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

Partially update data row in lookup table

Request

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

type of data being updated

externalIdstringrequired

Previously sent externalId

Bodyapplication/merge-patch+jsonrequired
externalIdstringrequired

External id of the lookup-table-row that is globally unique across the provided lookup-table-row data

Example: "12345"
externalClientIdstring

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

Example: "EXTERNAL_CLIENT_ID"
codestring

Number of the lookup table record in the source system (not unique across clients)

Example: "CODE1"
property name*string<= 20 propertiesadditional property

externalClientId and code counts for maximum 20 additional properties

curl -i -X PATCH \
  'https://api.cloud.hypatos.ai/v2/enrichment/lookup-tables/{type}/{externalId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '{
    "externalId": "12345",
    "externalClientId": "EXTERNAL_CLIENT_ID",
    "dimension1": "someValue",
    "dimension2": "anotherValue",
    "customField": "dynamicValue"
  }'

Responses

Successfully updated

Bodyapplication/json
externalIdstringrequired

External id of the lookup-table-row that is globally unique across the provided lookup-table-row data

Example: "12345"
externalClientIdstring

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

Example: "EXTERNAL_CLIENT_ID"
codestring

Number of the lookup table record in the source system (not unique across clients)

Example: "CODE1"
property name*string<= 20 propertiesadditional property

externalClientId and code counts for maximum 20 additional properties

Response
application/json
{ "externalId": "12345", "externalClientId": "EXTERNAL_CLIENT_ID", "dimension1": "someValue", "dimension2": "anotherValue", "customField": "dynamicValue" }

Request

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

type of data from which we should delete the row

externalIdstringrequired

Previously sent externalId

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

Responses

Successfully deleted

Response
No content

Request

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

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

Example: "CONTRACT-2025-0001"
externalClientIdstring

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

Example: "CONTRACT-2025-0001"
documentIdstring^[0-9a-fA-F]{24}$

Document id that was assigned during upload to Hypatos

Example: "67c02594d4aa80eecbd39bbe"
documentsArray of objects(document)non-empty
contractNumberstring

Contract number assigned in the source system

Example: "CN-2025-001"
statusstring or null(contractStatus)

Indicates the current lifecycle state of the contract

Enum"draft""active""pending""suspended""cancelled""expired""terminated"null
Example: "active"
businessPartnerContractNumberstring

Contract number assigned by the business partner

Example: "K9120-12"
externalCompanyIdstring

External unique identifier of the company in the source system

Example: "DE01"
salesOrganizationInfoArray of objects(salesOrganizationInfo)
businessPartnerobject(businessPartner)

Details of the business partner associated with the contract

titlestring

Title or name of the contract

Example: "Software Maintenance Agreement"
descriptionstring

Description of the contract and its purpose

Example: "Annual software maintenance contract for Acme Corp"
createdDatestring(date)

Date when the contract was created (YYYY-MM-DD)

Example: "2025-01-15"
startDatestring(date)

Date when the contract becomes effective (YYYY-MM-DD)

Example: "2025-02-01"
endDatestring(date)

Date when the contract expires (YYYY-MM-DD)

Example: "2026-01-31"
fiscalYearLabelstring

Fiscal year label associated with the contract

Example: "2023"
typestring

Type of contract

Example: "Service Agreement"
subTypestring

Subtype of contract

Example: "Quantity"
currencystring

Currency in which the contract amounts are denominated

Example: "EUR"
totalNetAmountnumber

Total net amount of the contract

Example: 50000
totalTaxAmountnumber

Total tax amount applicable to the contract

Example: 9500
totalGrossAmountnumber

Total gross amount of the contract (net amount + tax)

Example: 59500
paymentTermsobject(paymentTerms)
parentContractobject(parentContract)

Details of the business partner associated with the contract

targetQuantitynumber

Target quantity specified in the contract

Example: 1000
targetValuenumber

Target value of the contract in the specified currency

Example: 200000
contractItemsArray of objects(contractItem)

List of items included in the contract

additionalAgreementsArray of objects(additionalAgreement)

List of additional agreements linked to the contract

obligationsArray of objects(obligation)

List of obligations specified in the contract

contactsArray of objects(contactItem)

List of contact persons associated with the contract

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/contracts \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "externalId": "CONTRACT-2025-0001",
    "externalClientId": "CONTRACT-2025-0001",
    "documentId": "67c02594d4aa80eecbd39bbe",
    "documents": [
      {
        "id": "63cac12c37bb02accb396cae",
        "type": "invoice"
      }
    ],
    "contractNumber": "CN-2025-001",
    "status": "active",
    "businessPartnerContractNumber": "K9120-12",
    "externalCompanyId": "DE01",
    "salesOrganizationInfo": [
      {
        "externalSalesOrganizationId": "1000",
        "distributionChannel": "2000",
        "division": "3000",
        "salesGroup": "4000",
        "salesOffice": "5000",
        "blockedForOrdering": true,
        "blockedForDelivery": false,
        "shippingAddresses": [
          "ADDR001",
          "ADDR002"
        ],
        "billingAddresses": [
          "ADDR003"
        ],
        "salesOrganizationCode": "SO001",
        "salesUnit": {
          "unitOfMeasure": "PK",
          "conversionFactorToBaseUnit": 1000,
          "description": "Package of 10 units"
        }
      }
    ],
    "businessPartner": {
      "externalId": "0000100000",
      "type": "supplier"
    },
    "title": "Software Maintenance Agreement",
    "description": "Annual software maintenance contract for Acme Corp",
    "createdDate": "2025-01-15",
    "startDate": "2025-02-01",
    "endDate": "2026-01-31",
    "fiscalYearLabel": "2023",
    "type": "Service Agreement",
    "subType": "Quantity",
    "currency": "EUR",
    "totalNetAmount": 50000,
    "totalTaxAmount": 9500,
    "totalGrossAmount": 59500,
    "paymentTerms": {
      "paymentTermKey": "T10",
      "descriptions": [
        {
          "text": "Please pay us",
          "language": "en"
        }
      ]
    },
    "parentContract": {
      "externalId": "PARENT-2024-0005",
      "contractNumber": "CN-2024-005"
    },
    "targetQuantity": 1000,
    "targetValue": 200000,
    "contractItems": [
      {
        "itemNumber": "001",
        "category": "Service",
        "description": "Annual software maintenance",
        "netAmount": 25000,
        "taxAmount": 4750,
        "grossAmount": 29750,
        "unitPrice": 25000,
        "quantity": 1,
        "unitOfMeasure": "EA",
        "billingCycle": "Billing cycle for the contract item",
        "durationMonths": 12,
        "taxCode": {
          "code": "DEU_Standard",
          "description": "DEU - Standard (19%)"
        }
      }
    ],
    "additionalAgreements": [
      {
        "externalId": "AGREEMENT-001",
        "type": "downPaymentAllowed",
        "value": true
      }
    ],
    "obligations": [
      {
        "party": "Company A",
        "description": "Company A will deliver 1000 units of Product X per quarter"
      }
    ],
    "contacts": [
      {
        "firstName": "Koala",
        "lastName": "Hinze",
        "email": "accountant@sap.com",
        "phoneNumber": 491001234567891
      }
    ],
    "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