Lottery and Scratch

Real Time Events You Need To Send

Lottery events are sent as a complete purchase and includes all the lines and draws in a single event. FT CRM will break out relevant information on this feed for actionable segmentation and triggering options.

POST /v1/integration/lottery

Send each Bet and Win event separately.

Sample Request for Lottery Subscription Purchase:

{
  "timestamp": "2019-02-18T10:35:03-08:00",
  "transaction_id": "23767444",
  "user_id": "5288704",
  "amount": 36,
  "account_amount": 16.80,
  "bonus_amount": 0,
  "bonus_code": "",
  "currency": "BRL",
  "deposit_amount": 19.20,
  "exchange_rate": 1,
  "origin": "sub.example.com",
  "status": "Approved",
  "tickets": [
    {
      "ticket_id": "17167745",
      "product": "SingleTicket",
      "product_name": "Mega-Sena",
      "amount": 18,
      "lines_count": 1,
      "draws": [{ "timestamp": "2019-02-20T14:00:00-07:00" }]
    },
    {
      "ticket_id": "17167746",
      "product": "SingleTicket",
      "product_name": "Mega-Sena",
      "amount": 18,
      "lines_count": 1,
      "draws": [{ "timestamp": "2019-02-20T14:00:00-07:00" }]
    }
  ]
}

POST /v2/integration/lottery [Bet]

The lottery v2 endpoints takes in more parameters in the post body and does first take a bet request, and there after a settlement request.

Sample Request for a bet update

{
  "ticket_id": "2019020103308257480",
  "lottery_id": "1",
  "lottery_name": "Mega Millions",  
  "lottery_type": "Lottery",
  "draw_id": "1",
  "draw_date": "2015-03-02T8:27:58.721607+06:00",
  "currency": "EUR",
  "exchange_rate": 1,
  "bonus_code": "Welcome",
  "amount": 4.0,
  "discount_amount": 2.0,
  "lines": [{
    "line_id": 1,
    "is_free_bet": false,
    "numbers": [12,31,32,11,35,54],
    "special_numbers": [35],
    "is_quick_pick": true,
    "meta": {}
  },
  {
    "line_id": 2,
    "is_free_bet": true,
    "numbers": [32,23,12,11,35,54],
    "special_numbers": [32],
    "is_quick_pick": false,
    "meta": {}
  }],
  "origin": "sub.example.com",
  "timestamp": "2015-03-02T8:27:58.721607+06:00",
  "type": "Bet",
  "user_id": "52530",
  "device_type": "Mobile",
  "meta": {
    "key1": 10.00,
		"key2": "some string",
		"key3": false
  }
}

POST /v2/integration/lottery [Settlement]

Sample Request for a settlement update

{
  "ticket_id": "2019020103308257480",
  "lottery_id": "1",
  "lottery_name": "Mega Millions",  
  "lottery_type": "Lottery",
  "draw_id": "1",
  "draw_date": "2015-03-02T8:27:58.721607+06:00",
  "currency": "EUR",
  "exchange_rate": 1,
  "draw_numbers": [32,23,12,11,35,54],
  "draw_special_numbers": [32],
  "amount": 2400,
  "lines": [{
    "line_id": 1,
    "matched_numbers": [12,32,35,54],
    "is_winning_line": false,
    "meta": {}
  },
  {
    "line_id": 2,
    "matched_numbers": [32,23,12,11,35,54],
    "matched_special_numbers": [32],
    "is_winning_line": true,
    "meta": {}
  }],
  "origin": "sub.example.com",
  "timestamp": "2015-03-02T8:27:58.721607+06:00",
  "type": "Settlement",
  "user_id": "52530",
  "meta": {}
}