Leases

Ingest a public bail draft

Ingests a public bail (lease) draft into a real lease for the authenticated tenant.

The draft is identified by a draft_token, which may be supplied in the request body or via cookie (in which case the body can be omitted). On success, the created lease, estate, owner, and (optionally) lessee identifiers are returned.

Usage Example

curl -X POST https://api.faireplace.com/api/leases/ingest-draft \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "draft_token": "draft_a1b2c3d4e5f6" }'

Response:

{
  "lease_id": "660e8400-e29b-41d4-a716-446655440001",
  "estate_id": "aa0e8400-e29b-41d4-a716-446655440005",
  "owner_id": "bb0e8400-e29b-41d4-a716-446655440006",
  "lessee_id": "cc0e8400-e29b-41d4-a716-446655440007"
}
post/leases/ingest-draft

Request

  • Base URL: https://api.faireplace.com/api
  • URL: https://api.faireplace.com/api/leases/ingest-draft
  • Auth: HTTP bearer

Request body

draft_tokenstring nullable

Token identifying the public draft to ingest.

Example request

{
  "draft_token": "draft_a1b2c3d4e5f6"
}

Response

Draft ingested; lease created successfully

lease_idstring uuid required

Identifier of the created lease.

estate_idstring uuid required

Identifier of the created/linked estate.

owner_idstring uuid required

Identifier of the created/linked owner.

lessee_idstring uuid nullable

Identifier of the created/linked lessee, if any.

Example response

{
  "lease_id": "660e8400-e29b-41d4-a716-446655440001",
  "estate_id": "aa0e8400-e29b-41d4-a716-446655440005",
  "owner_id": "bb0e8400-e29b-41d4-a716-446655440006",
  "lessee_id": "cc0e8400-e29b-41d4-a716-446655440007"
}

Changes

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