Umowy i zgodność
Umowy, kontrakty, załączniki i harmonogramy płatności — automatyzuj procesy umowne.
Umowa
Endpoints
| GET | /agreements | Pobiera kolekcję zasobów Agreement. |
| POST | /agreements | Tworzy zasób Agreement. |
| GET | /agreements/{id} | Pobiera zasób Agreement. |
| PATCH | /agreements/{id} | Aktualizuje zasób Agreement. |
| GET | /agreements/action-needed | Pobiera kolekcję zasobów Agreement. |
| GET | /agreements/full-time-norm | Pobiera zasób Agreement. |
| GET | /agreements/without-file | Pobiera kolekcję zasobów Agreement. |
| GET | /agreements/without-file/active | Pobiera kolekcję zasobów Agreement. |
Pola schematu
| Pole | Typ | Opis |
|---|---|---|
| employee | string,null (iri-reference) | |
| type | string | The CODE of a row in `agreement_type` — see {@see AgreementType}. Still a plain string and still the same five values it has always held for an org that has not added any; widened 16 -> 63 in Version20260730150000 because an org-entered name slugs into this column and 16 does not hold one (63, not 64, so MySQL can widen it without rebuilding the table — the migration's docblock has the byte arithmetic). |
| variant | string | |
| amount | number | |
| minutesPerWeek | integer | |
| jobSize | integer | |
| hasFixedWorkingTime | boolean | Whether this contract has an agreed weekly working time. |
| amountType | string | |
| billingType | string | |
| positionName | stringnull | |
| position | string,null (iri-reference) | |
| dateFrom | string (date-time) | |
| dateTo | string,null (date-time) | |
| currency | string (iri-reference) | |
| cost | string,null (iri-reference) | |
| hoursPerWeek | integer |
Typ umowy
Endpoints
| GET | /agreement-types | Pobiera kolekcję zasobów AgreementType. |
| POST | /agreement-types | Tworzy zasób AgreementType. |
| GET | /agreement-types/{id} | Pobiera zasób AgreementType. |
| PATCH | /agreement-types/{id} | Aktualizuje zasób AgreementType. |
| DELETE | /agreement-types/{id} | Usuwa zasób AgreementType. |
Pola schematu
| Pole | Typ | Opis |
|---|---|---|
| name | stringnull | The org-entered label. Null for the built-in five, which carry a translation key instead — see the class docblock. |
| calculable | boolean | Does an agreement of this type mean "this person is employed"? |
| position | integer | Dropdown sort key. Ties are legitimate while a user reorders and are broken by the code, so there is deliberately no unique constraint. |
| isActive | boolean |
Umowa
Endpoints
| GET | /contracts | Pobiera kolekcję zasobów Contract. |
| POST | /contracts | Tworzy zasób Contract. |
| GET | /contracts/{id} | Pobiera zasób Contract. |
| PATCH | /contracts/{id} | Aktualizuje zasób Contract. |
| DELETE | /contracts/{id} | Usuwa zasób Contract. |
| GET | /contracts/{id}/billing-schedule | Preview the payment schedule a cyclic contract's cadence implies. |
| GET | /contracts/{id}/documents | Pobiera zasób Contract. |
| POST | /contracts/{id}/invoice-from-virtual-line | Create an Invoice from a virtual (unmaterialized) row of a recurring contract's schedule preview. |
| POST | /contracts/{id}/send-for-signature | Send the contract's existing uploaded document to the signature middleware. |
| GET | /contracts/{id}/signature-status | Live per-signer signing status for a contract. |
Pola schematu
| Pole | Typ | Opis |
|---|---|---|
| name | string | |
| direction | string | Which way the money flows. A closed set of three: `out`, `in`, and `unknown` for a contract whose direction has not been established — `directionUnverifiedReason` says why. |
| counterparty | string,null (iri-reference) | |
| project | string,null (iri-reference) | |
| currency | string (iri-reference) | |
| totalAmount | string | Whole number of 1/10000 units — 11 000,00 is "110000000", NOT "11000.00". |
| area | stringnull | The area in m2 as AGREED, i.e. before any amendment (#3726). |
| dateFrom | string,null (date-time) | |
| dateTo | string,null (date-time) | |
| cyclic | boolean | Marks the contract as a recurring/ongoing relationship rather than a one-shot deal — e.g. a monthly retainer, ongoing security service, or indefinite tenancy. When true, dateTo is conventionally left null (open-ended) until the contract is actually terminated. |
| billingInterval | string | How often a cyclic contract bills. Null means the cadence has not been stated — it does NOT mean monthly. |
| billingAnchorDay | integer | Day of month the billing period starts, 1-31. Clamped to the last day in shorter months. |
| billingAnchorMonth | integer | Anniversary month for quarterly/annual billing, 1-12. Unused for monthly. |
| amountPerInterval | string | Cost of ONE billing period, as a whole number of 1/10000 units. Distinct from totalAmount, which is the whole contract. |
| noDocumentExpected | boolean | "This contract legitimately has no document" (#3854). |
| noProjectExpected | boolean | "This contract is not attributable to a project" (#3854). |
| noPaymentScheduleExpected | boolean | "No payment schedule will ever be entered for this contract" (#3854). |
| notes | stringnull | |
| description | stringnull | |
| signatureEnvelopeId | stringnull | |
| signatureStatus | stringnull | |
| signatureSentAt | string,null (date-time) | |
| signatureCompletedAt | string,null (date-time) | |
| paymentDeadlineDays | integernull | When payment falls due (#3535). Read from prose such as "w terminie 14 dni od dnia doręczenia faktury VAT, z góry" — three separate facts that previously had nowhere to live, so every extracted contract arrived with its terms blank and someone retyped them. |
| paymentCountedFrom | stringnull | When the payment deadline starts counting. Invoice DELIVERY and invoice ISSUE are deliberately distinct: they are different dates, and the leases in hand bind the former. Null when the contract is silent. |
| paymentInAdvance | booleannull | True for "z góry", false for arrears, null when the contract is silent. |
Załącznik umowy
Endpoints
| GET | /contract-attachments | Pobiera kolekcję zasobów ContractAttachment. |
| POST | /contract-attachments | Tworzy zasób ContractAttachment. |
| GET | /contract-attachments/{id} | Pobiera zasób ContractAttachment. |
| POST | /contract-attachments/{id}/mark-reviewed | Tworzy zasób ContractAttachment. |
| GET | /contract-attachments/{id}/preview | Preview contract attachment file |
| POST | /contract-attachments/{id}/reanalyze | Tworzy zasób ContractAttachment. |
| POST | /contract-attachments/create-base64 | Tworzy zasób ContractAttachment. |
Pola schematu
| Pole | Typ | Opis |
|---|---|---|
| id | string | |
| contract | string (iri-reference) | |
| organizationId | string | Organization is mapped on a separate EntityManager (central DB), so a Doctrine ManyToOne would reference an entity the default EM cannot resolve and any query touching this row would 500 with a MappingException. Store the organization ID as a plain VARCHAR(8) column instead — the same shape the migration already defined and the pattern the rest of `src/Entity/` uses for cross-EM references. Resolve the actual Organization entity via OrganizationRepository (central EM) at the call site. |
| filename | string | |
| mimeType | string | |
| size | integer | |
| storagePath | string | |
| status | string | |
| kind | string | |
| analysisResult | arraynull | |
| failureReason | stringnull | Why the analysis failed, when it did (#3832). |
| analysisSummary | arraynull | |
| reviewedAt | string,null (date-time) | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) | |
| contractId | stringnull | Surfaces the linked contract's id in the response so the FE can navigate to /contracts/{id} after a successful upload. The ManyToOne `$contract` field itself stays unexposed (no Groups) to keep the contract-attachment:read payload narrow — exposing the full Contract entity here would leak unrelated fields and require an extra serialization group. |
| failureRetryable | booleannull | Whether re-running the analysis on the same document could succeed. |
Pozycja harmonogramu płatności
Endpoints
| GET | /contracts/{contractId}/payment-schedule-lines | Pobiera kolekcję zasobów PaymentScheduleLine. |
| GET | /payment-schedule-lines | Pobiera kolekcję zasobów PaymentScheduleLine. |
| POST | /payment-schedule-lines | Tworzy zasób PaymentScheduleLine. |
| GET | /payment-schedule-lines/{id} | Pobiera zasób PaymentScheduleLine. |
| PATCH | /payment-schedule-lines/{id} | Aktualizuje zasób PaymentScheduleLine. |
| DELETE | /payment-schedule-lines/{id} | Usuwa zasób PaymentScheduleLine. |
| POST | /payment-schedule-lines/{id}/invoice | Create an Invoice from this contract schedule line. |
Pola schematu
| Pole | Typ | Opis |
|---|---|---|
| id | string | |
| date | string (date-time) | |
| amount* | string | Whole number of 1/10000 units — 5 000,00 is "50000000". NOT a decimal: "5000.00" is rejected. |
| note | stringnull | Free text against the line — "due after signature, not yet invoiced". |
| source | string | |
| invoice | mixed | Inverse side of Invoice.paymentScheduleLine. Read-only — set when the "Create invoice" button issues an Invoice from this line; the unique index on the owning side guarantees at most one Invoice per line. |
Aneks do umowy
Endpoints
| GET | /contract-amendments | Pobiera kolekcję zasobów ContractAmendment. |
| POST | /contract-amendments | Tworzy zasób ContractAmendment. |
| GET | /contract-amendments/{id} | Pobiera zasób ContractAmendment. |
| DELETE | /contract-amendments/{id} | Usuwa zasób ContractAmendment. |
| GET | /contracts/{contractId}/amendments | Pobiera kolekcję zasobów ContractAmendment. |
Pola schematu
| Pole | Typ | Opis |
|---|---|---|
| contract | string (iri-reference) | |
| effectiveDate* | string (date-time) | When the change TAKES EFFECT — not when the row was written. |
| totalAmountAfter* | string | The contract's total value AFTER this amendment, in the contract's own currency, minor units x Price::MULTIPLIER — the same units and the same `bigint`-as-string mapping `Contract::$totalAmount` uses. |
| areaAfter | stringnull | The measured area, in m2, AFTER this amendment (#3726). |
| dateFromAfter | string,null (date-time) | The contract's start and end dates after this amendment. |
| dateToAfter | string,null (date-time) | |
| note | stringnull | Why it changed, in the recorder's own words. |
| attachment | string,null (iri-reference) | The signed aneks, when there is one. |
Zdarzenie umowy
Endpoints
| GET | /contract-events | Pobiera kolekcję zasobów ContractEvent. |
| POST | /contract-events | Tworzy zasób ContractEvent. |
| GET | /contract-events/{id} | Pobiera zasób ContractEvent. |
| PATCH | /contract-events/{id} | Aktualizuje zasób ContractEvent. |
| DELETE | /contract-events/{id} | Usuwa zasób ContractEvent. |
| GET | /contracts/{contractId}/events | Pobiera kolekcję zasobów ContractEvent. |
Pola schematu
| Pole | Typ | Opis |
|---|---|---|
| id | string | |
| label | string | The contract's own wording, e.g. "wydanie Lokalu". |
| description | stringnull | |
| occurredOn | string,null (date-time) |