We need several JSON services developed that will be consumed by our Android Application. This will be the foundation of a much larger web administrative application, and must be clean structured code and well documented.
The JSON Services must include services for retrieving Users and Merchant information. These services must be secured via a private token only known to our Android application. They will also need to include the data access routines, created in a such a way that will will later be able to layer our JSP pages on top re-using the same objects.
## Deliverables
User and Merchant table structure will be provided, but is fairly simple, as the majority of the information comes from other services (Facebook and Google Places). Mostly these tables will include the keys into those services, and a few other fields we need to supplement with. We also want a several merchant services that redirect (302) to merhcant images, for logo and possible ads. These could also be returned as part of the merchant JSON, but I think I like them separated better.
UPDATED INFO:
I worked through some more detail on the services based on some of the questions we have received. The backend will be Java / Tomcat / MySQL. I have not designed out the tables, that should be part of the requirements proposal. Here's more detail on what I am thinking the JSON, but I am by no means and expert and expect the coder to fill in the gaps.
User Info Requests:
[https://baseurl/user?userid=<user_id][1]> OR
[https://baseurl/user?facebookid=<facebook_id][2]>
1) Return the JSON similar to:
{
“user_id??: 12344,
“facebook_id??: 3123122,
“gender??: “male??,
“settings??: [ {
“time_zone??: ??"5,
“auto_checkin??: “true??
} ],
“favorites??: [ {
“category_id??: 3434,
“category_name??: “Pizza??,
“merchant_id??: 234234,
“merchant_name??: “Pizza Hut??,
“points??: 12,
“last_visit??: “10/10/2010 22:10??
}, {
“category_id??: 3445,
“category_name??: “Fast Food??,
“merchant_id??: 234235,
“merchant_name??: “McDonalds??,
“points??: 14,
“last_visit??: “10/10/2010??
}, {
“category_id??: 4564,
“category_name??: “Video Games??,
“merchant_id??: 244235,
“merchant_name??: “Gamestop??,
“points??: 24,
“last_visit??: “10/10/2010??
} ]
}
User Info Login:
[https://baseurl/user/login?userid=<user_id>&location=<long,lat][3]> OR
[https://baseurl/user/login?facebookid=<facebook_id>&location=<long,lat][4]>
1) Return JSON as above.
2) Add row to login tracking table with login, timestamp, location
User Info Checkin:
[https://baseurl/user/checkin?userid=<user_id>&merchant_id=<merchant_id][5]>
1) Update merchant record setting last_visit to today.
Update User Info:
[https://baseurl/user/update?userid=<user_id][6]>
1) Update user info, not sure of format, probably some data in POST. A couple items not in return data.
Update User Favorite:
[https://baseurl/user/favorite?userid=<user_id>&category=<category_id][7]>
1) Update user favorite, not sure of format, probably some data in POST.
Merchant Info Requests:
[https://baseurl/merchant?merchantid=<merchant_id][8]>
[https://baseurl/merchant?placesref=<ref_id][9]>
1) Return the JSON similar to:
{
“merchant_id??: 12344,
??merchant_name??: “Pizza Hut??,
??website??: “url??,
“has_ads": true
“stores??: [ {
“places_reference??: “123BF334A??,
}, {
“places_reference??: “455BF334A??,
} ]
}
Merchant Logo:
[https://baseurl/merchant/logo?merchantid=<merchant_id][10]>
1) Redirect to image of logo.
Merchant Ad:
[https://baseurl/merchant/ad?merchantid=<merchant_id][11]>
1) Redirect to RANDOM ad image for merchant.
## Platform
Java / Tomcat / MySQL