{"info":{"_postman_id":"d0a8a309-2893-fbd7-6504-80db40805e07","name":"Colossusbets Proplayer API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"1255977","collectionId":"d0a8a309-2893-fbd7-6504-80db40805e07","publishedId":"RVnWiK2Y","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-03-15T17:39:36.000Z"},"item":[{"name":"1. Introduction","item":[],"id":"b7a59232-2f6d-468c-84d5-06cf3fabff4d","description":"<h1 id=\"about-us\">About us</h1>\n<p>Colossus Bets offers the largest sports and racing jackpots in the world, and is the home of Partial Cash Out and Syndicates. For more information about the Colossus product, see our <a href=\"https://corporate.colossusbets.com\">Corporate Website</a>, our our <a href=\"https://www.colossusbets.com\">Own Product</a> build on this documentation.</p>\n<p>This is a server-to-server API, providing a full interface into the multi-sport Colossus Bets engine, using HTTPS requests with JSON objects.</p>\n<h1 id=\"units\">Units</h1>\n<p>These are the core measurement of the underlying system in order to keep the system currency-agnostic. Units need to be converted into a relevant user currency before being shown to customers. In this API you'll find exact instructions on how to deal with these values when encoutered. The units can have different value per pool.</p>\n<h1 id=\"fx-rates\">Fx Rates</h1>\n<p>Fx rates can be provided from the API in order to transform the units into a given currency. (<code>unit</code> value * <code>fx_rate</code> for currency <code>XYZ</code>  =  <code>XYZ</code> value.\nWe are keeping the rates up to date, and they are static per pool, being set at the pool creation time, based on the pool base currency, and the unit.</p>\n<h1 id=\"wallet-api-token-auth\">Wallet Api Token Auth</h1>\n<h2 id=\"token-header-format\">Token Header Format</h2>\n<ul>\n<li>The authentication information should be included by the client in the headers of each authenticated request and it will be received in the same manner or as parameters in some cases. The headers follow the RFC 6750 Bearer Token format:</li>\n</ul>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header Name</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>param</td>\n<td>somesecuretoken</td>\n<td>This serves as the user's password for each request. A hashed version of this value is stored in the database for later comparison. This value should be changed on each request.</td>\n</tr>\n<tr>\n<td>token-type</td>\n<td>Bearer</td>\n<td>Token type</td>\n</tr>\n<tr>\n<td>client</td>\n<td>testclient</td>\n<td>This enables the use of multiple simultaneous sessions on different clients. (For example, a user may want to be authenticated on both their phone and their laptop at the same time.)</td>\n</tr>\n<tr>\n<td>expiry</td>\n<td>tttttttt</td>\n<td>The date at which the current session will expire. This can be used by clients to invalidate expired tokens without the need for an API request.</td>\n</tr>\n<tr>\n<td>uid</td>\n<td><a href=\"mailto:zzzzz@yyy.com\">zzzzz@yyy.com</a></td>\n<td>A unique value that is used to identify the user. This is necessary because searching the DB for users by their access token will make the API susceptible to timing attacks.</td>\n</tr>\n</tbody>\n</table>\n</div><ul>\n<li>The authentication headers required for each request will be available in the response from the previous request. You can have a look at ng-token-auth AngularJS module or the jToker jQuery plugin where this functionality is already provided.</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"c92eec20-d566-4205-a846-ad8199681767","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f0e11c18-78ec-4846-acd5-66efc0902301","type":"text/javascript","exec":[""]}}],"_postman_id":"b7a59232-2f6d-468c-84d5-06cf3fabff4d"},{"name":"2. Wallet Auth","item":[{"name":"users/sign_in","event":[{"listen":"prerequest","script":{"id":"dd0438fd-eadb-4f2b-96ac-ba38fb87d285","exec":["var TokenAuth = eval(globals.loadTokenAuth);","TokenAuth.setTime();",""],"type":"text/javascript"}},{"listen":"test","script":{"id":"739516d1-86c5-4f46-bd8c-b0805cc2e277","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var TokenAuth = eval(globals.loadTokenAuth);","TokenAuth.setHeadersIfSuccess();"],"type":"text/javascript"}}],"id":"2321d8b8-25f4-6af4-2eca-a3e313e58f22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"login\": \"{{username}}\",\n  \"password\": \"{{password}}\"\n}"},"url":"{{wallet_api_url}}/users/sign_in","description":"<h2 id=\"sign_in---post-userssign_in\">sign_in - POST <code>/users/sign_in</code></h2>\n<ul>\n<li>logs in the user and returns the authentication headers, the customer state and whatever parameters required for login logic (sign_in_count?, notifications?)</li>\n<li>it first checks if the user with the introduced <code>email/username</code> is authorized to log in</li>\n<li>if the introduced <code>password</code> is wrong and the <code>email</code> address belongs to an account, it will be locked after a number of attempts, only if authorization passes</li>\n<li><code>login</code> field representing the <code>email</code> or the <code>username</code> </li>\n<li><code>password</code></li>\n<li>upon successful login information like <code>failed_attempts</code>, <code>sign_in_count</code>, <code>last_sign_in_ip</code> are being saved/reset</li>\n</ul>\n<p><strong>Error response examples</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>403\n{\n  \"status\": \"ERROR\",\n  \"error\": \"LOCKED\"\n}\n</code></pre><ul>\n<li>the 403 error codes can be found in code <code>en.yml</code> under <code>accounts</code> tab and logic/translations can be build on them</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>401\n{\n  \"status\": \"ERROR\",\n  \"error\": \"BAD_CREDENTIALS\"\n}\n</code></pre><p><strong>Successfull response examples</strong></p>\n<p><code>200 {   \"status\": \"SUCCESS\",   \"data\": { state: 'active' },   \"message\": \"OK\" }</code> + auth headers</p>\n","urlObject":{"path":["users","sign_in"],"host":["{{wallet_api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2321d8b8-25f4-6af4-2eca-a3e313e58f22"}],"id":"0ea8de21-00ea-56cf-4fc7-dcc65a40d395","event":[{"listen":"prerequest","script":{"id":"0bd2d2fa-5f16-41e1-a223-0c75817e193d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8e9b40b0-6d30-465a-8376-ae0e9f819fd9","type":"text/javascript","exec":[""]}}],"_postman_id":"0ea8de21-00ea-56cf-4fc7-dcc65a40d395","description":""},{"name":"3. Pools","item":[{"name":"Pool","event":[{"listen":"prerequest","script":{"id":"4f70d659-6a10-4e9d-838f-24a954137e23","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b91fa176-2d7b-4ed2-8489-f9fff5158136","type":"text/javascript","exec":["data = JSON.parse(responseBody);","var ToteTests = eval(globals.loadToteTests);","","ToteTests.checkPoolSerializer(data);"]}}],"id":"6126b500-ef3c-3936-03b1-d4bbbcbcb5f0","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{microsite_api_url}}/pools/{{pool_id}}?no_serializer=true&currency=GBP","description":"<p>Retrieves a pool with a specific id.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>pool_id</code> required</li>\n<li><code>no_serializer</code> required with TRUE value, BOOLEAN, default: false<ul>\n<li><code>no_serializer=true</code> returns a faster response</li>\n<li><code>no_serializer=false</code> is DEPRECATED</li>\n</ul>\n</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<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<h6>Response example</h6>\n<pre><code>\n{\n    \"id\": 29475,\n    \"name\": \"Race Winner Pick 7\",\n    \"type_code\": \"RACE_WIN\",\n    \"status\": \"ABANDONED\",\n    \"settlement_status\": \"NOT_READY\",\n    \"sched_start\": \"2018-03-01T15:00:00.000Z\",\n    \"sched_next\": \"2018-03-01T15:30:00.000Z\",\n    \"num_units\": \"14.61268774\",\n    \"headline_prize\": \"25000.0\",\n    \"in_rollback_mode\": false,\n    \"stake_sizes\": [\n        {\n            \"currency\": \"GBP\",\n            \"country\": \"00\",\n            \"stakes\": [\n                \"2.0\",\n                \"1.0\",\n                \"0.5\",\n                \"0.2\"\n            ],\n            \"min_stake\": \"0.01\",\n            \"max_stake\": \"2.1\",\n            \"min_cost\": \"0.01\",\n            \"max_cost\": \"100000000.0\"\n        }\n    ],\n    \"sport_code\": \"HORSE_RACING\",\n    \"leg_num\": 7,\n    \"sport_sub_code\": \"HORSERACING\",\n    \"show_sub_code\": false,\n    \"fx_rates\": [\n        {\n            \"currency\": \"GBP\",\n            \"rate\": \"2.0\"\n        }\n    ],\n    \"smart_pick_perms\": [],\n    \"free_play_only\": true,\n    \"available_syndicates\": 0,\n    \"has_offers\": false,\n    \"currency\": \"GBP\",\n    \"prizes\": [\n        {\n            \"prize_type_code\": \"WIN\",\n            \"amount\": \"25000.0\",\n            \"guarantee\": \"25000.0\",\n            \"carry_in\": \"0.0\",\n            \"pay_out\": \"0.0\",\n            \"win_units\": \"0.0\"\n        },\n        ...\n    ],\n    \"legs\": [\n        {\n            \"id\": 93381,\n            \"type_code\": \"RACE_WIN\",\n            \"official\": true,\n            \"display_order\": 1,\n            \"leg_order\": 1,\n            \"winning_selections\": [\n                {\n                    \"prize_code\": \"WIN\",\n                    \"selections\": [\n                        4,\n                        1,\n                        2,\n                        3,\n                        0\n                    ]\n                }\n            ],\n            \"sport_event\": {\n                \"id\": 83773,\n                \"name\": \"15:00 Cheltenham\",\n                \"status\": \"OFFICIAL\",\n                \"sport_code\": \"HORSE_RACING\",\n                \"sport_sub_code\": \"HORSERACING\",\n                \"sport_sub_code_desc\": null,\n                \"period\": null,\n                \"add_info_json\": {\n                    \"max_runners\": 4,\n                    \"advanced_going\": \"Heavy\",\n                    \"handicap\": false,\n                    \"track_type\": \"Hurdle\",\n                    \"race_type\": \"important\",\n                    \"eligibility\": \"yes\",\n                    \"distance\": \"2m3f\"\n                },\n                \"sched_start\": \"2018-03-01T15:00:00.000Z\",\n                \"competitors\": [\n                    {\n                        \"id\": 2347,\n                        \"name\": \"Ds Ben\",\n                        \"sport_code\": \"HORSE_RACING\",\n                        \"sport_sub_code\": \"HORSERACING\",\n                        \"colour\": \"B00707\",\n                        \"add_info_json\": null\n                    },\n                    ...\n                ],\n                \"sport_event_competitors\": [\n                    {\n                        \"id\": 171193,\n                        \"sport_event_id\": 83773,\n                        \"competitor_id\": 2347,\n                        \"cloth_number\": 4,\n                        \"name\": \"Allfredandnobell\",\n                        \"status\": null,\n                        \"withdrawn\": false,\n                        \"result\": null,\n                        \"favourite\": false,\n                        \"probability\": null,\n                        \"fractional_probability\": null,\n                        \"add_info_json\": {\n                            \"form_figure_type\": \"\",\n                            \"form_figure_text\": \"1538-36\",\n                            \"age\": 5,\n                            \"weight\": \"11-10\",\n                            \"trainer_id\": \"\",\n                            \"trainer_name\": \"Micky Hammond\",\n                            \"jockey_id\": \"\",\n                            \"jockey_name\": \"Finian O'Toole\",\n                            \"jockey_color_desc\": \"\",\n                            \"jockey_color_url\": \"\",\n                            \"allowance\": \"\"\n                        }\n                    },\n                    ...\n                ],\n                \"history\": [],\n                \"venue\": {\n                    \"code\": \"che\",\n                    \"name\": \"Cheltenham\",\n                    \"country\": \"England\"\n                }\n            },\n            \"selections\": [\n                {\n                    \"id\": 1356835,\n                    \"competitor_id\": 2347,\n                    \"sport_event_competitor_id\": 171193,\n                    \"bin\": 4,\n                    \"name\": \"Allfredandnobell\",\n                    \"price\": \"4.0\",\n                    \"display_order\": 4,\n                    \"add_info_json\": null,\n                    \"unit_distributions\": [\n                        {\n                            \"units\": \"0.0\",\n                            \"prize_code\": \"WIN\"\n                        }\n                    ]\n                },\n                ...\n            ]\n        },\n        ...\n    ],\n    \"history\": []\n}\n\n<p></p></code></pre><p></p>\n","urlObject":{"path":["pools","{{pool_id}}"],"host":["{{microsite_api_url}}"],"query":[{"key":"no_serializer","value":"true"},{"key":"currency","value":"GBP"}],"variable":[]}},"response":[],"_postman_id":"6126b500-ef3c-3936-03b1-d4bbbcbcb5f0"},{"name":"Pools","event":[{"listen":"prerequest","script":{"id":"1fadb1a7-e33b-43a9-9eb8-938a5806e59b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"00f0f38d-529d-4087-83f4-c606bcca44db","type":"text/javascript","exec":[""]}}],"id":"6def1ff9-8d7a-b560-68ec-1321e384a9d4","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"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":"{{microsite_api_url}}/pools?ungrouped=true&currency=GBP&no_serializer=true","description":"<p>Retrieves the list of pools available at the moment.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>no_serializer</code> required with TRUE value, BOOLEAN, default: false<ul>\n<li><code>no_serializer=true</code> returns a faster response</li>\n<li><code>no_serializer=false</code> is DEPRECATED</li>\n</ul>\n</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<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<li>we reccommend you to include only the information you must save/display for maximizing the preformance</li>\n<li><code>includes</code> possible values when <code>ungrouped=true&amp;details=false</code>: <code>includes=legs.sport_event</code></li>\n<li><code>includes</code> possible values when <code>ungrouped=true&amp;details=true</code>: <code>includes=prizes,fx_rates,smart_pick_perms,legs.sport_event.competitors,legs.sport_event.sport_event_competitors,legs.sport_event.venue,legs.selections, comma separated list of VALUE(.NESTED_VALUE)</code> - note that requesting the full list should not be done often, might take some time to respond, and might return a JSON object that contains a few MB of data</li>\n</ul>\n</li>\n<li><code>filters</code> optional, HASH (key value pair), default: {}, flags for the pools<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<li><code>ungrouped</code> optional, BOOLEAN, default: false<ul>\n<li>support for <code>ungrouped=false</code> was REMOVED so <code>ungrouped=true</code> must be used</li>\n</ul>\n</li>\n<li><code>details</code> optional, BOOLEAN, default: false, returns <code>PoolData</code> structure (more complex) rather than <code>PoolItemData</code> structure</li>\n</ul>\n<p>Response structure:</p>\n<ul>\n<li><code>ungrouped=true</code> - array of <code>PoolItemData</code></li>\n<li><code>ungrouped=true</code> and <code>details=true</code> - array of <code>PoolData</code></li>\n</ul>\n<h6> `PoolItemData` Response example</h6>\n<pre><code>\n[\n    {\n        \"id\": 29475,\n        \"name\": \"Race Winner Pick 7\",\n        \"type_code\": \"RACE_WIN\",\n        \"headline_prize\": \"25000.0\",\n        \"status\": \"ABANDONED\",\n        \"sched_start\": \"2018-03-01T15:00:00.000Z\",\n        \"sched_next\": \"2018-03-01T15:30:00.000Z\",\n        \"stake_sizes\": [\n            {\n                \"currency\": \"GBP\",\n                \"country\": \"00\",\n                \"stakes\": [\n                    \"2.0\",\n                    \"1.0\",\n                    \"0.5\",\n                    \"0.2\"\n                ],\n                \"min_stake\": \"0.01\",\n                \"max_stake\": \"2.1\",\n                \"min_cost\": \"0.01\",\n                \"max_cost\": \"100000000.0\"\n            }\n        ],\n        \"leg_num\": 7,\n        \"sport_code\": \"HORSE_RACING\",\n        \"has_sport_event_in_progress\": true,\n        \"sport_sub_code\": \"HORSERACING\",\n        \"show_sub_code\": false,\n        \"fx_rates\": [\n            {\n                \"currency\": \"GBP\",\n                \"rate\": \"2.0\"\n            }\n        ],\n        \"free_play_only\": true,\n        \"available_syndicates\": 0,\n        \"has_offers\": false,\n        \"currency\": \"GBP\",\n        \"legs\": [\n            {\n                \"type_code\": \"RACE_WIN\",\n                \"display_order\": 1,\n                \"sport_event\": {\n                    \"sport_code\": \"HORSE_RACING\",\n                    \"sport_sub_code\": \"HORSERACING\",\n                    \"add_info_json\": {\n                        \"max_runners\": 4,\n                        \"advanced_going\": \"Heavy\",\n                        \"handicap\": false,\n                        \"track_type\": \"Hurdle\",\n                        \"race_type\": \"important\",\n                        \"eligibility\": \"yes\",\n                        \"distance\": \"2m3f\"\n                    },\n                    \"sched_start\": \"2018-03-01T15:00:00.000Z\",\n                    \"id\": 83773\n                }\n            },\n            ...\n        ]\n    },\n    ...\n]    \n</code></pre>\n\n<h6>Additional response info</h6>\n\n<table>\n  <tr>\n    <th>Field name</th>\n    <th>Note</th>\n  </tr>\n  <tr>\n    <td>type_code</td>\n    <td>See <a href=\"#2908415e-6648-7a3d-c1f5-a9b38bea7bf2\">Pool Type Codes</a></td>\n  </tr>\n  <tr>\n    <td>headline_prize</td>\n    <td>This value is based on \"currency\"</td>\n  </tr>\n  <tr>\n    <td>status</td>\n    <td>See <a href=\"#2908415e-6648-7a3d-c1f5-a9b38bea7bf2\">Pool Status Codes </a></td>\n  </tr>\n  <tr>\n    <td>sched_start</td>\n    <td>In pool, Kick-off time of the first match in the pool. In sport_event, Kick-off time of that particular match</td>\n  </tr>\n  <tr>\n    <td>sched_next</td>\n    <td>Kick-off time of the next match in the pool (null if all matches started)</td>\n  </tr>\n  <tr>\n    <td>sport_code</td>\n    <td>See <a href=\"#2908415e-6648-7a3d-c1f5-a9b38bea7bf2\">Sport codes</a></td>\n  </tr>\n  <tr>\n    <td>display_order</td>\n    <td>Number indicating in which order the legs should be displayed</td>\n  </tr>\n  <tr>\n    <td>add_info_json</td>\n    <td>Dynamic set of data changing based on the (sport code, sport sub code) pair</td>\n  </tr>\n</table>","urlObject":{"path":["pools"],"host":["{{microsite_api_url}}"],"query":[{"key":"ungrouped","value":"true"},{"key":"currency","value":"GBP"},{"key":"no_serializer","value":"true"}],"variable":[]}},"response":[],"_postman_id":"6def1ff9-8d7a-b560-68ec-1321e384a9d4"}],"id":"b886ff43-d3c9-a879-5eee-3a892f5b5d26","event":[{"listen":"prerequest","script":{"id":"d7ab929b-b389-4844-80c5-7a621a9de4d3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"401e8453-b3d7-41c1-99da-2b4e9ee35341","type":"text/javascript","exec":[""]}}],"_postman_id":"b886ff43-d3c9-a879-5eee-3a892f5b5d26","description":""},{"name":"4. Tickets","item":[{"name":"Ticket [Auth]","event":[{"listen":"prerequest","script":{"id":"281caa10-f6a3-42a5-a349-bffd48729c27","type":"text/javascript","exec":["var CB = eval(globals.loadTokenAuth);","//CB.computeSignature(['customer_id']);"]}},{"listen":"test","script":{"id":"5ef73039-df60-40fe-aa3f-8ea4784a8a6b","type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","//CB.checkTicketsItemSerializer(data.items[0]);"]}}],"id":"e5a931a9-9ff3-dfa5-c84e-b04ab22a6261","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"uid","value":"{{uid}}"},{"key":"access-token","value":"{{access-token}}"},{"key":"client","value":"{{client}}"}],"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":"{{microsite_api_url}}/tickets/{{ticket_id}}?no_serializer=true","description":"<p>Returns a ticket</p>\n<p>Parameters:</p>\n<ul>\n<li><code>ticket_id</code> required, INT</li>\n<li><code>no_serializer</code> required with TRUE value, BOOLEAN, default: false</li>\n<li><code>no_serializer=true</code> returns a faster response</li>\n<li><code>no_serializer=false</code> is DEPRECATED</li>\n<li><code>includes</code> optional, STRING, default: \"offer_transactions,syndicate.manager,pool_info,legs.sport_event,legs.selections\", comma separated list of VALUE(.NESTED_VALUE)*</li>\n</ul>\n<h6>Response example</h6>\n<pre><code>\n\n<p>{\n    \"id\": 100000099834,\n    \"customer_id\": \"nandobermejo\",\n    \"selections\": \"8/8/8\",\n    \"lines\": 1,\n    \"amount_owned_customer\": \"1.0\",\n    \"status\": \"PLACED\",\n    \"stake\": \"2.0\",\n    \"currency\": \"GBP\",\n    \"poc\": \"GB\",\n    \"smartpick\": 0,\n    \"created_at\": \"2018-01-17T15:18:49.000Z\",\n    \"is_live\": false,\n    \"is_live_win\": true,\n    \"is_live_consolation\": true,\n    \"merchant_ref\": \"1030-7314\",\n    \"is_free_play\": false,\n    \"fx_rate\": \"2.0\",\n    \"ow_settle_date\": \"2018-01-17\",\n    \"cross_sell\": 0,\n    \"customer_win_payout\": \"5000.0\",\n    \"customer_consolation_payout\": \"0.0\",\n    \"is_in_store\": false,\n    \"store_id\": null,\n    \"customer_payout\": \"5000.0\",\n    \"customer_winnings\": \"5000.0\",\n    \"pool_id\": 29374,\n    \"channel\": \"DESKTOP\",\n    \"syndicate_portion\": null,\n    \"stringified_id\": \"100000099834\",\n    \"cost\": \"2.0\",\n    \"units_per_line\": \"1.0\",\n    \"offers_accepted\": \"0.0\",\n    \"syndicate\": null,\n    \"live_offer\": null,\n    \"offer_transactions\": [],\n    \"is_security_code_changed\": null, \n    \"above_threshold\": null,\n    \"pool\": {\n        \"name\": \"Pick 3\",\n        \"type_code\": \"CORRECT_SCORE\",\n        \"status\": \"OFFICIAL\",\n        \"settlement_status\": \"READY\",\n        \"sched_start\": \"2018-06-06T11:00:00.000Z\",\n        \"sched_next\": null,\n        \"num_units\": \"1.0\",\n        \"headline_prize\": \"2500.0\",\n        \"in_rollback_mode\": false,\n        \"stake_sizes\": [\n            {\n                \"currency\": \"GBP\",\n                \"country\": \"00\",\n                \"stakes\": [\n                    \"2.0\",\n                    \"1.0\",\n                    \"0.5\",\n                    \"0.2\"\n                ],\n                \"min_stake\": \"0.01\",\n                \"max_stake\": \"2.1\",\n                \"min_cost\": \"0.01\",\n                \"max_cost\": \"100000000.0\"\n            }\n        ],\n        \"sport_code\": \"FOOTBALL\",\n        \"leg_num\": 3,\n        \"sport_sub_code\": \"ESFLIGA\",\n        \"show_sub_code\": true,\n        \"fx_rates\": [\n            {\n                \"currency\": \"GBP\",\n                \"rate\": \"2.0\"\n            }\n        ],\n        \"smart_pick_perms\": [\n            1,\n            2,\n            4,\n            8,\n            12,\n            18,\n            24,\n            36,\n            48,\n            60,\n            80,\n            100,\n            125,\n            216,\n            343,\n            512\n        ],\n        \"available_syndicates\": 0,\n        \"has_offers\": false,\n        \"currency\": \"GBP\",\n        \"prizes\": [\n            {\n                \"prize_type_code\": \"CON_N1\",\n                \"amount\": \"250.0\",\n                \"guarantee\": \"250.0\",\n                \"carry_in\": \"0.0\",\n                \"pay_out\": \"0.0\",\n                \"win_units\": \"0.0\"\n            },\n            {\n                \"prize_type_code\": \"WIN\",\n                \"amount\": \"2500.0\",\n                \"guarantee\": \"2500.0\",\n                \"carry_in\": \"0.0\",\n                \"pay_out\": \"2500.0\",\n                \"win_units\": \"1.0\"\n            }\n        ],\n        \"legs\": [\n            {\n                \"id\": 92669,\n                \"type_code\": \"CORRECT_SCORE\",\n                \"official\": true,\n                \"display_order\": 1,\n                \"leg_order\": 1,\n                \"winning_selections\": [\n                    {\n                        \"prize_code\": \"WIN\",\n                        \"selections\": [\n                            8\n                        ]\n                    }\n                ],\n                \"sport_event\": {\n                    \"id\": 83317,\n                    \"name\": \"Ath Bilbao v Atl Madrid\",\n                    \"status\": \"OFFICIAL\",\n                    \"sport_code\": \"FOOTBALL\",\n                    \"sport_sub_code\": \"ESFLIGA\",\n                    \"sport_sub_code_desc\": null,\n                    \"period\": \"FT\",\n                    \"add_info_json\": {\n                        \"home_id\": 503,\n                        \"home_name\": \"Ath Bilbao\",\n                        \"home_colour\": null,\n                        \"home_score\": 0,\n                        \"away_id\": 504,\n                        \"away_name\": \"Atl Madrid\",\n                        \"away_colour\": null,\n                        \"away_score\": 0,\n                        \"current_score\": \"0-0\",\n                        \"half_time_score\": \"0-0\",\n                        \"result_code\": \"Draw\",\n                        \"current_event_code\": null\n                    },\n                    \"sched_start\": \"2018-06-06T11:00:00.000Z\",\n                    \"competitors\": [\n                        {\n                            \"id\": 503,\n                            \"name\": \"Ath Bilbao\",\n                            \"sport_code\": \"FOOTBALL\",\n                            \"sport_sub_code\": \"ESFLIGA\",\n                            \"colour\": \"E7071B\",\n                            \"add_info_json\": null\n                        },\n                        {\n                            \"id\": 504,\n                            \"name\": \"Atl Madrid\",\n                            \"sport_code\": \"FOOTBALL\",\n                            \"sport_sub_code\": \"ESFLIGA\",\n                            \"colour\": \"C71910\",\n                            \"add_info_json\": null\n                        }\n                    ],\n                    \"history\": []\n                },\n                \"selections\": [\n                    {\n                        \"id\": 1349614,\n                        \"bin\": 1,\n                        \"name\": \"AOH\",\n                        \"price\": \"17.0\",\n                        \"display_order\": 1,\n                        \"add_info_json\": null,\n                        \"unit_distributions\": [\n                            {\n                                \"units\": \"0.0\",\n                                \"prize_code\": \"WIN\"\n                            }\n                        ]\n                    },\n                    ...\n                ]\n            },\n            ...\n        ],\n        \"history\": [\n            {\n                \"event_code\": \"STARTED\",\n                \"remaining_units\": \"1.0\",\n                \"prize_code\": \"WIN\",\n                \"sport_event_history\": {\n                    \"event_code\": \"STARTED\",\n                    \"event_time\": \"2018-01-17T15:19:33.000Z\",\n                    \"event_info_json\": {\n                        \"home_id\": 503,\n                        \"home_name\": \"Ath Bilbao\",\n                        \"home_colour\": null,\n                        \"home_score\": 0,\n                        \"away_id\": 504,\n                        \"away_name\": \"Atl Madrid\",\n                        \"away_colour\": null,\n                        \"away_score\": 0,\n                        \"current_score\": \"0-0\",\n                        \"half_time_score\": null,\n                        \"result_code\": \"Draw\",\n                        \"current_event_code\": null\n                    }\n                }\n            },\n            ...\n        ],\n        \"id\": 29374\n    }\n}    </p>\n<p></p></code></pre><p></p>\n<table>\n  <tr>\n    <th>Field name</th>\n    <th>Note</th>\n  </tr>\n  <tr>\n    <td>is_security_code_changed</td>\n    <td>Boolean flag only populated for retail tickets</td>\n  </tr>\n  <tr>\n    <td>pin</td>\n    <td>Pin of the retail ticket</td>\n  </tr>\n</table>\n  ","urlObject":{"path":["tickets","{{ticket_id}}"],"host":["{{microsite_api_url}}"],"query":[{"key":"no_serializer","value":"true"}],"variable":[]}},"response":[],"_postman_id":"e5a931a9-9ff3-dfa5-c84e-b04ab22a6261"},{"name":"Tickets [Auth]","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var CB = eval(globals.loadTokenAuth);","//CB.computeSignature(['customer_id']);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkTicketsItemSerializer(data.items[0]);"]}}],"id":"312553af-5c46-e1f7-d7ee-366fe8c0fdf0","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"uid","value":"{{uid}}"},{"key":"access-token","value":"{{access-token}}"},{"key":"client","value":"{{client}}"}],"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":"{{microsite_api_url}}/tickets?no_serializer=true","description":"<p>Returns the tickets for a given customer</p>\n<p>Parameters:</p>\n<ul>\n<li><code>no_serializer</code> required with TRUE value, BOOLEAN, default: false<ul>\n<li><code>no_serializer=true</code> returns a faster response</li>\n<li><code>no_serializer=false</code> is DEPRECATED</li>\n</ul>\n</li>\n<li><code>customer_id</code> required, STRING, the customer's id </li>\n<li><code>type</code> optional, INT, in: [0, 1, 2], default: 0, 0 = all, 1 = live, 2 = historic(not live)</li>\n<li><code>from_date</code> optional, DATETIME</li>\n<li><code>to_date</code> optional, DATETIME</li>\n<li><code>per</code> optional, INT, number of tickets per page, for pagination purposes</li>\n<li><code>page</code> optional, INT, default: 0, page number, for pagination purposes</li>\n<li><code>pool_id</code> optional, INT</li>\n<li><code>filters</code> optional, HASH(key value pair), default: {}, flags for the tickets<ul>\n<li><code>is_in_store</code> optional, BOOLEAN, default: false</li>\n<li><code>is_free_play</code> optional, BOOLEAN, default: false</li>\n<li><code>is_managed_syndicate</code> optional, BOOLEAN, default: false</li>\n<li><code>is_joined_syndicate</code> optional, BOOLEAN, default: false</li>\n<li><code>is_solo_bet</code> optional, BOOLEAN, default: false</li>\n<li><code>with_offer</code> optional, BOOLEAN, default: false</li>\n<li><code>pool_type</code> optional, STRING (see full list of TYPE_CODES at end of API document)</li>\n<li><code>pool_types</code> optional, STRING, default: '', comma separated list of SPORT_CODE.TYPE_CODE (see full list of SPORT_CODES at end of API document)</li>\n<li><code>leg_num</code> optional, INT </li>\n<li><code>sport</code> optional, STRING (see full list of SPORT_CODES at end of API document)</li>\n</ul>\n</li>\n<li><code>sort_by</code> optional, STRING, in: [total_winnings_customer_local, cost_local, created_at]</li>\n<li><code>sort_asc</code> optional, BOOLEAN, default: false</li>\n<li><code>includes</code> optional, STRING, default: \"pool,syndicate.manager\", comma separated list of VALUE(.NESTED_VALUE)*</li>\n</ul>\n<h6>Response example</h6>\n<pre><code>\n{\n    \"items\": [\n        {\n            \"id\": 100000099834,\n            \"status\": \"PLACED\",\n            \"currency\": \"GBP\",\n            \"lines\": 1,\n            \"amount_owned_customer\": \"1.0\",\n            \"created_at\": \"2018-01-17T15:18:49.000Z\",\n            \"offer_amount\": \"0.0\",\n            \"is_live_win\": true,\n            \"is_live_consolation\": true,\n            \"merchant_ref\": \"1030-7314\",\n            \"is_live\": false,\n            \"is_free_play\": false,\n            \"fx_rate\": \"2.0\",\n            \"is_in_store\": false,\n            \"store_id\": null,\n            \"customer_payout\": \"5000.0\",\n            \"customer_winnings\": \"5000.0\",\n            \"pool_id\": 29374,\n            \"channel\": \"DESKTOP\",\n            \"syndicate_portion\": null,\n            \"syndicate_id\": null,\n            \"stringified_id\": \"100000099834\",\n            \"stake\": \"2.0\",\n            \"cost\": \"2.0\",\n            \"offers_accepted\": \"0.0\",\n            \"syndicate\": null,\n            \"pool\": {\n                \"id\": 29374,\n                \"name\": \"Pick 3\",\n                \"type_code\": \"CORRECT_SCORE\",\n                \"headline_prize\": \"2500.0\",\n                \"status\": \"OFFICIAL\",\n                \"sched_start\": \"2018-06-06T11:00:00.000Z\",\n                \"sched_next\": null,\n                \"stake_sizes\": [\n                    {\n                        \"currency\": \"GBP\",\n                        \"country\": \"00\",\n                        \"stakes\": [\n                            \"2.0\",\n                            \"1.0\",\n                            \"0.5\",\n                            \"0.2\"\n                        ],\n                        \"min_stake\": \"0.01\",\n                        \"max_stake\": \"2.1\",\n                        \"min_cost\": \"0.01\",\n                        \"max_cost\": \"100000000.0\"\n                    }\n                ],\n                \"leg_num\": 3,\n                \"sport_code\": \"FOOTBALL\",\n                \"has_sport_event_in_progress\": false,\n                \"sport_sub_code\": \"ESFLIGA\",\n                \"show_sub_code\": true,\n                \"fx_rates\": [\n                    {\n                        \"currency\": \"GBP\",\n                        \"rate\": \"2.0\"\n                    }\n                ],\n                \"available_syndicates\": 0,\n                \"has_offers\": false,\n                \"currency\": \"GBP\"\n            }\n        },\n        ...\n    ],\n    \"total_items\": 581\n}\n</code></pre>\n  ","urlObject":{"path":["tickets"],"host":["{{microsite_api_url}}"],"query":[{"key":"no_serializer","value":"true"}],"variable":[]}},"response":[],"_postman_id":"312553af-5c46-e1f7-d7ee-366fe8c0fdf0"},{"name":"Ticket [Auth]","event":[{"listen":"prerequest","script":{"id":"b392f278-7d93-4163-acea-4d2ee880de50","type":"text/javascript","exec":["var CB = eval(globals.loadTokenAuth);"]}},{"listen":"test","script":{"id":"07bf9c79-23cb-4ace-89a5-8c9951bf1ea1","type":"text/javascript","exec":["data = JSON.parse(responseBody);","postman.setEnvironmentVariable('ticket_id', data.id)","","var CB = eval(globals.loadColossus);","CB.checkPlacedTicketSerializer(data);"]}}],"id":"a16c38d3-ba0d-c8f3-be52-0d287fa70ce3","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"uid","value":"{{uid}}"},{"key":"access-token","value":"{{access-token}}"},{"key":"client","value":"{{client}}"}],"body":{"mode":"raw","raw":"{\n  \"ticket\": {\n    \"merchant_ref\" : \"{{rand_ref}}\",\n    \"customer_id\" : \"{{customer_id}}\",\n    \"pool_id\": \"{{pool_id}}\",\n    \"selections\": \"1/1/1/1\",\n    \"stake\" : \"2.00\",\n    \"cost\" : \"2.0\",\n    \"currency\" : \"GBP\",\n    \"poc\" : \"GB\"\n  }\n}"},"url":"{{microsite_api_url}}/tickets","description":"<p>Places a ticket in the tote.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>ticket</code> required, HASH, having the following parameters:<ul>\n<li><code>pool_id</code> required, INT</li>\n<li><code>selections</code> required, STRING, comma separated values of the bin parameter from the pool</li>\n<li><code>stake</code> required, STRING</li>\n<li><code>cost</code> required, STRING</li>\n<li><code>currency</code> required, STRING, 3 letter ISO 4217</li>\n<li><code>channel</code> optional, STRING, one of the values [DESKTOP MOBILE MOBILE_APP STORE STORE_BOOKABET SMS PRO SEMI_PRO]. Mainly used for reporting</li>\n<li><code>smartpick</code> optional, INT, default: 0<ul>\n<li>0 value - the smart pick wasn't used to generate the selections</li>\n<li>1 value - the smart pick was used to generate the selections</li>\n<li>2 value - the smart pick was used to generate the selections and some selections were changed by the user</li>\n</ul>\n</li>\n<li><code>cross_sell</code> optional, INT, default: 0<ul>\n<li>0 value - the ticket is not a cross sell one</li>\n<li>1 value - the ticket is a cross sell one</li>\n<li>2 value - the ticket is a cross sell one but some selections were changed by the user</li>\n</ul>\n</li>\n<li><code>free_play_id</code> optional, STRING and represents the token id associated with a free to play campaign</li>\n</ul>\n</li>\n</ul>\n<h6>Response example</h6>\n<pre><code>\n\n<p>{\n    \"id\": \"100000099933\",\n    \"merchant_ref\": \"1030-7350\",\n    \"selections\": \"1/1/1/1/1/1\",\n    \"stake\": \"2.00\",\n    \"cost\": \"2.0\",\n    \"currency\": \"GBP\",\n    \"cross_sell_suggestion\": null,\n    \"security_code\": null,\n    \"syndicate\": null,\n    \"pin\": null\n}</p>\n<p></p></code></pre><p></p>\n<h6>Additional response info</h6>\n\n<table>\n  <tr>\n    <th>Field name</th>\n    <th>Note</th>\n  </tr>\n  <tr>\n    <td>security_code</td>\n    <td>Is only populated with a value when the ticket is a retail one</td>\n  </tr>\n  <tr>\n    <td>pin</td>\n    <td>Is only populated with a value when the ticket is a retail one</td>\n  </tr>\n</table>","urlObject":{"path":["tickets"],"host":["{{microsite_api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a16c38d3-ba0d-c8f3-be52-0d287fa70ce3"},{"name":"Tickets Batch [Auth]","event":[{"listen":"test","script":{"id":"2584e456-9ae4-4054-bb3b-2d3ce85671bd","exec":[""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"2bf12b6b-920e-4503-b3ed-f2f12d72c130","exec":["var CB = eval(globals.loadTokenAuth);"],"type":"text/javascript"}}],"id":"d2f763f7-fec1-493d-a3a4-2bce1a03abcc","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"uid","value":"{{uid}}"},{"key":"access-token","value":"{{access-token}}"},{"key":"client","value":"{{client}}"}],"body":{"mode":"raw","raw":"{\n  \"response_type\": \"old\",\n  \"tickets\": [{\n\t\"pool_id\": \"{{pool_id}}\",\n    \"selections\": \"1/1/1/1/1\",\n    \"stake\": \"2.00\",\n    \"cost\": \"2.0\",\n    \"currency\": \"GBP\",\n    \"backref\": \"abcd\"\n  },\n  {\n\t\"pool_id\": \"{{pool_id}}\",\n    \"selections\": \"1/1/1/1/2\",\n    \"stake\": \"2.00\",\n    \"cost\": \"2.0\",\n    \"currency\": \"GBP\",\n    \"backref\": \"abcd\"\n  }]\n}"},"url":"{{microsite_api_url}}/tickets/batch","description":"<p>Places a batch of tickets in the tote.\nRecommendeed batch size between 200-500.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>response_type</code> optional, recommended, changes to a faster implementation, changes the response type to a more detailed report<ul>\n<li>in order to use the <code>new</code> value, please inform us your username/customer_id first !</li>\n</ul>\n</li>\n<li><code>ticket</code> required, ARRAY, having the following parameters:<ul>\n<li><code>pool_id</code> required, INT</li>\n<li><code>selections</code> required, STRING, comma separated values of the bin parameter from the pool</li>\n<li><code>stake</code> required, STRING</li>\n<li><code>cost</code> required, STRING</li>\n<li><code>currency</code> required, STRING, 3 letter ISO 4217</li>\n<li><code>backref</code>, required, STRING, used for identifying a ticket in a batch</li>\n<li><code>channel</code> optional, STRING, default: 'DESKTOP', in: [DESKTOP MOBILE MOBILE_APP STORE STORE_BOOKABET SMS PRO SEMI_PRO]. Mainly used for reporting, please populate with 'PRO' if you consider yourself to be one.</li>\n</ul>\n</li>\n</ul>\n<p>Response example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"backref1\": {\n        \"id\": 100000171793,\n        \"merchant_ref\": \"1037-8628\",\n        \"selections\": \"1/1/1/1\",\n        \"stake\": \"2.00\",\n        \"cost\": \"2.0\",\n        \"currency\": \"GBP\"\n    },\n    \"backref2\": {\n        \"id\": 100000171794,\n        \"merchant_ref\": \"1037-8629\",\n        \"selections\": \"1/1/1/2\",\n        \"stake\": \"2.00\",\n        \"cost\": \"2.0\",\n        \"currency\": \"GBP\"\n    }\n}\n</code></pre><p>NEW response example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"batch_ref\": \"postman-ref-972646987092\", # we generate a batch reference for the entire ticket set sent, the wallet transaction reference\n    \"placed\": [ # standard TOTE ticket placement response, note that the data under `placed` is different than the data under `rejected`\n        {\n            \"id\": 500000367612, # our tote ticket id, to use for further requesting the ticket information\n            \"merchant_settlement_currency\": \"GBP\",\n            \"merchant_settlement_cost\": 2, \n            \"takeout_gbp\": 0.6,\n            \"customer_currency\": \"GBP\",\n            \"customer_cost\": 2,\n            \"takeout\": 0.6, # cost - takeout = the amount placed in the pool out or your bet :)\n            \"status\": \"PENDING\", # ticket has status pending until accepted on tote (can take up to around 5 seconds depending on load)\n            \"created_at\": 1558535188856, # epoch time stamp at creation\n            \"merchant_ref\": \"postman-ref-972646987092\", # individual tote bet reference, needed internaly as parent transaction for potential win/loss/void/cashout actions\n            \"backref\": \"postman-ref-972646987092\" # the backref that you sent in the request \n        }\n    ],\n    \"rejected\": [  # note that the data under `placed` is different than the data under `rejected`\n        {\n            \"params\": { # the parameters that were sent to the tote 'AS IS' for this ticket, so you can debug easily\n                \"pool_id\": 323,\n                \"selections\": \"1/1/1\",\n                \"stake\": \"2.00\",\n                \"cost\": \"2.00\",\n                \"currency\": \"GBP\",\n                \"channel\": \"DESKTOP\",\n                \"smartpick\": 0, \n                \"cross_sell\": 0,\n                \"poc\": \"GB\", # your wallet country code\n                \"customer_id\": \"silvius\", # your wallet customer_id\n                \"merchant_ref\": \"postman-ref-972646987092\",\n                \"backref\": \"postman-ref-972646987092\"\n            },\n            \"reason\": \"Pool 323 not in cache\" # rejection reson\n        }\n    ]\n}\n</code></pre>","urlObject":{"path":["tickets","batch"],"host":["{{microsite_api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2f763f7-fec1-493d-a3a4-2bce1a03abcc"},{"name":"Tickets Batch - NEW endpoint [Auth]","event":[{"listen":"test","script":{"id":"2584e456-9ae4-4054-bb3b-2d3ce85671bd","exec":[""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"2bf12b6b-920e-4503-b3ed-f2f12d72c130","exec":["var CB = eval(globals.loadTokenAuth);"],"type":"text/javascript"}}],"id":"dff1f4ab-8b79-47f6-8bd6-247c37395a69","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"uid","value":"{{uid}}"},{"key":"access-token","value":"{{access-token}}"},{"key":"client","value":"{{client}}"}],"body":{"mode":"raw","raw":"{\n  \"response_type\": \"old\",\n  \"tickets\": [{\n\t\"pool_id\": \"{{pool_id}}\",\n    \"selections\": \"1/1/1/1/1\",\n    \"stake\": \"2.00\",\n    \"cost\": \"2.0\",\n    \"currency\": \"GBP\",\n    \"backref\": \"abcd\"\n  },\n  {\n\t\"pool_id\": \"{{pool_id}}\",\n    \"selections\": \"1/1/1/1/2\",\n    \"stake\": \"2.00\",\n    \"cost\": \"2.0\",\n    \"currency\": \"GBP\",\n    \"backref\": \"abcd\"\n  }]\n}"},"url":"{{microsite_api_url}}/tickets/batch","description":"<p>Places a batch of tickets in the tote.\nRecommendeed batch size between 200-500.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>response_type</code> optional, recommended, changes to a faster implementation, changes the response type to a more detailed report<ul>\n<li>in order to use the <code>new</code> value, please inform us your username/customer_id first !</li>\n</ul>\n</li>\n<li><code>ticket</code> required, ARRAY, having the following parameters:<ul>\n<li><code>pool_id</code> required, INT</li>\n<li><code>selections</code> required, STRING, comma separated values of the bin parameter from the pool</li>\n<li><code>stake</code> required, STRING</li>\n<li><code>cost</code> required, STRING</li>\n<li><code>currency</code> required, STRING, 3 letter ISO 4217</li>\n<li><code>backref</code>, required, STRING, used for identifying a ticket in a batch</li>\n<li><code>channel</code> optional, STRING, default: 'DESKTOP', in: [DESKTOP MOBILE MOBILE_APP STORE STORE_BOOKABET SMS PRO SEMI_PRO]. Mainly used for reporting, please populate with 'PRO' if you consider yourself to be one.</li>\n</ul>\n</li>\n</ul>\n<p>Response example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"backref1\": {\n        \"id\": 100000171793,\n        \"merchant_ref\": \"1037-8628\",\n        \"selections\": \"1/1/1/1\",\n        \"stake\": \"2.00\",\n        \"cost\": \"2.0\",\n        \"currency\": \"GBP\"\n    },\n    \"backref2\": {\n        \"id\": 100000171794,\n        \"merchant_ref\": \"1037-8629\",\n        \"selections\": \"1/1/1/2\",\n        \"stake\": \"2.00\",\n        \"cost\": \"2.0\",\n        \"currency\": \"GBP\"\n    }\n}\n</code></pre><p>NEW response example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"batch_ref\": \"postman-ref-972646987092\", # we generate a batch reference for the entire ticket set sent, the wallet transaction reference\n    \"placed\": [ # standard TOTE ticket placement response, note that the data under `placed` is different than the data under `rejected`\n        {\n            \"id\": 500000367612, # our tote ticket id, to use for further requesting the ticket information\n            \"merchant_settlement_currency\": \"GBP\",\n            \"merchant_settlement_cost\": 2, \n            \"takeout_gbp\": 0.6,\n            \"customer_currency\": \"GBP\",\n            \"customer_cost\": 2,\n            \"takeout\": 0.6, # cost - takeout = the amount placed in the pool out or your bet :)\n            \"status\": \"PENDING\", # ticket has status pending until accepted on tote (can take up to around 5 seconds depending on load)\n            \"created_at\": 1558535188856, # epoch time stamp at creation\n            \"merchant_ref\": \"postman-ref-972646987092\", # individual tote bet reference, needed internaly as parent transaction for potential win/loss/void/cashout actions\n            \"backref\": \"postman-ref-972646987092\" # the backref that you sent in the request \n        }\n    ],\n    \"rejected\": [  # note that the data under `placed` is different than the data under `rejected`\n        {\n            \"params\": { # the parameters that were sent to the tote 'AS IS' for this ticket, so you can debug easily\n                \"pool_id\": 323,\n                \"selections\": \"1/1/1\",\n                \"stake\": \"2.00\",\n                \"cost\": \"2.00\",\n                \"currency\": \"GBP\",\n                \"channel\": \"DESKTOP\",\n                \"smartpick\": 0, \n                \"cross_sell\": 0,\n                \"poc\": \"GB\", # your wallet country code\n                \"customer_id\": \"silvius\", # your wallet customer_id\n                \"merchant_ref\": \"postman-ref-972646987092\",\n                \"backref\": \"postman-ref-972646987092\"\n            },\n            \"reason\": \"Pool 323 not in cache\" # rejection reson\n        }\n    ]\n}\n</code></pre>","urlObject":{"path":["tickets","batch"],"host":["{{microsite_api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"dff1f4ab-8b79-47f6-8bd6-247c37395a69"}],"id":"53e99839-93a6-2114-cf46-a4a829281ed4","event":[{"listen":"prerequest","script":{"id":"dce1df1d-9fcc-4bd6-aa74-6766dc47f8d3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8e8190c6-aab5-4ed2-a4ca-b6524806885b","type":"text/javascript","exec":[""]}}],"_postman_id":"53e99839-93a6-2114-cf46-a4a829281ed4","description":""},{"name":"5. Cash Out Offers","item":[{"name":"Offers [Auth]","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.checkOffersItemSerializer(data[0]);"]}}],"id":"146cfa2e-2faf-a9ee-707f-01f29c3904a4","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}}/offers","description":"<p>Returns the list of all the offers for a specific pool.\nParameters:</p>\n<ul>\n<li><code>pool_id</code> required, INT, the id of the pool</li>\n</ul>\n<h6>Response example</h6>\n<pre><code>\n\n<p>[\n    {\n        \"customer_id\": \"20011212\",\n        \"offers\": 18,\n        \"max_offer\": \"56.05184868\"\n    }\n]</p>\n<p></p></code></pre><p></p>\n","urlObject":{"path":["pools","{{pool_id}}","offers"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"146cfa2e-2faf-a9ee-707f-01f29c3904a4"},{"name":"Offer [Auth]","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var CB = eval(globals.loadColossus);","CB.computeSignature(['offer_id']);",""]}},{"listen":"test","script":{"type":"text/javascript","exec":["data = JSON.parse(responseBody);","var CB = eval(globals.loadColossus);","","CB.checkOfferSerializer(data);"]}}],"id":"27887cce-6f3b-d9cf-a712-92aad6caf86c","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}}/offers/{{offer_id}}","description":"<p>Returns all the details for an offer.\nParameters:</p>\n<ul>\n<li><code>offer_id</code> required, STRING, the id of the offer</li>\n</ul>\n<h6>Response example</h6>\n<pre><code>\n\n<p>{\n    \"id\": \"A27495-1-76239-1\",\n    \"customer_id\": \"paulacarasek2\",\n    \"ticket_id\": 220000000000197309,\n    \"amount\": \"155.709342015712\",\n    \"leg_num\": 1,\n    \"pool_id\": 27495,\n    \"transactions\": [\n        {\n            \"id\": 5795,\n            \"amount_sold_units\": \"0.69446133\",\n            \"merchant_margin_local\": \"1.73\",\n            \"total_margin_local\": \"1.73\",\n            \"created_at\": \"2017-04-04T10:20:03.000Z\",\n            \"merchant_offer_acceptance_ref\": \"1013-6868\",\n            \"amount_sold_fraction\": \"0.1\",\n            \"amount_sold\": \"15.57\"\n        },\n        ...\n    ]\n}</p>\n<p></p></code></pre><p></p>\n","urlObject":{"path":["offers","{{offer_id}}"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"27887cce-6f3b-d9cf-a712-92aad6caf86c"},{"name":"Accept Offer [Auth]","event":[{"listen":"prerequest","script":{"id":"29c5be73-fa1c-4995-9f0a-751a58dc5bcc","exec":["var CB = eval(globals.loadColossus);","CB.computeSignature(['offer_id']);",""],"type":"text/javascript"}}],"id":"51523b1b-f884-4c2d-9446-d72f72a7ba86","request":{"method":"POST","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  \"accept_fraction\": \"0.1\",\n  \"remaining_fraction\": \"0.9\",\n  \"accept_amount\": \"2205.24\"\n}"},"url":"{{api_url}}/offers/{{offer_id}}/accept","description":"<p>Accept an offer or a fraction of an offer.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>accept_fraction</code> required, STRING, the accepted fraction of the offer</li>\n<li><code>remaining_fraction</code> required, STRING, the remaining fraction of the offer, for validation purposes</li>\n<li><code>accept_amount</code> required, STRING, the accepted amount expressed in the user's currency, for validation purposes, must be truncated at two decimal places</li>\n</ul>\n<p>For example:</p>\n<ul>\n<li>if a customer cashes out 20% of their ticket, then <code>accept_fraction</code>='0.2', <code>remaining_fraction</code>='0.8'</li>\n<li>if the same customer then cashes out a further 10% of their ticket, then <code>accept_fraction</code>='0.1', <code>remaining_fraction</code>='0.7'</li>\n</ul>\n","urlObject":{"path":["offers","{{offer_id}}","accept"],"host":["{{api_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"51523b1b-f884-4c2d-9446-d72f72a7ba86"}],"id":"793ed252-e43b-3ce0-1c1a-b3239d6a2bc8","description":"<p>The endpoints in this section are used for managing Cash Out offers.</p>\n<p>Key endpoints are:</p>\n<ul>\n<li><strong>GET Offers</strong> - returns all of the offers for a specific pool</li>\n<li><strong>GET Offer</strong> - returns a specific offer (however details of the offer are also included in the ticket detail, so this endpoint is not necessary and only included for reference)</li>\n<li><strong>POST Accept Offer</strong> - accept a Cash Out offer</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"a3c6ce6c-d8f9-4c79-9cf9-cc50f5a9cb2c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2c0cfb69-7d03-4678-bcdd-4c6f82ea4b64","type":"text/javascript","exec":[""]}}],"_postman_id":"793ed252-e43b-3ce0-1c1a-b3239d6a2bc8"},{"name":"6. Data Type and Status Codes","item":[],"id":"2908415e-6648-7a3d-c1f5-a9b38bea7bf2","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>ICE_HOCKEY</li>\n<li>DARTS</li>\n<li>WRC</li>\n<li>MIXED</li>\n<li>SPECIAL</li>\n<li>ESPORTS</li>\n<li>FANTASY_NFL</li>\n<li>FANTASY_NBA</li>\n</ul>\n<h4 id=\"type-codes\">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>BTTS</td>\n<td>Both teams to score (yes or no)</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,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>HORSE_RACING,GREYHOUNDS,WRC</td>\n<td>RACE_PLACE</td>\n<td>Top n finishers(placers) in each leg (one or more legs)</td>\n</tr>\n<tr>\n<td>HORSE_RACING,GREYHOUNDS,WRC</td>\n<td>RACE_ORDER</td>\n<td>Pick the runners order of finish (same event)</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>ESPORTS</td>\n<td>H2H</td>\n<td>Head to head - Pick the team that will win</td>\n</tr>\n<tr>\n<td>ESPORTS</td>\n<td>HA</td>\n<td>Head / Away - Pick the team that will win</td>\n</tr>\n<tr>\n<td>ESPORTS</td>\n<td>OVER_UNDER</td>\n<td>Over or under a certain number of points, depending on the game</td>\n</tr>\n<tr>\n<td>ESPORTS</td>\n<td>HDA</td>\n<td>1 x 2 (Home / Draw / Away)</td>\n</tr>\n<tr>\n<td>FANTASY_NFL,FANTASY_NBA</td>\n<td>MVP</td>\n<td>The player with the highest score (fantasy sports)</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,ICE_HOCKEY</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>DARTS</td>\n<td>CORRECT_SCORE_9</td>\n<td>Correct score in the best of 9 matches</td>\n</tr>\n<tr>\n<td>DARTS</td>\n<td>CORRECT_SCORE_12</td>\n<td>Correct score in the best of 12 matches</td>\n</tr>\n<tr>\n<td>DARTS</td>\n<td>CORRECT_SCORE_14</td>\n<td>Correct score in the best of 14 matches</td>\n</tr>\n<tr>\n<td>FANTASY_ESPORTS</td>\n<td>EVENT_WIN</td>\n<td>Pick the winner of each leg (one or more legs)</td>\n</tr>\n<tr>\n<td>FANTASY_ESPORTS</td>\n<td>EVENT_ORDER</td>\n<td>Pick the final position of each competitor (same event)</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<h4 id=\"selections-string\">Selections String</h4>\n<p>Example \"1,2/1,8,10/13\"</p>\n<p>The above string represents a ticket/coupon/bet in a pool that has 3 legs (the selections for each leg are separated by a <code>/</code>).\nThe first leg has the selections with the <code>bin</code> numbers 1 and 2, second leg the <code>bin</code> numbers 1,8,10 and so on.</p>\n<p>For most <code>type_codes</code> the above would represent 6 lines (2 x 3 x 1), however for some racing type pools (race order), some lines can be invalid and the valid lines calculation is more complex. </p>\n<h4 id=\"pool-prizes\">Pool Prizes</h4>\n<p>Currently, our system supports a win pool prize and up to 5 consolation prizes depending on the <code>sport_code</code>, <code>type_code</code> and the number of legs.\nEach pool will have an association of at least one pool prize, differentiated by a prize code. All the prizes are distributed between the corresponding winning units accordingly.\nA ticket with multiple lines, can win different consolations for the loosing lines that did not qualify for a higher prize.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>For example, for a FOOTBALL HDA PICK 15:\n\n(_ni - representing the prize for x - i out of x winning linesm where x is the total nr of legs in the pool)\n* WIN    - prize for 15/15 correct results lines\n* CON_N1 - prize for 14/15 correct results lines\n* CON_N2 - prize for 13/15 correct results lines\n* CON_N3 - prize for 12/15 correct results lines\n* CON_N4 - prize for 11/15 correct results lines\n* CON_N5 - prize for 10/15 correct results lines\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"6bc8d489-3999-44c9-90af-6f8a0d28610c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"bb5800e7-ef62-4314-a2b8-fd89ccabe147","type":"text/javascript","exec":[""]}}],"_postman_id":"2908415e-6648-7a3d-c1f5-a9b38bea7bf2"}],"event":[{"listen":"prerequest","script":{"id":"704086b8-b601-442e-9b7a-14bd3374142f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b574b7e9-f947-4b07-9173-cf39bcc31720","type":"text/javascript","exec":[""]}}]}