====== XML slip printer integration ====== Printer application could be reconfigured to store all purchased, cancelled or paid-out betting slips as XML files in a local directory. To enable this integration printer application must have XML2FS integration enabled and configured. Integration configuration can be changed [[https://static.adv.bet/ab-print/|here]] ===== XML files ===== ==== Change log ==== ^ Version ^ Changes ^ | 1.2 | Added ''PayoutCode'' field, ''PayoutCode'' will be included in the checksum data. Removed double tournament occurrence in ''EventName'' field | | 1.1 | Moved ''Product'' field from ''Ticket'' to ''Leg'' object, field ''Product'' no longer included in the checksum data | | 1.0 | Initial release | ==== Schema documentation ==== All XML files produced with this integration have the same structure. XML documents contain only one root element ''Ticket''. This element have an attribute ''version'', this documentation is for version ''1.0''. ^ Element ^ Type ^ Example ^ Description ^ | ''Platform'' | string | Aardvark | Name of the platform, always ''Aardvark'' | | ''UUID'' | string | 155ea541-8b74-ff05-5292-3239d4eb817a | Unique ticket ID (used only internally) | | ''ID'' | string | 47165941 | Numeric ticket ID that should be printed on a ticket | | ''Barcode'' | string | %As+x9Q%mBs | Ticket barcode, should be printed in using [[https://en.wikipedia.org/wiki/Code_128|Code 128]] encoding, not empty only for tickets in ''SOLD'' state | | ''PayoutCode''| integer | 341591 | Numeric ticket ''PayoutCode'' that should be printed on a ticket. Empty if payout codes are disabled through organisation settings | | ''State'' | string | SOLD | Ticket status, one of ''SOLD'', ''RETURNED'', ''PAIDOUT'' | | ''Currency'' | string | EUR | Currency code for all cash operations as defined in[[https://en.wikipedia.org/wiki/ISO_4217|ISO 4217]] | | ''IssueTime'' | date-time | 2018-10-18T07:29:53Z | Time when ticket was issued in [[https://tools.ietf.org/html/rfc3339|RFC3999]] format | | ''TotalPayin'' | integer | 400 | Total amount staked/paid for this ticket in cents, 400 -> 4.00 EUR | | ''TotalWin'' | integer | 0 | Total amount of money won for this ticket in cents, empty for tickets in ''SOLD'' state | | ''MaxWin'' | integer | 3600 | Estimated maximum amount of money that could be won by this ticket in cents, 3600 -> 36.00 EUR | | ''PayoutTime'' | date-time | 2018-10-18T07:29:53Z | Time when ticket was paid out in [[https://tools.ietf.org/html/rfc3339|RFC3999]] format, empty for tickets in ''SOLD'' state | | ''TotalPayout'' | integer | 0 | Total amount of money paid out for this ticket, empty for tickets in ''SOLD'' state | | ''Bets'' | array of ''Bet'' | | Element for grouping all bets on this ticket | | ''Bets''->''Bet'' | object | | A representation of a single bet, bet can be a multi-leg accumulator or simple bet | | ''Bets''->''Bet''->''Legs'' | array of ''Leg'' | | Element for grouping all bet legs for a single bet | | ''Bets''->''Bet''->''Legs''->''Leg'' | object | | A representation of a single simple bet | | ''Bets''->''Bet''->''Legs''->''Leg''->''Product'' | string | live | Event product name, examples: ''live'', ''prematch'' | | ''Bets''->''Bet''->''Legs''->''Leg''->''EventName'' | string | Pro League\nPadideh Khorasan FC - Foolad Khuzestan FC | Event description this bet is placed on | | ''Bets''->''Bet''->''Legs''->''Leg''->''EventCode'' | string | 1053 | Short (non unique) event ID this bet is placed on | | ''Bets''->''Bet''->''Legs''->''Leg''->''EventStartTime'' | date-time | 2018-10-18T07:30:40Z | Time when event this bet is placed on should start in [[https://tools.ietf.org/html/rfc3339|RFC3999]] format | | ''Bets''->''Bet''->''Legs''->''Leg''->''BetText'' | string | Who Wins (Full-Time): 1 | Bet description | | ''Bets''->''Bet''->''Legs''->''Leg''->''Odds'' | integer | 200 | Decimal odds (multiplied by 100) for this bet leg, 200 -> 2.00 | | ''Bets''->''Bet''->''Odds'' | integer | 200 | Decimal odds for whole bet (multiplied by 100) for this event, 200 -> 2.00 | | ''Bets''->''Bet''->''Stake'' | integer | 100 | Amount of money in cents staked on this bet, 100 -> 1.00 EUR | | ''Bets''->''Bet''->''MaxWin'' | integer | 200 | Estimated maximum amount of money that could be won by this bet in cents, 200 -> 2.00 EUR | | ''Bets''->''Bet''->''RealWin'' | integer | 0 | Actual amount of money won by this bet in cents | | ''CheckSum'' | string | b94ff77ed87597f615253f0e3bfaeaaa | MD5 sum of critical ticket elements, computed as ''MD5(Platform + UUID + ID + State + Currency + IssueTime + TotalPayin + TotalPayout + PayoutCode + _SALT_)'' | ===== XML file examples ===== New betting slip: Aardvark 15612666-9db5-f2f6-5aa9-6d4df7a1853c 90726906 %BWhh+g% 341591 SOLD EUR 2018-10-26T11:53:28Z 200 0 2308 0 prematch Soccer Arabian Gulf League Fujairah FC - Dibba Arabian Gulf League 10530 2018-10-26T12:55:00Z Winner (Regular Time): 1 235 prematch Soccer 2. HNL NK Hrvatski Dragovoljac - Kustosija 2. HNL 10324 2018-10-26T13:00:00Z Winner (Regular Time): X 334 prematch Soccer Arabian Gulf League Ajman - Al Ain Arabian Gulf League 10952 2018-10-26T13:00:00Z Winner (Regular Time): 2 147 1154 200 2308 0 f130b4cddf8b630c3abe27ec74481457 Paid-out winner slip: Aardvark 156126ba-6fc3-c255-5f9b-1be11ad61e2e 90727217 341591 PAIDOUT EUR 2018-10-26T11:59:37Z 1000 950 1900 2018-10-26T12:05:38Z 950 betgames-lucky5 Betgames lucky5 51810260145 2018-10-26T12:03:20Z 506 | More ODD 190 190 500 950 0 betgames-lucky5 Betgames lucky5 51810260145 2018-10-26T12:03:20Z 507 | More EVEN 190 190 500 950 950 0e72c1d130255ddf8bdcddfdf93ce3f6 Cancelled (revoked) slip: Aardvark 15612682-b92f-8a93-592e-7eff38e583d7 90727005 341591 RETURNED EUR 2018-10-26T11:55:28Z 1000 0 1900 2018-10-26T11:56:14Z 1000 betgames-lucky5 Betgames lucky5 51810260144 2018-10-26T11:58:20Z 508 | SUM ODD 190 190 500 950 0 betgames-lucky5 Betgames lucky5 51810260144 2018-10-26T11:58:20Z 509 | SUM EVEN 190 190 500 950 0 1189653be8336339f4613c5cb532ae15