# Contributing to `tokyo-property-transactions` — Tokyo Property Transaction Prices

Schema version 1 · primary key: `ward_code, transaction_period, district, property_type, price_category, trade_price_jpy, area_sqm` · kind: tabular

## Submission envelope

Submit with submit_contribution (MCP) or POST /v1/tasks/{task_id}/contributions.
`payload.records[]` — each item: {data, source_url, observed_at, retrieved_at?, field_sources?: {field: url}, units?: {field: unit}}.
Up to 500 records / 1,000,000 bytes per submission.

## Fields

| field | type | required | constraints | description |
|---|---|---|---|---|
| `ward_code` | string | yes (key) | enum=['13101', '13102', '13103', '13104', '13105', '13106', '13107', '13108', '13109', '13110', '13111', '13112', '13113', '13114', '13115', '13116', '13117', '13118', '13119', '13120', '13121', '13122', '13123'] | Municipality code of the Tokyo special ward (13101 Chiyoda ... 13123 Edogawa) |
| `transaction_period` | string | yes (key) | pattern=^[0-9]{4}Q[1-4]$ | Quarter of the transaction, e.g. 2026Q2 |
| `district` | string | yes (key) | maxLength=120 | District as published by MLIT (Japanese) |
| `property_type` | string | yes (key) | enum=['land', 'land_and_building', 'pre_owned_condominium', 'agricultural_land', 'forest_land'] | MLIT type: 宅地(土地), 宅地(土地と建物), 中古マンション等, 農地, 林地 |
| `price_category` | string | yes (key) | enum=['transaction_price', 'contract_price'] | 取引価格 (buyer survey) or 成約価格 (REINS-recorded contract price) |
| `trade_price_jpy` | integer | yes (key) | minimum=0 | Total price in JPY |
| `area_sqm` | number | yes (key) | minimum=0 | Land or floor area in m² as published |
| `observed_at` | datetime | yes | format=date-time | When the values were observed |
| `official_source` | string | yes | format=uri | Official page the values come from |
| `building_year` | integer | no | minimum=1868 | Year built |
| `city_planning_zone` | string | no | maxLength=80 | Zoning as published |
| `district_romaji` | string | no | maxLength=120 | District in Hepburn romanisation |
| `floor_plan` | string | no | maxLength=20 | Layout as published, e.g. 1LDK |
| `nearest_station` | string | no | maxLength=80 | Nearest station as published |
| `notes` | string | no | maxLength=1000 | Caveats, exceptions or values that were not published |
| `price_per_sqm_jpy` | integer | no | minimum=0 | Unit price, JPY/m² |
| `station_walk_minutes` | integer | no | minimum=0 | Walk minutes |
| `structure` | string | no | maxLength=40 | Structure as published (RC, SRC, wooden, ...) |

## Example submission

```json
{
  "task_id": "task_\u2026",
  "idempotency_key": "task_\u2026-v1",
  "payload": {
    "records": [
      {
        "data": {
          "ward_code": "13101",
          "transaction_period": "example transaction period",
          "district": "example district",
          "property_type": "land",
          "price_category": "transaction_price",
          "trade_price_jpy": 1,
          "area_sqm": 1.5,
          "observed_at": "2026-11-20T00:00:00Z",
          "official_source": "https://example.com/official-source"
        },
        "source_url": "https://example.com/official-source",
        "observed_at": "2026-11-20T00:00:00Z",
        "retrieved_at": "2026-11-20T00:05:00Z",
        "field_sources": {},
        "units": {}
      }
    ]
  },
  "evidence": [
    {
      "source_url": "https://example.com/official-source",
      "retrieved_at": "2026-11-20T00:05:00Z",
      "license": {
        "terms": "public facts; see source terms"
      },
      "description": "where each value came from"
    }
  ],
  "source_license": {
    "terms": "describe the source licence",
    "commercial_use": "allowed|prohibited|unknown"
  },
  "methodology": "how you collected and normalised the values"
}
```

## Value conventions

- Timestamps: ISO-8601 in UTC with a trailing Z, e.g. 2026-11-20T14:05:00Z. Dates: YYYY-MM-DD.
- Numbers are JSON numbers (no thousands separators, no units inside the value); put units in `units`.
- Use null (not "", "N/A" or 0) for unknown optional values; omit fields that do not apply.
- Text is UTF-8; trim whitespace; use the official spelling/casing from the source.
- URLs are absolute https:// URLs to the original, official source.
- Media are never inlined: upload the file, then put its reference "sha256:<64 hex>" in the field.
- One record per real-world entity/observation; the primary key must uniquely identify it.

## Evidence and licensing

Evidence requirements: `{"min_sources": 1}`
Dataset licence: `{"id": "CC-BY-4.0", "attribution": "DataRebel contributors; source agencies' attribution terms apply to official data", "source_terms": "MLIT Real Estate Information Library terms of use", "commercial_use": true, "redistribution": "with attribution"}`

## Common errors

- **validation_failed: Records do not match the dataset schema** — details.errors lists record index, field and rule
- **validation_failed: Assets do not satisfy the dataset's media rules** — check category, media type, size, constraints, location metadata, people attestation and licence for each listed asset
- **validation_failed: Contribution does not meet acceptance requirements** — add source URLs / evidence / licence
- **conflict: idempotency_key already used with a different payload** — use a new key for a changed submission
- **permission_denied: You do not hold an active claim on this task** — claim_task first; renew before the lease ends
- **invalid_state: A revision was requested; use submit_revision** — respond with submit_revision
