Requirements for product API
On this page, you will find basic information on how to integrate InTarget.
Last updated
Was this helpful?
On this page, you will find basic information on how to integrate InTarget.
Last updated
Was this helpful?
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. . 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.
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:
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
58557
2020-10-10 07:11:32
2020-10-10 07:11:32
1996-03-12
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
id — player ID — required
first_name — optional
last_name — optional
gender — optional
country — optional
city — optional
ip — 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_blocked — true
if a user was blocked and can’t log in. false
- otherwise — optional
self_excluded — true
if a user should be unsubscribed from all types of communications. false
- otherwise — optional
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
)
player_id — required
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_at — required
modified_at — required
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
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
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
Endpoint with game activity has its unique approach to fetch all game sessions. There are three steps of data composition:
Find all game session ids that have at least one action within the time range >=from
and <to
Find all past and future actions of this session ids, disregarding time.
Aggregate all data for each session. There must be one row in result data per one game session.
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
id — required
name — required
sport_id — optional
sport_name — optional
country_code — optional
dateStart — required
dateEnd — optional
id — required
tournament_id — required
title — required
status — required
startTime — required
endTime — optional
type — required
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
id — required
bet_id — required
event_id — required
ratio — optional
status — optional
market — required
created_at — required
updated_at — required
locale — the user's preferred language with the country (en_US, es, etc.) Must be in ISO639
format. —optional