Requirements for product API

On this page, you will find basic information on how to integrate InTarget.

Preferred format is CSV (for large datasets), but JSON is also acceptable.

All timestamps must be in UTC timezone without any exceptions and must be formatted with ISO 8601 standard. https://en.wikipedia.org/wiki/ISO_8601arrow-up-right. Example: YYYY-MM-DD HH:MM:SS

Your web server must correctly see the space in the endpoint URL, which can be represented either by + or %20

Most endpoints receive from and to GET parameters and must respond with rows, whose last modify timestamp is within range >= from and < to (half-closed interval)

In each response, each row must contain the last modification timestamp. Timestamps can’t be decreased.

You can use any authorization method (md5 auth, signature, basic, OAuth, login+password). We only need examples or descriptions of how we can authorize.

Example

Here is an example of how InTarget gets users every hour (could be changed) from your product (Let's name it "SpaceVegas"):

  • At 2020-10-10 08:00:01 InTarget will request the URL: https://space-vegas.com/api/users?from=2020-10-10+07:00:00&to=2020-10-10+08:00:00

  • SpaceVegas must return all users that registered or changed something within this hour (from 07:00 to 08:00). Example:

id
registered_at
modified_at
birthday
email

58013

2020-10-06 02:02:14

2020-10-10 07:58:22

1985-07-10

51153

2020-10-06 11:43:43

2020-10-10 07:12:09

2002-09-06

86603

2017-05-09 02:32:24

2020-10-10 07:20:11

1985-05-27

28748

2016-08-07 18:37:52

2020-10-10 07:47:16

1983-07-07

58477

2020-10-10 07:40:04

2020-10-10 07:40:39

2002-10-10

32135

2019-04-27 11:04:22

2020-10-10 07:23:48

1990-06-22

58557

2020-10-10 07:11:32

2020-10-10 07:11:32

1996-03-12

58570

2020-10-07 19:34:10

2020-10-10 07:03:45

1994-09-07

53316

2020-06-09 04:31:30

2020-10-10 07:24:13

1983-07-02

58208

2020-10-01 07:45:19

2020-10-10 07:42:08

1988-02-19

  • InTarget will save these users (insert newly registered and update old ones)

  • In the next hour, InTarget will go for another batch of users with datetime modification between 2020-10-10 08:00:00 and 2020-10-10 09:00:00 using URL: https://space-vegas.com/api/users?from=2020-10-10+08:00:00&to=2020-10-10+09:00:00

  • InTarget will make the same requests for transactions, wallets, contacts, and game data from SpaceVegas every hour

List of endpoints with fields:

Players (Registration + Personal Info Update):

Feed Example
  • id — player ID — required

  • first_name — optional

  • last_name — optional

  • gender — optional

  • country — optional

  • city — optional

  • ip — optional

  • locale — the user's preferred language with the country (en_US, es, etc.) Must be in ISO639 format. https://en.wikipedia.org/wiki/ISO_639arrow-up-right —optional

  • birthday — optional

  • registered_at — timestamp with a user registration date — required

  • ref_code —custom string for traffic source detection — optional

  • traffic_source — optional

  • user_agent — optional

  • modified_at — last modified date (must be updated every time the user changes something) — required

  • is_blockedtrue if a user was blocked and can’t log in. false - otherwise — optional

  • self_excludedtrue if a user should be unsubscribed from all types of communications. false - otherwise — optional

Custom Fields in the "Players" feed:

If you have any additional information about your player, we can import them as custom fields with the following data types:

  • Integer

  • Fractional number with two decimal places

  • String

  • Date (YYYY-MM-DD HH:MM:SS)

Contacts:

Feed Example
  • player_idrequired

  • email — optional

  • email_confirmed_at — timestamp when the email address was confirmed — optional

  • email_subscribe true if the email is subscribed to any communication, false — otherwise — optional

  • phone — optional

  • phone_subscribe true if the phone number is subscribed to any communication, false — otherwise — optional

  • phone_confirmed_at — timestamp when the phone number was confirmed— optional

  • push_token — optional

  • created_atrequired

  • modified_atrequired

Transactions (Deposits, Withdrawals, Bonuses):

Feed Example
  • id — unique transaction identifier — required

  • player_id — required

  • amount — required

  • currency original currency (USD, EUR, AUD, etc.) — required

  • type — operation type (Normal (Real Money), Prize(Bonus), Compensation, Cash back, Other) — optional

  • status — transaction current status (New, Process, Success, Fail) — optional

  • payment_system — payment system name — optional

  • dir balance change direction (IN or OUT) — required

  • created_at — timestamp when a transaction was created — required

  • updated_at last modified timestamp (any change in the transaction must affect this date) — required

  • invoice_id — unique invoice identifier for external payment system — optional

  • wallet_id — ID of the affected wallet — optional

  • user_agent — optional

  • ip — optional

  • requisite — requisite used in payment (mask card number, email, phone, external wallet, etc.) — optional

  • comment — optional

Logins:

Feed Example
  • id unique login identifier — required

  • player_id — required

  • ip — optional

  • created_at — required

  • ref_code — custom string for referral code detection — optional

  • traffic_source — custom string for traffic source detection — optional

  • user_agent — optional

  • host — real hostname for possible mirrors — optional

  • is_success 1 if the login was successful, 0 - otherwise — optional

  • fail_reason — custom description of login fail reason, empty if success— optional

Wallets (Balances):

Feed Example
  • id unique wallet identifier — required

  • player_id — required

  • type operation type, like in transactions (Normal (Real Money), Prize(Bonus), Other) — required

  • balance — balance sum — required

  • currency — the currency of the wallet — required

  • created_at — required

  • modified_at — last modified timestamp (any balance change must affect this date) — required

Casino Game Activity:

Endpoint with game activity has its unique approach to fetch all game sessions. There are three steps of data composition:

  1. Find all game session ids that have at least one action within the time range >=from and <to

  2. Find all past and future actions of this session ids, disregarding time.

  3. Aggregate all data for each session. There must be one row in result data per one game session.

Feed Example
  • player_id — required

  • session_id unique session identifier — required

  • game_code — unique game identifier — optional

  • game_name — required

  • currency — required

  • bet_count count of all bets in this game session — required

  • win_count count of all wins in this game session — required

  • bet_amount the amount of all bets in this game session — required

  • win_amount the amount of all wins in this game session — required

  • created_at first action in session timestamp — required

  • updated_at last action in session timestamp — required

  • game_vendor — optional

  • balance_type — operation type, like in transactions (Normal (Real Money), Prize(Bonus), Other) — optional

  • ip — optional

  • user_agent — optional

  • ref_code — optional

Sports Betting

Sports Betting Tournaments

Feed Example
  • id — required

  • name — required

  • sport_id — optional

  • sport_name — optional

  • country_code — optional

  • dateStart — required

  • dateEnd — optional

Sports Betting Events

Feed Example

  • id — required

  • tournament_id — required

  • title — required

  • status — required

  • startTime — required

  • endTime — optional

  • type — required

Sports Betting Bets

Feed Example

  • id — required

  • player_id — required

  • status — optional

  • type — required

  • stake — optional

  • win_amount — optional

  • currency — optional

  • kind — operation type, like in transactions (Normal (Real Money), Prize(Bonus), Other)— optional

  • created_at — required

  • user_agent — optional

  • modified_at— required

Sports Betting Odds

Feed Example
  • id — required

  • bet_id — required

  • event_id — required

  • ratio — optional

  • status — optional

  • market — required

  • created_at — required

  • updated_at — required

Last updated