{"info":{"_postman_id":"105bbe04-50f0-4b0b-a9ac-17ae02e59977","name":"OpenApi","description":"<html><head></head><body><p>ICM’s OpenApi provides a connection between TeeSheet applications and the ICM TeeTime and Reservation engines. </p>\n<p>The ICM core functionality is to have Golfcourse Booking Channels communicate with GolfCourses through the TeeSheet application. Your effort in connecting to our ICM is very much appreciated and please feel free to contact us should you have any questions or suggestions. You can reach us on <a href=\"mailto:openapi@icm.golf\">openapi@icm.golf</a></p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>For validation the OpenApi security key is added to the header.</p>\n<h1 id=\"the-bookings-process\">The bookings process</h1>\n<p>When the ICM Reservation engine receives a booking from a Channel, it creates a reservation. This reservation goes into <strong>Status 1</strong>, which is <strong>a holding status</strong>. The Reservation engine will send a trigger to the callback url of the TeeTime. The callback url will use method POST, and in it's body there will be a json object with an <strong>id</strong>. This id is the internal id of the reservation, and is needed to use the OpenApi function reservation/get. With reservation/get the reservation can be retrieved from the ICM and will provide all information of the reservation. When the reservation is retrieved and the processed in the TeeSheet of the corresponding course, the OpenApi function reservation/put is used to update the reservation and set it’s status to either <strong>Status 2 (“confirmed by course”)</strong> or to <strong>Status 3 (“rejected by course”)</strong> . In both cases the party making the reservation will need to be informed by the TeeSheet application on the status of the reservation.</p>\n<h1 id=\"getting-started\">Getting started</h1>\n<p>To get started with the OpenApi a security key is required. To receive a security key we need the following documents:</p>\n<ul>\n<li>a signed non-disclosure agreement</li>\n<li>a signed GDPR agreement</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Authentication","slug":"authentication"},{"content":"The bookings process","slug":"the-bookings-process"},{"content":"Getting started","slug":"getting-started"}],"owner":"11238075","collectionId":"105bbe04-50f0-4b0b-a9ac-17ae02e59977","publishedId":"TVCjvjxK","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-09-08T09:34:28.000Z"},"item":[{"name":"teetimes get","event":[{"listen":"prerequest","script":{"id":"fd313edd-c579-4903-b746-86b43848992b","exec":["pm.environment.get(\"variable_key\");","pm.variables.get(\"variable_key\");","pm.globals.get(\"variable_key\");"],"type":"text/javascript"}}],"id":"f34f9b01-4c88-4e77-91b3-03feafff1acd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://www.icm.golf/external/teetimes/get?date=2020-05-29","description":"<p><strong>Retrieves a list of TeeTimes for a specific day.</strong></p>\n","urlObject":{"protocol":"https","path":["external","teetimes","get"],"host":["www","icm","golf"],"query":[{"description":{"content":"<p>Date of teetimes</p>\n","type":"text/plain"},"key":"date","value":"2020-05-29"}],"variable":[]}},"response":[{"id":"4696d848-642e-47ba-bb17-b9cabdd97ea5","name":"teetimes get example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://www.icm.golf/external/teetimes/get?date=2020-05-29","protocol":"https","host":["www","icm","golf"],"path":["external","teetimes","get"],"query":[{"key":"date","value":"2020-05-29","description":"Date of teetimes"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 04 Jun 2020 06:38:42 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Length","value":"773"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"function\": \"get\",\n    \"start\": \"2020-06-04 08:38:42.494920\",\n    \"end\": \"2020-06-04 08:38:42.494950\",\n    \"error\": {\n        \"code\": 0,\n        \"message\": \"none\"\n    },\n    \"payload\": [\n        {\n            \"icmId\": 22,\n            \"id\": 1,\n            \"datetime\": {\n                \"date\": \"2020-05-29 07:00:00.000000\",\n                \"timezone_type\": 3,\n                \"timezone\": \"Europe/Amsterdam\"\n            },\n            \"daysFrom\": 4,\n            \"price9\": \"20.00\",\n            \"price18\": \"40.00\",\n            \"minHoles\": 9,\n            \"maxHoles\": 18,\n            \"slots\": 4,\n            \"loopOut\": 1,\n            \"loopIn\": 2,\n            \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\",\n            \"status\": 1\n        }\n    ]\n}"}],"_postman_id":"f34f9b01-4c88-4e77-91b3-03feafff1acd"},{"name":"teetimes post","id":"46a11167-4ec5-4216-88d0-d39c02341cf0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"loops\": [\n        {\n            \"id\": 1,\n            \"name\": \"A\",\n            \"duration\": 120,\n            \"interval\": 10\n        },\n        {\n            \"id\": 2,\n            \"name\": \"B\",\n            \"duration\": 120,\n            \"interval\": 10\n        }\n    ],\n    \"teetimes\": [\n        {\n            \"id\": 48,\n            \"datetime\": \"2020-08-02 07:00\",\n            \"daysFrom\": 14,\n            \"price9\": 20,\n            \"price18\": 40,\n            \"minHoles\": 9,\n            \"maxHoles\": 18,\n            \"slots\": 4,\n            \"loopOut\": 1,\n            \"loopIn\": 2,\n            \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\"\n        },\n        {\n            \"id\": 49,\n            \"datetime\": \"2020-08-02 08:00\",\n            \"daysFrom\": 14,\n            \"price9\": 20,\n            \"price18\": 40,\n            \"minHoles\": 9,\n            \"maxHoles\": 18,\n            \"slots\": 4,\n            \"loopOut\": 1,\n            \"loopIn\": 2,\n            \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\"\n        },\n        {\n            \"id\": 50,\n            \"datetime\": \"2020-08-02 09:00\",\n            \"daysFrom\": 14,\n            \"price9\": 20,\n            \"price18\": 40,\n            \"minHoles\": 9,\n            \"maxHoles\": 18,\n            \"slots\": 4,\n            \"loopOut\": 1,\n            \"loopIn\": 2,\n            \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://www.icm.golf/external/teetimes/post","description":"<p><strong>Post TeeTimes to the ICM TeeTime database.</strong></p>\n<p>This function expects a json body with two arrays:</p>\n<ul>\n<li>First array is the loop object array. Based on the loops the ICM will check and When needed store loops in it's loop table. </li>\n<li>The second array is the TeeTime object array. The <strong>id</strong> in a TeeTime needs to be a unique integer. When this value is <strong>not unique</strong> you will receive an error and the action will <strong>fail</strong>. You can use the id to retrieve the TeeTime from the ICM. \nLoopOut and LoopIn correspond to the loops object array. When the corresponding <strong>loop</strong> is <strong>not present</strong> in the loops array the action will <strong>fail</strong>.</li>\n</ul>\n","urlObject":{"protocol":"https","path":["external","teetimes","post"],"host":["www","icm","golf"],"query":[],"variable":[]}},"response":[{"id":"4c30b8aa-e1a0-4d5f-a784-3dc29ac2951f","name":"teetimes post example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"loops\": [\n        {\n            \"id\": 1,\n            \"name\": \"A\",\n            \"duration\": 120,\n            \"interval\": 10\n        },\n        {\n            \"id\": 2,\n            \"name\": \"B\",\n            \"duration\": 120,\n            \"interval\": 10\n        }\n    ],\n    \"teetimes\": [\n        {\n            \"id\": 34,\n            \"datetime\": \"2020-08-01 07:00\",\n            \"daysFrom\": 14,\n            \"price9\": 20,\n            \"price18\": 40,\n            \"minHoles\": 9,\n            \"maxHoles\": 18,\n            \"slots\": 4,\n            \"loopOut\": 1,\n            \"loopIn\": 2,\n            \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\"\n        },\n        {\n            \"id\": 35,\n            \"datetime\": \"2020-08-01 08:00\",\n            \"daysFrom\": 14,\n            \"price9\": 20,\n            \"price18\": 40,\n            \"minHoles\": 9,\n            \"maxHoles\": 18,\n            \"slots\": 4,\n            \"loopOut\": 1,\n            \"loopIn\": 2,\n            \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\"\n        },\n        {\n            \"id\": 36,\n            \"datetime\": \"2020-08-01 09:00\",\n            \"daysFrom\": 14,\n            \"price9\": 20,\n            \"price18\": 40,\n            \"minHoles\": 9,\n            \"maxHoles\": 18,\n            \"slots\": 4,\n            \"loopOut\": 1,\n            \"loopIn\": 2,\n            \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://www.icm.golf/external/teetimes/post"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 04 Jun 2020 06:47:03 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Length","value":"216"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"function\": \"post\",\n    \"start\": \"2020-06-04 08:47:03.263717\",\n    \"end\": \"2020-06-04 08:47:03.263746\",\n    \"error\": {\n        \"code\": 0,\n        \"message\": \"none\"\n    },\n    \"payload\": [\n        \"ok\"\n    ]\n}"}],"_postman_id":"46a11167-4ec5-4216-88d0-d39c02341cf0"},{"name":"teetime get","id":"1a6cf8d9-0881-4ca1-8bde-f31639de7fca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://www.icm.golf/external/teetime/get?id=22","description":"<p>Get a TeeTime from the ICM TeeTime database. The TeeTime is retrieved by it's external id. The external id is the id that was provided during the TeeTimes/post action.</p>\n","urlObject":{"protocol":"https","path":["external","teetime","get"],"host":["www","icm","golf"],"query":[{"description":{"content":"<p>Course internal teetime id provide during teetimes post</p>\n","type":"text/plain"},"key":"id","value":"22"}],"variable":[]}},"response":[{"id":"3b610b7e-f223-420e-a983-108eae791e33","name":"teetime get example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://www.icm.golf/external/teetime/get?id=22","protocol":"https","host":["www","icm","golf"],"path":["external","teetime","get"],"query":[{"key":"id","value":"22","description":"Course internal teetime id provide during teetimes post"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 04 Jun 2020 06:33:27 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Length","value":"685"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"function\": \"get\",\n    \"start\": \"2020-06-04 08:33:27.574655\",\n    \"end\": \"2020-06-04 08:33:27.577370\",\n    \"error\": {\n        \"code\": 0,\n        \"message\": \"none\"\n    },\n    \"payload\": {\n        \"icmId\": 22,\n        \"id\": 1,\n        \"datetime\": {\n            \"date\": \"2020-05-29 07:00:00.000000\",\n            \"timezone_type\": 3,\n            \"timezone\": \"Europe/Amsterdam\"\n        },\n        \"daysFrom\": 4,\n        \"price9\": \"20.00\",\n        \"price18\": \"40.00\",\n        \"minHoles\": 9,\n        \"maxHoles\": 18,\n        \"slots\": 4,\n        \"loopOut\": 1,\n        \"loopIn\": 2,\n        \"callbackUrl\": \"https://www.yoururl.com/callback_url?your_params\",\n        \"status\": 1\n    }\n}"}],"_postman_id":"1a6cf8d9-0881-4ca1-8bde-f31639de7fca"},{"name":"teetime put","id":"47459d9f-4803-448f-b775-a4c00bb9b914","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"id\":22,\n\t\"daysFrom\":14,\n\t\"price9\":20.00,\n\t\"price18\":40.00,\n\t\"status\":1\n}","options":{"raw":{"language":"json"}}},"url":"https://www.icm.golf/external/teetime/put","description":"<p><strong>Update a TeeTime based on it's external id.</strong>  The external id is the id that was provided during the TeeTimes/post action.</p>\n<p>Main functionality here is to set the status of the TeeTime.</p>\n<ul>\n<li><strong>Status 1</strong> - <em>TeeTime is available</em>. --&gt; This is the default status after TeeTimes/POST.</li>\n<li><strong>Status 2</strong> - <em>TeeTime is confirmed</em>. --&gt;  Automatically set when Reservation is accepted.</li>\n<li><strong>Status 3</strong> - <em>TeeTime retracted by course</em>. --&gt; <strong>This status needs to be set by when a TeeTime is no longer available for booking for the ICM!</strong></li>\n</ul>\n","urlObject":{"protocol":"https","path":["external","teetime","put"],"host":["www","icm","golf"],"query":[],"variable":[]}},"response":[{"id":"6b0dd5c1-fd8f-4aa6-945f-73a9ca8aaf50","name":"teetime put example","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"id\": 22,\t\t\t//Course internal teetime id provide during teetimes post\n    \"daysFrom\": 14,\t\t//Maximum days the can be booked in advance\n    \"price9\": 20.50,\t//Price for 9 holes\n    \"price18\": 40.50,\t//Price for 18 holes\n    \"status\": 1\t\t\t//status of the teetime\n}","options":{"raw":{"language":"json"}}},"url":"https://www.icm.golf/external/teetime/put"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 04 Jun 2020 06:30:45 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Length","value":"230"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"function\": \"put\",\n    \"start\": \"2020-06-04 08:30:45.177303\",\n    \"end\": \"2020-06-04 08:30:45.177340\",\n    \"error\": {\n        \"code\": 0,\n        \"message\": \"none\"\n    },\n    \"payload\": {\n        \"result\": \"success\"\n    }\n}"}],"_postman_id":"47459d9f-4803-448f-b775-a4c00bb9b914"},{"name":"reservations get","id":"1b44f72d-874a-4bdb-9e1a-6331f57cb245","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://www.icm.golf/external/reservations/get?date=2020-05-29","description":"<p><strong>Retrieves a list of reservations for a specific day.</strong></p>\n","urlObject":{"protocol":"https","path":["external","reservations","get"],"host":["www","icm","golf"],"query":[{"key":"date","value":"2020-05-29"}],"variable":[]}},"response":[],"_postman_id":"1b44f72d-874a-4bdb-9e1a-6331f57cb245"},{"name":"reservation get","id":"57ea47dd-614d-4448-844f-6092a99eac7a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://www.icm.golf/external/reservation/get?id=2","description":"<p><strong>Get a specific Reservation from the ICM Reservation database.</strong> </p>\n<p>The Reservation is retrieved by it's internal id. The internal id is the id that was posted in the callback body that was send to the callback-url provided during the TeeTimes/POST.</p>\n","urlObject":{"protocol":"https","path":["external","reservation","get"],"host":["www","icm","golf"],"query":[{"key":"id","value":"2"}],"variable":[]}},"response":[],"_postman_id":"57ea47dd-614d-4448-844f-6092a99eac7a"},{"name":"reservation put","id":"9a70dd7d-1380-486e-9183-b9702369528a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"id\":1,\n\t\"status\":2\n}","options":{"raw":{"language":"json"}}},"url":"https://www.icm.golf/external/reservation/put","description":"<p>When a TeeTime is booked a reservation is created and the callback is triggered, ICM adds it’s internal id to the callback. This id can be used by this version to update the status of the reservation to Status 2 (“confirmed by course”) or to Status 3 (“rejected by course”).</p>\n<p>In the case the TeeTime is rejected (Status 3), use <strong>reservation/get</strong> to retrieve the reservation, and send an email to the booker that the reservation was rejected.</p>\n","urlObject":{"protocol":"https","path":["external","reservation","put"],"host":["www","icm","golf"],"query":[],"variable":[]}},"response":[],"_postman_id":"9a70dd7d-1380-486e-9183-b9702369528a"},{"name":"loops get","id":"ac8174fc-58a7-4a47-9d4b-1b0a2d52002e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"key"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://www.icm.golf/external/loops/get","description":"<p>During TeeTimes/POST loops are automatically generated based on the loops array provided in the json body. Use this function to retrieve a list op loops from the ICM loop database.</p>\n","urlObject":{"protocol":"https","path":["external","loops","get"],"host":["www","icm","golf"],"query":[],"variable":[]}},"response":[],"_postman_id":"ac8174fc-58a7-4a47-9d4b-1b0a2d52002e"}]}