GamingAPI

Opens a platform to get more gamers or customers whether you are a game developer or a business

What is GamingAPI?

As game developers continuously look for ways to attract more gamers and make their game more popular, we are proving an API which can help them further to engage their gamers and offer them coupons for making achievements at their games. Use your account to set up achievements and associate coupons with them. Then simply hit our API with the details a gamer has made and we'll handle the rest. We'll check if the gamer has made an achievement based on criterias you have defined and will email them a coupon you have selected to the gamer's email provided.

Designed for developers

Specially designed for developers. API is really simple to use.

Time saver

Focus on developing your game and we'll handle the logic for handling achievements.

UX-enabled criterias

You can define achievement criterias using your dashboard..

Business Friendly

Business can also provide coupons to promote their business.

Easy to customise

Dashboard is feature-rich.

Minimum API hits required

API is extremely simple to use and requires minimal efforts to get familiar with..

Features

Documentation for Gaming Vendors


Authentication and environment

          
            # =>  HEADERS =>
            Authorization: Basic <test_or_live_api_key>
            # =>  REQUEST =>
            {
              "test": true // default true
            }
            # => Sample Error Response (Authorization - 401)
            {
                "success": false,
                "error": "Invalid api key"
            }

            # => Sample Error Response (Record not found - 404)
            {
                "success": false,
                "error": "Resource not found"
            }
          
        

Gamer API

1A. Gamer Create

          
            # => Sample Request
            # GET /api/v1/gamers
            { 
                "name"  : ,
                "email" : ,
                "phone" : 
            }
            Eg.
            {
              "test" : true,
              "name" : "Gamer 2",
              "email" : "gamer2@gamingapi.com",
              "phone" : "0000000000"
            }
            # => Sample Success Response (200)
            {
                "success": true,
                "message": "Gamer created",
                "object": {
                    "name": "Gamer 1",
                    "email": "gamer1@gamingapi.com",
                    "phone": "0000000000",
                    "created_at": "2016-06-25T10:05:01.794Z",
                    "updated_at": "2016-06-25T10:17:28.307Z"
                }
            }
            # => Sample Error Response
            {
                "success": false,
                "error": {
                    "email": [
                        "has already been taken"
                    ]
                }
            }
          
        

1B. Gamer(s) Info

          
            # Handles both show and index
            # => Sample Request
            # GET /api/v1/gamers
            { "id":  | null }
            # => Sample success SHOW Response (200)
            {
                "success": true,
                "message": "Gamer found",
                "object": {
                    "name": "Gamer 2",
                    "email": "gamer2@gamingapi.com",
                    "phone": "0000000000",
                    "created_at": "2016-06-25T10:20:03.867Z",
                    "updated_at": "2016-06-25T10:20:03.867Z"
                }
            }
            # => Sample success INDEX Response
            {
                "meta": {
                    "page": 1
                },
                "message": "Gamers list",
                "data": [
                    {
                        "name": "Gamer 2",
                        "email": "gamer2@gamingapi.com",
                        "phone": "0000000000",
                        "created_at": "2016-06-25T10:20:03.867Z",
                        "updated_at": "2016-06-25T10:20:03.867Z"
                    }
                ],
                "success": true
            }
          
        

1C. Gamer Update

          
            # => Sample Request
            # PUT /api/v1/gamers
            { "id": , ... }
            Eg.
            {
              "test" : true,
              "id" : 1,
              "name" : "Gamer 2",
              "email" : "gamer2@gamingapi.com",
              "phone" : "0000000000"
            }
            # => Sample Success Response
            {
                "success": true,
                "message": "Gamer updated",
                "object": {
                    "name": "Gamer 1",
                    "email": "gamer1@gamingapi.com",
                    "phone": "0000000000",
                    "created_at": "2016-06-25T10:05:01.794Z",
                    "updated_at": "2016-06-25T10:17:28.307Z"
                }
            }
          
        

1D. Gamer Delete

          
            # => Sample Request
            # DELETE /api/v1/gamers
            { "id": , ... }
            Eg.
            {
              "test" : true,
              "id" : 1
            }
            # => Sample Success Response
            {
                "success": true,
                "message": "Gamer destroyed",
                "object": {
                    "name": "Gamer 1",
                    "email": "gamer1@gamingapi.com",
                    "phone": "0000000000",
                    "created_at": "2016-06-25T10:05:01.794Z",
                    "updated_at": "2016-06-25T10:17:28.307Z"
                }
            }
          
        

Achievements API

