HTTP/HTTPS API  | Gamooga

HTTP/HTTPS API

Step1: Getting the backend server of your company
Use the following HTTP API for getting your backend server.

http://cdn-jp.gsecondscreen.com/newnaconf/<company id>/

 The above will give you a JSON. Ignore all the keys except ‘evbk’. This contains the server to which you would   send your events. The ‘evbk’ does not change often and is mostly fixed.
 Hence please call this API only once before you push events to us in each session of yours.

Step 2: Sending events with identification
 Once you receive the ‘evbk’ from above, you can push events to us like below:

http://<evbk>/evwid/?c=<company id>&u=<unique id>&e=<event name>&ky=<property name>&vl=<property value>&tp=<property type>

Company id: Your company id
Unique id: Unique identifier of the visitor. This would be the same identifier being used on the website.
Event Name: Event name to be used in the campaign. An event can have multiple property sets.
Property Set (Property Name, Property Value and Property Type): Each property set defines a single property of an event. And multiple sets can be added using
   key: property name
   value: property value
   type: type of the data(s for string, n for number)
Response
 A 200 response means a successful event push.
 Please do reach out to us if you may have any queries.

Step 3: Sending events with vistitor id
 Once you receive the ‘evbk’ from step 1, you can push events to us like below:

http://<evbk>/ev/?c=<company id>&v=<visitor id>&e=<event name>&ky=<property name>&vl=<property value>&tp=<property type>

Company id: Your company id
Visitor id: Visitor id.
Event Name: Event name to be used in the campaign. An event can have multiple property sets.
Property Set (Property Name, Property Value and Property Type): Each property set defines a single property of an event. And multiple sets can be added using
   key: property name
   value: property value
   type: type of the data(s for string, n for number and b for boolean)
Response
 A 200 response means a successful event push.
 Please do reach out to us if you may have any queries.

Step 4: Sending events with vistitor id
 Once you receive the ‘evbk’ from step 1, you can push events to us using the bulk API like below:

http://<evbk>/bev/

Required Post parameters

   c: Your company id

   jwt: Json Web token generated using your API key, expiration and the below payload. HMAC - SHA256 algorithm must be used. Payload is a dictionary containing the following:

payload = {"payload": [["eventname1", "uniqueid1", {"p1": "v1", "p2": 2, "p3": false}], ["eventname2", "uniqueid2", {"p1": "v1", "p2": 2, "p3": true}], ...]}

Maximum of 10000 values can be present in a single AP! call.

Response
 A 200 response with a json return value. json contains the succeded event pushed as a list of booleans. 

   A 401 response if authentication failed

   A 400 bad request
 Please do reach out to us if you may have any queries.