{
    "openapi": "3.0.0",
    "info": {
        "title": "bng2latlong",
        "description": "Convert an OSGB36 easting and northing (British National Grid) to WGS84 latitude and longitude.",
        "version": "1.0",
        "contact": {
            "name": "bng2latlong",
            "email": "info@getthedata.com",
            "url": "https:\/\/www.getthedata.com\/bng2latlong"
        }
    },
    "externalDocs": {
        "description": "Full documentation",
        "url": "https:\/\/www.getthedata.com\/bng2latlong"
    },
    "servers": [
        {
            "url": "https:\/\/api.getthedata.com"
        }
    ],
    "paths": {
        "\/bng2latlong\/{easting}\/{northing}": {
            "get": {
                "summary": "Returns latitude and longitude for the given easting and northing.",
                "description": "Takes an OSGB36 easting and northing (British National Grid) and returns the geographically equivalent WGS84 latitude and longitude.\n#### A successful request returns the following fields:\n* status - this will be `ok`\n* easting - the easting provided in the request\n* northing - the northing provided in the request\n* latitude - the latitude of the converted coordinates\n* longitude - the longitude of the converted coordinates\n#### An unsuccessful request returns the following fields:\n* status - this will be `error`\n* error - an error message\n",
                "parameters": [
                    {
                        "name": "easting",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "An OSGB36 (British National Grid) easting.",
                        "example": 326897
                    },
                    {
                        "name": "northing",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "An OSGB36 (British National Grid) northing.",
                        "example": 673919
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A JSON object containing the original easting and northing, and the converted latitude and longitude.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "enum": [
                                                "ok",
                                                "error"
                                            ]
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Both <easting> and <northing> must be provided, must be positive integers, and must be within range."
                                        },
                                        "easting": {
                                            "type": "integer",
                                            "example": 326897
                                        },
                                        "northing": {
                                            "type": "integer",
                                            "example": 673919
                                        },
                                        "latitude": {
                                            "type": "number",
                                            "example": 55.95271
                                        },
                                        "longitude": {
                                            "type": "number",
                                            "example": -3.17227
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}