2A. Achievement creation for gamer

          
            # => Sample Request
            # POST /api/v1/achievements
            { "gamer_id": , ..."winning_rule_specific_params"... }
            Eg.
            {
              "test" : true,
              "gamer_id" : 2,
              "level" : "1"
            }
            # => Sample Error Response - 400
            {
                "success": false,
                "error": "No achievements achieved"
            }
            # => Sample Error Response (No coupon found though achievement made - 422)
            {
                "success": true,
                "message": "Sorry. All the coupons for this achievement have been expired",
                "object": {
                    "created_at": "2016-06-25T13:13:22.942Z",
                    "updated_at": "2016-06-25T13:13:22.942Z",
                    "winning_rule": {
                        "type": "percentage",
                        "name": "Pro Player",
                        "created_at": "2016-06-25T11:50:39.480Z",
                        "updated_at": "2016-06-25T11:50:39.480Z"
                    }
                }
            }
            # => Sample Success Response (Coupon emailed)
            {
                "success": true,
                "message": "Coupon(s) mailed to the gamer's email id",
                "object": {
                    "created_at": "2016-06-25T13:11:25.041Z",
                    "updated_at": "2016-06-25T13:11:25.041Z",
                    "winning_rule": {
                        "type": "levels",
                        "name": "Mid Level",
                        "created_at": "2016-06-25T11:48:58.489Z",
                        "updated_at": "2016-06-25T11:48:58.489Z"
                    },
                    "coupon": {
                        "title": "Flat 15% off",
                        "company_name": "BigBasket",
                        "details": "Grab 15% off on all products",
                        "conditions": "",
                        "discount_amount": null,
                        "discount_percentage": "15.0",
                        "valid_from": "2016-06-25T00:00:00.000Z",
                        "valid_till": "2016-12-30T00:00:00.000Z"
                    }
                }
            }
          
        

2B. View all achievements of gamer

          
            # => Sample Request
            # GET /api/v1/achievements
            { "gamer_id": , "page":  }
            # => Sample Response
            {
                "meta": {
                    "page": "1"
                },
                "message": "Achievements list",
                "data": [
                    {
                        "created_at": "2016-06-25T13:08:30.339Z",
                        "updated_at": "2016-06-25T13:08:30.339Z",
                        "winning_rule": {
                            "type": "levels",
                            "name": "Mid Level",
                            "created_at": "2016-06-25T11:48:58.489Z",
                            "updated_at": "2016-06-25T11:48:58.489Z"
                        },
                        "coupon": {
                            "title": "Flat 15% off",
                            "company_name": "BigBasket",
                            "details": "Grab 15% off on all products",
                            "conditions": "",
                            "discount_amount": null,
                            "discount_percentage": "15.0",
                            "valid_from": "2016-06-25T00:00:00.000Z",
                            "valid_till": "2016-12-30T00:00:00.000Z"
                        }
                    },
                    {
                        "created_at": "2016-06-25T13:08:50.011Z",
                        "updated_at": "2016-06-25T13:08:50.011Z",
                        "winning_rule": {
                            "type": "levels",
                            "name": "Mid Level",
                            "created_at": "2016-06-25T11:48:58.489Z",
                            "updated_at": "2016-06-25T11:48:58.489Z"
                        },
                        "coupon": {
                            "title": "Flat 15% off",
                            "company_name": "BigBasket",
                            "details": "Grab 15% off on all products",
                            "conditions": "",
                            "discount_amount": null,
                            "discount_percentage": "15.0",
                            "valid_from": "2016-06-25T00:00:00.000Z",
                            "valid_till": "2016-12-30T00:00:00.000Z"
                        }
                    },
                    {
                        "created_at": "2016-06-25T13:11:25.041Z",
                        "updated_at": "2016-06-25T13:11:25.041Z",
                        "winning_rule": {
                            "type": "levels",
                            "name": "Mid Level",
                            "created_at": "2016-06-25T11:48:58.489Z",
                            "updated_at": "2016-06-25T11:48:58.489Z"
                        },
                        "coupon": {
                            "title": "Flat 15% off",
                            "company_name": "BigBasket",
                            "details": "Grab 15% off on all products",
                            "conditions": "",
                            "discount_amount": null,
                            "discount_percentage": "15.0",
                            "valid_from": "2016-06-25T00:00:00.000Z",
                            "valid_till": "2016-12-30T00:00:00.000Z"
                        }
                    },
                    {
                        "created_at": "2016-06-25T13:13:22.942Z",
                        "updated_at": "2016-06-25T13:13:22.942Z",
                        "winning_rule": {
                            "type": "percentage",
                            "name": "Pro Player",
                            "created_at": "2016-06-25T11:50:39.480Z",
                            "updated_at": "2016-06-25T11:50:39.480Z"
                        }
                    }
                ],
                "success": true
            }
          
        

2C. Delete all achievements of gamer

          
            # Deletes all gamers achievements. Please note that existing emails in queue will still be sent
            # => Sample Request
            # DELETE /api/v1/achievements
            { "gamer_id":  }
            Eg.
            {
              "test" : true,
              "gamer_id" : 2
            }
            # => Sample Success Response
            {
                "success": true,
                "message": "Gamer achievements successfully removed from our records.",
                "object": null
            }
          
        

Contact

Feel free to get in touch with us for any queries. We'll be happy to respond.

Profile

Have some suggestions for us?

We are open to all of it and look forward to hear to them.

[Tip for developers]: Please go through the documentation before raising your questions!

Gaming API