You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does return JSON for something that looks like a postcode but doesn't exist. We should probably have a default fallback for the endpoint locations to JSON, just for consistency, though we hope API users will do what they can to reduce unnecessary API calls being made. In this case, it hasn't actually reached the postcode endpoint with that URL, because it hasn't got past the basic check in the router, hence it being treated as a normal web page. The API does sort of assume you are doing some minimal form of checking of the data you're going to send before being sent (e.g. stripping out non-alphanumerics, perhaps even checking it's the right format for a postcode ideally).
The API documentation says:
and
but for example https://mapit.mysociety.org/postcode/F-54110 returns a HTML page.
The text was updated successfully, but these errors were encountered: