Agreements
Report an external agreement
PUT /api/v1/reservations/{id}/agreement
Your whole current view of the envelope. The same externalId as the current agreement updates it in place; a different one, or the first, creates a new version and supersedes a live one, exactly as a re-issue from the dashboard would.
Signers are matched by role and never removed. A report about one party says nothing about the others, so you may send only the party that changed.
Path parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| id required | path | string | The reservation id. |
Request body
application/json, shaped as AgreementInput.
| Field | Type | Description |
|---|---|---|
| externalId | string | null | Your stable id for the envelope (a DocuSeal submission id, say). Required unless status is failed: a failure before any envelope exists, missing fields or an API outage, annotates the current agreement instead. |
| status required | enum | "sent""completed""declined""failed""voided" |
| sentAt | timestamp | null | Defaults to now the first time the status is reached, and is kept afterwards. ISO 8601 |
| completedAt | timestamp | null | As sentAt. ISO 8601 |
| declinedAt | timestamp | null | As sentAt. ISO 8601 |
| voidedAt | timestamp | null | As sentAt. ISO 8601 |
| error | string | null | Why it failed, for staff to read on the booking. Only kept while status is failed. max 2000 chars |
| documentUrl | url | null | Where the provider hosts the executed document. Shown to staff as a link. max 2000 charshttps only |
| signers | SignerInput[] | Up to ten. Matched by role; a party you leave out is left as it was. max 10default [] |
Response
201 { agreement: Agreement }
Agreement fields
| Field | Type | Description |
|---|---|---|
| id | string | |
| version | integer | Counts up on every re-issue. Superseded versions are not listed. |
| provider | enum | quarters for an envelope Quarters issued itself, external for one written through this API. "quarters""external" |
| externalId | string | null | Your stable id for the envelope, as you reported it. |
| status | enum | "sent""completed""declined""failed""superseded""voided" |
| templateName | string | null | The Quarters template used; null for an external envelope. |
| sentAt | timestamp | null | ISO 8601 |
| completedAt | timestamp | null | ISO 8601 |
| declinedAt | timestamp | null | ISO 8601 |
| voidedAt | timestamp | null | ISO 8601 |
| error | string | null | Why it failed. Only kept while status is failed. |
| documentUrl | string | null | The provider-hosted copy of the executed document, as reported. |
| document | object | null | Set once the executed PDF has been archived: by Quarters for its own envelopes, by you through the document endpoint for yours. |
| signers | Signer[] | |
| createdAt | timestamp | ISO 8601 |
| updatedAt | timestamp | ISO 8601 |
Errors
Every failure is { error, message }; see Errors. A missing or expired bearer is a 401 on every endpoint
but the token exchange.
| Status | error | When |
|---|---|---|
| 400 | invalid_request | A bad field, named in the message; a missing externalId on a non-failed status; or a role listed twice. |
| 404 | not_found | Unknown reservation. |
| 409 | conflict | The organisation signs its contracts in Quarters (switch the provider under Settings › Contracts first), or a failure without an externalId arrived while a sent or completed envelope is current. Report it against that envelope’s id instead. |
Notes
- 201 when the call created a new version, 200 when it updated the current one in place.
- The moment
statusbecomescompleted, a booking that isreservedbecomesconfirmed, the same consequence a signature in Quarters has. You do not have to change the booking status yourself, and you receive areservation.updatedwebhook for it. declined,voidedandfailedare recorded and shown to staff; none of them changes the booking. Quarters sends no email on any of these: your system already talked to the parties.- Reporting
sentwith a new externalId while asentagreement is current marks the old onesuperseded. Acompletedone is kept in the history untouched. - A report whose externalId belongs to a superseded version lands on that historical row: it records what happened, but changes nothing about the current agreement or the booking. Finishing an old envelope after staff re-issued never confirms anything.