signup/sign in

API Documentation



Overview

To use the Super Raffle apis in your Mobile application .First, you have to generate your publish key and secret key form api keys section.

You can use following end point :

https://superraffle.net/webservices

Customer Register post

To register your customer on the Super Raffle you have to use the following end point. On successfull registration the customer will received a email from Super Raffle to varify his email address.

https://superraffle.net/webservices/register

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
name
string
Name of your customer
email
string
Unique email of customer
phone
string
Phone number of your customer
password
string
Base 64 encoded password
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO",
   "name":"app_testing",
   "email":"youremail@gmail.com",
   "phone":"3234234",
   "password":"MTIzNDU="
}
						
						
Registered Successfuly
						 
{
    "message": "You have received an email to varify your email",
    "status": "success"
}
						
						
Failure
						 
{
"status":"error"
}
						
						
Customer login post

After registration you need to login by using following end point. The only varified user the allowed to logged in.On successfull login you will get the data or logged user.

https://superraffle.net/webservices/login

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
email
string
Email of your registered customer
password
string
Base 64 endcoded password
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO",
   "email":"youremail.com",
   "password":"MTIzNDU="
}
						
						
On success
						 
{
    "status": "success",
    "message": "logged In",
    "userData": {
        "user_id": "10",
        "name": "app_testing",
        "contact_number": "3234234",
        "email": "youremail@gmail.com",
        "register_date": "2021-04-08 11:21:34",
        "status": "Active"
    }
}
						
						
Failure
						 
{
    "status": "error",
    "message": "Email or password is wrong"
}
						
						
Available draws post

To get your Available draws you have to use the following end point. Only the active draws will show in this list with their available prizes.

https://superraffle.net/webservices/available_draws_list

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO"
}
						
						
On success
						 
{
    "available_draws": [
        {
            "drawID": "12",
            "draw_name": "testing draw",
            "draw_image": "depositphotos_26296093-stock-photo-3d-special-offer-word-on.1617880600.jpg",
            "ticket_price": "3",
            "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
            "end_date": "2021-04-30 00:00:00",
            "status": "Active"
        },
        {
            "drawID": "12",
            "draw_image": "https://superraffle.net/v2.0/uploads/admin/depositphotos_26296093-stock-photo-3d-special-offer-word-on.1617880600.jpg",
            "prize_details": [
                {
                    "prize_id": "22",
                    "prize_name": "Mobile phone",
                    "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
                    "prize_category": "1st Prize",
                    "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/960x0.1617880600.jpg"
                },
                {
                    "prize_id": "23",
                    "prize_name": "Laptop",
                    "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
                    "prize_category": "2nd Prize",
                    "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/149911hp_4-500x500__29249_zoom.1617880600.jpg"
                }
            ]
        }
    ],
    "status": "Found"
}
						
						
Failure
						 
{
"status":"notFound"
}
						
						
Previous draws post

To get your previous draws you have to use following end point. This will contain the passed draws with their prizes.

https://superraffle.net/webservices/previous_draws_list

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO"
}
						
						
On success
						 
{
    "previous_draws": [
        {
            "drawID": "12",
            "draw_name": "testing draw",
            "draw_image": "depositphotos_26296093-stock-photo-3d-special-offer-word-on.1617880600.jpg",
            "ticket_price": "3",
            "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
            "end_date": "2021-04-30 00:00:00",
            "status": "Active"
        },
        {
            "drawID": "12",
            "draw_image": "https://superraffle.net/v2.0/uploads/admin/depositphotos_26296093-stock-photo-3d-special-offer-word-on.1617880600.jpg",
            "prize_details": [
                {
                    "prize_id": "22",
                    "prize_name": "Mobile phone",
                    "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
                    "prize_category": "1st Prize",
                    "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/960x0.1617880600.jpg"
                },
                {
                    "prize_id": "23",
                    "prize_name": "Laptop",
                    "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
                    "prize_category": "2nd Prize",
                    "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/149911hp_4-500x500__29249_zoom.1617880600.jpg"
                }
            ]
        }
    ],
    "status": "Found"
}
						
						
Failure
						 
{
"status":"notFound"
}
						
						
Previous Winners list post

To get the previous winners list you need to use following end point:.

https://superraffle.net/webservices/previous_winners_list

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO"
}
						
						
On success
						 
