Reference: Contracts
Contracts managed in ELO Contract (module “Contracts”): hand over from ELO, the state with the fineelik fields, and the contract document. Changes come back as events agreement.* in the same stream as the invoice events.
| Method | Path | Summary |
|---|---|---|
| GET | /api/integration/agreements/{externalGuid} |
Get the state of a contract managed in ELO |
| PUT | /api/integration/agreements/{externalGuid} |
Hand over a contract from ELO |
| POST | /api/integration/agreements/{externalGuid}/documents |
Hand over a contract document from ELO |
Get the state of a contract managed in ELO
Section titled “Get the state of a contract managed in ELO”GET /api/integration/agreements/{externalGuid}
Operation id: getEloAgreement
Returns the state of the contract with the fineelik fields and whether its matching conditions are approved in fineelik (see AgreementEloState). A key reads only contracts of its own company; an unknown GUID and a contract of another company answer 404.
Authentication: API key in the x-api-key header (ApiKey)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
externalGuid |
path | string | yes | GUID of the contract in ELO (Sord.guid). GUID-shaped values are normalized to the ELO notation, so braces and case do not matter. Up to 200 characters. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The state of the contract. | AgreementEloState |
| 401 | The API key is missing, invalid, expired or revoked. | ApiError |
| 403 | The owner of the API key does not hold the permission agreements.integration_read. |
ApiError |
| 404 | No contract with this GUID in the company of the key (agreement.not_found). |
ApiError |
Hand over a contract from ELO
Section titled “Hand over a contract from ELO”PUT /api/integration/agreements/{externalGuid}
Operation id: putEloAgreement
Creates or updates a contract that is managed in ELO Contract. ELO leads the contract: in fineelik its ELO fields (master data, partner as printed, term, termination, status, currency, total value, payments) are read only and change only through this route. fineelik keeps what ELO does not know (vendor, net or gross, tolerances, automatic approval, object numbers, keywords, confidentiality) and never overwrites it here.
Idempotent. The GUID is unique. Sending the same payload again changes nothing and triggers nothing (outcome unchanged). A payload with an older changedAt than the stored one is not applied (outcome stale). Two hand overs of the same contract at the same time are serialized.
Approval in fineelik. When the hand over changes the matching conditions (partner, term, currency, payments), the automatic approval of invoices rests until the conditions are approved again in fineelik. A running approval is withdrawn when the new state differs from the submitted one. The responsible persons get a notice and the event agreement.conditions_changed follows.
Status. The status comes only from ELO; fineelik does not change it on its own and sends no own reminders for these contracts.
Authentication: API key in the x-api-key header (ApiKey)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
externalGuid |
path | string | yes | GUID of the contract in ELO (Sord.guid). GUID-shaped values are normalized to the ELO notation, so braces and case do not matter. Up to 200 characters. |
Request body (required)
Content type: application/json
Schema: AgreementEloHandover
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The result of the hand over. | AgreementEloHandoverResponse |
| 400 | The body is invalid, for example a date or amount in the wrong format, a negative amount or more than two decimals. | ApiError |
| 401 | The API key is missing, invalid, expired or revoked. | ApiError |
| 403 | The owner of the API key does not hold the permission agreements.integration_write. |
ApiError |
| 404 | The company is not the one of the key or does not exist (company.not_found). |
ApiError |
| 409 | Conflict: the contract belongs to another company in fineelik (agreement_elo.company_mismatch) or is managed in fineelik (agreement_elo.not_elo_managed). |
ApiError |
| 422 | Not applicable: unknown status key (agreement_elo.unknown_status, params.value) or no company given for a caller with several companies (agreement_elo.company_required). |
ApiError |
Hand over a contract document from ELO
Section titled “Hand over a contract document from ELO”POST /api/integration/agreements/{externalGuid}/documents
Operation id: addEloAgreementDocument
Attaches the contract document (PDF) from ELO to the contract, for display and for the reading by AI of the fineelik suggestions (keywords). Idempotent by dmsGuid and the hash of the file: the same document again answers created false. It does not start a reading by AI on its own.
Authentication: API key in the x-api-key header (ApiKey)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
externalGuid |
path | string | yes | GUID of the contract in ELO (Sord.guid). GUID-shaped values are normalized to the ELO notation, so braces and case do not matter. Up to 200 characters. |
Request body (required)
Content type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
file |
string (binary) | yes | The contract document as a PDF file. |
dmsGuid |
string | yes | GUID of the document in ELO. Together with the hash of the file the anchor for idempotency. Up to 200 characters. |
dmsVersion |
string | no | Version of the document in ELO, kept as a note. Up to 100 characters. |
role |
string | no | Role of the document at the contract: main (default), amendment, termination or other. One of: main, amendment, termination, other. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The document at the contract. | AgreementEloDocumentResponse |
| 400 | A field is missing or invalid, for example dmsGuid. |
ApiError |
| 401 | The API key is missing, invalid, expired or revoked. | ApiError |
| 403 | The owner of the API key does not hold the permission agreements.integration_write. |
ApiError |
| 404 | No contract with this GUID in the company of the key, or no file in the field file. |
ApiError |
| 422 | The file is not a PDF (agreement.document_type). |
ApiError |