{"_id":"549961320195cc0b00dc32e5","githubsync":"","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"},"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"},"__v":4,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-12-23T12:33:54.282Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The `services` endpoint provides the latest information on all services from Transport for Edinburgh.\n\n## Update frequency\n\nOnce a day\n\n## Resource\n\n    GET /v1/services\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\\\": 1419853193,\\n    \\\"services\\\": [\\n        {\\n            \\\"name\\\": \\\"1\\\",\\n            \\\"description\\\": \\\"Clermiston - Easter Road\\\",\\n            \\\"service_type\\\": \\\"day\\\",\\n            \\\"routes\\\": [\\n                {\\n                    \\\"destination\\\": \\\"Clermiston\\\",\\n                    \\\"points\\\": [\\n                        {\\n                          \\t\\\"stop_id\\\": 36234249,\\n                            \\\"latitude\\\": 55.96799,\\n                            \\\"longitude\\\": -3.168343\\n                        },\\n                        {\\n                          \\t\\\"stop_id\\\": null,\\n                            \\\"latitude\\\": 55.96717,\\n                            \\\"longitude\\\": -3.169231\\n                        },\\n                        {...}\\n                    ],\\n                    \\\"stops\\\": [\\n                        36234249,\\n                        36234252,\\n                        36234253,\\n                        {...}\\n                    ]\\n                },\\n                {...}\\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\": \"`name`\",\n    \"1-1\": \"string\",\n    \"1-2\": \"The name of the service (Edinburgh Trams is designated as **T50**)\",\n    \"2-0\": \"`description`\",\n    \"2-1\": \"string\",\n    \"2-2\": \"The canonical description of the service\",\n    \"3-0\": \"`service_type`\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Can be **day**, **express**, **night** or **tram**\",\n    \"4-0\": \"`routes`\",\n    \"4-1\": \"Array(`Route`)\",\n    \"4-2\": \"A `Route` object describes one of various routes - each route has a destination, a series of **points** co-ordinates and a list of stops on that route (the stops are in order)\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]","excerpt":"","slug":"services","type":"basic","title":"Services"}
The `services` endpoint provides the latest information on all services from Transport for Edinburgh. ## Update frequency Once a day ## Resource GET /v1/services ## Authorisation API Authentication Token ## Response Status-Code: 200 OK [block:code] { "codes": [ { "code": "{\n \"last_updated\": 1419853193,\n \"services\": [\n {\n \"name\": \"1\",\n \"description\": \"Clermiston - Easter Road\",\n \"service_type\": \"day\",\n \"routes\": [\n {\n \"destination\": \"Clermiston\",\n \"points\": [\n {\n \t\"stop_id\": 36234249,\n \"latitude\": 55.96799,\n \"longitude\": -3.168343\n },\n {\n \t\"stop_id\": null,\n \"latitude\": 55.96717,\n \"longitude\": -3.169231\n },\n {...}\n ],\n \"stops\": [\n 36234249,\n 36234252,\n 36234253,\n {...}\n ]\n },\n {...}\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": "`name`", "1-1": "string", "1-2": "The name of the service (Edinburgh Trams is designated as **T50**)", "2-0": "`description`", "2-1": "string", "2-2": "The canonical description of the service", "3-0": "`service_type`", "3-1": "string", "3-2": "Can be **day**, **express**, **night** or **tram**", "4-0": "`routes`", "4-1": "Array(`Route`)", "4-2": "A `Route` object describes one of various routes - each route has a destination, a series of **points** co-ordinates and a list of stops on that route (the stops are in order)" }, "cols": 3, "rows": 5 } [/block]