Skip to content
Quarters Developers
esc
  • Type an endpoint, an object or a word from a guide.

Agreements

Archive the executed PDF

PUT /api/v1/reservations/{id}/agreement/document

The signed document, stored by Quarters next to the agreement so it outlives the provider’s retention and the dashboard can serve it. Send the bytes as application/pdf, at most 25 MB, not a link: a URL to fetch would be a request from inside Quarters to wherever the caller says.

Path parameters

ParameterInTypeDescription
id requiredpathstringThe reservation id.

Request body

The raw PDF bytes, sent as Content-Type: application/pdf.

Response

200 { agreement: Agreement }

Agreement fields
FieldTypeDescription
id string
version integerCounts up on every re-issue. Superseded versions are not listed.
provider enumquarters for an envelope Quarters issued itself, external for one written through this API. "quarters""external"
externalId string | nullYour stable id for the envelope, as you reported it.
status enum "sent""completed""declined""failed""superseded""voided"
templateName string | nullThe 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 | nullWhy it failed. Only kept while status is failed.
documentUrl string | nullThe provider-hosted copy of the executed document, as reported.
document object | nullSet 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.

StatuserrorWhen
404not_foundUnknown reservation, or one without an agreement.
409conflictThe current agreement is a Quarters envelope (it has its own document), or is not completed yet.
413payload_too_largeOver 25 MB.
415unsupported_media_typeNot application/pdf, or the bytes are not a PDF.

Notes

  • Uploading again replaces the archived copy and its checksum.

Request

curl -X PUT "https://go.quarters.live/api/v1/reservations/7c02…/agreement/document" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/pdf" \
  --data-binary @signed.pdf

Response · 200

{
  "agreement": {
    "id": "9a41…",
    "version": 1,
    "provider": "external",
    "externalId": "docuseal:1849213",
    "status": "completed",
    "templateName": null,
    "sentAt": "2026-09-08T10:02:11.000Z",
    "completedAt": "2026-09-09T08:12:40.000Z",
    "declinedAt": null,
    "voidedAt": null,
    "error": null,
    "documentUrl": "https://docuseal.com/d/…/signed.pdf",
    "document": {
      "sha256": "9f86d081…",
      "uploadedAt": "2026-09-09T08:14:02.000Z"
    },
    "signers": [
      {
        "role": "lessor",
        "name": "City Retreat B.V.",
        "email": "bookings@cityretreat.com",
        "status": "completed",
        "signingUrl": null,
        "viewedAt": null,
        "completedAt": "2026-09-08T10:02:11.000Z",
        "declinedAt": null,
        "declineReason": null
      },
      {
        "role": "lessee",
        "name": "Sofia Rossi",
        "email": "sofia@example.com",
        "status": "completed",
        "signingUrl": "https://docuseal.com/s/…",
        "viewedAt": "2026-09-09T08:10:02.000Z",
        "completedAt": "2026-09-09T08:12:40.000Z",
        "declinedAt": null,
        "declineReason": null
      }
    ],
    "createdAt": "2026-09-08T10:02:11.000Z",
    "updatedAt": "2026-09-09T08:14:02.000Z"
  }
}