Leases
Signatures

Initiate signature for a specific lease

Initiates the electronic signature process directly from the context of a lease.

Signer identification

The system automatically identifies the initiating signer via:

  • The auth_user_id extracted from the JWT (claim sub)
  • Matching with an owner_id or lessee_id in the database
  • The signer type (owner or tenant) is determined automatically

Verification at individual signer level

The system now verifies at the individual signer level rather than at the global document level:

  • If you have already signed: you cannot restart (error 409)
  • If the document is fully signed: you cannot restart (error 409)
  • If a signature is in progress for you: you must wait (error 409)
  • If another signer has signed: you can continue the process (partial restart allowed)

Partial restart

If only one signer has signed, the other signer can initiate a new signature. This allows continuing the process even if one signer has already completed their signature.

PDF generation

Generates the PDF, creates signature requests for all signers (owner + tenants).

post/leases/{lease_id}/signature/initiate

Request

  • Base URL: https://api.faireplace.com/api
  • URL: https://api.faireplace.com/api/leases/{lease_id}/signature/initiate
  • Auth: HTTP bearer

Path parameters

lease_idstring uuid required

Lease ID

Request body

object required

Response

Signature initiated successfully

document_signature_idstring uuid required

Unique ID of the signature process

event_idstring required

Unique event ID for traceability

pdf_urlstring uri required

Absolute URL of the PDF document to sign

media_idstring uuid required

Reference to the media table (PDF document)

status'READY' | 'SIGNING' | 'COMPLETED' | 'FAILED' | 'ARCHIVED' required

Status of the document signature process

Example response

{
  "document_signature_id": "550e8400-e29b-41d4-a716-446655440000",
  "event_id": "signature_550e8400-e29b-41d4-a716-446655440001_1704985200",
  "pdf_url": "https://api.faireplace.com/api/media/serve/550e8400-e29b-41d4-a716-446655440002",
  "media_id": "550e8400-e29b-41d4-a716-446655440002",
  "signature_requests": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "signer_type": "proprietaire",
      "signer_email": "jean.dupont@example.com",
      "status": "PENDING",
      "expires_at": "2024-01-20T10:00:00Z"
    }
  ],
  "status": "READY"
}

Changes

No recorded changes to this operation across all 1 revision of this API.