{
    "previous_winners": [
        {
            "winning_id": "1",
            "users_id": "1",
            "ticket_number": "KJUC-28PNF60I",
            "draw_name": "testing wallet payment",
            "winner_name": "Moaviz Qureshi",
            "prize_name": "bfbgb",
            "prize_category": "1st Prize",
            "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/149911hp_4-500x500__29249_zoom.1617770721.jpg"
        },
        {
            "winning_id": "2",
            "users_id": "1",
            "ticket_number": "KJUC-28PNF60I",
            "draw_name": "testing wallet payment",
            "winner_name": "Moaviz Qureshi",
            "prize_name": "333",
            "prize_category": "2nd Prize",
            "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/samsung-galaxy-s10-1.1617770721.jpg"
        }
    ],
    "status": "success",
    "message": "found"
}
						
						
Failure
						 
{
    "message": "Notfound",
    "status": "error"
}
						
						
Buy tickets post

To buy the tickets of the respected draw you need to use following end point.

https://superraffle.net/webservices/buytickets

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
user_id
int
Your registered customer ID
drawID
int
Draw ID of the draws whose ticket customer wants to buy
ticket_qty
int
Number of ticket the customer wants to buy
transaction_id
string
Transaction ID after the payment
paid_amount
int
Paid amount on the transaction
payment_method
string
Payment method you used for the payment
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO",
   "user_id":"10",
   "drawID":"12",
   "ticket_qty":"1",
   "transaction_id":"txn_1Id8WtBkmmnV9scEC6nlYF3P",
   "paid_amount":"3",
   "payment_method":"stripe"
}
						
						
On success
						 
{
    "message": "Tickets buy successfull",
    "status": "success"
}
						
						
Failure
						 
{
    "status": "error"
}
						
						
Customer tickets list post

To get the tickets list of your customer you need to use the following end point.

https://superraffle.net/webservices/my_tickets_list

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
user_id
int
Your customer ID
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO",
   "user_id":"10"
}
						
						
On success
						 
{
    "customers_tickets": [
        {
            "drawID": "12",
            "tickets_id": "11",
            "draw_name": "testing draw",
            "user_id": "10",
            "draw_date": "2021-04-30 00:00:00",
            "ticket_number": "DQKZ-MHJSQN62"
        },
        {
            "drawID": "12",
            "tickets_id": "10",
            "draw_name": "testing draw",
            "user_id": "10",
            "draw_date": "2021-04-30 00:00:00",
            "ticket_number": "DQKZ-ZXCKW9D8"
        },
        {
            "drawID": "12",
            "tickets_id": "9",
            "draw_name": "testing draw",
            "user_id": "10",
            "draw_date": "2021-04-30 00:00:00",
            "ticket_number": "DQKZ-IPLHJUFI"
        }
    ],
    "status": "success",
    "message": "found"
}
						
						
Failure
						 
{
    "message": "Notfound",
    "status": "error"
}
						
						
My winning tickets post

To get the customer winning tickets you have to POST the required data to following end point:.

https://superraffle.net/webservices/my_winning_tickets

Body parameter
publish_key
string
Generate from api key section
secret_key
string
Generate from api key section
user_id
int
Your customer ID
						 
{
   "publish_key":"PU-LBMWPOS0169BGLFA0PSA01435T70DY",
   "secret_key":"SE-FMRFEV8UE5JPHPT7PR7RNC7MYP40VO",
   "user_id":"10"
}
						
						
On success
						 
{
    "customer_winning_tickets": [
        {
            "winning_id": "1",
            "users_id": "1",
            "ticket_number": "KJUC-28PNF60I",
            "draw_name": "testing wallet payment",
            "prize_name": "bfbgb",
            "prize_category": "1st Prize",
            "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/149911hp_4-500x500__29249_zoom.1617770721.jpg"
        },
        {
            "winning_id": "2",
            "users_id": "1",
            "ticket_number": "KJUC-28PNF60I",
            "draw_name": "testing wallet payment",
            "prize_name": "333",
            "prize_category": "2nd Prize",
            "prize_image": "https://superraffle.net/v2.0/uploads/admin/draw_prizes/samsung-galaxy-s10-1.1617770721.jpg"
        }
    ],
    "status": "success",
    "message": "found"
}
						
						
Failure
						 
{
    "message": "Notfound",
    "status": "error"
}