Contratti e compliance
Accordi, contratti, allegati e piani di pagamento — automatizza i flussi contrattuali.
Accordo
Endpoint
| GET | /agreements | Recupera la raccolta di risorse Agreement. |
| POST | /agreements | Crea una risorsa Agreement. |
| GET | /agreements/{id} | Recupera una risorsa Agreement. |
| PATCH | /agreements/{id} | Aggiorna la risorsa Agreement. |
| GET | /agreements/action-needed | Recupera la raccolta di risorse Agreement. |
| GET | /agreements/full-time-norm | Recupera una risorsa Agreement. |
| GET | /agreements/without-file | Recupera la raccolta di risorse Agreement. |
| GET | /agreements/without-file/active | Recupera la raccolta di risorse Agreement. |
Campi schema
| Campo | Tipo | Descrizione |
|---|---|---|
| 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 |
Tipo di Accordo
Endpoint
| GET | /agreement-types | Recupera la raccolta di risorse AgreementType. |
| POST | /agreement-types | Crea una risorsa AgreementType. |
| GET | /agreement-types/{id} | Recupera una risorsa AgreementType. |
| PATCH | /agreement-types/{id} | Aggiorna la risorsa AgreementType. |
| DELETE | /agreement-types/{id} | Rimuove la risorsa AgreementType. |
Campi schema
| Campo | Tipo | Descrizione |
|---|---|---|
| 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 |
Contratto
Endpoint
| GET | /contracts | Recupera la raccolta di risorse Contract. |
| POST | /contracts | Crea una risorsa Contract. |
| GET | /contracts/{id} | Recupera una risorsa Contract. |
| PATCH | /contracts/{id} | Aggiorna la risorsa Contract. |
| DELETE | /contracts/{id} | Rimuove la risorsa Contract. |
| GET | /contracts/{id}/documents | Recupera una risorsa 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. |
Campi schema
| Campo | Tipo | Descrizione |
|---|---|---|
| name | string | |
| direction | string | Setting a direction CONFIRMS it. The extraction applier re-marks it immediately afterwards when the party could not be verified; every other caller — including a user correcting the toggle — leaves it confirmed. |
| counterparty | string,null (iri-reference) | |
| project | string,null (iri-reference) | |
| currency | string (iri-reference) | |
| totalAmount | stringnull | |
| 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. The flag is advisory: the system doesn't auto-generate PaymentScheduleLines from a cadence; consumers (UI badges, calendar rendering) decide how to present cyclic contracts. |
| notes | stringnull | |
| description | stringnull | |
| signatureEnvelopeId | stringnull | |
| signatureStatus | stringnull | |
| signatureSentAt | string,null (date-time) | |
| signatureCompletedAt | string,null (date-time) |
Allegato contratto
Endpoint
| GET | /contract-attachments | Recupera la raccolta di risorse ContractAttachment. |
| POST | /contract-attachments | Crea una risorsa ContractAttachment. |
| GET | /contract-attachments/{id} | Recupera una risorsa ContractAttachment. |
| POST | /contract-attachments/{id}/mark-reviewed | Crea una risorsa ContractAttachment. |
| GET | /contract-attachments/{id}/preview | Preview contract attachment file |
| POST | /contract-attachments/{id}/reanalyze | Crea una risorsa ContractAttachment. |
| POST | /contract-attachments/create-base64 | Crea una risorsa ContractAttachment. |
Campi schema
| Campo | Tipo | Descrizione |
|---|---|---|
| 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 | |
| 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. |
| file | string |
Riga piano pagamenti
Endpoint
| GET | /contracts/{contractId}/payment-schedule-lines | Recupera la raccolta di risorse PaymentScheduleLine. |
| GET | /payment-schedule-lines | Recupera la raccolta di risorse PaymentScheduleLine. |
| POST | /payment-schedule-lines | Crea una risorsa PaymentScheduleLine. |
| GET | /payment-schedule-lines/{id} | Recupera una risorsa PaymentScheduleLine. |
| PATCH | /payment-schedule-lines/{id} | Aggiorna la risorsa PaymentScheduleLine. |
| DELETE | /payment-schedule-lines/{id} | Rimuove la risorsa PaymentScheduleLine. |
| POST | /payment-schedule-lines/{id}/invoice | Create an Invoice from this contract schedule line. |
Campi schema
| Campo | Tipo | Descrizione |
|---|---|---|
| id | string | |
| date | string (date-time) | |
| amount | string | |
| note | stringnull | |
| 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. |