# Jackpot

Create jackpot ticket.

Request fields:

<table><thead><tr><th width="168">Attribute</th><th width="176">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>operator</td><td>string</td><td>Name of the operator as registered on the system</td></tr><tr><td>token</td><td>string</td><td>Player identification token</td></tr><tr><td>psp</td><td>string or null</td><td>Optional payment service provider or method used to pay for the ticket. E.g mobile, brite, pawapay</td></tr><tr><td>price</td><td>integer</td><td>Ticket price. Should be in integer format (cents). For example, for price <code>35.00</code> the value will be <code>3500</code></td></tr><tr><td>currency</td><td>string</td><td>Currency code in <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO 4217</a> three letter format</td></tr><tr><td>atag</td><td>string or null</td><td>Optional affiliate Tag or Affiliate ID. If parameter is present then it is added to the <code>ticket_create</code> PAM API call.</td></tr><tr><td>rtag</td><td>string or null</td><td>Optional referral Tag or referral ID. If parameter is present then it is added to the <code>ticket_create</code> PAM API call.</td></tr><tr><td>source</td><td>string</td><td>Ticket source (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>type</td><td>string</td><td><code>jackpot</code></td></tr><tr><td>odds_diff</td><td>float</td><td><p>Specifies the max odds deviation when we still accept the request and create the ticket. </p><p>When the value is set to zero it means we don't allow any odds difference during ticket creation and will respond with "Ticket odds changed" Error response</p></td></tr><tr><td>events</td><td>list of objects</td><td></td></tr><tr><td>events id</td><td>integer</td><td>Event id</td></tr><tr><td>events bet</td><td>integer</td><td>Event bet id</td></tr><tr><td>events odds</td><td>float</td><td>Event odds at time of ticket submission. Should be in decimal format with 2 digits after comma</td></tr><tr><td>betcard_code</td><td>string</td><td>Betcard code</td></tr><tr><td>prize</td><td>integer</td><td>Betcard prize</td></tr><tr><td>bonus_prizes</td><td>list of integers</td><td>Betcard bonus prizes</td></tr></tbody></table>

Sample request to create `jackpot` ticket:

```json
{
    "operator": "acme",
    "token": "sometokenvalue",
    "psp": "mobile",
    "price": 500,
    "currency": "USD",
    "atag": null,
    "rtag": "rk4rk4krnk3nrl3",
    "source": "desktop",
    "type": "jackpot",
    "odds_diff": 10.5,
    "events": [
        {
            "id": 265825,
            "bet": 14,
            "odds": 2.55
        },
        {
            "id": 265826,
            "bet": 34,
            "odds": 3.62
        },
        {
            "id": 265827,
            "bet": 22,
            "odds": 1.55
        },
        {
            "id": 265828,
            "bet": 83,
            "odds": 2.11
        },
        {
            "id": 265829,
            "bet": 66,
            "odds": 5.1
        },
        {
            "id": 265830,
            "bet": 25,
            "odds": 1.78
        }
    ],
    "betcard_code": "ABC123",
    "prize": 10000,
    "bonus_prizes": [
        2000,
        1500,
        1000
    ]
}
```

Response fields:

<table><thead><tr><th width="224">Attribute</th><th width="122">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Ticket id</td></tr><tr><td>code</td><td>string</td><td>Ticket code</td></tr><tr><td>price</td><td>integer</td><td>Ticket price. Should be in integer format (cents). For example, for price <code>35.00</code> the value will be <code>3500</code></td></tr><tr><td>stake</td><td>integer</td><td>Ticket amount. Should be in integer format (cents). For example, for stake <code>30.45</code> the value should be <code>3045</code></td></tr><tr><td>currency</td><td>string</td><td>Currency code in <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO 4217</a> three letter format</td></tr><tr><td>gross_payout</td><td>integer</td><td>Ticket gross payout. Should be in integer format (cents). For example, for gross payout <code>30.45</code> the value should be <code>3045</code></td></tr><tr><td>net_payout</td><td>integer</td><td>Ticket net payout. Should be in integer format (cents). For example, for net payout <code>30.45</code> the value should be <code>3045</code></td></tr><tr><td>wht_amount</td><td>integer</td><td>Player withholding tax amount. Should be in integer format (cents). For example, for withholding tax amount <code>30.45</code> the value should be <code>3045</code></td></tr><tr><td>wht</td><td>float</td><td>Player withholding tax percentage. For example, for withholding tax percentage <code>20.0%</code> the value should be <code>20.0</code></td></tr><tr><td>ext_amount</td><td>integer</td><td>Ticket exercise tax amount. Should be in integer format (cents). For example, for exercise tax amount <code>1.25</code> the value will be <code>125</code></td></tr><tr><td>ext</td><td>float</td><td>Ticket exercise tax percentage. For example, for exercise tax percentage <code>12.5%</code> the value should be <code>12.5</code></td></tr><tr><td>ext_type</td><td>string</td><td>Exercise tax type (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>status</td><td>string</td><td>Ticket Status (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>result</td><td>string</td><td>Ticket Result (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>approved</td><td>bool</td><td>Ticket approval (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>source</td><td>string</td><td>Ticket source (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>type</td><td>string</td><td><code>jackpot</code></td></tr><tr><td>atag</td><td>string or null</td><td>Optional affiliate Tag or Affiliate ID. If parameter is present then it is added to the <code>ticket_create</code> PAM API call.</td></tr><tr><td>rtag</td><td>string or null</td><td>Optional referral Tag or referral ID. If parameter is present then it is added to the <code>ticket_create</code> PAM API call.</td></tr><tr><td>aff_instant_comm_amt</td><td>int or null</td><td>Optional instant commission amount of affiliate user (in cents). Actual value may be only in smartbet, jackpot and superbet tickets</td></tr><tr><td>aff_instant_comm_pct</td><td>float or null</td><td>Optional instant commission percentage of affiliate user. Actual value may be only in smartbet, jackpot and superbet tickets</td></tr><tr><td>user_id</td><td>string</td><td>User ID from PAM</td></tr><tr><td>psp</td><td>string</td><td>Payment service provider or payment method name</td></tr><tr><td>created</td><td>string</td><td>Ticket created datetime, UTC. Format - <code>2024-01-28T14:33:01.000000</code></td></tr><tr><td>operator_time_created</td><td>string</td><td>Ticket created datetime, operator timezone. Format - <code>2024-01-28T14:33:01.000000</code></td></tr><tr><td>updated</td><td>string</td><td>Ticket updated datetime, UTC. Format - <code>2024-01-28T14:33:01.000000</code></td></tr><tr><td>operator_time_updated</td><td>string</td><td>Ticket updated datetime, operator timezone. Format - <code>2024-01-28T14:33:01.000000</code></td></tr><tr><td>odds</td><td>float</td><td>Product of odds for all events for ticket</td></tr><tr><td>betcard_code</td><td>string</td><td>Betcard code</td></tr><tr><td>prize</td><td>integer</td><td>Betcard prize</td></tr><tr><td>bonus_prizes</td><td>list of integers</td><td>Betcard bonus prizes</td></tr></tbody></table>

Sample response (status=200) to `jackpot` ticket:

```json
{
    "id": "66e38e2760b915970f42fa85",
    "code": "B5D096",
    "price": 500,
    "stake": 444,
    "currency": "USD",
    "gross_payout": 0,
    "net_payout": 0,
    "wht_amount": 0,
    "wht": 10.0,
    "ext_amount": 56,
    "ext": 12.5,
    "ext_type": "inclusive",
    "status": "open",
    "result": "pending",
    "approved": true,
    "source": "desktop",
    "type": "jackpot",
    "atag": null,
    "rtag": "rk4rk4krnk3nrl3",
    "aff_instant_comm_amt": null,
    "aff_instant_comm_pct": null,
    "user_id": "sometokenvalue",
    "psp": "mobile",
    "created": "2024-09-13T00:58:15.595000",
    "operator_time_created": "2024-09-13T03:58:15.595000",
    "updated": "2024-09-13T00:58:15.614000",
    "operator_time_updated": "2024-09-13T03:58:15.614000",
    "odds": 32.77,
    "betcard_code": "ABC123",
    "prize": 10000,
    "bonus_prizes": [
        2000,
        1500,
        1000
    ]
}
```

Response status codes:

<table><thead><tr><th width="150">Status Code</th><th>Interpretation</th></tr></thead><tbody><tr><td>200</td><td>OK - Everything worked as expected</td></tr><tr><td>400</td><td>Bad Request. Please check error code in response body (see <a data-mention href="../error-codes">error-codes</a>)</td></tr><tr><td>403</td><td>Forbidden. You do not have access for such request</td></tr><tr><td>422</td><td>Validation Error. Please check response body for more details</td></tr></tbody></table>

Error response (status=400):

```json
{
    "code": 103,
    "message": "Event with `{event-id}` identifier is not found"
}
```

Error response (status=400):

```json
{
    "code": 104,
    "message": "Events list in ticket object can't be empty"
}
```

Error response (status=400):

```json
{
    "code": 105,
    "message": "Team with `{team-id}` identifier is not found"
}
```

Error response (status=400):

```json
{
    "code": 106,
    "message": "Market for bet with `{market-id}` identifier is not found"
}
```

Error response (status=400):

```json
{
    "code": 107,
    "message": "Event with `{event-id}` identifier is not available for play because it has already started"
}
```

Error response (status=400):

```json
{
    "code": 108,
    "message": "Bookmaker event for event with `{event-id}` identifier is not found"
}
```

Error response (status=400):

```json
{
    "code": 109,
    "message": "Market is blocked"
}
```

Error response (status=400):

```json
{
    "code": 110,
    "message": "Ticket odds changed"
}
```

Error response (status=400):

```json
{
    "code": 111,
    "message": "Duplicate key for code generation"
}
```

Error response (status=400):

```json
{
    "code": 112,
    "message": "Operator with `{operator-id}` name is not found"
}
```

Error response (status=400):

```json
{
    "code": 114,
    "message": "No webhook url for operator with `{operator-id}` name"
}
```

Error response (status=400):

```json
{
    "code": 115,
    "message": "Operators in request body and in request header are not identical"
}
```

Error response (status=400):

```json
{
    "code": 118,
    "message": "Events list must contain at least {correct_amount} items."
}
```
