User Batch

User exchange system for gaming.

Base URI

http://userbatch.com/api
Parameters
timestamp
string required
Applied to all operations

Actual time. The validity of query is limited to 300 seconds.

Example:
1420028423
login
string required
Applied to all operations

Login have to be integer between 10000000 and 99999999. {8}

Example:
40052010
Headers
Content-Type
string required
Applied to all operations

Content type for sending data.

Example:
application/json, application/xml
X-HTTP-AUTH-TOKEN
string required
Applied to all operations

Security token generated by hash HMAC from sended data “variable=value;…”.

  1. Message digest algorithm: sha256
  2. Data: application/json, application/xml
  3. Secret Key: your private security key
Example:
7557ca299039ecba7dfe3cbd77169a5e951e901ed7de1bda09f4facf58d6a70d
Accept
string required
Applied to all operations

Accept data type which you want to receive from the userbatch.com.

Example:
application/json, application/xml
API Methods
GET /advertisement/content
GET /advertisment/newuser
GET /advertisement/edituser
Get content
GET /advertisement/content

Request parameters

timestamp
string required

Actual time. The validity of query is limited to 300 seconds.

Example:
1420028423
login
string required

Login have to be integer between 10000000 and 99999999. {8}

Example:
40052010
lang
string required

Language of user in ISO 639-1. {2}

Example:
en, cs
email
string optional

User email. Crypted by aes-128-cbc.

Example:
user@gmail.com

Request headers

Content-Type
string required

Content type for sending data.

Example:
application/json, application/xml
X-HTTP-AUTH-TOKEN
string required

Security token generated by hash HMAC from sended data “variable=value;…”.

  1. Message digest algorithm: sha256
  2. Data: application/json, application/xml
  3. Secret Key: your private security key
Example:
7557ca299039ecba7dfe3cbd77169a5e951e901ed7de1bda09f4facf58d6a70d
Accept
string required

Accept data type which you want to receive from the userbatch.com.

Example:
application/json, application/xml

Responses

200 OK
Body
Object
active
boolean

If is there nothing to see for this particular user the value is false.

Example:
false
name
string

System name.

Example:
PH-SM Bez registrace
credit
number

Number of credit as a reward.

Example:
10
title
string

Advertisement title.

Example:
Test
info
string

Advertisement info.

Example:
Testing message.
banner
string

URL for graphic banner.

action
number

Action id by user status.

Examples

GET http://userbatch.com/api/advertisement/content?lang=en HTTP/1.1 
GET http://userbatch.com/api/advertisement/content?lang=en&email=info@userbatch.com HTTP/1.1 


HTTP/1.1 200 OK 

Content-Type: application/json

{
    "active": true,
    "name": "PH-SM Uzivatel zaznamenan do systemu",
    "credit": 0,
    "title": "Waiting",
    "info": "Waiting to finishing your registration",
    "banner": null
}
New user
GET /advertisment/newuser

Request parameters

timestamp
string required

Actual time. The validity of query is limited to 300 seconds.

Example:
1420028423
login
string required

Login have to be integer between 10000000 and 99999999. {8}

Example:
40052010
lang
string required

Language of user in ISO 639-1. /[a-z]{2}/

Example:
en, cs
email
string required

User email.

Example:
user@gmail.com
platform
number required

1 - Android 2 - iOS

Example:
1
device
string optional

Device specification

Request headers

Content-Type
string required

Content type for sending data.

Example:
application/json, application/xml
X-HTTP-AUTH-TOKEN
string required

Security token generated by hash HMAC from sended data “variable=value;…”.

  1. Message digest algorithm: sha256
  2. Data: application/json, application/xml
  3. Secret Key: your private security key
Example:
7557ca299039ecba7dfe3cbd77169a5e951e901ed7de1bda09f4facf58d6a70d
Accept
string required

Accept data type which you want to receive from the userbatch.com.

Example:
application/json, application/xml

Responses

200 OK
Body
Object
url
string

Redirection URL for device vith advertisement.

Example:
http://www.domain.com/?acces=UEx-crmKoMogL6
access
string

Access code for next communication with userbatch.com and specific user. “UEx-” is userbatch.com prefix. /[0-9a-zA-Z-]{14}/

Example:
UEx-crmKoMogL6
User status
GET /advertisement/edituser

Request parameters

timestamp
string required

Actual time. The validity of query is limited to 300 seconds.

Example:
1420028423
login
string required

Login have to be integer between 10000000 and 99999999. {8}

Example:
40052010
access
string required

Access code for next communication with userbatch.com and specific user. “UEx-” is userbatch.com prefix. /[0-9a-zA-Z-]{14}/

Example:
UEx-crmKoMogL6
action
number required

Chose user action. Variants (id - name [which side created/update]): 1 - unknown user [system/-] 2 - new user [the advertiser, advertised] 3 - user registration on the new portal [advertised, the advertiser] 4 - active 1 week [advertised, the advertiser]

Example:
2
email
string optional

Advertised side can put into the usrebatch the second user email which was used during the registration.

Example:
info2@userbatch.com

Request headers

Content-Type
string required

Content type for sending data.

Example:
application/json, application/xml
X-HTTP-AUTH-TOKEN
string required

Security token generated by hash HMAC from sended data “variable=value;…”.

  1. Message digest algorithm: sha256
  2. Data: application/json, application/xml
  3. Secret Key: your private security key
Example:
7557ca299039ecba7dfe3cbd77169a5e951e901ed7de1bda09f4facf58d6a70d
Accept
string required

Accept data type which you want to receive from the userbatch.com.

Example:
application/json, application/xml

Responses

200 OK
Body
Object
success
boolean
Example:
true

Examples

GET http://userbatch.com/api/advertisement/edituser?access=UEx-crmKoMogL6&action=2&email=info2@userbatch.com HTTP/1.1 


HTTP/1.1 200 OK 

Content-Type: application/json

{
    "success": true
}