{"openapi":"3.1.0","info":{"title":"Lettance rental reference Actions","version":"1.0.0","summary":"Cited English rental rules, council licensing and postcode research for software and AI.","description":"Named public examples and coverage are free. A delivered production lookup costs one prepaid credit. Use a production project key with data:read. Generate a UUIDv4 purchaseId for each intended purchase and reuse it with the same inputs for a retry. Keep source links, dates, uncertainty and attribution with each answer.","termsOfService":"https://lettance.com/developers/terms","contact":{"name":"Lettance","url":"https://lettance.com/developers","email":"gm@galleonlabs.io"}},"externalDocs":{"description":"Developer guide","url":"https://lettance.com/developers"},"servers":[{"url":"https://lettance.com","description":"Production"}],"security":[{"projectKey":[]}],"tags":[{"name":"Address check","description":"Council scheme context and planning counts for one postcode."},{"name":"Compare and market","description":"Postcodes side by side, and local rents and sale prices from a dated open-data snapshot."},{"name":"Councils","description":"Council licensing research for every English council."},{"name":"Rules","description":"The cited catalogue of landlord rules in England."},{"name":"Rental plan","description":"A home's dated plan for the next 12 months, from its postcode and the landlord's answers."}],"paths":{"/api/v1/check":{"get":{"operationId":"checkAddress","tags":["Address check"],"summary":"Rules for a rental postcode","description":"Get scheme types and dates, the planned registration window, the mapped flood zone and mapped-area counts at a postcode centre. Check the source for the exact address, eligibility and fees.","parameters":[{"name":"postcode","in":"query","required":true,"description":"A full UK postcode in England, with or without the space. Longer than 16 characters is rejected, not shortened.","schema":{"type":"string","minLength":5,"maxLength":16,"examples":["SE15 5BA"]}},{"name":"household","in":"query","required":false,"description":"single: one household (default). small_hmo: 3 or 4 people from 2 or more households. large_hmo: 5 or more people from 2 or more households.","schema":{"type":"string","enum":["single","small_hmo","large_hmo"],"default":"single"}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"Council scheme context and mapped-area counts for a postcode centre. Use the separate property assessment for licensing applicability.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"No such postcode.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/v1/plan":{"get":{"operationId":"planRental","tags":["Rental plan"],"summary":"A rental's dated plan","description":"Every duty for one rented home with its status, date and cited rules for the next 12 months, from the postcode and the landlord's optional answers. Returns the questions still worth asking. Statuses rely on those answers, not documents.","parameters":[{"name":"postcode","in":"query","required":true,"description":"A full UK postcode in England, with or without the space. Longer than 16 characters is rejected, not shortened.","schema":{"type":"string","minLength":5,"maxLength":16,"examples":["SW9 7AA"]}},{"name":"household","in":"query","required":false,"description":"single: one household (default). small_hmo: 3 or 4 people from 2 or more households. large_hmo: 5 or more.","schema":{"type":"string","enum":["single","small_hmo","large_hmo"],"default":"single"}},{"name":"let","in":"query","required":false,"description":"Whether the home is let. Optional.","schema":{"type":"string","enum":["now","next"]}},{"name":"start","in":"query","required":false,"description":"The tenancy start date, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"gas","in":"query","required":false,"description":"Whether the home has gas. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"gas_check","in":"query","required":false,"description":"The date of the last gas safety check, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"eicr","in":"query","required":false,"description":"The date of the last electrical inspection, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"eicr_next","in":"query","required":false,"description":"The next inspection date on the electrical report, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"epc","in":"query","required":false,"description":"The EPC rating. Optional.","schema":{"type":"string","enum":["A","B","C","D","E","F","G"]}},{"name":"epc_expiry","in":"query","required":false,"description":"The date the EPC expires, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"licence","in":"query","required":false,"description":"Whether you hold the licence. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"licence_end","in":"query","required":false,"description":"The date the licence ends, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"deposit","in":"query","required":false,"description":"Whether you took a deposit. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"deposit_on","in":"query","required":false,"description":"The date you received the deposit, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"deposit_done","in":"query","required":false,"description":"Whether the deposit was protected in time. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"rtr","in":"query","required":false,"description":"Whether the right to rent checks were done. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"terms","in":"query","required":false,"description":"Whether the tenancy document was given. Optional.","schema":{"type":"string","enum":["yes","late","no"]}},{"name":"alarms","in":"query","required":false,"description":"Whether the alarms were tested. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"increase","in":"query","required":false,"description":"The date of the last rent increase, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"period","in":"query","required":false,"description":"How often the rent is due. Optional.","schema":{"type":"string","enum":["month","four_weeks","fortnight","week"]}},{"name":"furnished","in":"query","required":false,"description":"Whether the home is furnished. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"The plan.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"No such postcode.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/v1/plan/calendar":{"get":{"operationId":"planRentalCalendar","tags":["Rental plan"],"summary":"A rental's plan as a calendar file","description":"Download a home’s future dates as an iCalendar file, with reminders 30 and 7 days before certificate, licence and register dates. Your application can import the file into a calendar. Authenticated exports cost one credit.","parameters":[{"name":"postcode","in":"query","required":true,"description":"A full UK postcode in England, with or without the space. Longer than 16 characters is rejected, not shortened.","schema":{"type":"string","minLength":5,"maxLength":16,"examples":["SW9 7AA"]}},{"name":"household","in":"query","required":false,"description":"single: one household (default). small_hmo: 3 or 4 people from 2 or more households. large_hmo: 5 or more.","schema":{"type":"string","enum":["single","small_hmo","large_hmo"],"default":"single"}},{"name":"let","in":"query","required":false,"description":"Whether the home is let. Optional.","schema":{"type":"string","enum":["now","next"]}},{"name":"start","in":"query","required":false,"description":"The tenancy start date, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"gas","in":"query","required":false,"description":"Whether the home has gas. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"gas_check","in":"query","required":false,"description":"The date of the last gas safety check, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"eicr","in":"query","required":false,"description":"The date of the last electrical inspection, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"eicr_next","in":"query","required":false,"description":"The next inspection date on the electrical report, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"epc","in":"query","required":false,"description":"The EPC rating. Optional.","schema":{"type":"string","enum":["A","B","C","D","E","F","G"]}},{"name":"epc_expiry","in":"query","required":false,"description":"The date the EPC expires, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"licence","in":"query","required":false,"description":"Whether you hold the licence. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"licence_end","in":"query","required":false,"description":"The date the licence ends, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"deposit","in":"query","required":false,"description":"Whether you took a deposit. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"deposit_on","in":"query","required":false,"description":"The date you received the deposit, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"deposit_done","in":"query","required":false,"description":"Whether the deposit was protected in time. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"rtr","in":"query","required":false,"description":"Whether the right to rent checks were done. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"terms","in":"query","required":false,"description":"Whether the tenancy document was given. Optional.","schema":{"type":"string","enum":["yes","late","no"]}},{"name":"alarms","in":"query","required":false,"description":"Whether the alarms were tested. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"increase","in":"query","required":false,"description":"The date of the last rent increase, as YYYY-MM-DD. Optional.","schema":{"type":"string","format":"date"}},{"name":"period","in":"query","required":false,"description":"How often the rent is due. Optional.","schema":{"type":"string","enum":["month","four_weeks","fortnight","week"]}},{"name":"furnished","in":"query","required":false,"description":"Whether the home is furnished. Optional.","schema":{"type":"string","enum":["yes","no"]}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"An iCalendar file.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"text/calendar":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"No such postcode.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/v1/compare":{"get":{"operationId":"compareAddresses","tags":["Compare and market"],"summary":"Compare 2 to 4 rental postcodes","description":"Compare council context, registration windows, mapped-area counts, rents and sales. One credit if at least one postcode resolves. If none resolves, permanent misses return 404; any upstream outage returns 503. No charge for either error. Each postcode counts toward the rate limit.","parameters":[{"name":"postcode","in":"query","required":true,"description":"Repeat 2 to 4 times, once per full postcode in England. Longer than 16 characters is rejected, not shortened.","style":"form","explode":true,"schema":{"type":"array","minItems":2,"maxItems":4,"items":{"type":"string","minLength":5,"maxLength":16},"examples":[["SE15 5BA","SW6 1HS"]]}},{"name":"household","in":"query","required":false,"description":"single: one household (default). small_hmo: 3 or 4 people from 2 or more households. large_hmo: 5 or more people from 2 or more households.","schema":{"type":"string","enum":["single","small_hmo","large_hmo"],"default":"single"}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"The comparison. A postcode that could not be checked is listed with its error.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"The lookup returned no usable observations. No debit or receipt is recorded.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","message"],"properties":{"error":{"const":"no_data_available"},"credits":{"const":0},"message":{"type":"string"}}}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/v1/area-market":{"get":{"operationId":"getAreaMarket","tags":["Compare and market"],"summary":"Local rents and sale prices","description":"ONS average private rent for the local authority and HM Land Registry median sale price and sales count for the postcode district, from a dated snapshot, with attribution. Area figures, not a valuation.","parameters":[{"name":"postcode","in":"query","required":true,"description":"A full UK postcode in England, with or without the space. Longer than 16 characters is rejected, not shortened.","schema":{"type":"string","minLength":5,"maxLength":16,"examples":["SE15 5BA"]}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"Rents and sale prices for the area.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaMarketResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"Unknown postcode (error.code=not_found), or a resolved postcode with neither rents nor sales (error=no_data_available). Neither incurs a charge.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error","credits","message"],"properties":{"error":{"const":"no_data_available"},"credits":{"const":0},"message":{"type":"string"}}}]}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/v1/coverage":{"get":{"security":[],"x-credits":0,"operationId":"getDataCoverage","tags":["Councils"],"summary":"Coverage and source dates","description":"Check which council records are published or held, local assessment coverage, market observation periods, source releases, and the geography and form editions in use.","responses":{"200":{"description":"Coverage of the serving datasets.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageResponse"}}}},"429":{"description":"Too many requests from this address. Wait for Retry-After seconds.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/councils":{"get":{"operationId":"listCouncils","tags":["Councils"],"summary":"Every English council","description":"Every current English council with its region, whether its licensing has been researched, research dates and counts of schemes and open questions.","responses":{"200":{"description":"All councils.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouncilListResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"parameters":[{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"x-openai-isConsequential":true}},"/api/v1/councils/{slug}":{"get":{"operationId":"getCouncilLicensing","tags":["Councils"],"summary":"One council's licensing","description":"Council scheme types, area scope, dates, confidence and sources. For exact boundaries and fees follow the primary notice. A council not researched yet returns researched: false with its landlord register window. Not researched never means no licence.","parameters":[{"name":"slug","in":"path","required":true,"description":"Council slug such as southwark or tower-hamlets. A council name also works. Longer than 120 characters does not match.","schema":{"type":"string","minLength":1,"maxLength":120,"examples":["southwark"]}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"The council's licensing, or researched: false.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouncilResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"No English council matches.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/v1/rules":{"get":{"operationId":"searchRules","tags":["Rules"],"summary":"List or search landlord rules","description":"Without q, every rule in the catalogue. With q, up to 10 rules whose title, summary or topic match the words. A search longer than 500 characters is rejected. Each match has its status and a link to the full rule.","parameters":[{"name":"q","in":"query","required":false,"description":"Search words, for example gas safety or deposit. Longer than 500 characters is rejected.","schema":{"type":"string","maxLength":500,"examples":["gas safety"]}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"Matching rules.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleListResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"The lookup returned no usable observations. No debit or receipt is recorded.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","message"],"properties":{"error":{"const":"no_data_available"},"credits":{"const":0},"message":{"type":"string"}}}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/v1/rules/{id}":{"get":{"operationId":"getRule","tags":["Rules"],"summary":"One landlord rule","description":"The full rule: who it applies to, the requirement, deadline, evidence to keep, penalty, legal basis, official guidance, status and confidence.","parameters":[{"name":"id","in":"path","required":true,"description":"Rule id from searchRules, for example gas-safety-annual-check. Longer than 120 characters does not match.","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"purchaseId","in":"query","required":true,"description":"An alternative to Idempotency-Key for clients without custom headers. Generate one UUIDv4 per intended purchase and reuse it with identical parameters on retry. Supply a key using either transport.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}],"responses":{"200":{"description":"The rule.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Lettance-Receipt-Id":{"description":"Project credit receipt ID.","schema":{"type":"string"}},"X-Lettance-Credits":{"description":"Credits charged for the original purchase.","schema":{"type":"integer","const":1}},"X-Lettance-Replayed":{"description":"True if the original response was recovered without another debit.","schema":{"type":"boolean"}},"Link":{"description":"Field attribution and reuse manifest.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResponse"}}}},"400":{"description":"Missing or invalid idempotency key, or invalid query.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"401":{"description":"Supply a valid production project bearer key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"402":{"description":"Insufficient credits. The request debited zero credits and needs one credit to proceed.","content":{"application/json":{"schema":{"type":"object","required":["error","credits","creditsRequired"],"properties":{"error":{"const":"insufficient_credits"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}}}},"403":{"description":"The key does not grant data:read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"404":{"description":"No rule with that id.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"This purchase ID was used for other inputs or another operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"422":{"description":"Unsupported geography or a sandbox key on a paid data endpoint.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}}},"429":{"description":"Rate limited. Back off before retrying the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"description":"Service or source temporarily unavailable. A comparison with zero usable properties and any temporary lookup failure returns upstream_unavailable with credits 0. Retry the same purchase.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"credits":{"type":"integer","const":0,"description":"Credits debited on this error."},"creditsRequired":{"type":"integer","const":1,"description":"Present for insufficient_credits."},"console":{"type":"string"},"documentation":{"type":"string"}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter","description":"When supplied, wait this many seconds."}}}},"x-required-scope":"data:read","x-credits":1,"x-openai-isConsequential":true}},"/api/examples/councils":{"get":{"operationId":"listCouncilExamples","tags":["Councils"],"summary":"Check council coverage and available examples","description":"Find English councils by exact slug, or omit slug for the directory. Each row names its region, publication status and whether a free full example is available. A single published council includes one scheme preview when a cited source is available.","security":[],"x-credits":0,"parameters":[{"name":"slug","in":"query","required":false,"description":"Exact English council slug.","schema":{"type":"string","maxLength":120,"examples":["leeds"]}}],"responses":{"200":{"description":"Council coverage rows.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouncilExampleDirectoryResponse"}}}},"400":{"description":"Supply a single slug.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown council slug.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests from this address. Wait for Retry-After seconds.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/examples/councils/{slug}":{"get":{"operationId":"getCouncilExample","tags":["Councils"],"summary":"Read a free regional example","description":"Retrieve the projected record and sources for a published council marked isExample=true in the free directory.","security":[],"x-credits":0,"parameters":[{"name":"slug","in":"path","required":true,"description":"An exact free example slug from the directory.","schema":{"type":"string","maxLength":120,"examples":["bristol"]}}],"responses":{"200":{"description":"The full projected council example.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouncilResponse"}}}},"404":{"description":"No full example for this slug.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests from this address. Wait for Retry-After seconds.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/examples/rules/gas-safety-annual-check":{"get":{"operationId":"getGasSafetyExample","tags":["Rules"],"summary":"Read the free gas safety rule","description":"Retrieve the gas safety rule example with its official legal basis and dates.","security":[],"x-credits":0,"responses":{"200":{"description":"The projected rule example.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResponse"}}}},"404":{"description":"This rule is unavailable.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests from this address. Wait for Retry-After seconds.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CoverageResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"jurisdiction":{"type":"string","const":"England"},"asOf":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"councils":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"published":{"type":"integer","minimum":0,"maximum":9007199254740991},"held":{"type":"array","items":{"type":"string"}},"researchRange":{"type":"object","properties":{"earliest":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"latest":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["earliest","latest"]},"independentCheckRange":{"type":"object","properties":{"earliest":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"latest":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["earliest","latest"]},"researchDue":{"type":"integer","minimum":0,"maximum":9007199254740991},"independentChecksDue":{"type":"integer","minimum":0,"maximum":9007199254740991},"citationAudit":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"urls":{"type":"integer","minimum":0,"maximum":9007199254740991},"receipt":{"type":"string","format":"uri"}},"required":["date","urls","receipt"]},"researchTargetDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"independentCheckTargetDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"withOpenQuestions":{"type":"integer","minimum":0,"maximum":9007199254740991},"directory":{"type":"string","format":"uri"}},"required":["total","published","held","researchRange","independentCheckRange","researchDue","independentChecksDue","citationAudit","researchTargetDays","independentCheckTargetDays","withOpenQuestions","directory"]},"assessments":{"type":"object","properties":{"national":{"type":"string"},"localCouncils":{"type":"array","items":{"type":"string"}},"catalogue":{"type":"string","format":"uri"}},"required":["national","localCouncils","catalogue"]},"rules":{"type":"object","properties":{"published":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastReview":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"rules":{"type":"integer","minimum":0,"maximum":9007199254740991},"guidanceTemplates":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourceUrls":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"string"}},"required":["date","rules","guidanceTemplates","sourceUrls","scope"]},"directory":{"type":"string","format":"uri"}},"required":["published","lastReview","directory"]},"forms":{"type":"object","properties":{"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"retrieved":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"checksumsVerified":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"source":{"type":"string","format":"uri"}},"required":["files","retrieved","checksumsVerified","source"]},"geography":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string","format":"uri"},"retrieved":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"councils":{"type":"integer","minimum":0,"maximum":9007199254740991},"wards":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","url","retrieved","councils","wards"]},"market":{"type":"object","properties":{"rents":{"type":"object","properties":{"published":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"retrieved":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"source":{"type":"string","format":"uri"},"period":{"type":"string"},"councils":{"type":"integer","minimum":0,"maximum":9007199254740991},"missingCouncils":{"type":"array","items":{"type":"string"}}},"required":["published","retrieved","source","period","councils","missingCouncils"]},"sales":{"type":"object","properties":{"published":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"retrieved":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"source":{"type":"string","format":"uri"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"districts":{"type":"integer","minimum":0,"maximum":9007199254740991},"minimumSales":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["published","retrieved","source","from","to","districts","minimumSales"]}},"required":["rents","sales"]}},"required":["jurisdiction","asOf","councils","assessments","rules","forms","geography","market"]},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"Meta":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"string","description":"Absolute URL"},"description":"Distinct upstream sources this response draws on: legislation, GOV.UK guidance, council pages and data services."},"coverage":{"type":"string","description":"How much of England the council licensing research covers today."},"notice":{"type":"string","description":"How to use this answer. It is information, not legal advice."},"catalogueDate":{"type":"string","description":"Date used to evaluate the catalogue. Individual sources have separate research, release and retrieval dates."},"links":{"type":"object","properties":{"documentation":{"type":"string","description":"Absolute URL"},"openapi":{"type":"string","description":"Absolute URL"},"html":{"description":"The human page for this answer.","type":"string"},"markdown":{"description":"The same page as Markdown, for agents.","type":"string"}},"required":["documentation","openapi"]}},"required":["sources","coverage","notice","catalogueDate","links"],"description":"Sources, coverage and links. Present on every response, including errors."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","not_found","outside_england","rate_limited","upstream_unavailable"]},"message":{"type":"string"}},"required":["code","message"]},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["error","meta"]},"RegisterWindow":{"type":"object","properties":{"region":{"type":"string"},"opens":{"type":"string","description":"ISO date, YYYY-MM-DD"},"deadline":{"type":"string","description":"ISO date, YYYY-MM-DD"},"earlyRegistrationFrom":{"type":"string","description":"ISO date, YYYY-MM-DD"},"feeGbp":{"type":"number"},"status":{"type":"string","const":"planned"},"note":{"type":"string"},"rule":{"type":"string","description":"Absolute URL"}},"required":["region","opens","deadline","earlyRegistrationFrom","feeGbp","status","note","rule"],"description":"The planned landlord register (Private Rented Sector Database) window for the region. The regulations are in draft."},"CouncilExampleDirectoryResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"councils":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"region":{"type":"string"},"published":{"type":"boolean"},"isExample":{"type":"boolean"}},"required":["name","slug","region","published","isExample"]}},"preview":{"type":"object","properties":{"scheme":{"type":"string","enum":["selective","additional","mandatory_hmo"]},"status":{"type":"string"},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"source":{"type":"string","description":"Absolute URL"}},"required":["scheme","status","verifiedAt","source"]}},"required":["councils"]},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"CheckScheme":{"type":"object","properties":{"type":{"type":"string","enum":["selective","additional","mandatory_hmo"]},"status":{"type":"string","enum":["in_force","approved_not_started","consultation","expired","quashed","revoked"]},"start":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"end":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"The last day the scheme is certainly in force."},"ceasesOn":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"The notice's \"ceases to have effect on\" date, the day after end, when recorded. On that day covers is check."},"endDateUncertainUntil":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"Last disputed day when primary sources conflict. From ceasesOn through this date covers is check, not proof that a licence is required or unnecessary."},"confidence":{"type":"string","enum":["high","medium","low"],"description":"How sure the research is. Medium or low means read the linked source before relying on it."},"apply":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]},"sources":{"type":"array","items":{"type":"string","description":"Absolute URL"}}},"required":["type","status","start","end","ceasesOn","endDateUncertainUntil","confidence","apply","sources"]},"CheckResult":{"type":"object","properties":{"postcode":{"type":"string"},"ward":{"type":["string","null"]},"council":{"type":["string","null"]},"household":{"type":"string","enum":["single","small_hmo","large_hmo"]},"licence":{"type":"object","properties":{"needed":{"type":"string","const":"check"},"summary":{"type":"string"},"nationalRuleSource":{"description":"Official source for the national HMO building and occupancy tests, when relevant.","type":"string"},"schemes":{"type":"array","items":{"$ref":"#/components/schemas/CheckScheme"}}},"required":["needed","summary","schemes"]},"register":{"anyOf":[{"$ref":"#/components/schemas/RegisterWindow"},{"type":"null"}]},"registerSources":{"type":"array","items":{"type":"string","description":"Absolute URL"}},"registerCheckedAt":{"type":"string","description":"ISO date, YYYY-MM-DD"},"planningSource":{"type":"string","description":"Absolute URL"},"planningAvailability":{"type":"object","properties":{"floodZone":{"type":"string","enum":["available","unavailable"]},"conservationAreas":{"type":"string","enum":["available","unavailable"]},"article4":{"type":"string","enum":["available","unavailable"]}},"required":["floodZone","conservationAreas","article4"]},"floodZone":{"anyOf":[{"type":"object","properties":{"level":{"anyOf":[{"type":"number","const":2},{"type":"number","const":3}]}},"required":["level"]},{"type":"null"}]},"councilPage":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]},"researched":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"When the council's licensing was researched; null if not researched yet."},"verified":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"limitations":{"type":"array","items":{"type":"string"}},"openQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"conservationAreaCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"article4DirectionCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["postcode","ward","council","household","licence","register","registerSources","registerCheckedAt","planningSource","planningAvailability","floodZone","councilPage","researched","verified","limitations","openQuestionCount","conservationAreaCount","article4DirectionCount","sourceManifest"]},"CheckResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"MarketSource":{"type":"object","properties":{"dataset":{"type":"string"},"publisher":{"type":"string"},"url":{"type":"string","description":"The dataset's page."},"files":{"type":"array","items":{"type":"string","description":"Absolute URL"},"description":"The files the snapshot was compiled from."},"released":{"type":"string","description":"When the publisher released the files used."},"obtained":{"type":"string","description":"When Lettance downloaded them."},"measure":{"type":"string"},"licence":{"type":"string"},"licenceUrl":{"type":"string","description":"Absolute URL"},"attribution":{"type":"string","description":"The attribution statement to show with the figure."}},"required":["dataset","publisher","url","files","released","obtained","measure","licence","licenceUrl","attribution"],"description":"Where an area market figure comes from. Show the attribution with the figure."},"AreaMarket":{"type":"object","properties":{"postcode":{"type":"string"},"council":{"type":["string","null"]},"councilCode":{"type":"string","description":"ONS local authority code"},"rent":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available"},"area":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"period":{"type":"string","description":"The month the figure describes, YYYY-MM."},"averageMonthlyRentGbp":{"type":"number"},"annualChangePct":{"type":["number","null"]},"byBedrooms":{"type":"object","properties":{"one":{"type":["number","null"]},"two":{"type":["number","null"]},"three":{"type":["number","null"]},"fourPlus":{"type":["number","null"]}},"required":["one","two","three","fourPlus"]},"england":{"anyOf":[{"type":"object","properties":{"averageMonthlyRentGbp":{"type":"number"},"annualChangePct":{"type":["number","null"]}},"required":["averageMonthlyRentGbp","annualChangePct"]},{"type":"null"}]},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","area","period","averageMonthlyRentGbp","annualChangePct","byBedrooms","england","source"]},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"reason":{"type":"string"},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","reason","source"]}]},"sales":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available"},"district":{"type":"object","properties":{"code":{"type":"string","description":"Postcode district, e.g. SE15."},"medianPriceGbp":{"type":"number"},"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","medianPriceGbp","sales"]},"window":{"type":"object","properties":{"from":{"type":"string","description":"ISO date, YYYY-MM-DD"},"to":{"type":"string","description":"ISO date, YYYY-MM-DD"}},"required":["from","to"]},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","district","window","source"]},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"reason":{"type":"string"},"window":{"type":"object","properties":{"from":{"type":"string","description":"ISO date, YYYY-MM-DD"},"to":{"type":"string","description":"ISO date, YYYY-MM-DD"}},"required":["from","to"]},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","reason","window","source"]}]},"limitations":{"type":"array","items":{"type":"string"}},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["postcode","council","councilCode","rent","sales","limitations","sourceManifest"]},"AreaMarketResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AreaMarket"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"FieldSource":{"type":"object","properties":{"publisher":{"type":"string"},"dataset":{"type":"string"},"url":{"type":"string","description":"Absolute URL"},"licence":{"type":["string","null"]},"licenceUrl":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]},"attribution":{"type":["string","null"]},"released":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"obtained":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"Null for live lookups; see note."},"note":{"type":"string"}},"required":["publisher","dataset","url","licence","licenceUrl","attribution","released","obtained","note"]},"Comparison":{"type":"object","properties":{"household":{"type":"string","enum":["single","small_hmo","large_hmo"]},"postcodes":{"type":"array","items":{"type":"string"}},"addresses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"postcode":{"type":"string"},"status":{"type":"string","const":"ok"},"check":{"type":"object","properties":{"postcode":{"type":"string"},"ward":{"type":["string","null"]},"council":{"type":["string","null"]},"household":{"type":"string","enum":["single","small_hmo","large_hmo"]},"licence":{"type":"object","properties":{"needed":{"type":"string","const":"check"},"summary":{"type":"string"},"nationalRuleSource":{"description":"Official source for the national HMO building and occupancy tests, when relevant.","type":"string"},"schemes":{"type":"array","items":{"$ref":"#/components/schemas/CheckScheme"}}},"required":["needed","summary","schemes"]},"register":{"anyOf":[{"$ref":"#/components/schemas/RegisterWindow"},{"type":"null"}]},"registerSources":{"type":"array","items":{"type":"string","description":"Absolute URL"}},"registerCheckedAt":{"type":"string","description":"ISO date, YYYY-MM-DD"},"planningSource":{"type":"string","description":"Absolute URL"},"planningAvailability":{"type":"object","properties":{"floodZone":{"type":"string","enum":["available","unavailable"]},"conservationAreas":{"type":"string","enum":["available","unavailable"]},"article4":{"type":"string","enum":["available","unavailable"]}},"required":["floodZone","conservationAreas","article4"]},"floodZone":{"anyOf":[{"type":"object","properties":{"level":{"anyOf":[{"type":"number","const":2},{"type":"number","const":3}]}},"required":["level"]},{"type":"null"}]},"councilPage":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]},"researched":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"When the council's licensing was researched; null if not researched yet."},"verified":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"limitations":{"type":"array","items":{"type":"string"}},"openQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"conservationAreaCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"article4DirectionCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["postcode","ward","council","household","licence","register","registerSources","registerCheckedAt","planningSource","planningAvailability","floodZone","councilPage","researched","verified","limitations","openQuestionCount","conservationAreaCount","article4DirectionCount"]},"market":{"type":"object","properties":{"postcode":{"type":"string"},"council":{"type":["string","null"]},"councilCode":{"type":"string","description":"ONS local authority code"},"rent":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available"},"area":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"period":{"type":"string","description":"The month the figure describes, YYYY-MM."},"averageMonthlyRentGbp":{"type":"number"},"annualChangePct":{"type":["number","null"]},"byBedrooms":{"type":"object","properties":{"one":{"type":["number","null"]},"two":{"type":["number","null"]},"three":{"type":["number","null"]},"fourPlus":{"type":["number","null"]}},"required":["one","two","three","fourPlus"]},"england":{"anyOf":[{"type":"object","properties":{"averageMonthlyRentGbp":{"type":"number"},"annualChangePct":{"type":["number","null"]}},"required":["averageMonthlyRentGbp","annualChangePct"]},{"type":"null"}]},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","area","period","averageMonthlyRentGbp","annualChangePct","byBedrooms","england","source"]},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"reason":{"type":"string"},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","reason","source"]}]},"sales":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available"},"district":{"type":"object","properties":{"code":{"type":"string","description":"Postcode district, e.g. SE15."},"medianPriceGbp":{"type":"number"},"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","medianPriceGbp","sales"]},"window":{"type":"object","properties":{"from":{"type":"string","description":"ISO date, YYYY-MM-DD"},"to":{"type":"string","description":"ISO date, YYYY-MM-DD"}},"required":["from","to"]},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","district","window","source"]},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"reason":{"type":"string"},"window":{"type":"object","properties":{"from":{"type":"string","description":"ISO date, YYYY-MM-DD"},"to":{"type":"string","description":"ISO date, YYYY-MM-DD"}},"required":["from","to"]},"source":{"$ref":"#/components/schemas/MarketSource"}},"required":["status","reason","window","source"]}]},"limitations":{"type":"array","items":{"type":"string"}}},"required":["postcode","council","councilCode","rent","sales","limitations"],"description":"ONS private rents for the local authority and HM Land Registry sale prices for the postcode district, from a dated snapshot. Area figures, not a valuation."}},"required":["postcode","status","check","market"]},{"type":"object","properties":{"postcode":{"type":"string"},"status":{"type":"string","enum":["not_found","outside_england","unavailable"]},"error":{"type":"string"}},"required":["postcode","status","error"]}]}},"comparison":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["licence","register","floodZone","conservationAreas","article4Directions","averageRent","medianPrice"]},"label":{"type":"string"},"source":{"$ref":"#/components/schemas/FieldSource"},"values":{"type":"array","items":{"type":"object","properties":{"postcode":{"type":"string"},"value":{"description":"The value, or \"unknown\" when the source cannot settle it. Unknown never means no."},"unknown":{"type":"string"},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["postcode","value"]}}},"required":["field","label","source","values"]}},"limitations":{"type":"array","items":{"type":"string"}},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["household","postcodes","addresses","comparison","limitations","sourceManifest"]},"CompareResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Comparison"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"CouncilListing":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"gss":{"type":"string"},"region":{"type":"string"},"researched":{"type":"boolean"},"researchedAt":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"schemeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openQuestionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["name","slug","gss","region","researched","researchedAt","verifiedAt","schemeCount","openQuestionCount","url"]},"CouncilList":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"researched":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"councils":{"type":"array","items":{"$ref":"#/components/schemas/CouncilListing"}},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["total","researched","councils","sourceManifest"]},"CouncilListResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CouncilList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"Scheme":{"type":"object","properties":{"type":{"type":"string","enum":["selective","additional","mandatory_hmo"]},"status":{"type":"string","enum":["in_force","approved_not_started","consultation","expired","quashed","revoked"]},"start_date":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"end_date":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"The last day the scheme is certainly in force."},"ceases_on":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"The designation's own \"ceases to have effect on\" date when it falls before the fifth anniversary. Whether that day is still covered is not settled; treat it as a day to check with the council."},"end_date_uncertain_until":{"description":"Last disputed day of a sourced final-date conflict; does not extend certain coverage.","anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"confidence":{"type":"string","enum":["high","medium","low"],"description":"How sure the research is. Medium or low means read the linked source before relying on it."},"source_urls":{"type":"array","items":{"type":"string","description":"Absolute URL"}},"apply_url":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]},"area":{"type":"object","properties":{"kind":{"type":"string","enum":["borough_wide","wards","other"]},"wardCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind"]},"needsEligibilityCheck":{"type":"boolean"},"includesConvertedBlocks":{"type":"boolean"}},"required":["type","status","start_date","end_date","ceases_on","confidence","source_urls","apply_url","area","needsEligibilityCheck","includesConvertedBlocks"]},"ResearchedCouncil":{"type":"object","properties":{"researched":{"type":"boolean","const":true},"authority":{"type":"string"},"slug":{"type":"string"},"gss":{"type":"string","description":"ONS local authority code"},"url":{"type":"string","description":"Absolute URL"},"researched_at":{"type":"string","description":"ISO date, YYYY-MM-DD"},"verified_at":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"applicationEvidence":{"type":"object","properties":{"version":{"type":"string","const":"council-application-evidence-v1"},"status":{"type":"string","enum":["available","no_published_evidence"]},"asOf":{"type":"string","description":"ISO date, YYYY-MM-DD"},"councilGss":{"type":"string"},"schemeType":{"type":["string","null"]},"councilReportedMetrics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"locator":{"type":"string"},"schemeTypes":{"type":"array","items":{"type":"string"}},"publisher":{"type":"string"},"sourceTitle":{"type":"string"},"sourceUrl":{"type":"string","description":"Absolute URL"},"observedOn":{"type":"string","description":"ISO date, YYYY-MM-DD"},"lastCheckedOn":{"type":"string","description":"ISO date, YYYY-MM-DD"},"sourceType":{"type":"string","const":"council_reported_metric"},"schemeScope":{"type":"string","enum":["pooled","single_scheme"]},"measure":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string"},"precision":{"type":"string"},"periodLabel":{"type":"string"},"periodThrough":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"scopeNote":{"type":"string"}},"required":["id","locator","schemeTypes","publisher","sourceTitle","sourceUrl","observedOn","lastCheckedOn","sourceType","schemeScope","measure","value","unit","precision","periodLabel","periodThrough","scopeNote"]}},"publishedProcedures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"locator":{"type":"string"},"schemeTypes":{"type":"array","items":{"type":"string"}},"publisher":{"type":"string"},"sourceTitle":{"type":"string"},"sourceUrl":{"type":"string","description":"Absolute URL"},"observedOn":{"type":"string","description":"ISO date, YYYY-MM-DD"},"lastCheckedOn":{"type":"string","description":"ISO date, YYYY-MM-DD"},"sourceType":{"type":"string","const":"council_published_procedure"},"applicability":{"type":"string","enum":["ended","as_published"]},"stage":{"type":"string"},"summary":{"type":"string"},"appliesThrough":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"requirements":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"condition":{"type":"string"}},"required":["item","condition"]}},"timing":{"anyOf":[{"type":"object","properties":{"classification":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"unit":{"type":"string"},"value":{"type":"number"}},"required":["classification","startsAt","endsAt","unit","value"]},{"type":"null"}]}},"required":["id","locator","schemeTypes","publisher","sourceTitle","sourceUrl","observedOn","lastCheckedOn","sourceType","applicability","stage","summary","appliesThrough","requirements","timing"]}},"firstParty":{"type":"object","properties":{"sourceType":{"type":"string","const":"opt_in_partner_benchmark"},"benchmarkEndpoint":{"type":"string"},"contributionEndpoint":{"type":"string"},"contributionAgreement":{"type":"string"},"minimumCases":{"type":"integer","minimum":0,"maximum":9007199254740991},"minimumIndependentOrganisations":{"type":"integer","minimum":0,"maximum":9007199254740991},"maximumOrganisationShare":{"type":"number"},"availability":{"type":"string","const":"separate_quarterly_lookup"}},"required":["sourceType","benchmarkEndpoint","contributionEndpoint","contributionAgreement","minimumCases","minimumIndependentOrganisations","maximumOrganisationShare","availability"]}},"required":["version","status","asOf","councilGss","schemeType","councilReportedMetrics","publishedProcedures","firstParty"]},"schemes":{"type":"array","items":{"$ref":"#/components/schemas/Scheme"}},"openQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"notice":{"type":"string"},"article4_hmo":{"anyOf":[{"type":"object","properties":{"exists":{"type":["boolean","null"]},"effective_date":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"source_url":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["exists","effective_date","source_url"]},{"type":"null"}]},"civil_penalty_policy":{"anyOf":[{"type":"object","properties":{"url":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["url"]},{"type":"null"}]},"hmo_register":{"type":"object","properties":{"url":{"type":"string","description":"Absolute URL"},"access":{"type":"string","enum":["online_search","download","web_page","on_request"]},"checked_at":{"type":"string","description":"ISO date, YYYY-MM-DD"}},"required":["url","access","checked_at"]},"consultations":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"closes":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"url":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["status","closes","url"]}},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["researched","authority","slug","gss","url","researched_at","verified_at","applicationEvidence","schemes","openQuestionCount","notice","article4_hmo","civil_penalty_policy","consultations","sourceManifest"]},"UnresearchedCouncil":{"type":"object","properties":{"researched":{"type":"boolean","const":false},"council":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"region":{"type":"string"},"gss":{"type":"string"}},"required":["name","slug","region","gss"]},"message":{"type":"string"},"register":{"anyOf":[{"$ref":"#/components/schemas/RegisterWindow"},{"type":"null"}]},"registerSources":{"type":"array","items":{"type":"string","description":"Absolute URL"}},"registerCheckedAt":{"type":"string","description":"ISO date, YYYY-MM-DD"},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["researched","council","message","register","registerSources","registerCheckedAt","sourceManifest"]},"Council":{"oneOf":[{"$ref":"#/components/schemas/ResearchedCouncil"},{"$ref":"#/components/schemas/UnresearchedCouncil"}]},"CouncilResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Council"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"RuleSummary":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["in_force","confirmed_future","proposed"],"description":"proposed is not law yet; confirmed_future has a set start date."},"summary":{"type":"string"},"url":{"type":"string","description":"Absolute URL"}},"required":["id","title","status","summary","url"]},"RuleList":{"type":"object","properties":{"query":{"description":"The search words, or null when listing every rule.","type":["string","null"]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RuleSummary"}},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["query","total","rules","sourceManifest"]},"RuleListResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RuleList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"Rule":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"status":{"type":"string","enum":["in_force","confirmed_future","proposed"],"description":"proposed is not law yet; confirmed_future has a set start date."},"summary":{"type":"string"},"applies_when":{"type":"string"},"conditions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"requirement":{"type":"string"},"deadline":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string"},"interval_months":{"type":["number","null"]},"event":{"type":["string","null"]},"days":{"type":["number","null"]},"date":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"notes":{"type":["string","null"]}},"required":["kind","interval_months","event","days","date","notes"]},{"type":"null"}]},"evidence":{"type":"array","items":{"type":"string"}},"penalty":{"anyOf":[{"type":"object","properties":{"max_civil_penalty_gbp":{"type":["number","null"]},"criminal":{"type":"boolean"},"rent_repayment_order":{"type":"boolean"},"other_consequences":{"type":["string","null"]}},"required":["max_civil_penalty_gbp","criminal","rent_repayment_order","other_consequences"]},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"effective_to":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]},"legal_basis":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string","description":"Absolute URL"}},"required":["title","url"]}},"guidance":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string","description":"Absolute URL"}},"required":["title","url"]}},"confidence":{"type":"string","enum":["high","medium","low"],"description":"How sure the research is. Medium or low means read the linked source before relying on it."},"notes":{"type":["string","null"]},"url":{"type":"string","description":"Absolute URL"},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["id","title","category","status","summary","applies_when","conditions","requirement","deadline","evidence","penalty","effective_from","effective_to","legal_basis","guidance","confidence","notes","url","sourceManifest"]},"RuleResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Rule"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"PlanItem":{"type":"object","properties":{"id":{"type":"string","description":"The checklist item a saved home would use for the same duty, such as gas or deposit."},"title":{"type":"string"},"status":{"type":"string","enum":["action","due_soon","unknown","upcoming","ok"],"description":"action: do it now. due_soon: due within 60 days, or before the next tenancy starts. unknown: needs an answer or a council check. upcoming: a later date or a continuing duty. ok: on track by the landlord's own answers, not checked against documents."},"date":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"The item's key date: a deadline, an expiry or the earliest new rent."},"dateLabel":{"description":"What the date is, such as Due by, Deadline or Earliest new rent.","type":["string","null"]},"detail":{"type":"string"},"basis":{"type":"string","enum":["address","answers","unanswered"],"description":"address: from the postcode. answers: from the landlord's answers. unanswered: waiting for an answer."},"ongoing":{"type":"boolean","description":"A continuing duty with no date of its own."},"otherDates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"ISO date, YYYY-MM-DD"},"label":{"type":"string"}},"required":["date","label"]},"description":"Other dates for the same item, such as a register window opening."},"applyUrl":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}],"description":"The council's page to apply for a licence, when one is needed and not held."},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","description":"Absolute URL"}},"required":["id","title","url"]}}},"required":["id","title","status","date","dateLabel","detail","basis","ongoing","otherDates","applyUrl","rules"]},"PlanQuestion":{"type":"object","properties":{"key":{"type":"string"},"parameter":{"type":"string","description":"The query parameter that answers it on /api/v1/plan and /plan."},"argument":{"type":"string","description":"The plan_rental MCP tool argument that answers it."},"prompt":{"type":"string"},"hint":{"type":["string","null"]},"kind":{"type":"string","enum":["date","choice"]},"options":{"type":"array","items":{"type":"string"},"description":"The allowed values for a choice; empty for a date."}},"required":["key","parameter","argument","prompt","hint","kind","options"]},"PlanResult":{"type":"object","properties":{"postcode":{"type":"string"},"ward":{"type":["string","null"]},"council":{"type":"string"},"councilPage":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]},"region":{"type":["string","null"]},"household":{"type":"string","enum":["single","small_hmo","large_hmo"]},"letting":{"anyOf":[{"type":"string","enum":["now","next"]},{"type":"null"}],"description":"now: tenants live there. next: a tenancy is starting or the home is being got ready. null: not answered yet."},"asOf":{"type":"string","description":"The London date the plan was worked out for."},"licence":{"type":"object","properties":{"needed":{"type":"string","const":"check"},"summary":{"type":"string"},"sources":{"type":"array","items":{"type":"string","description":"Absolute URL"},"description":"The council sources behind every scheme matched for this household."},"researched":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}],"description":"When the council's licensing was researched; null if not researched yet."},"verified":{"anyOf":[{"type":"string","description":"ISO date, YYYY-MM-DD"},{"type":"null"}]}},"required":["needed","summary","sources","researched","verified"]},"summary":{"type":"object","properties":{"now":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"soon":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upcoming":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"toAnswer":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ongoing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["now","soon","upcoming","ok","toAnswer","ongoing"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/PlanItem"},"description":"Work first, then questions, then dates, then what is on track."},"questions":{"type":"array","items":{"$ref":"#/components/schemas/PlanQuestion"},"description":"Answers that would make the plan more exact, most useful first. Ask the landlord; never guess them."},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The answers this plan used, as query parameters."},"links":{"type":"object","properties":{"plan":{"type":"string","description":"The interactive plan page."},"api":{"type":"string","description":"Absolute URL"},"calendar":{"type":"string","description":"The plan's future dates as an iCalendar file."}},"required":["plan","api","calendar"]},"notice":{"type":"string"},"sourceManifest":{"type":"string","format":"uri","description":"Source fields, transformations, attribution and reuse terms."}},"required":["postcode","ward","council","councilPage","region","household","letting","asOf","licence","summary","items","questions","answers","links","notice","sourceManifest"]},"PlanResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}},"securitySchemes":{"projectKey":{"type":"http","scheme":"bearer","description":"Production project key with data:read scope."}},"headers":{"RateLimitLimit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimitReset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"RetryAfter":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}}}