{"__v":38,"_id":"55a673bcaaf9cf190011509a","category":{"__v":3,"_id":"55a4d5541a5f991700a940a2","pages":["55a4d5551a5f991700a940a4","560267d54f15002100ee444c","56d4360c8001e30b00896e28"],"project":"55a4d5531a5f991700a9409e","version":"55a4d5541a5f991700a940a1","reference":false,"createdAt":"2015-07-14T09:24:36.519Z","from_sync":false,"order":0,"slug":"setup","title":"urb-it as delivery method"},"parentDoc":null,"project":"55a4d5531a5f991700a9409e","user":"55a4d483dad9d00d0071fd74","version":{"__v":15,"_id":"55a4d5541a5f991700a940a1","project":"55a4d5531a5f991700a9409e","createdAt":"2015-07-14T09:24:36.007Z","releaseDate":"2015-07-14T09:24:36.007Z","categories":["55a4d5541a5f991700a940a2","55a671d0aaf9cf1900115073","55a671e3aaf9cf1900115076","55a8dd90cf45e1390093f1e8","560268333ee4af1700047111","56027f4a930fe1170074bd77","56027f8a3ee4af170004713f","56027fd9930fe1170074bd78","5602b7654f15002100ee4487","5602b7a74f15002100ee4488","5603a674e5102a0d0070f86e","561f71204d67490d00804ad2","56d011e91991690b003b2a3a","56d438f68001e30b00896e33","572b09de4f41fc19002bfc55"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"createdAt":"2015-07-15T14:52:44.431Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":"/openinghours"},"isReference":false,"order":6,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"\"\n}\n[/block]\nEndpoint for retrieving all **opening_hours**.\n\nDeprecated - Is replaced by the Urbning hours API\n\n\nWill look at the opening hours on the current retailer. Opening hours are setup in the **retailer portal**.\nYou can specify a datetime-span to get the opening hours for an extended amount of time.\nIf no parameter is passed, todays openhours will be returned.\n\n**Request parameters** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Querystring\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Example\",\n    \"0-0\": \"from\",\n    \"0-1\": \"Date\",\n    \"0-2\": \"2015-07-15\",\n    \"1-0\": \"to\",\n    \"1-1\": \"Date\",\n    \"1-2\": \"2015-07-17\",\n    \"h-3\": \"Description\",\n    \"0-3\": \"Filter opening hours from this date\",\n    \"1-3\": \"Filter opening hours to this date\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n**Response parameters**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"from\",\n    \"0-1\": \"DateTime (with the stores local timezoneoffset)\",\n    \"0-2\": \"Indicates from the time the store opening hours start.\",\n    \"1-0\": \"to\",\n    \"1-1\": \"DateTime (with the stores local timezoneoffset)\",\n    \"1-2\": \"Indicates what date and time the indicated opening hours end. Together with **from** this shows a timespan in between the store is open or closed.\",\n    \"2-0\": \"closed\",\n    \"2-1\": \"boolean\",\n    \"2-2\": \"If this parameter is returned as **true**, the store is closed between the given hours.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET https://stage-retailer-api.urb-it.com/api/openinghours/?from=2015-11-26&to=2015-11-29 HTTP/1.1\\nAccept-Encoding: gzip,deflate\\nAccept: application/vnd.urb-it.se+json; version=1\\nAuthorization: uwa b0477a45-1198-419f-b159-e484be341512:mltN3WwhN9/EZzu/0nRWjHFMdzYG1INAoVwUJ+mD9Nc=:b97ad65f78b741e78988dcb868f27d4d:1448549091\\nHost: dev-retailer-api.urb-it.com\\nConnection: Keep-Alive\\nUser-Agent: Apache-HttpClient/4.1.1 (java 1.5)\",\n      \"language\": \"http\",\n      \"name\": \"Request\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example Response\"\n}\n[/block]\nExample shows a store with opening hours setup. The example below shows a store where the setup is done for daily opening hours.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n  {\\n    \\\"from\\\": \\\"2015-07-15T15:00:00+02:00\\\",\\n    \\\"to\\\": \\\"2015-07-15T19:12:00+02:00\\\",\\n    \\\"closed\\\": false\\n  }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\nThe example below shows a store with opening hours setup as **specific**.\nA store with specific hours shows times where it's open during a day, and times when it's not. This is done by looking at the timespan and the **closed** parameter.\n\nExample response for specific opening hours.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n  {\\n    \\\"from\\\": \\\"2015-10-19T06:00:00+02:00\\\",\\n    \\\"to\\\": \\\"2015-10-19T11:00:00+02:00\\\",\\n    \\\"closed\\\": false\\n  },\\n  {\\n    \\\"from\\\": \\\"2015-10-19T11:00:00+02:00\\\",\\n    \\\"to\\\": \\\"2015-10-19T12:00:00+02:00\\\",\\n    \\\"closed\\\": true\\n  },\\n  {\\n    \\\"from\\\": \\\"2015-10-19T12:00:00+02:00\\\",\\n    \\\"to\\\": \\\"2015-10-19T19:00:00+02:00\\\",\\n    \\\"closed\\\": false\\n  }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n*The example above indicates that urbning hours is between **06:00:00+02:00** and **11:00:00+02:00**  then closed between **11:00:00+02:00** and **12:00:00+02:00**. It is then reopened and urbning between **12:00:00+02:00** and **19:00:00+02:00**.*\n( The store opening hour is 05:00 and urb-it adds +1 hour getting the urbning hours )","excerpt":"**Version 1.0**\nReturns opening hours for the retailer - replaced by Urbning hours","slug":"opening-hours","type":"get","title":"Opening hours (deprecated)"}

getOpening hours (deprecated)

**Version 1.0** Returns opening hours for the retailer – replaced by Urbning hours

Definition

{{ api_url }}{{ page_api_url }}

Documentation

[block:api-header] { "type": "basic", "title": "" } [/block] Endpoint for retrieving all **opening_hours**. Deprecated – Is replaced by the Urbning hours API Will look at the opening hours on the current retailer. Opening hours are setup in the **retailer portal**. You can specify a datetime-span to get the opening hours for an extended amount of time. If no parameter is passed, todays openhours will be returned. **Request parameters** [block:parameters] { "data": { "h-0": "Querystring", "h-1": "Type", "h-2": "Example", "0-0": "from", "0-1": "Date", "0-2": "2015-07-15", "1-0": "to", "1-1": "Date", "1-2": "2015-07-17", "h-3": "Description", "0-3": "Filter opening hours from this date", "1-3": "Filter opening hours to this date" }, "cols": 4, "rows": 2 } [/block] **Response parameters** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "from", "0-1": "DateTime (with the stores local timezoneoffset)", "0-2": "Indicates from the time the store opening hours start.", "1-0": "to", "1-1": "DateTime (with the stores local timezoneoffset)", "1-2": "Indicates what date and time the indicated opening hours end. Together with **from** this shows a timespan in between the store is open or closed.", "2-0": "closed", "2-1": "boolean", "2-2": "If this parameter is returned as **true**, the store is closed between the given hours." }, "cols": 3, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Example Request" } [/block] [block:code] { "codes": [ { "code": "GET https://stage-retailer-api.urb-it.com/api/openinghours/?from=2015-11-26&to=2015-11-29 HTTP/1.1\nAccept-Encoding: gzip,deflate\nAccept: application/vnd.urb-it.se+json; version=1\nAuthorization: uwa b0477a45-1198-419f-b159-e484be341512:mltN3WwhN9/EZzu/0nRWjHFMdzYG1INAoVwUJ+mD9Nc=:b97ad65f78b741e78988dcb868f27d4d:1448549091\nHost: dev-retailer-api.urb-it.com\nConnection: Keep-Alive\nUser-Agent: Apache-HttpClient/4.1.1 (java 1.5)", "language": "http", "name": "Request" } ] } [/block] [block:api-header] { "type": "basic", "title": "Example Response" } [/block] Example shows a store with opening hours setup. The example below shows a store where the setup is done for daily opening hours. [block:code] { "codes": [ { "code": "[\n {\n \"from\": \"2015-07-15T15:00:00+02:00\",\n \"to\": \"2015-07-15T19:12:00+02:00\",\n \"closed\": false\n }\n]", "language": "json" } ] } [/block] The example below shows a store with opening hours setup as **specific**. A store with specific hours shows times where it’s open during a day, and times when it’s not. This is done by looking at the timespan and the **closed** parameter. Example response for specific opening hours. [block:code] { "codes": [ { "code": "[\n {\n \"from\": \"2015-10-19T06:00:00+02:00\",\n \"to\": \"2015-10-19T11:00:00+02:00\",\n \"closed\": false\n },\n {\n \"from\": \"2015-10-19T11:00:00+02:00\",\n \"to\": \"2015-10-19T12:00:00+02:00\",\n \"closed\": true\n },\n {\n \"from\": \"2015-10-19T12:00:00+02:00\",\n \"to\": \"2015-10-19T19:00:00+02:00\",\n \"closed\": false\n }\n]", "language": "json" } ] } [/block] *The example above indicates that urbning hours is between **06:00:00+02:00** and **11:00:00+02:00** then closed between **11:00:00+02:00** and **12:00:00+02:00**. It is then reopened and urbning between **12:00:00+02:00** and **19:00:00+02:00**.* ( The store opening hour is 05:00 and urb-it adds +1 hour getting the urbning hours )