{"_id":"560daa8f6660a03700976ddb","__v":1,"githubsync":"","project":"560d5ac71ec45619006069d6","editedParams":true,"category":{"_id":"560dacb26660a03700976de4","project":"560d5ac71ec45619006069d6","version":"560d5ac71ec45619006069d9","__v":2,"pages":["5611758fb177ce190073d70a","56128cc85b4fb72300748549"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-01T21:59:14.130Z","from_sync":false,"order":1,"slug":"data-hierarchy","title":"Data Hierarchy"},"editedParams2":true,"user":"560d5a4faf97231900938125","version":{"_id":"560d5ac71ec45619006069d9","__v":6,"project":"560d5ac71ec45619006069d6","createdAt":"2015-10-01T16:09:43.711Z","releaseDate":"2015-10-01T16:09:43.711Z","categories":["560d5ac81ec45619006069da","560dabb698a6ae3700673f9f","560dabe1961d492300d94b4b","560dac2cd10a730d0081ac92","560dacb26660a03700976de4","560ebbffcac9dc0d007af87a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-01T21:50:07.092Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","results":{"codes":[{"name":"With Exit ID","code":"{\n  \"business\": {\n    \"id\": 172849,\n    \"establishment_id\": 107,\n    \"phone\": \"1-251-679-5898\",\n    \"latitude\": \"30.80271\",\n    \"longitude\": \"-88.109\",\n    \"name\": \"Exxon\",\n    \"brand_name\": \"Exxon\",\n    \"formatted_address\": \"1380 Industrial Pkwy, Saraland, AL 36571-3900\",\n    \"website\": \"http://www.exxonmobilstations.com/13892-clarks-exxon-20-saraland\",\n    \"claimed\": 0,\n    \"exit_mapping\": {\n      \"exit_id\": 14634,\n      \"distance\": \"0.32\",\n      \"cardinal_direction_short\": \"W\",\n      \"cardinal_direction_long\": \"West\",\n      \"turn_direction_short\": \"L\",\n      \"turn_direction_long\": \"Left\"\n    },\n    \"amenities\": [\n      {\n        \"id\": 1,\n        \"name\": \"Unleaded\",\n        \"background_color\": \"#0099FF\",\n        \"image_prefix\": \"Gas\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 2,\n        \"name\": \"Diesel\",\n        \"background_color\": \"#006600\",\n        \"image_prefix\": \"Diesel\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 4,\n        \"name\": \"Fast Food\",\n        \"background_color\": \"#FF3366\",\n        \"image_prefix\": \"FastFood\",\n        \"priority\": 1,\n        \"value\": \"Subway\"\n      },\n      {\n        \"id\": 5,\n        \"name\": \"Restaurant\",\n        \"background_color\": \"#CC3333\",\n        \"image_prefix\": \"Food\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 6,\n        \"name\": \"Coffee\",\n        \"background_color\": \"#814000\",\n        \"image_prefix\": \"Coffee\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 29,\n        \"name\": \"24 Hours\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0,\n        \"value\": \"Outside, Inside\"\n      },\n      {\n        \"id\": 32,\n        \"name\": \"ATM\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 33,\n        \"name\": \"Convenient Store\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 34,\n        \"name\": \"Restrooms\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 51,\n        \"name\": \"Pay at the Pump\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 52,\n        \"name\": \"Speedpass\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      }\n    ],\n    \"top_priority_amenity\": {\n      \"id\": 2,\n      \"name\": \"Diesel\",\n      \"background_color\": \"#006600\",\n      \"image_prefix\": \"Diesel\",\n      \"priority\": 1\n    },\n    \"fuel_prices\": [\n      {\n        \"price\": \"1.879\",\n        \"fuel_type_id\": 3,\n        \"fuel_type\": \"Regular\",\n        \"background_color\": \"#0099FF\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-26T00:12:00.000Z\"\n      },\n      {\n        \"price\": \"2.179\",\n        \"fuel_type_id\": 4,\n        \"fuel_type\": \"Mid Grade\",\n        \"background_color\": \"#9b59b6\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-26T00:12:00.000Z\"\n      },\n      {\n        \"price\": \"2.379\",\n        \"fuel_type_id\": 5,\n        \"fuel_type\": \"Premium\",\n        \"background_color\": \"#e74c3c\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-26T00:12:00.000Z\"\n      },\n      {\n        \"price\": \"2.299\",\n        \"fuel_type_id\": 1,\n        \"fuel_type\": \"Diesel\",\n        \"background_color\": \"#006600\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-05T03:47:00.000Z\"\n      }\n    ]\n  },\n  \"exit\": {\n    \"id\": 14634,\n    \"exit_latitude\": \"30.793841\",\n    \"exit_longitude\": \"-88.102556\",\n    \"destination_latitude\": \"30.802167\",\n    \"destination_longitude\": \"-88.103663\",\n    \"city\": \"Saraland\",\n    \"state\": \"Alabama\",\n    \"postal_code\": \"36571\",\n    \"exit_description\": \"SR-158 / SR-213 – Eight Mile, Saraland\",\n    \"sign_label_line_one\": \"EXIT\",\n    \"sign_label_line_two\": \"13\",\n    \"sign_number\": \"13\",\n    \"formatted_sign_name\": \"Exit 13\",\n    \"highway_exit_type_id\": 1,\n    \"highway_exit_type\": \"Exit\",\n    \"highway_exit_sign_background_color\": \"#67B964\",\n    \"highway_exit_sign_text_color\": \"#ffffff\",\n    \"highway_in_state\": {\n      \"id\": 123,\n      \"highway\": {\n        \"id\": 42,\n        \"display_name\": \"I-65\",\n        \"sign_name\": \"65\",\n        \"sign_web_background_image\": \"interstate-bg.svg\",\n        \"sign_background_image_small\": \"interstatesign_small.png\",\n        \"sign_background_image_large\": \"interstatesign_large.png\",\n        \"sign_text_color\": \"#FFFFFF\",\n        \"highway_sign_class\": \"interstate-bg\",\n        \"highway_type_id\": 1,\n        \"highway_type\": \"Interstate\",\n        \"positive_direction\": \"North\",\n        \"negative_direction\": \"South\",\n        \"direction_suffix\": \"bound\"\n      },\n      \"state\": {\n        \"id\": 1,\n        \"short_name\": \"AL\",\n        \"long_name\": \"Alabama\"\n      },\n      \"direction\": {\n        \"current_direction\": \"North\",\n        \"reverse_direction\": \"South\",\n        \"direction_suffix\": \"bound\"\n      }\n    }\n  }\n}","language":"json","status":200},{"code":"{\n  \"business\": {\n    \"id\": 172849,\n    \"establishment_id\": 107,\n    \"phone\": \"1-251-679-5898\",\n    \"latitude\": \"30.80271\",\n    \"longitude\": \"-88.109\",\n    \"name\": \"Exxon\",\n    \"brand_name\": \"Exxon\",\n    \"formatted_address\": \"1380 Industrial Pkwy, Saraland, AL 36571-3900\",\n    \"website\": \"http://www.exxonmobilstations.com/13892-clarks-exxon-20-saraland\",\n    \"claimed\": 0,\n    \"amenities\": [\n      {\n        \"id\": 1,\n        \"name\": \"Unleaded\",\n        \"background_color\": \"#0099FF\",\n        \"image_prefix\": \"Gas\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 2,\n        \"name\": \"Diesel\",\n        \"background_color\": \"#006600\",\n        \"image_prefix\": \"Diesel\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 4,\n        \"name\": \"Fast Food\",\n        \"background_color\": \"#FF3366\",\n        \"image_prefix\": \"FastFood\",\n        \"priority\": 1,\n        \"value\": \"Subway\"\n      },\n      {\n        \"id\": 5,\n        \"name\": \"Restaurant\",\n        \"background_color\": \"#CC3333\",\n        \"image_prefix\": \"Food\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 6,\n        \"name\": \"Coffee\",\n        \"background_color\": \"#814000\",\n        \"image_prefix\": \"Coffee\",\n        \"priority\": 1\n      },\n      {\n        \"id\": 29,\n        \"name\": \"24 Hours\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0,\n        \"value\": \"Outside, Inside\"\n      },\n      {\n        \"id\": 32,\n        \"name\": \"ATM\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 33,\n        \"name\": \"Convenient Store\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 34,\n        \"name\": \"Restrooms\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 51,\n        \"name\": \"Pay at the Pump\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      },\n      {\n        \"id\": 52,\n        \"name\": \"Speedpass\",\n        \"background_color\": \"\",\n        \"image_prefix\": \"\",\n        \"priority\": 0\n      }\n    ],\n    \"top_priority_amenity\": {\n      \"id\": 2,\n      \"name\": \"Diesel\",\n      \"background_color\": \"#006600\",\n      \"image_prefix\": \"Diesel\",\n      \"priority\": 1\n    },\n    \"fuel_prices\": [\n      {\n        \"price\": \"1.879\",\n        \"fuel_type_id\": 3,\n        \"fuel_type\": \"Regular\",\n        \"background_color\": \"#0099FF\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-26T00:12:00.000Z\"\n      },\n      {\n        \"price\": \"2.179\",\n        \"fuel_type_id\": 4,\n        \"fuel_type\": \"Mid Grade\",\n        \"background_color\": \"#9b59b6\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-26T00:12:00.000Z\"\n      },\n      {\n        \"price\": \"2.379\",\n        \"fuel_type_id\": 5,\n        \"fuel_type\": \"Premium\",\n        \"background_color\": \"#e74c3c\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-26T00:12:00.000Z\"\n      },\n      {\n        \"price\": \"2.299\",\n        \"fuel_type_id\": 1,\n        \"fuel_type\": \"Diesel\",\n        \"background_color\": \"#006600\",\n        \"currency\": \"USD\",\n        \"liquid_measurement\": \"Gallons\",\n        \"updated_at\": \"2016-01-05T03:47:00.000Z\"\n      }\n    ]\n  }\n}","language":"json","status":200,"name":"Without Exit ID"}]},"settings":"","examples":{"codes":[]},"auth":"optional","params":[{"_id":"560ea590dfdd5a2100e8f016","ref":"","in":"path","required":true,"desc":"","default":"","type":"int","name":"business_id"},{"_id":"560ea590dfdd5a2100e8f015","ref":"","in":"path","required":false,"desc":"","default":"","type":"int","name":"exit_id"}],"url":"/business/:business_id/:exit_id"},"isReference":false,"order":4,"body":"** JSON Response **\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Key\",\n    \"h-1\": \"Value\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`business`\",\n    \"0-1\": \"[Business / POI](doc:business-poi)\",\n    \"0-2\": \"[Business / POI](doc:business-poi) that can contain many child data objects. See below for a detailed explanation of each possible child object.\",\n    \"1-0\": \"`exit`\",\n    \"1-1\": \"[Exit](doc:exit)\",\n    \"1-2\": \"[Optional] [Exit](doc:exit) object that is present only if `exit_id` is present.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\nThe POI Details API allows the user to retrieve all information we have for an individual business. \n\nIn addition to core [Business / POI](doc:business-poi) fields such as `establishment_id`, `brand_name`, `name`, `phone`, `latitude`, `longitude`, `formatted_address`, and `website`, we may optionally have the following child objects that belong to `business`:\n- `amenities`: an array of every [Amenity](doc:amenity)s we have for this [Business / POI](doc:business-poi) \n- `top_priority_amenity`: the most \"important\" [Amenity](doc:amenity) which will come with information on how to render its icon. In the picture below, the `top_priority_amenity` for that Exxon is \"Diesel\" and contains information on how to render the dark green diesel icon.\n- `promotion`: if this business is running a current [Promotion](doc:promotion), it will show up here.\n- `logo`: if this business has a custom [Logo](doc:logo), it will show up here.\n- `poi_images`: if this business has any uploaded [POI Image](doc:poi-image)s, they will show up here as an array.\n- `exit_mapping`: if `exit_id` was supplied, not only will the root `exit` object be present, but an [Exit Mapping](doc:exit-mapping) object will show up as a child of `business`. This will contain information as to the relative location of the [Business / POI](doc:business-poi) from the [Exit](doc:exit).\n- `fuel_prices`: If this is a gas station, and if we have gas prices from GasBuddy/OPIS for this station, an array of [Fuel Price](doc:fuel-price) objects will be found here, one for each type of fuel found at this station.\n\nAs shown in the example results towards the top of the page, this API has two different modes. If this API is passed `exit_id` it will have both a root `business` object and a root `exit` object. In this case as well, `business` will contain a child `exit_mapping` object. If the user does not pass an `exit_id`, then we return results with no knowledge of a highway exit, which is simply a `business` object with no child `exit_mapping` object.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2wl8ALDiSBN8LvpNtQJB_POIDetails.png\",\n        \"POIDetails.png\",\n        \"720\",\n        \"1280\",\n        \"#2f9e46\",\n        \"\"\n      ],\n      \"caption\": \"The 'POI Details' API in use inside the iExit Android app\"\n    }\n  ]\n}\n[/block]\n** Common Next API(s) **\n- [Exit Details](doc:exit-details) (by using `exit`.`id`)","excerpt":"Retrieve all data relevant to an individual business","slug":"poi-details","type":"endpoint","title":"POI Details"}

