Contratos e Conformidade
Acordos, contratos, anexos e planos de pagamento — automatize os fluxos de trabalho contratuais.
Acordo
Endpoints
| GET | /agreements | Recupera a coleção de recursos Agreement. |
| POST | /agreements | Cria um recurso Agreement. |
| GET | /agreements/{id} | Recupera um recurso Agreement. |
| PATCH | /agreements/{id} | Atualiza o recurso Agreement. |
| GET | /agreements/action-needed | Recupera a coleção de recursos Agreement. |
| GET | /agreements/full-time-norm | Recupera um recurso Agreement. |
| GET | /agreements/without-file | Recupera a coleção de recursos Agreement. |
| GET | /agreements/without-file/active | Recupera a coleção de recursos Agreement. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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 de Acordo
Endpoints
| GET | /agreement-types | Recupera a coleção de recursos AgreementType. |
| POST | /agreement-types | Cria um recurso AgreementType. |
| GET | /agreement-types/{id} | Recupera um recurso AgreementType. |
| PATCH | /agreement-types/{id} | Atualiza o recurso AgreementType. |
| DELETE | /agreement-types/{id} | Remove o recurso AgreementType. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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 |
Contrato
Endpoints
| GET | /contracts | Recupera a coleção de recursos Contract. |
| POST | /contracts | Cria um recurso Contract. |
| GET | /contracts/{id} | Recupera um recurso Contract. |
| PATCH | /contracts/{id} | Atualiza o recurso Contract. |
| DELETE | /contracts/{id} | Remove o recurso Contract. |
| GET | /contracts/{id}/documents | Recupera um recurso 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. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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) |
Anexo do Contrato
Endpoints
| GET | /contract-attachments | Recupera a coleção de recursos ContractAttachment. |
| POST | /contract-attachments | Cria um recurso ContractAttachment. |
| GET | /contract-attachments/{id} | Recupera um recurso ContractAttachment. |
| POST | /contract-attachments/{id}/mark-reviewed | Cria um recurso ContractAttachment. |
| GET | /contract-attachments/{id}/preview | Preview contract attachment file |
| POST | /contract-attachments/{id}/reanalyze | Cria um recurso ContractAttachment. |
| POST | /contract-attachments/create-base64 | Cria um recurso ContractAttachment. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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 |
Linha do Plano de Pagamentos
Endpoints
| GET | /contracts/{contractId}/payment-schedule-lines | Recupera a coleção de recursos PaymentScheduleLine. |
| GET | /payment-schedule-lines | Recupera a coleção de recursos PaymentScheduleLine. |
| POST | /payment-schedule-lines | Cria um recurso PaymentScheduleLine. |
| GET | /payment-schedule-lines/{id} | Recupera um recurso PaymentScheduleLine. |
| PATCH | /payment-schedule-lines/{id} | Atualiza o recurso PaymentScheduleLine. |
| DELETE | /payment-schedule-lines/{id} | Remove o recurso PaymentScheduleLine. |
| POST | /payment-schedule-lines/{id}/invoice | Create an Invoice from this contract schedule line. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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. |