{"_id":"549961290195cc0b00dc32e3","githubsync":"","category":{"_id":"5499610f0195cc0b00dc32e2","pages":["549961290195cc0b00dc32e3","549961320195cc0b00dc32e5","5499613c0195cc0b00dc32e7","549961499da9390b00cffad7","549961549da9390b00cffad9","5499615f9da9390b00cffadb","5499646c0195cc0b00dc32fb","549a60225b50c21400fae6b8","54cbbea561698d0d00baf85d"],"project":"54995cb59da9390b00cffac6","version":"54995cb59da9390b00cffac9","__v":9,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-23T12:33:19.815Z","from_sync":false,"order":9999,"slug":"api-reference","title":"API Reference"},"project":"54995cb59da9390b00cffac6","user":"54995c979da9390b00cffac5","version":{"_id":"54995cb59da9390b00cffac9","__v":3,"project":"54995cb59da9390b00cffac6","createdAt":"2014-12-23T12:14:45.422Z","releaseDate":"2014-12-23T12:14:45.422Z","categories":["54995cb59da9390b00cffaca","54995e289da9390b00cffad0","5499610f0195cc0b00dc32e2"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":12,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-12-23T12:33:45.396Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"The `stops` endpoint provides the latest information on all bus and tram stops served by Transport for Edinburgh.\n\n## Update frequency\n\nOnce a day\n\n## Resource\n\n    GET /v1/stops\n\n## Authorisation\n\nAPI Authentication Token\n\n## Response\n\n    Status-Code: 200 OK\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"last_updated\\\": 1419853198,\\n    \\\"stops\\\": [\\n        {\\n            \\\"stop_id\\\": 36235736,\\n            \\\"atco_code\\\": \\\"6200242500\\\",\\n            \\\"name\\\": \\\"Fishmarket Square\\\",\\n            \\\"identifier\\\": null,\\n            \\\"locality\\\": \\\"Newhaven\\\",\\n            \\\"orientation\\\": 271,\\n            \\\"direction\\\": \\\"W\\\",\\n            \\\"latitude\\\": 55.98071,\\n            \\\"longitude\\\": -3.19447,\\n           \\t\\\"service_type\\\": \\\"bus\\\",\\n            \\\"destinations\\\": [\\n                \\\"Hyvots Bank\\\", \\n                \\\"Silverknowes\\\"\\n            ],\\n            \\\"services\\\": [\\n                \\\"11\\\",\\n                \\\"16\\\",\\n                \\\"N16\\\"\\n            ],\\n          \\t\\\"atco_latitude\\\": 55.98073,\\n          \\t\\\"atco_longitude\\\": -3.19446\\n        }\\n        ...\\n    ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`last_updated`\",\n    \"0-1\": \"int\",\n    \"1-0\": \"`stop_id`\",\n    \"1-1\": \"int\",\n    \"1-2\": \"The stop's unique SMS code - this is used by the Open Data API as the canonical ID for each stop\",\n    \"2-0\": \"`atco_code`\",\n    \"2-1\": \"string\",\n    \"2-2\": \"The stop's NaPTAN code - used with many journey planning systems\",\n    \"3-0\": \"`name`\",\n    \"3-1\": \"string\",\n    \"3-2\": \"The name shown on the stop flag\",\n    \"4-0\": \"`identifier`\",\n    \"4-1\": \"string\",\n    \"4-2\": \"A two-letter code used by some stops in high-density areas (such as 'PQ', 'PR' etc) where stops may be close to each other\",\n    \"5-0\": \"`locality`\",\n    \"5-1\": \"string\",\n    \"5-2\": \"The town, village or locality the stop is situated in\",\n    \"6-0\": \"`orientation`\",\n    \"6-1\": \"int\",\n    \"6-2\": \"The direction of the stop in degrees (0-360)\",\n    \"7-0\": \"`direction`\",\n    \"7-1\": \"string\",\n    \"7-2\": \"The direction of the stop in compass points (NE, SE etc)\",\n    \"8-0\": \"`latitude`\",\n    \"8-1\": \"float\",\n    \"9-0\": \"`longitude`\",\n    \"9-1\": \"float\",\n    \"11-0\": \"`destinations`\",\n    \"11-1\": \"Array(string)\",\n    \"11-2\": \"A list of destinations that this stop serves\",\n    \"12-0\": \"`services`\",\n    \"12-1\": \"Array(string)\",\n    \"12-2\": \"A list of services that this stop serves\",\n    \"8-2\": \"The latitude of the stop\",\n    \"9-2\": \"The longitude of the stop\",\n    \"0-2\": \"The time since this endpoint was last updated\",\n    \"10-0\": \"`service_type`\",\n    \"10-1\": \"string\",\n    \"10-2\": \"The type of stop (will be either `tram` or `bus`)\",\n    \"13-0\": \"`atco_latitude`\",\n    \"13-1\": \"float\",\n    \"13-2\": \"Latitude of the stop within the NaPTAN database (see note below)\",\n    \"14-0\": \"`atco_longitude`\",\n    \"14-1\": \"float\",\n    \"14-2\": \"Longitude of the stop within the NaPTAN database (see note below)\"\n  },\n  \"cols\": 3,\n  \"rows\": 15\n}\n[/block]\n*Note on stop co-ordinates*\nNaPTAN is the UK-wide database that provides stop locations. All of the journey planning systems such as Google Maps use this system. Unfortunately, you might find that NaPTAN's co-ordinates are several meters out from the actual stop location. We provide two extra fields - `atco_latitude` and `atco_longitude` - that you can use to match a stop given by Google Maps to our own database.","excerpt":"","slug":"stops","type":"basic","title":"Stops"}
The `stops` endpoint provides the latest information on all bus and tram stops served by Transport for Edinburgh. ## Update frequency Once a day ## Resource GET /v1/stops ## Authorisation API Authentication Token ## Response Status-Code: 200 OK [block:code] { "codes": [ { "code": "{\n \"last_updated\": 1419853198,\n \"stops\": [\n {\n \"stop_id\": 36235736,\n \"atco_code\": \"6200242500\",\n \"name\": \"Fishmarket Square\",\n \"identifier\": null,\n \"locality\": \"Newhaven\",\n \"orientation\": 271,\n \"direction\": \"W\",\n \"latitude\": 55.98071,\n \"longitude\": -3.19447,\n \t\"service_type\": \"bus\",\n \"destinations\": [\n \"Hyvots Bank\", \n \"Silverknowes\"\n ],\n \"services\": [\n \"11\",\n \"16\",\n \"N16\"\n ],\n \t\"atco_latitude\": 55.98073,\n \t\"atco_longitude\": -3.19446\n }\n ...\n ]\n}", "language": "json" } ] } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "`last_updated`", "0-1": "int", "1-0": "`stop_id`", "1-1": "int", "1-2": "The stop's unique SMS code - this is used by the Open Data API as the canonical ID for each stop", "2-0": "`atco_code`", "2-1": "string", "2-2": "The stop's NaPTAN code - used with many journey planning systems", "3-0": "`name`", "3-1": "string", "3-2": "The name shown on the stop flag", "4-0": "`identifier`", "4-1": "string", "4-2": "A two-letter code used by some stops in high-density areas (such as 'PQ', 'PR' etc) where stops may be close to each other", "5-0": "`locality`", "5-1": "string", "5-2": "The town, village or locality the stop is situated in", "6-0": "`orientation`", "6-1": "int", "6-2": "The direction of the stop in degrees (0-360)", "7-0": "`direction`", "7-1": "string", "7-2": "The direction of the stop in compass points (NE, SE etc)", "8-0": "`latitude`", "8-1": "float", "9-0": "`longitude`", "9-1": "float", "11-0": "`destinations`", "11-1": "Array(string)", "11-2": "A list of destinations that this stop serves", "12-0": "`services`", "12-1": "Array(string)", "12-2": "A list of services that this stop serves", "8-2": "The latitude of the stop", "9-2": "The longitude of the stop", "0-2": "The time since this endpoint was last updated", "10-0": "`service_type`", "10-1": "string", "10-2": "The type of stop (will be either `tram` or `bus`)", "13-0": "`atco_latitude`", "13-1": "float", "13-2": "Latitude of the stop within the NaPTAN database (see note below)", "14-0": "`atco_longitude`", "14-1": "float", "14-2": "Longitude of the stop within the NaPTAN database (see note below)" }, "cols": 3, "rows": 15 } [/block] *Note on stop co-ordinates* NaPTAN is the UK-wide database that provides stop locations. All of the journey planning systems such as Google Maps use this system. Unfortunately, you might find that NaPTAN's co-ordinates are several meters out from the actual stop location. We provide two extra fields - `atco_latitude` and `atco_longitude` - that you can use to match a stop given by Google Maps to our own database.