{"info":{"_postman_id":"b0c027ec-ab70-0fb5-a00d-62a9e889c80c","name":"Tote API - data feed","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"1255977","collectionId":"b0c027ec-ab70-0fb5-a00d-62a9e889c80c","publishedId":"RVfyDAft","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-02-20T13:18:02.000Z"},"item":[{"name":"1. Authentication","item":[],"id":"48b4b432-cbec-03f0-56a1-50f245c21e60","description":"<p>All endpoints in this API require authentication to be accessed.</p>\n<p>Authentication is HMAC-signature based (we support both SHA1 and SHA256). Upon registering as a partner with Colossus Bets, you'll receive an <code>api_auth_key</code> and an <code>api_auth_secret</code>.\nPlease follow the steps below to sign your requests.</p>\n<h4 id=\"request-headers\">Request Headers</h4>\n<p>These headers have to be provided in all your requests:</p>\n<ul>\n<li><p>Date: this is the HTTP timestamp of the request in the RFC 1123/2822 Internet Standard. For security reasons, our API will reject the request when the HTTP timestamp is too far in the past (currently set to 15 minutes max).\nExample: \"Mon, 23 Jan 1984 03:29:56 GMT\"</p>\n</li>\n<li><p>Authorization: this is the header that will contain the HMAC signature. The format will be \"APIAuth {{api_auth_key}}:{{signature}}\". You'll need to substitute <code>api_auth_key</code> and <code>signature</code>. The former will be provided by us while the latter will need to be calculated (see below in Signature Generation paragraph).</p>\n</li>\n<li><p>(Optional) Content-MD5: this is the standard header which is the Base64 encoding of the MD5 hash of the request body. It's optional in case of an empty body or a GET request.</p>\n</li>\n<li><p>(Optional) Content-Type: this is the standard header which will tell the API how to read the request body. It's optional in case of an empty body or a GET request.</p>\n</li>\n</ul>\n<h4 id=\"signature-generation\">Signature Generation</h4>\n<p>In order to calculate the signature, you'll first need to generate the <code>canonical string</code>. The format for it is the following:</p>\n<p>{{HTTP_METHOD}},[Content-Type],[Content-MD5],{{RequestURI}},{{Date}}</p>\n<ul>\n<li>HTTP_METHOD: this is the HTTP Method of the request, uppercase. Can be GET, POST, DELETE or any other HTTP method.</li>\n<li>RequestURI: this is the <code>path</code> part of your request URL, including the querystring parameters.</li>\n<li>Content-Type, Content-MD5 and Date: these are the same values of the 3 headers with the same name, if present.</li>\n</ul>\n<p>The elements between <code>{{ }}</code> are mandatory, while the ones between <code>[ ]</code> are optional. All commas are mandatory, even when an element is missing.</p>\n<p>Once you calculated the canonical string based on the request, you can proceed calculating the signature from it. This can be achieved with the following 2 steps:</p>\n<ol>\n<li>Calculate the SHA1 HMAC (or SHA256) hash of the canonical string using your <code>api_auth_secret</code> (provided by us).</li>\n<li>Encode the resulting hash using Base64 encoding.</li>\n</ol>\n<h4 id=\"example\">Example</h4>\n<p>We'll now guide you through an example for a request authentication.</p>\n<p>Let's assume Colossus Bets provided you with the following details:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>api_auth_key</code></td>\n<td>api_key</td>\n</tr>\n<tr>\n<td><code>api_auth_secret</code></td>\n<td>api_secret</td>\n</tr>\n</tbody>\n</table>\n</div><p>Let's assume we want to call the POST /tickets endpoint to place a bet. We will have the following canonical string:</p>\n<p><code>POST,application/json,rY5GyingAbnOReyXXtSqyA==,/tickets,Tue, 11 Apr 2017 16:05:42 GMT</code></p>\n<p>From which we can calculate the Base64 encoding of the SHA1 HMAC hash, using our <code>api_auth_secret</code>, is  <code>QZDwWjZOGKCe+DSVWwAQGhKySQ0=</code>.</p>\n<p>The final <code>Authorization</code> header will then be:</p>\n<p><code>APIAuth api_auth_key:QZDwWjZOGKCe+DSVWwAQGhKySQ0=</code> or \n<code>APIAuth-HMAC-SHA256 api_auth_key:QZDwWjZOGKCe+DSVWwAQGhKySQ0=</code></p>\n","event":[{"listen":"prerequest","script":{"id":"e5b6f6ab-489f-4426-9b2c-851f2ef863e8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"77146b36-ef7b-4ae5-a2f8-facd9dd26503","type":"text/javascript","exec":[""]}}],"_postman_id":"48b4b432-cbec-03f0-56a1-50f245c21e60"},{"name":"2. Pools","item":[{"name":"Pools Menu","event":[{"listen":"prerequest","script":{"id":"46aafad6-e290-424c-867d-d42f9924f04d","type":"text/javascript","exec":["var ApiAuth = eval(globals.loadApiAuth);","ApiAuth.computeSignature();"]}},{"listen":"test","script":{"id":"cfc05f2c-45df-4396-8c8b-e31d0a428842","type":"text/javascript","exec":["data = JSON.parse(responseBody);","","if (data.error === undefined) {","    var ToteTests = eval(globals.loadToteTests);","    ToteTests.checkPoolMenuSerializer(data); ","}",""]}}],"id":"e7a11926-8ac0-0bdf-6eab-a8623a148eb2","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":""},"url":"{{api_url}}/pools/menu.json?currency=GBP","description":"<p>Returns a list of pools that are open for betting.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>currency</code> optional (recommended), STRING, 3 letter ISO 4217, returns <code>stake_sizes</code> and <code>fx_rates</code> for the requested currency only</li>\n<li><code>includes</code> optional, STRING, default: <code>includes=legs.sport_event</code>, comma separated list of <code>VALUE(.NESTED_VALUE)</code>*, used for speeding up the request if not all pool information is needed<ul>\n<li><code>includes=</code> left empty will return pool with basic data</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["pools","menu.json"],"host":["{{api_url}}"],"query":[{"key":"currency","value":"GBP"}],"variable":[]}},"response":[],"_postman_id":"e7a11926-8ac0-0bdf-6eab-a8623a148eb2"},{"name":"Recommended Pools","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var ApiAuth = eval(globals.loadApiAuth);","ApiAuth.computeSignature();"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkPoolsWidgetItemSerializer(data[0]);"]}}],"id":"eb41873a-1830-b855-be8d-ed11a44ce809","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":"{\n\"type_code\": \"RACE_WIN\",\n\"sport_code\": \"HORSE_RACING\",\n\"pool_id\": \"123456\",\n\"amount\": \"1\",\n\"currency\": \"CAD\",\n\"legs\": [\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T11:06:12.000Z\",\n  \"leg_number\": 1\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T11:40:12.000Z\",\n  \"leg_number\": 2\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T12:10:12.000Z\",\n  \"leg_number\": 3\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T18:12:12.000Z\",\n  \"leg_number\": 4\n  }],\n\"info\":\n{\n  \"track_name\": \"Woodbine (SB)\",\n  \"race_number\": \"13\"\n},\n\"prizes\": [\n  { \n    \"amount\": \"14000\",\n    \"prize_code\":\"WIN\"\n  }]\n}\n\n"},"url":"{{api_url}}/pools/recommended?customer_type=1&num_pools=3&currency=GBP","description":"<p>Returns a summary list of pools that are 'recommended' for a particular customer type.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>customer_type</code> required, INT, representing the type of customer (use 1 if unknown)</li>\n<li><code>num_pools</code> required, INT, representing the number of pools to return, maximum 5</li>\n<li><code>currency</code> optional (recommended), STRING, 3 letter ISO 4217, returns <code>stake_sizes</code> and <code>fx_rates</code> for the requested currency only</li>\n</ul>\n","urlObject":{"path":["pools","recommended"],"host":["{{api_url}}"],"query":[{"key":"customer_type","value":"1"},{"key":"num_pools","value":"3"},{"key":"currency","value":"GBP"}],"variable":[]}},"response":[],"_postman_id":"eb41873a-1830-b855-be8d-ed11a44ce809"},{"name":"Pools Widget","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var ApiAuth = eval(globals.loadApiAuth);","ApiAuth.computeSignature();"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkPoolsWidgetItemSerializer(data[0]);"]}}],"id":"126ac2b8-3e4e-e68d-113d-97eeb03696b6","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":"{\n\"type_code\": \"RACE_WIN\",\n\"sport_code\": \"HORSE_RACING\",\n\"pool_id\": \"123456\",\n\"amount\": \"1\",\n\"currency\": \"CAD\",\n\"legs\": [\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T11:06:12.000Z\",\n  \"leg_number\": 1\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T11:40:12.000Z\",\n  \"leg_number\": 2\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T12:10:12.000Z\",\n  \"leg_number\": 3\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T18:12:12.000Z\",\n  \"leg_number\": 4\n  }],\n\"info\":\n{\n  \"track_name\": \"Woodbine (SB)\",\n  \"race_number\": \"13\"\n},\n\"prizes\": [\n  { \n    \"amount\": \"14000\",\n    \"prize_code\":\"WIN\"\n  }]\n}\n\n"},"url":"{{api_url}}/pools/widget?num_pools=3","description":"<p>Returns data for a widget to show live pool prizes.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>num_pools</code> required, INT, the number of pools to show</li>\n</ul>\n","urlObject":{"path":["pools","widget"],"host":["{{api_url}}"],"query":[{"key":"num_pools","value":"3"}],"variable":[]}},"response":[],"_postman_id":"126ac2b8-3e4e-e68d-113d-97eeb03696b6"},{"name":"Stats","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var ApiAuth = eval(globals.loadApiAuth);","ApiAuth.computeSignature();"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var ToteTests = eval(globals.loadToteTests);","","ToteTests.checkLegStatsSerializer(data[0]);"]}}],"id":"7a344548-38a2-7c76-b7d2-826268df1c95","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":""},"url":"{{api_url}}/pools/{{pool_id}}/stats","description":"<p>Returns statistics for competitors (e.g. teams, horses, tennis players) within a specific pool.</p>\n<p>Parameters: None</p>\n","urlObject":{"path":["pools","{{pool_id}}","stats"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7a344548-38a2-7c76-b7d2-826268df1c95"},{"name":"Pool","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var ApiAuth = eval(globals.loadApiAuth);","ApiAuth.computeSignature();"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var ToteTests = eval(globals.loadToteTests);","","ToteTests.checkPoolSerializer(data);"]}}],"id":"ab7d8fae-c415-2728-29ab-6676b099e9aa","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":""},"url":"{{api_url}}/pools/{{pool_id}}","description":"<p>Parameters:</p>\n<ul>\n<li><code>includes</code> optional (recommended - empty), STRING, default: <code>includes=prizes,fx_rates,smart_pick_perms,history.sport_event_history,legs.sport_event.competitors,sport_event.sport_event_competitors,legs.sport_event.venue,legs.sport_event.history,legs.sport_event.sport_code_sub_code,legs.sport_event.selections.unit_distributions</code>, comma separated list of <code>VALUE(.NESTED_VALUE)</code>*, used for speeding up the request if not all pool information is needed<ul>\n<li><code>includes=</code> left empty will return pool without the nested elements</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["pools","{{pool_id}}"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ab7d8fae-c415-2728-29ab-6676b099e9aa"},{"name":"Pools","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var ApiAuth = eval(globals.loadApiAuth);","ApiAuth.computeSignature();"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","","var ToteTests = eval(globals.loadToteTests);","","var ungrouped_param = TestBase.getParameterByName('ungrouped');","if (ungrouped_param === undefined || ungrouped_param === \"false\") {","    ToteTests.checkDisplayGroupsItemSerializer(data[0]);","} else {","    ToteTests.checkPoolItemSerializer(data[0]);","}",""]}}],"id":"478c09f2-cb73-093d-421b-9fcdaa7e2ec9","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":"{\n\"type_code\": \"RACE_WIN\",\n\"sport_code\": \"HORSE_RACING\",\n\"pool_id\": \"123456\",\n\"amount\": \"1\",\n\"currency\": \"CAD\",\n\"legs\": [\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T11:06:12.000Z\",\n  \"leg_number\": 1\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T11:40:12.000Z\",\n  \"leg_number\": 2\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T12:10:12.000Z\",\n  \"leg_number\": 3\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T18:12:12.000Z\",\n  \"leg_number\": 4\n  }],\n\"info\":\n{\n  \"track_name\": \"Woodbine (SB)\",\n  \"race_number\": \"13\"\n},\n\"prizes\": [\n  { \n    \"amount\": \"14000\",\n    \"prize_code\":\"WIN\"\n  }]\n}\n\n"},"url":"{{api_url}}/pools?ungrouped=false","description":"<p>Parameters:</p>\n<ul>\n<li><code>currency</code> optional (recommended), STRING, 3 letter ISO 4217, returns <code>stake_sizes</code> and <code>fx_rates</code> for the requested currency only</li>\n<li><code>includes</code> optional (recommended - empty), STRING, default: <code>includes=legs.sport_event</code>, comma separated list of <code>VALUE(.NESTED_VALUE)</code>*, used for speeding up the request if not all pool information is needed<ul>\n<li><code>includes=</code> left empty will return pool without the nested elements</li>\n</ul>\n</li>\n<li><code>ungrouped</code> optional, BOOLEAN, default: false<ul>\n<li><code>ungrouped=true</code> generates an array of pools</li>\n<li><code>ungrouped=false</code> generates a nested list of arrays</li>\n</ul>\n</li>\n<li><code>filters</code> optional, HASH (key value pair), default: {}, flags for the pools - <code>ungrouped</code> must be true to use it.<ul>\n<li><code>sport_codes</code> optional, array of STRING (see full list of SPORT_CODES at end of API document)</li>\n<li><code>type_codes</code> optional, STRING, array of STRINGs (see full list of TYPE_CODES at end of API document)</li>\n<li><code>leg_nums</code> optional, array of INT</li>\n<li><code>statuses</code> optional, array of STRINGs</li>\n<li><code>ids</code> optional, array of INT</li>\n<li><code>start_date</code> optional</li>\n<li><code>end_date</code> optional</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["pools"],"host":["{{api_url}}"],"query":[{"key":"ungrouped","value":"false"}],"variable":[]}},"response":[],"_postman_id":"478c09f2-cb73-093d-421b-9fcdaa7e2ec9"}],"id":"ebe58c7b-de85-c752-22a6-3598c7c79791","description":"<p>Every bet in the system goes into a specific pool. Pools can be single-leg or multi-leg, and can be of any sport type.</p>\n<p>The endpoints in this section are used for returning a list of pools, and full details of each pool, and for confirming settlement details.</p>\n<p>Key endpoints are:</p>\n<ul>\n<li><strong>GET Pools Menu</strong> - returns a summary list of pools</li>\n<li><strong>GET Pool</strong> - returns full details of a specific pool</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"8605398f-654c-4893-b670-343976b97ddf","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c1f07fe9-64ba-4039-b2d6-cd7b530a4caf","type":"text/javascript","exec":[""]}}],"_postman_id":"ebe58c7b-de85-c752-22a6-3598c7c79791"},{"name":"3. Syndicates","item":[{"name":"Syndicates","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var CB = eval(globals.loadColossus);","CB.computeSignature();",""]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkSyndicatesItemSerializer(data.items[0]);"]}}],"id":"38c254e5-9199-03b7-e922-41564c024b66","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":""},"url":"{{api_url}}/syndicates?currency=GBP&filters[fully_funded]=true&search=386KAHEN","description":"<p>Returns the list of syndicates.\nParameters:</p>\n<ul>\n<li><code>customer_id</code> required, STRING, the user id</li>\n<li><code>currency</code> required, STRING, 3 letter ISO 4217</li>\n<li><code>per</code> optional, INT, number of syndicate to display, for pagination purposes. Default: 25</li>\n<li><code>page</code> optional, page number in the list of syndicate, for pagination purposes. Default: 1</li>\n<li><code>search</code> deprecated, moved to filters</li>\n<li><code>pool_id</code> deprected, moved to filters</li>\n<li><code>sort_by</code> optional, comma separated list of attributes (<code>starting_soon</code>, <code>percentage_filled</code>, <code>contributors</code>, <code>cost</code>)</li>\n<li><code>filters</code> optional, HASH of attiributes to restrict the list of syndicates<ul>\n<li><code>search</code> optional, STRING to search for</li>\n<li><code>pool_id</code> int, filter to have all the syndicates for a specific pool</li>\n<li><code>pool_type</code> optional, comma separated list of SPORT_CODE.TYPE_CODE values (see list at end of API docs)</li>\n<li><code>almost_full</code> optional, BOOLEAN, to see only the syndicates which are close to be full</li>\n<li><code>starting_soon</code> optional, BOOLEAN, to see only the syndicates where the first leg is near to start</li>\n<li><code>fully_funded</code> optional, OPTIONAL, to see only the fully funded syndicates (only true or nothing, false is ignored)</li>\n<li><code>incomplete</code> optional, BOOLEAN, to see only the fully funded syndicates (only true or nothing, false is ignored)</li>\n<li><code>my_captains</code> optional, only syndicates made by manager followed by tyhe user</li>\n<li><code>managers</code> optional, array of managers</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["syndicates"],"host":["{{api_url}}"],"query":[{"key":"currency","value":"GBP"},{"key":"filters[fully_funded]","value":"true"},{"key":"search","value":"386KAHEN"}],"variable":[]}},"response":[],"_postman_id":"38c254e5-9199-03b7-e922-41564c024b66"},{"name":"Syndicate","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var CB = eval(globals.loadColossus);","CB.computeSignature(['syndicate_id']);",""]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkSyndicateSerializer(data);"]}}],"id":"a2df239a-8a82-421f-e1d4-ffbd0cf4f516","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":""},"url":"{{api_url}}/syndicates/{{syndicate_id}}?currency=GBP","description":"<p>Returns full details of a specific Syndicate.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>syndicate_id</code> required, INT, the id of the syndicate</li>\n<li><code>currency</code> required, STRING, 3 letter ISO 4217, the currency used by the user</li>\n</ul>\n","urlObject":{"path":["syndicates","{{syndicate_id}}"],"host":["{{api_url}}"],"query":[{"key":"currency","value":"GBP"}],"variable":[]}},"response":[],"_postman_id":"a2df239a-8a82-421f-e1d4-ffbd0cf4f516"},{"name":"Manager","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var CB = eval(globals.loadColossus);","CB.computeSignature(['manager_id']);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkManagerSerializer(data);"]}}],"id":"d9dc527c-1011-6015-15a4-841c38eb8d19","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":"{\n\"type_code\": \"RACE_WIN\",\n\"sport_code\": \"HORSE_RACING\",\n\"pool_id\": \"123456\",\n\"amount\": \"1\",\n\"currency\": \"CAD\",\n\"legs\": [\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T11:06:12.000Z\",\n  \"leg_number\": 1\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T11:40:12.000Z\",\n  \"leg_number\": 2\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T12:10:12.000Z\",\n  \"leg_number\": 3\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T18:12:12.000Z\",\n  \"leg_number\": 4\n  }],\n\"info\":\n{\n  \"track_name\": \"Woodbine (SB)\",\n  \"race_number\": \"13\"\n},\n\"prizes\": [\n  { \n    \"amount\": \"14000\",\n    \"prize_code\":\"WIN\"\n  }]\n}\n\n"},"url":"{{api_url}}/managers/{{manager_id}}","description":"<p>Returns details of a manager.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>manager_id</code> required, INT, id of the manager to be displayed</li>\n</ul>\n","urlObject":{"path":["managers","{{manager_id}}"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d9dc527c-1011-6015-15a4-841c38eb8d19"},{"name":"Managers leaderboard","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var CB = eval(globals.loadColossus);","CB.computeSignature(['manager_id']);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkManagerSerializer(data[0]);"]}}],"id":"0ccddaf8-7e23-8407-87d1-9ab96e3965fb","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":"{\n\"type_code\": \"RACE_WIN\",\n\"sport_code\": \"HORSE_RACING\",\n\"pool_id\": \"123456\",\n\"amount\": \"1\",\n\"currency\": \"CAD\",\n\"legs\": [\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T11:06:12.000Z\",\n  \"leg_number\": 1\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T11:40:12.000Z\",\n  \"leg_number\": 2\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T12:10:12.000Z\",\n  \"leg_number\": 3\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T18:12:12.000Z\",\n  \"leg_number\": 4\n  }],\n\"info\":\n{\n  \"track_name\": \"Woodbine (SB)\",\n  \"race_number\": \"13\"\n},\n\"prizes\": [\n  { \n    \"amount\": \"14000\",\n    \"prize_code\":\"WIN\"\n  }]\n}\n\n"},"url":"{{api_url}}/managers/leaderboard.json?period=1","description":"<p>Returns best performing Syndicate managers.</p>\n<p>Under development.</p>\n","urlObject":{"path":["managers","leaderboard.json"],"host":["{{api_url}}"],"query":[{"key":"period","value":"1"}],"variable":[]}},"response":[],"_postman_id":"0ccddaf8-7e23-8407-87d1-9ab96e3965fb"},{"name":"Managers rank periods","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var CB = eval(globals.loadColossus);","CB.computeSignature(['manager_id']);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkManagerSerializer(data[0]);"]}}],"id":"7db42deb-6480-7db5-5a0b-33ce8f38fae7","request":{"method":"GET","header":[{"key":"Authorization","value":"{{api_auth_sha}} {{api_auth_key}}:{{signature}}"},{"key":"Date","value":"{{time}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Content-MD5","value":"{{content-MD5}}"}],"body":{"mode":"raw","raw":"{\n\"type_code\": \"RACE_WIN\",\n\"sport_code\": \"HORSE_RACING\",\n\"pool_id\": \"123456\",\n\"amount\": \"1\",\n\"currency\": \"CAD\",\n\"legs\": [\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T11:06:12.000Z\",\n  \"leg_number\": 1\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T11:40:12.000Z\",\n  \"leg_number\": 2\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7\",\n  \"scheduled_start\": \"2016-10-08T12:10:12.000Z\",\n  \"leg_number\": 3\n  },\n  {\n  \"selections\": \"1/2/3/4/5/6/7/8/9/10\",\n  \"scheduled_start\": \"2016-10-08T18:12:12.000Z\",\n  \"leg_number\": 4\n  }],\n\"info\":\n{\n  \"track_name\": \"Woodbine (SB)\",\n  \"race_number\": \"13\"\n},\n\"prizes\": [\n  { \n    \"amount\": \"14000\",\n    \"prize_code\":\"WIN\"\n  }]\n}\n\n"},"url":"{{api_url}}/managers/rank_periods","description":"<p>Returns the options for the time periods for the Leaderboard rankings.</p>\n<p>Under development.</p>\n","urlObject":{"path":["managers","rank_periods"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7db42deb-6480-7db5-5a0b-33ce8f38fae7"}],"id":"70084bb0-a94c-0f7b-dbf8-59020e99f80c","description":"<p>Syndicates is a unique feature that lets customers from any partner site, in any language and currency, start a Syndicate to give themselves more chances to win. They can do this completely anonymously, or choose to share their Twitter handle to engage other users.</p>\n<p>If a user selects lots of different selections, thereby creating many lines, it can give them more chances to win. However it also becomes expensive. A Syndicate lets them buy a fraction of a ticket, and then other users can also buy portions of the ticket until it's fully bought. This gives all the users more chances to win, however they will also share that prize with the other users in the Syndicate.</p>\n","event":[{"listen":"prerequest","script":{"id":"a9d89bbf-ebe8-4352-bb52-ce91ca4894b3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"28caeac2-27fb-4c2d-869e-19ada5456527","type":"text/javascript","exec":[""]}}],"_postman_id":"70084bb0-a94c-0f7b-dbf8-59020e99f80c"},{"name":"4. Receiving Updates","item":[],"id":"c8a49705-cafb-2943-4ddb-3a4212ab9969","description":"<p>The API provides Callbacks for any updates to data. The Callback consists of a single endpoint which the Colossus API calls via POST to provide a summary of the new information available.</p>\n<h4 id=\"callback-endpoint-description\">Callback Endpoint Description</h4>\n<p>To use the Callback, we require access to a single endpoint over HTTPS, which sens a JSON object via POST with the following parameters:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>object_name</code></td>\n<td>This will either be: \"pools\" or \"tickets\" (where 'ticket' refers to a 'bet'), relating to an update event of each category respectively</td>\n</tr>\n<tr>\n<td><code>object_id</code></td>\n<td>Numeric id, representing either the pool or the ticket</td>\n</tr>\n<tr>\n<td><code>event_code</code></td>\n<td>Test description (e.g. \"run_settlement\", indicating that a pool has finished and final ticket details are available)</td>\n</tr>\n<tr>\n<td><code>data</code></td>\n<td>Changes for each event, see more details below</td>\n</tr>\n<tr>\n<td><code>route</code></td>\n<td>Ignore, used for debugging purposes only</td>\n</tr>\n<tr>\n<td><code>originator</code></td>\n<td>Ignore, used for debugging purposes only</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"event-codes-and-data\">Event Codes and Data</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><code>object_name</code></th>\n<th><code>event_code</code></th>\n<th><code>data</code></th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>pools</td>\n<td>status_change</td>\n<td>\"status\":\"IN_PLAY\"</td>\n<td>Refers to the status of a pool. Possible status codes are: OPEN (the pool is open for betting), IN_PLAY (the pool is currently in progress, new bets are no longer accepted), OFFICIAL (the pool has finished, all games within the pool have finished), ABANDONED (the pool has finished, all games within the pool have been abandoned)</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>show</td>\n<td>\"show\":true</td>\n<td>Show the pool to customers</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>hide</td>\n<td>\"show\":false</td>\n<td>Hide the pool from customers</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>enable_trading</td>\n<td>\"trading_enabled\":true</td>\n<td>The pool is now open for transactions (either new bets or accepting cash outs, depending on the state of the pool)</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>disable_trading</td>\n<td>\"trading_enabled\":false</td>\n<td>The pool has been suspended from all actions until further notice (no new bets can be placed, and no cash out offers can be accepted</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>cycle_update</td>\n<td>[JSON object]</td>\n<td>Updated pool information for an OPEN pool, uses the following structure: {\"id\":INT, \"num_units\":FLOAT, \"num_units_gross\":FLOAT, \"num_units_net\": FLOAT, \"headline_prize\":FLOAT, \"pool_prizes\":{[\"WIN\"/\"BONUS\"]:{\"id\":INT,\"pool_id\":INT,\"current_prize\":FLOAT,\"prize_type_code\":[\"WIN\"/\"BONUS\"]}}</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>new_offers</td>\n<td>\"offers\":true</td>\n<td>There are new Cash Out offers available for a specific pool (show to customer and send notification to customer)</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>delete_offers</td>\n<td>\"offers\":false</td>\n<td>There are no longer Cash Out offers available for a specific pool (hide these from the customer view)</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>run_settlement</td>\n<td>\"settlement_status\":\"READY\"</td>\n<td>All tickets (bets) are ready to settle within a specific pool. A call should be made to the API to receive details of the payouts due: GET /pools/:id/settlement</td>\n</tr>\n<tr>\n<td>pools</td>\n<td>external_db_update</td>\n<td>[JSON object]</td>\n<td>Called when an item of data changes (e.g. a team name). We recommend passing this data to a customer's screen directly to update the information in real-time and/or replacing any cache</td>\n</tr>\n<tr>\n<td>tickets</td>\n<td>tote_refund</td>\n<td>[empty object]</td>\n<td>Void/cancel a specific ticket. Usually tickets are only cancelled prior to a pool starting</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"00193496-1794-4a34-ba4b-eae4e7eb0ac8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"aa388676-03e5-45f5-92a0-7cab01f7454b","type":"text/javascript","exec":[""]}}],"_postman_id":"c8a49705-cafb-2943-4ddb-3a4212ab9969"},{"name":"5. Data Type and Status Codes","item":[],"id":"aa0174b9-41d5-b2f4-920f-7f0f49648cc5","description":"<p>This section contains a list of codes used in the API.</p>\n<h4 id=\"sport-codes\">Sport Codes</h4>\n<ul>\n<li>FOOTBALL</li>\n<li>HORSE_RACING</li>\n<li>GREYHOUNDS</li>\n<li>TENNIS</li>\n<li>NFL</li>\n<li>NBA</li>\n<li>AFL</li>\n<li>RUGBY</li>\n<li>WRC</li>\n<li>MIXED</li>\n<li>SPECIAL</li>\n</ul>\n<h4 id=\"pool-type-codes\">Pool Type Codes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Sport Code</th>\n<th>Type Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>FOOTBALL</td>\n<td>CORRECT_SCORE</td>\n<td>Correct Score</td>\n</tr>\n<tr>\n<td>FOOTBALL</td>\n<td>HDA</td>\n<td>1 x 2 (Home / Draw / Away)</td>\n</tr>\n<tr>\n<td>FOOTBALL</td>\n<td>ASIAN_HANDICAP</td>\n<td>Winning team with handicap</td>\n</tr>\n<tr>\n<td>FOOTBALL</td>\n<td>OVER_UNDER</td>\n<td>Over or under a certain number of goals (usually 2.5)</td>\n</tr>\n<tr>\n<td>HORSE_RACING/GREYHOUNDS</td>\n<td>RACE_WIN</td>\n<td>Pick the winner of each leg (one or more legs)</td>\n</tr>\n<tr>\n<td>HORSE_RACING/GREYHOUNDS</td>\n<td>RACE_PLACE</td>\n<td>Top 3 finishers in each leg (one or more legs)</td>\n</tr>\n<tr>\n<td>HORSE_RACING/GREYHOUNDS</td>\n<td>RACE_ORDER</td>\n<td>Pick the runners to finish in each leg in order (one or more legs)</td>\n</tr>\n<tr>\n<td>TENNIS</td>\n<td>CORRECT_SCORE_5</td>\n<td>Correct sets, for 5 set games</td>\n</tr>\n<tr>\n<td>TENNIS</td>\n<td>CORRECT_SCORE_3</td>\n<td>Correct sets, for 3 set games</td>\n</tr>\n<tr>\n<td>TENNIS</td>\n<td>H2H</td>\n<td>Head to head - pick the tennis player that will last in the tournament the longest</td>\n</tr>\n<tr>\n<td>AFL/NFL/NBA/RUGBY</td>\n<td>POINT_MARGIN</td>\n<td>Pick the correct winning margin of points - used in high scoring games</td>\n</tr>\n<tr>\n<td>WRC</td>\n<td>RACE_WIN</td>\n<td>Pick the winner of each leg (one or more legs)</td>\n</tr>\n<tr>\n<td>WRC</td>\n<td>RACE_ORDER</td>\n<td>Pick the runners to finish in each leg in order (one or more legs)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"pool-status-codes\">Pool Status Codes</h4>\n<ul>\n<li>OPEN (the pool is open for betting)</li>\n<li>IN_PLAY (the pool is currently in progress, new bets are no longer accepted)</li>\n<li>OFFICIAL (the pool has finished, all games within the pool have finished)</li>\n<li>ABANDONED (the pool has finished, all games within the pool have been abandoned)</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"ebe2e169-195f-4155-b170-014334605ffd","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"49906378-a8e4-4965-9425-6eb1c271a8d0","type":"text/javascript","exec":[""]}}],"_postman_id":"aa0174b9-41d5-b2f4-920f-7f0f49648cc5"},{"name":"6. Error Codes","item":[],"id":"817cd38b-9f3b-4960-0c86-ce64e2c8d877","description":"<p>API usual request success responses:</p>\n<ul>\n<li><code>200 ok</code> for <code>GET, DELETE, PUT, POST(rarely)</code> requests</li>\n<li><code>201 created</code> for<code>POST</code> requests</li>\n</ul>\n<p>API usual request client error responses: (some of them are accompanied by a readable error message)</p>\n<ul>\n<li><code>400 bad request</code> absent or invalid parameters</li>\n<li><code>401 unauthorized</code> APIauth authentication failed or wrong merchant credentials</li>\n<li><code>403 forbidden</code> accessing unauthorised resources</li>\n<li><code>404 not found</code> missing records or files or wrong identifiers being passed</li>\n<li><code>406 not acceptable</code> requests in invalid format (e.g. not <code>json</code>)</li>\n<li><code>422 unprocessable entity</code> parameters fail more complex validation logic</li>\n</ul>\n<p>API unusual server request error responses:</p>\n<ul>\n<li><code>500 internal server error</code> usually unhandled parameters case, please let us know</li>\n<li><code>503 service_unavailable</code> should not really happen, but some server probably down, please let us know</li>\n<li><code>504 getaway_timeout</code> should not really happen, request took too long, please let us know, especially for 'finiancial' requests</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"172329b7-6c16-4046-8aa5-7ba6bdfd4890","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9ea7e2f9-eee1-4c40-b56d-65bb7fe86e18","type":"text/javascript","exec":[""]}}],"_postman_id":"817cd38b-9f3b-4960-0c86-ce64e2c8d877"}]}