Handling Plays


Here is a list of all available plays response

acceptedPlay

Play is accepted: this means player can still win. Check if won parameter in response is true or false

{
    "status_code" : 201,
    "message" : "Play created",
    "response" : {
        "won" : true,
        "status_flag" : "acceptedPlay",
        "ip_address" : "127.0.0.1",
        "user_agent" : "WebKit OS X Chrome",
        "object_id" : "nLPIJwdFzt",
        "sweepstake_id" : 2,
        "player_id" : 8,
        "win_id" : 100,
        "award":{
            "object_id" : "hwKMmSXRpW",
            "sweepstake_id" : 2,
            "title" : "Premio weekly",
            "description" : "Premio Weekly",
            "last_activity_time":1415618164
        }
    },
    "origin" : "",
    "errors" : false
}

maxTotalWinsReached

Player has reached wins limit across the whole Sweepstake. won parameter will be false and both award and win_id null

{
    "status_code" : 201,
    "message" : "Play created",
    "response" : {
        "won" : false,
        "status_flag" : "maxTotalWinsReached",
        "ip_address" : "127.0.0.1",
        "user_agent" : "WebKit OS X Chrome",
        "object_id" : "nLPIJwdFzt",
        "sweepstake_id" : 2,
        "player_id" : 8,
        "win_id" : null,
        "award": null
    },
    "origin" : "",
    "errors" : false
}

maxIntervalWinsReached

Player has reached wins limit across interval (daily, weekly, monthly). won parameter will be false and both award and win_id null

{
    "status_code" : 201,
    "message" : "Play created",
    "response" : {
        "won" : false,
        "status_flag" : "maxIntervalWinsReached",
        "ip_address" : "127.0.0.1",
        "user_agent" : "WebKit OS X Chrome",
        "object_id" : "nLPIJwdFzt",
        "sweepstake_id" : 2,
        "player_id" : 8,
        "win_id" : null,
        "award": null
    },
    "origin" : "",
    "errors" : false
}

maxTotalPlaysReached

Player has reached plays limit across the whole Sweepstake. won parameter will be false and both award and win_id null

{
    "status_code" : 201,
    "message" : "Play created",
    "response" : {
        "won" : false,
        "status_flag" : "maxTotalPlaysReached",
        "ip_address" : "127.0.0.1",
        "user_agent" : "WebKit OS X Chrome",
        "object_id" : "nLPIJwdFzt",
        "sweepstake_id" : 2,
        "player_id" : 8,
        "win_id" : null,
        "award": null
    },
    "origin" : "",
    "errors" : false
}

maxIntervalPlaysReached

Player has reached plays limit across interval (daily, weekly, monthly). won parameter will be false and both award and win_id null

{
    "status_code" : 201,
    "message" : "Play created",
    "response" : {
        "won" : false,
        "status_flag" : "maxIntervalPlaysReached",
        "ip_address" : "127.0.0.1",
        "user_agent" : "WebKit OS X Chrome",
        "object_id" : "nLPIJwdFzt",
        "sweepstake_id" : 2,
        "player_id" : 8,
        "win_id" : null,
        "award": null
    },
    "origin" : "",
    "errors" : false
}