VERSION 0.9 :

Output Format

All the results given by the API are returned as a JSON format.

1. Get player's statistics

Route : /v0.9/mplayers/<CUSTOMER_KEY>/<PLAYER_ID>/ GET

ex : curl http://api.matchable.io/v0.9/mplayers/<CUSTOMER_KEY>/<PLAYER_ID>/

This action return all the statistics available for a given player

  • output json :
{
  "ChurnModel": {
      'score': 66.0,
      'last_update': '2015-10-15T15:03:13.532660'
      }, 
  "ScoringModel": {
      'score': 75.5,
      'last_update': '2015-10-15T14:30:26.321479'
      }, 
  "id": "player1"
}

2 . Get all players' stats

Route : /v0.9/mplayers/<CUSTOMER_KEY>/ GET

ex : curl http://api.matchable.io/v0.9/mplayers/<CUSTOMER_KEY>/

This action return all the statistics for all of your players

  • output json :
{
   "players": [
    {
      "ChurnModel": {
          'score': 66.0,
          'last_update': '2015-10-15T15:03:13.532660'
      }, 
      "ScoringModel": {
          'score': 75.5,
          'last_update': '2015-10-15T14:30:26.321479'
      }, 
      "id": "player1"
  },
 {
      "ChurnModel": {
          'score': 36.0,
          'last_update': '2015-10-15T15:03:13.532660'
      }, 
      "ScoringModel": {
          'score': 95.5,
          'last_update': '2015-10-15T14:30:26.321479'
      }, 
      "id": "player2"
 },
     ...
  ]
}

3 . Send multiple player's action

Route : /v0.9/mactions/<CUSTOMER_KEY>/ POST

ex : curl -H “Content-Type: application/json” -d <DATA> http://api.matchable.io/v0.9/mactions/<CUSTOMER_KEY>/

This action give you a way to send your user's actions, the API expect to receive a JSON array

Warning : The “date” parameter was changed to a timestamp due to date conversion issues occuring with foreign character sets.

  • input :
[
  {
    "player_id":"<player_id>",
    "type":"<type_action>",
    "parameters":"",
    "date":1445347584.983071
  },
  {
    "player_id":"<player_id>",
    "type":"<type_action>",
    "parameters":"",
    "date":1445347584.983071
  },...
]
  • output :
{
  "result": "<N> saved actions"
  "error": "<ERROR>"
}

4. Get player's retention action

Route : /v0.9/advisor/<CUSTOMER_KEY>/<PLAYER_ID>/ GET

ex : curl http://api.matchable.io/v0.9/advisor/<CUSTOMER_KEY>/<PLAYER_ID>/

This API call returns a retention action for a given player. This action is obtained using a strategy based on the different scores computed by Matchable. The strategies can be specifically developped for each customer in collaboration with Matchable's data scientists.

  • output json :
{
   "advisor": "offer_free_bonus", 
   'last_update': '2015-10-15T15:03:13.532660'
}