ver 1.0
2014/08/16
Start Over.
Before invoke any authorize require API function,we must have a access token using Signin Method.
authorize SOP:
- sign in.
- sign in function response the access token.
- client keep the access token for authorize require api funcitons.
http://xxx.com/api/v1/account/signin
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
String | - | NO |
||
password | String | - | NO |
{“success”:true,"errmsg",null,"data":{“token”:“abcd1234”}}
http://xxx.com/api/v1/account/signup
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
String | - | NO |
||
password | String | NO |
||
deviceType | Int | YES | ||
devicetoken | String | YES |
{“success”:true,"errmsg",null,"data":{“token”:“abcd1234”}}
When user submit his email,we send a forgot password guide email to THE email address and user should following the instruction to complete that.
http://xxx.com/api/v1/account/forgotpassword
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
String | - | NO |
{“success”:true,"errmsg",null,"data":{}}
http://xxx.com/api/v1/account/forgotpassword
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
String | - | NO |
{“success”:true,"errmsg",null,"data":{}}
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
String | - | NO |
||
createDate | DateTime | - | NO |
|
name | String | - | NO |
|
rank | unit | - | NO |
|
credit | uint | - | NO |
|
avator | String | - | YES | full path url |
{"name":"ward","email":"[email protected]","createdate","2014-08-08","rank":2,"credit":200,"avator":"http://xxx.com/xx.jpg"}
http://xxx.com/api/v1/account/getprofile
GET
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
String | - | NO |
{“success”:true,"errmsg",null,"data":{"name":"ward","email":"[email protected]","createdate","2014-08-08","rank":2,"credit":200,"avator":"http://xxx.com/xx.jpg"}}
http://xxx.com/api/v1/account/updateprofile
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
name | String | - | YES | |
String | - | NO |
{“success”:true,"errmsg",null,"data":{"name":"ward","email":"[email protected]","createdate","2014-08-08","rank":2,"credit":200,"avator":"http://xxx.com/xx.jpg"}}
http://xxx.com/api/v1/account/registerDeviceToken
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
devicetoken | String | - | NO |
{“success”:true,"errmsg",null,"data":{}}
We only have ONE shop for now
### Shop Object
### Get Shop
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
shopId | String | - | NO |
|
packageId | String | - | NO |
|
packageName | String | - | NO |
|
createDate | DateTime | - | NO |
|
price | Money | - | NO |
|
pages | uint | - | NO |
|
desc | String | - | NO |
|
images | String Array | - | NO |
aaa,bbb,ccc |
packagetype | uint | - | YES |
{"name":"ward","email":"[email protected]","createdate","2014-08-08","rank":2,"credit":200,"avator":"http://xxx.com/xx.jpg"}
http://xxx.com/api/v1/account/getPackages
GET
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
category | String | - | YES |
{“success”:true,"errmsg",null,"data":{"packages":{}}}
not avaliable in first release.
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
orderId | String | - | NO |
|
shopId | String | - | NO |
|
userId | String | - | NO |
|
createDate | DateTime | - | NO |
|
status | unit | - | NO |
|
amount | money | - | NO |
|
qty | uint | - | NO |
|
orderProducts | JSON Array | - | NO |
|
ordertype | uint | - | YES |
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
orderId | String | - | NO |
|
createDate | DateTime | - | NO |
|
status | unit | - | NO |
|
orderProductId | String | - | NO |
|
qty | uint | - | NO |
|
packageId | string | - | NO |
|
packageName | string | - | NO |
|
price | Money | - | NO |
{"name":"ward","email":"[email protected]","createdate","2014-08-08","rank":2,"credit":200,"avator":"http://xxx.com/xx.jpg"}
http://xxx.com/api/v1/account/getOrderList
GET
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
userId | String | - | NO |
|
startDate | String | - | YES | eg:2014-08-18 |
endDate | String | - | YES | eg:2014-08-20 |
status | unit | - | YES |
{“success”:true,"errmsg",null,"data":{"orders":{}}}
http://xxx.com/api/v1/account/getOrder
GET
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
userId | String | - | NO |
|
orderId | String | - | NO |
{“success”:true,"errmsg",null,"data":{}}
http://xxx.com/api/v1/account/cancelOrder
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
userId | String | - | NO |
|
orderId | String | - | NO |
{“success”:true,"errmsg",null,"data":{}}
http://xxx.com/api/v1/account/finishOrder
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
userId | String | - | NO |
|
orderId | String | - | NO |
{“success”:true,"errmsg",null,"data":{}}
Open a browser with the URL value in response json object for 3rd part online pay service step.
http://xxx.com/api/v1/account/payOrder
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
userId | String | - | NO |
|
orderId | String | - | NO |
{“success”:true,"errmsg",null,"data":{""payment":{"url":"http://m.alipay.com/xxx"}}}
http://xxx.com/api/v1/account/refondOrder
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
userId | String | - | NO |
|
orderId | String | - | NO |
{“success”:true,"errmsg",null,"data":{}}
http://xxx.com/api/v1/account/uploadPhoto
POST
JSON
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
token | String | - | NO |
|
String | - | NO |
||
localfilename | String | - | NO |
|
file | Stream | - | NO |
|
orderid | String | - | NO |
{“success”:true,"errmsg",null,"data":{"url":"http://xxx.com/abc.jpg","contentlength":2000}}
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
photoBookId | String | - | NO |
|
shopId | String | - | NO |
|
authorId | String | - | NO |
|
createDate | DateTime | - | NO |
|
status | uint | - | NO |
|
name | String | - | NO |
|
packageId | String | - | NO |
|
minPages | uint | - | NO |
|
maxPages | uint | - | NO |
|
size | String | - | NO |
|
category | String | - | NO |
|
style | String | - | NO |
|
coverImageUrl | String | - | NO |
|
previewVideoUrl | String | - | NO |
|
desc | String | - | NO |
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
pageStyleId | String | - | NO |
|
createDate | DateTime | - | NO |
|
status | uint | - | NO |
|
photoBookId | String | - | NO |
|
photoCount | uint | - | NO |
|
imageUrl | string | - | NO |
|
backendImageUrl | string | - | NO |
|
width | uint | - | NO |
|
height | uint | - | NO |
{"name":"ward","email":"[email protected]","createdate","2014-08-08","rank":2,"credit":200,"avator":"http://xxx.com/xx.jpg"}
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
userProjectId | String | - | NO |
|
photoBookId | String | - | NO |
|
shopId | String | - | NO |
|
userId | String | - | NO |
|
createDate | DateTime | - | NO |
|
lastUpdateDate | DateTime | - | NO |
|
status | uint | - | NO |
|
name | String | - | NO |
|
packageId | String | - | NO |
|
photoBookId | String | - | NO |
|
photoCount | uint | - | NO |
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
pageStyleId | String | - | NO |
|
pageId | String | - | NO |
|
createDate | DateTime | - | NO |
|
status | uint | - | NO |
|
photoCountRequire | uint | - | NO |
|
photoCount | uint | - | NO |
Prama | Type | Range | Nullable | Desc |
---|---|---|---|---|
photoId | String | - | NO |
|
userId | String | - | NO |
|
userProjectId | String | - | NO |
|
pageId | String | - | NO |
|
createDate | DateTime | - | NO |
|
status | uint | - | NO |
|
top | uint | - | NO |
|
left | uint | - | NO |
|
zoom | single | - | NO |
|
rotationAngle | single | - | NO |
{"name":"ward","email":"[email protected]","createdate","2014-08-08","rank":2,"credit":200,"avator":"http://xxx.com/xx.jpg"}