Contracts

Contracts are the container for rental/sale workflows. These endpoints let you read contract summaries from external tools.

Last updated:

The contract model

Contracts can be in different statuses (for example draft, active, ended). The exact flow depends on your account.

Properties

  • Name
    id
    Type
    integer
    Description
    Unique identifier for the contract.
  • Name
    listing_id
    Type
    integer | null
    Description
    Listing id associated with the contract (if any).
  • Name
    kind
    Type
    string
    Description
    Contract kind (rent, sale, etc.).
  • Name
    status
    Type
    string
    Description
    Current status of the contract.
  • Name
    created_at
    Type
    timestamp
    Description
    Timestamp of when the contract was created.
  • Name
    updated_at
    Type
    timestamp
    Description
    Timestamp of the last contract update.

GET/v1/contracts/

List contracts

This endpoint returns a paginated list of contract summaries.

Required scope

read:contracts

Request

GET
/v1/contracts/
curl -G https://api.twentybaan.com/v1/contracts/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d limit=10

Response

{
  "ok": true,
  "items": [
    {
      "id": 123,
      "listing_id": 42,
      "unit_id": null,
      "kind": "rent",
      "status": "draft",
      "unit_label": "Unit 12A",
      "template_id": 7,
      "created_at": "2026-01-12T08:00:00Z",
      "updated_at": "2026-01-12T09:10:00Z",
      "listing": {
        "id": 42,
        "slug": "nice-apartment-bangkok",
        "title": "Nice apartment",
        "city": "Bangkok",
        "area": "Sukhumvit"
      }
    }
  ],
  "next_before_id": null
}

GET/v1/contracts/?id=:id

Retrieve a contract

Fetch a contract by id.

To include the contract data payload, pass include_data=1.

Required scope

read:contracts

Request

GET
/v1/contracts/?id=123
curl -G https://api.twentybaan.com/v1/contracts/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d id=123

Response

{
  "ok": true,
  "contract": {
    "id": 123,
    "listing_id": 42,
    "unit_id": null,
    "kind": "rent",
    "status": "draft",
    "unit_label": "Unit 12A",
    "template_id": 7,
    "created_at": "2026-01-12T08:00:00Z",
    "updated_at": "2026-01-12T09:10:00Z",
    "listing": {
      "id": 42,
      "slug": "nice-apartment-bangkok",
      "title": "Nice apartment",
      "city": "Bangkok",
      "area": "Sukhumvit"
    }
  }
}

Last updated

Update details

Updated: Memuatkan…

Twentybaan
Account access
Forgot?

By continuing, you agree to our Terms and Privacy.

or continue with

Built for property managers, owners, and agents across Thailand.