getPOI Details

Retrieve all data relevant to an individual business

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

business_id:
required
integer
exit_id:
integer

Result Format


Documentation

** JSON Response ** [block:parameters] { "data": { "h-0": "Key", "h-1": "Value", "h-2": "Description", "0-0": "`business`", "0-1": "[Business / POI](doc:business-poi)", "0-2": "[Business / POI](doc:business-poi) that can contain many child data objects. See below for a detailed explanation of each possible child object.", "1-0": "`exit`", "1-1": "[Exit](doc:exit)", "1-2": "[Optional] [Exit](doc:exit) object that is present only if `exit_id` is present." }, "cols": 3, "rows": 2 } [/block] The POI Details API allows the user to retrieve all information we have for an individual business. In addition to core [Business / POI](doc:business-poi) fields such as `establishment_id`, `brand_name`, `name`, `phone`, `latitude`, `longitude`, `formatted_address`, and `website`, we may optionally have the following child objects that belong to `business`: - `amenities`: an array of every [Amenity](doc:amenity)s we have for this [Business / POI](doc:business-poi) - `top_priority_amenity`: the most "important" [Amenity](doc:amenity) which will come with information on how to render its icon. In the picture below, the `top_priority_amenity` for that Exxon is "Diesel" and contains information on how to render the dark green diesel icon. - `promotion`: if this business is running a current [Promotion](doc:promotion), it will show up here. - `logo`: if this business has a custom [Logo](doc:logo), it will show up here. - `poi_images`: if this business has any uploaded [POI Image](doc:poi-image)s, they will show up here as an array. - `exit_mapping`: if `exit_id` was supplied, not only will the root `exit` object be present, but an [Exit Mapping](doc:exit-mapping) object will show up as a child of `business`. This will contain information as to the relative location of the [Business / POI](doc:business-poi) from the [Exit](doc:exit). - `fuel_prices`: If this is a gas station, and if we have gas prices from GasBuddy/OPIS for this station, an array of [Fuel Price](doc:fuel-price) objects will be found here, one for each type of fuel found at this station. As shown in the example results towards the top of the page, this API has two different modes. If this API is passed `exit_id` it will have both a root `business` object and a root `exit` object. In this case as well, `business` will contain a child `exit_mapping` object. If the user does not pass an `exit_id`, then we return results with no knowledge of a highway exit, which is simply a `business` object with no child `exit_mapping` object. [block:image] { "images": [ { "image": [ "https://files.readme.io/2wl8ALDiSBN8LvpNtQJB_POIDetails.png", "POIDetails.png", "720", "1280", "#2f9e46", "" ], "caption": "The 'POI Details' API in use inside the iExit Android app" } ] } [/block] ** Common Next API(s) ** - [Exit Details](doc:exit-details) (by using `exit`.`id`)

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}