MeraEvents.com is a leading technology & solution platform that serves event organisers for event ticketing, registration, merchandise selling, and event management.
After login to MeraEvents https://www.meraevents.com/login go to ' Developers' (Under login user name).
As of now, we offer both read and write access to MeraEvents account holder for their data only. As an meraevent apps developer, we provide OAuth2 authentication, using which MeraEvents user can give access to your app for their data. We ensure our users data is 100% safe and it is only given access to those applications they decide to give access via OAuth2.
MeraEvents has a modular architecture with several application serving respective services, e.g. the account application works like a gatekeeper for the account & authentication whereas event management application provide services for ticketing, registration, donation and rsvp event & management. Therefore your API use will have different MeraEvents URL depending on the services you are accessing.
MeraEvents API is open to all. To create your account, go to https://www.meraevents.com/signup.
After login to MeraEvents https://www.meraevents.com/Login, go to Developer tab (userName/Developers,Logout). Meraevents supports OAuth2 specification to enable access to APIs. MeraEvents provides 2 ways to authenticate & access.
Mera Events users can use this approach to directly connect and use MeraEvents API.You need ‘Access Token”, get your access token from 'Developers'
As an Apps developer or user wants to access API, you have to first register your application with MeraEvents. Go to ‘Developers’ page and create an application as shown in the following diagram.
You will get Application Client Id and Client secret. Save it for future use
The following steps explain how to integrate MeraEvents OAuth2 with your application.
1. User Authorization (Get User authorize code)
In your application, show a button called 'Login with MeraEvents' and send the request to 'https://www.meraevents.com/developers/client_authorize.php?&response_type=code&client_id=yourAppClientId&redirect_url=yourRedirectURL' The above request is to authorize user or to get user’s authorization code.
After user’s successful authorization, it will return authorize code to your registered callback URL.
2.Get access token for authorized code.
To get the access token for the authorize code. You have to send POST request to the URL : 'https://www.meraevents.com/developers/token.php' with following parameters.
Note: only POST method is allowed.
Example:
$request_string = 'client_id=appClientId&client_secret=appClientSecret&grant_type=authorization_code&code=userAuthorizeCode'; $url= http://www.meraevents.com/developers/token.php;
$ch= curl_init($url) ;
curl_setopt($ch, CURLOPT_POSTFIELDS,$request_string);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,30);
curl_setopt($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
$response_data= json_decode(urldecode($response),true);
The above $response_data contains the token. With the token, you can now call any MeraEvents API methods. The token will be valid for 3 months; in future following the same process, user could give you access to their MeraEvents data.
To access MeraEvents API you need access token.
NOTE : Additional request headers are required when using access_tokens to use MeraEvents API: “access_token: YOUR_ACCESS_TOKEN_HERE“.
Parameter Name | Parameter Value |
---|---|
eventTitle (*) | Event Title (between 5 and 255 charecters) |
eventURL | preferred Event URL |
eventStartDate (*) | mm/dd/yyyy |
eventStartTime (*) | hh:mm (AM / PM) |
eventEndDate (*) | mm/dd/yyyy |
eventEndTime (*) | hh:mm (AM / PM) |
eventDescription (*) | Event Description (must be above 50 charecters) |
isPrivateEvent | 1 - Private Event (Private events wont come on Meraevents home page) 0 - Public Event (default) |
eventCategory (*) | Campus / Entertainment / NewYear / Professional / Qa / Special Occasion / Spiritual / Sports / Trade Shows / Training |
eventBanner | Event Banner Image link (Ex: https://www.meraevents.com/download/MeaEvents_Logo_High.png) Banner Image should be of Width:1140px and Height:330px for better view |
eventThumbnail | Event Logo Image link (Ex: https://www.meraevents.com/download/MeaEvents_Logo.png) Logo Image should be of Width:250px and Height:250px for better view |
venueAddress (*) | Event Venue Address (if not Webinar Event) |
country (*) | Event Country (if not Webinar Event) |
state (*) | Event State (if not Webinar Event) |
city (*) | Event City (if not Webinar Event) |
tgs | ex: sports, hyderabadevent..etc |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/developer/event/createEvent?access_token=yourAccessToken |
Response Type | json |
Response | Or {"errors":"{"error":"true","0":{"eventDescription":["This field does not meet the minimum length of 50"]}}"} |
Parameter Name | Parameter Value |
---|---|
eventId (*) | Your EventId |
publish (*) | 1 for Publish, 0 for UnPublish |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/developer/event/publishOrUnpublishEvent?access_token=yourAccessToken |
Response Type | json |
Response | {"status":"success","message":"Successfully published the event","eventid":"33090"} Or {"status":"error","message":"Inalid input","eventid":"33090"} |
Parameter Name | Parameter Value |
---|---|
eventId (*) | Event Id |
ticketName (*) | Name of the ticket/registration |
ticketDescription | Ticket/Registration description |
price (*) | price (Enter 0 for Free) |
currency (*) | INR/USD/Free |
totalTicketCount (*) | Ticket/Registration Quantity |
status | Active/InActive/SoldOut |
startDate (*) | mm/dd/yyyy |
startTime | hh:mm (AM / PM) |
endDate (*) | mm/dd/yyyy |
endTime | hh:mm (AM / PM) |
minQuantity | Minimum purchase quantity ( default :1) |
maxQuantity | Maximum purchase quantity (default : 9) |
donationType | true/false |
addServiceTaxValue | 3.09 / 12.36 / 12.5 / 14 / 14.5 / 17.5 / 17.42 / 20 / 25 / 25.5 choose any of the above values |
addEntertainmentTaxValue | 10 / 20 / 25 choose any of the above values |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/developer/event/createTicket?access_token=yourAccessToken |
Response Type | json |
Response | {"status":"error","message":"errorCode""} OR {"status":"success","message":"successfull transaction","ticketId":"TKCIGJ"} |
Parameter Name | Parameter Value |
---|---|
eventId (*) | Event Id |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/resource/getEvent?access_token=yourAccessToken |
Response Type | json |
Response | {"status":"error","message":"errorCode"","discountId": ""} OR {"event_detail_arr":{"Id":67596,"UserName":"Organizer Name ","StartDt":"2015-04-03 12:00:00","EndDt":"2015-12-04 14:00:00","Title":"Meraevents","Description":" Descripiton","Country":"India","State":null,"City":null,"Loc":null,"Venue":"","URL":"Meraevents","Logo":"","Banner":"","CatName":"Campus","SubCatName":"College Fest","PinCode":"0"},"message":"success"} |
Parameter Name | Parameter Value |
---|---|
None | None |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/resource/getEventList?access_token=yourAccessToken |
Response Type | json |
Response | {"status":"error","message":"errorCode"} OR [{"Id":"67602","StartDt":"2015-05-01 15:34:56","EndDt":"2015-05-01 17:34:56","Title":"Run Event"},{"Id":"67601","StartDt":"2015-04-20 22:00:00","EndDt":"2015-11-25 23:00:00","Title":"Meraevent event"}] |
Parameter Name | Parameter Value |
---|---|
eventId (*) | Event Id |
reportType | detailreport / summaryreport (Default: Detail Reports) |
modifiedDate | yyyy-mm-dd hh:ii:ss (Hours - 24 hrs format ) |
pageno | Page Number (per page 100 records, and if not provided will give you total records) |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/resource/getEventAttendees?access_token=yourAccessToken |
Response Type | json |
Response | {"status":"error","message":"errorCode"} OR [{"EventSIgnupId":"23116011","referralDAmount":"0","Signup Date":"2015-04-15 17:30:57","PaymentGateway":"EBS","BarcodeNumber":"7596231160","PaymentTransId":"1222333","UserName":"Meraevent","attendeeId":"687185","currencyCode":"INR","Email":"meraevent@meraevent.com","Fees":"150","PaymentModeId":"1","Company":"","Phone":"000000","Mobile":"","ticket_name":"Delegate Registration INR - Three Days","ticketPrice":"150","Amount":"150","NumOfTickets":1,"TicketAmt":"150","ServiceTax":"0"}] |
Parameter Name | Parameter Value |
---|---|
eventId (*) | Event Id |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/resource/getTickets?access_token=yourAccessToken |
Response Type | json |
Response | {"status":"error","message":"errorCode"} OR {"EventId":"67596","EventName":"Meraevents","status":"success","tickets_array":[{"Id":"27201","Name":"Delegate Registration INR - One Day","Description":"One Day","Price":"5000","currencyId":"INR"},{"Id":"27202","Name":"Delegate Registration INR - Two Days","Description":"INR2","Price":"10000","currencyId":"INR"}]} |
Parameter Name | Parameter Value |
---|---|
countryId | Number (Default India related events) |
page | Number (Default 20 records) |
limit | Number ( Default 1) |
date | Date (format MM/dd/yyyy) |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/developer/event/getEventList |
Response Type | POST |
Response | "eventList": [ { "id": 96220, "title": "CERTIFIED SCRUM MASTER TRAINING (CSM) In Hyderabad", "thumbImage": "http://d6wad9g39si6z.cloudfront.net/content/categorylogo/training-thumbnail1455801654.jpg", "bannerImage": "http://d6wad9g39si6z.cloudfront.net/content/categorylogo/training-banner1455801653.jpg", "timeZone": "ASIA", "startDate": "2016-05-16 09:00:00", "endDate": "2016-05-17 18:00:00", "venueName": "Hyatt Hyderabad Gachibowli, Road No.2, IT Park, Gachibowli, Hyderabad, India", "eventUrl": "http://dev.meraevents.com/event/CERTIFIED-SCRUM-MASTER-TRAINING-CSM-In-Hyderabad-May", "categoryName": "Training", "categoryIcon": "", "themeColor": "#8c905e", "defaultBannerImage": "http://d6wad9g39si6z.cloudfront.net/content/categorylogo/training-banner1455801653.jpg", "defaultThumbImage": "http://d6wad9g39si6z.cloudfront.net/content/categorylogo/training-thumbnail1455801654.jpg", "registrationType": "paid", "cityName": "Hyderabad", "bookMarked": 0, "isCustomFields": 0, "isSeatingLayout": 0, "isMultipleAttendee": 0 } "statusCode": 200 } |
Parameter Name | Parameter Value |
---|---|
keyword | String |
countryId | Number (Default India related events) |
customDate | Date Time |
page | Number (Default 20 records) |
limit | Number ( Default 1) |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/developer/event/eventSearch |
Response Type | POST |
Response | "eventList": [ { "id": 94751, "title": "Manual Testing training", "thumbImage": "http://d6wad9g39si6z.cloudfront.net/content/eventlogo/94751/campus-thumbnail1460009284.jpg", "bannerImage": "http://d6wad9g39si6z.cloudfront.net/content/eventbanner/94751/campus-banner1460009284.jpg", "startDate": "2016-05-23 16:30:00", "endDate": "2016-05-23 17:30:00", "venueName": "Gachibowli Stadium", "eventUrl": "http://dev.meraevents.com/event/manual-testing-training", "categoryName": "Training", "categoryIcon": "", "themeColor": "#8c905e", "defaultBannerImage": "http://d6wad9g39si6z.cloudfront.net/content/categorylogo/training-banner1455801653.jpg", "defaultThumbImage": "http://d6wad9g39si6z.cloudfront.net/content/categorylogo/training-thumbnail1455801654.jpg", "registrationType": "paid", "timeZone": "IST", "bookMarked": 0, "cityName": "Hyderabad" } ], "page": 1, "limit": 12, "nextPage": false, "keyWord": "manual", "total": 1 }, "statusCode": 200 } |
Parameter Name | Parameter Value |
---|---|
eventId (*) | Number |
Request/Response | Description |
---|---|
Request URL | https://www.meraevents.com/developer/event/getEventDetails |
Response Type | POST |
Response | "response": { "messages": [], "total": 1, "details": { "id": 91896, "ownerId": 264325, "startDate": "2016-04-30 03:30:00", "endDate": "2016-05-14 02:30:00", "title": " Trek to Everest Base Camp", "description": " Everest Base Camp Trek |
$host='https://www.meraevents.com/resource/getEventList';
$token= YOUR_ACCESS_TOKEN_HERE;
$process = curl_init($host);
curl_setopt($process, CURLOPT_HEADER, 0);
curl_setopt($process, CURLOPT_TIMEOUT, 30);
curl_setopt($process, CURLOPT_POST, 1);
curl_setopt($process, CURLOPT_POSTFIELDS, 'access_token='.$token);
curl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);
$return = curl_exec($process);
curl_close($process);
print_r($return);