Skip to content
markzhai edited this page Sep 28, 2016 · 2 revisions

Welcome to the PetLoverDoc wiki!

PetLover API document

API Address

http://zhaiyifan.cn:8080

develop environment

http://zhaiyifan.cn:8080

release environment

http://zhaiyifan.cn:8080

Http Request Header

name type description
APP-ID String iOS: 1,Android: 2
APP-VERSION String App version code
TOKEN String user token
NETWORK String network 4G/3G/2G/WIFI/UNKNOWN
SCREEN-SCALE String CDN Picture scale 1/2/3
SCREEN-WIDTH String screen width (dp)
SCREEN-HEIGHT String screen height (dp)
Accept-Language String in en/zh/ja

Global Response Format

name type description
statusCode int status code
statusMessage String status message
data Object response data object
time long response time

Global Status Code

name type 类型
-1 common exception description by status_msg 普通异常,见status_msg描述
-1000 token invalid, need login token失效,需要去登录
-1001 repeat login or register 重复登录或注册
-1010 Need perfect user profile 需要去完善个人信息
-1020 bind username from third login 从第三方登录需要绑定账号
-9990 APP-ID invalid in http request header APP-ID 在http请求头中不是有效的值
-9999 data decode error 数据解密错误
-999 unknown error 未知错误
-404 target not found 请求目标不存在

Clone this wiki locally