Event

Method: create

Authorization is required. In order to gamify an process in your business, you need to generate presonalized events towards the game engine. This is achieved by creating an event.

Request

HTTP request

POST https://<YOUR_DOMAIN>/rest/v1/en_US/event

Parameters

Do not supply a request parameters with this method.

Request body

propertyvaluedescription
name string The event label. It should be unique string value representing the event. It should not be empty and its characters should comply with the JSON string format.
playerId guid The Id of the player for which this event relays to. DO NOT FORGET that this player should be created first in the game engine with this Id.
time date When the event was generated in ISO 8601 date string and UTC time zone.
parameters object List of key/value properties that can be later used in the quest computation logic. Could be the amount of an order or rating value as example

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "playerId",
      "value": "",
      "message": "playerId not found as an existing record"
    }
  ],
 "object": {
"type":"event", "name": "INIT", "playerId": "00000000-61c8-447e-87aa-744f579e4efa", "time": "2014-12-10T15:42:11.9096344+02:00", "parameters": { "key1": "val1", "key2": "val2" } } }

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

propertyvaluedescription
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or that was created. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can different from the posted one.
name string The event label. It should be unique string value representing the event. It should not be empty and its characters should comply with the JSON string format.
playerId guid The Id of the player for which this event relays to. DO NOT FORGET that this player should be created first in the game engine with this Id.
parameters object List of key/value properties that can be later used in the quest computation logic. Could be the amount of an order or rating value as example

The event datetime is considered the time in which the event was posted towards the engine.