Friendi App 1.0
Friendi App 1.0
Friendi App 1.0
Category Offers 11
Get Offers
A list of active offers will be provided which are added to the Roam system. This can be
managed from the Roam System. 11
Request Parameter 11
Response Parameter 11
Offer Details:
This service will be called to fetch offer details. 13
Request Parameter 13
Response Parameter 14
Get Favorite Offer:
This service will be called to fetch user favourite offers. 16
Request parameter 16
Response Parameter 17
Get Nearby Offers:
This service will be called to fetch offers nearby user location. 19
Request parameter 19
Response Parameter 19
Search Offers:
This service will be called to search the offers and get the offers. 20
Request parameter 20
Response Parameter 20
Get Coupon Details:
This service will be called to fetch coupon details. 22
Request parameter 22
Response Parameter 23
Voucher Redeem:
This service will be called to redeem the voucher. 24
Request parameter 24
Response Parameter 24
Get Country List:
This service will be called to fetch a country list. 25
Request parameter 25
Response Parameter 25
Add Offer Rating and Review:
This service will be called to add an offer rating and review. 26
Request parameter 26
Response Parameter 27
Abbreviations 28
Conventions 28
Status Codes 28
Technology Stack for Web API
Database MYSQL
POST {{baseurl}}/?xAction=getDashboardData
200 {
"count":"1",
"msg":"Dashboard data send successfully.",
"categoryData":[
{
"offerCategoryID":"6",
"categoryID":"6",
"categoryTitle":"Category Title",
"categoryImage":"Category Image URL"
}
],
"homesliderData":[
{
"sliderID":"9",
"sliderTitle":"slide Title",
"sliderImage":"slider Image URL",
"redirectPageID":"55",
}
],
"popularOffers":[
{
"isDelivery":"1",
"isDeliveryText":"Delivery",
"favStatus":0,
"merchantName":"Max Vision LLC",
"offerID":"1386",
"merchantID":"3915",
"outletID":"3916,3917,3918",
"offerCategoryID":"25",
"tncID":"411",
"offerTitle":"Offer Title",
"offerTagline":"Offer Tagline",
"offerDesc":"Offer Description",
"offerFromDate":"Offer From Date",
"offerToDate":"Offer To Date",
"offerImage":"Offer Image URl",
"offerListingImage":"Offer ListingImage URl",
"popularImage":"Popular Image",
"discountValue":"33",
"estimatedSaving":"61",
"downloadLimit":"",
"couponCodeQty":"",
"isPopular":"1",
"estimatedSavingText":"Est. Savings - AED 61",
"avgRating":"3.3",
"searchTags":"Optical, eyetest",
"minDistance":"1967.48 Km"
}
],
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "Dashboard data sending failed.
"
}
Different validation errors will return as an "msg" parameter.
POST {{baseurl}}/?xAction=getMyVoucherList
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"data": [ ],
"count": 0,
"msg": "No record found."
}
Different validation errors will return as an "msg" parameter.
POST {{baseurl}}/?xAction=totalSavings
200 {
"data": [
{
"categoryTitle": "Category Title",
"categoryImage": "Category Image URL",
"saving": 0
}
],
"count": 1,
"msg": " Total savings data fetched successfully.",
"totalSavings": 0
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"data": [],
"count": 0,
"msg": "No total savings found."
}
Different validation errors will return as an "msg" parameter.
200 {
"count": 1,
"msg": "Your Feedback has been submitted successfully."
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "Error in saving feedback."
}
Different validation errors will return as an "msg" parameter.
200 {
"count": 1,
"msg": "Offer is added in favourite\list."
}
{
"count": 1,
"msg": "Lumiere Coffee has been removed from your favourite.",
"data": [
{
"offerID": "861",
"userID": "1",
"favStatus": 0
}
]
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "Error in adding offer to favourite\list."
}
Different validation errors will return as an "msg" parameter.
2. Category Offers
POST {{baseurl}}/?xAction=getOffers
200 {
"count":208,
"data":[
{
"isAppMenu":"0",
"isDelivery":"1",
"isDeliveryText":"Take Away",
"displayOrder":"0",
"searchTags":"Optical, eyetest",
"offerID":"1388",
"favStatus":0,
"enableLaunchTag":"0",
"offerDesc":"offerDesc",
"launchTag":"",
"isInformative":"0",
"merchantID":"3915",
"outletID":"3916,3917,3918",
"offerCategoryID":"25",
"tncID":"411",
"offerTitle":"Offer Title",
"offerTagline":"Offer Tagline",
"offerFromDate":"01-01-1970",
"offerToDate":"01-01-1970",
"offerImage":"offerImage",
"offerListingImage":"offerImage",
"discountValue":0,
"estimatedSaving":"700",
"estimatedSavingText":"estimatedSavingText",
"downloadLimit":"",
"couponCodeQty":"",
"isPercentage":"0",
"isFeatured":"0",
"isActive":"1",
"status":"1",
"offerDetailTemplate":"0",
"offerBannerTitleOne":"",
"offerBannerTitleTwo":"",
"merchantName":"Max Vision LLC",
"merchantImage":"merchantImage",
"merchantDescription":"",
"avgRating":"4.5",
"searchString":"searchString",
"minDistance":"1967.48 Km",
"location":null,
"offerImageArr":[
"offerImage"
],
"tncDescription":"tncDescription"
},
],
"categoryData": [
{
"offerCategoryID": "1",
"categoryID": "1",
"categoryTitle": "Category title 1",
}
],
"categoryFilterData": [
{
"catFilterID": "16",
"filterTitle": ""
}
],
"sortData": [
{
"1": "Highest to Lowest Discount",
"2": "Lowest to Highest Discount",
"3": "Distance",
"4": "Buy 1 Get 1 Offers"
}
],
"msg":"Fetching data from offer is completed successfully."
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "No data found."
}
POST {{baseurl}}/?xAction=getCategoryOfferDetails
Type Params Values
200 {
"count":1,
"msg":"Fetching data from offer is completed successfully.",
"relatedOffers":[
{
"isAppMenu":"0",
"isDelivery":"1",
"isDeliveryText":"Take Away",
"displayOrder":"0",
"searchTags":"Optical, eyetest",
"offerID":"1388",
"favStatus":0,
"enableLaunchTag":"0",
"offerDesc":"offerDesc",
"launchTag":"",
"isInformative":"0",
"merchantID":"3915",
"outletID":"3916,3917,3918",
"offerCategoryID":"25",
"tncID":"411",
"offerTitle":"Offer Title",
"offerTagline":"Offer Tagline",
"offerFromDate":"01-01-1970",
"offerToDate":"01-01-1970",
"offerImage":"offerImage",
"offerListingImage":"offerImage",
"discountValue":0,
"estimatedSaving":"700",
"estimatedSavingText":"estimatedSavingText",
"downloadLimit":"",
"couponCodeQty":"",
"isPercentage":"0",
"isFeatured":"0",
"isActive":"1",
"status":"1",
"offerDetailTemplate":"0",
"offerBannerTitleOne":"",
"offerBannerTitleTwo":"",
"merchantName":"Max Vision LLC",
"merchantImage":"merchantImage",
"merchantDescription":"",
"avgRating":"4.5",
"searchString":"searchString",
"minDistance":"1967.48 Km",
"location":null,
"offerImageArr":[
"offerImage"
],
"tncDescription":"tncDescription"
},
],
"data":[
{
"offer object":"offer object",
"location":[
{
"otherDescription":"",
"outletTitle":"Outlet Title",
"outletContactNo":[
{
"contactNo":"contactNo"
}
],
"outletAddress":"Outlet Address",
"latitude":"latitude",
"longitude":"longitude",
"distance":"1967.48 Km",
"outletImage":"outletImage"
},
],
"offerImageArr":[
"offerImage"
],
"tncDescription":"tncDescription"
}
],
"menuImages":[
"menuImages"
],
"popUpMenuImages":[
{
"url":"popUpMenuImages"
}
],
"isAppMenu":0,
"reviewRating":[
{
"offerID":"offerID",
"reviewRatingID":"reviewRatingID",
"userID":"userID",
"dateAdded":"dateAdded",
"rating":rating,
"review":"review",
"offerTitle":"Offer Title",
"merchantName":"Merchant Name",
"userName":"User Name"
}
],
"isReviewSubmit":0
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "No data found."
}
Different validation errors will return as an "msg" parameter.
POST {{baseurl}}/?xAction=getFavouriteOffer
Type Params Values
200 {
"count": 1,
"msg": "Data fetched successfully.",
"data": [
{
"isAppMenu": "0",
"isDelivery": "0",
"isDeliveryText": "",
"displayOrder": "1102",
"searchTags": "",
"offerID": "682",
"favStatus": "1",
"enableLaunchTag": "0",
"offerDesc": "",
"launchTag": "",
"isInformative": "0",
"merchantID": "669",
"outletID": "outletID",
"offerCategoryID": "3",
"tncID": "0",
"offerTitle": "HOSPITAL UAE",
"offerTagline": "",
"offerFromDate": "01-01-1970",
"offerToDate": "01-01-1970",
"offerImage": "offerImage",
"offerListingImage": "offerListingImage",
"discountValue": 0,
"estimatedSaving": "",
"estimatedSavingText": "",
"downloadLimit": "",
"couponCodeQty": "",
"isPercentage": "0",
"isFeatured": "0",
"isActive": "1",
"status": "1",
"offerDetailTemplate": "1",
"offerBannerTitleOne": "",
"offerBannerTitleTwo": "",
"merchantName": "Hospitals UAE ",
"merchantImage": "merchantImage",
"merchantDescription": "",
"avgRating": "0.0",
"searchString": "",
"minDistance": "1873.69 Km",
"location": null,
"offerImageArr": [
"hofferImage"
],
"tncDescription": ""
}
]
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "No data found."
}
Different validation errors will return as an "msg" parameter.
200 {
"data": [
{
"offerDetails": [
{
"offerID": "offerID",
"offerTitle": "Offer Title",
"offerTagline": "offer Tagline"
}
],
"outletData": {
"outletName": "Outlet Name",
"outletAddress": "Outlet Address",
"latitude": "latitude",
"longitude": "longitude",
"minDistance": "minDistance",
"merchantName": "Merchant Name",
"merchantImage": "Merchant Image URl"
}
}
]
}
800 {
"count": 0,
"msg": "Please allow location permission."
}
Different validation errors will return as an "msg" parameter.
POST {{baseurl}}/?xAction=searchOffers
200 {
"count":1,
"msg":"Search details.",
"data":[
{
"offerDesc":"Offer Desc",
"merchantID":"607",
"offerCategoryID":"6",
"offerTitle":"Offer Title",
"offerTagline":"Offer Tagline",
"offerFromDate":"Offer From Date",
"offerToDate":"Offer To Date",
"offerImage":"Offer Image URl",
"offerListingImage":"Offer Listing Image ˇ",
"discountValue":0,
"estimatedSaving":"10",
"estimatedSavingText":"",
"couponCodeQty":"",
"offerDetailTemplate":"0",
"offerBannerTitleOne":"",
"offerBannerTitleTwo":"",
"merchantName":"Merchant Name",
"merchantImage":"Merchant Image URl",
"merchantDescription":"Merchant Description",
"avgRating":"0.0",
"searchString":"special",
"minDistance":"1992.37 Km",
"location":location,
"offerImageArr":[
"Offer Image URl"
],
"tncDescription":"terms & conditions"
}
}
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "Search result not found !"
}
Different validation errors will return as an "msg" parameter.
2.6. Get Coupon Details:
This service will be called to fetch coupon details.
POST {{baseurl}}/?xAction=getAppVoucher
200 {
"data": [
{
"couponGenerationType": "1",
"offerTitle": "Offer Title",
"offerToDate": "Offer To Date",
"merchantPin": "Merchant Pin",
"userID": "userID",
"merchantName": "Merchant Name",
"merchantImage": "Merchant Image",
"couponCode": "Coupon Code",
"barCode": "Coupon BarCode image"
}
],
"count": 1,
"msg": "Coupon generated successfully."
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"data": [ ],
"count": 0,
"msg": "No data found."
}
Different validation errors will return as an "msg" parameter.
2.7. Voucher Redeem:
This service will be called to redeem the voucher.
POST {{baseurl}}/?xAction=appVoucherRedeem
200 {
"data": [ ],
"count": 0,
"msg": "Your voucher has been redeemed successfully."
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"data": [ ],
"count": 0,
"msg": "Coupon code already used."
}
{
"data": [],
"count": 0,
"msg": "Please enter a valid outlet pin."
}
Different validation errors will return as an "msg" parameter.
POST {{baseurl}}/?xAction=getCountryList
200 {
"count": 1,
"msg": "Country fetched successfully!!",
"data": [
{
"countryID": "1",
"countryName": "Country Name",
"countryCode": "Country Code",
"isdCode": "93",
"countryImage": "Country Image URL"
}
]
}
401 {"error":"Bad request: API key is missing."}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"data": [ ],
"count": 0,
"msg": "Something went wrong!!"
}
Different validation errors will return as an "msg" parameter.
POST {{baseurl}}/?xAction=addReviewRating
200 {
"count": 1,
"msg": "Review and rating added successfully."
}
403 {"error":"Forbidden Error: You don’t have access for this request."}
800 {
"count": 0,
"msg": "Error in adding review and rating.”
}
Different validation errors will return as an "msg" parameter.
Glossary
Abbreviations
● Roam Offers System: Roam Offers backend
● Roam Offers App: Roam Offers app
● User: End Consumer
● Status: HTTP status code of response.
Conventions
● All the possible responses are listed under ‘Responses’ for each method. Only one of them
is issued per request server.
● All responses are in JSON format.
● All request parameters are mandatory unless explicitly mentioned in the description.
● Integer will accept only numbers, not strings
Status Codes
All status codes are standard HTTP status codes. The below ones are used in this API.
200 Success