Skip to content

Check in and out push notification

Insane edited this page Sep 9, 2015 · 1 revision

1. POST /kindergarten/:kg/check

request payload: {"school_id": 93740362, "card_no": "1231311312", "card_type": 2, "notice_type": 1, "record_url": "http://url.com", "timestamp": 212312312312}

comments: card_type只有2, notice_type:1是入园,0是离园

json response: {"error_code":0}

2. GET /kindergarten/:kg/card/:cardId

json response: {"card_id":"0001234567","phone":"13402815317"}

3. GET /kindergarten/:kg/card

json response: [{"card_id":"0001234567","phone":"13402815317"},{"card_id":"0001234568","phone":"13880498549"}]

4. GET /kindergarten/:kg/child/:childId/dailylog

parameter: from,to,most

*** example: https://www.cocobabys.com/kindergarten/93740362/child/1_93740362_374/dailylog ***

json response:

[
{"timestamp":1393766772899,"notice_type":1,"child_id":"1_93740362_374","pushid":"815206836867002199",
"record_url":"http://suoqin-test.u.qiniudn.com/FoUJaV4r5L0bM0414mGWEIuCLEdL","parent_name":"林玄","device":3},
{"timestamp":1393766769865,"notice_type":0,"child_id":"1_93740362_374","pushid":"815206836867002199",
"record_url":"http://suoqin-test.u.qiniudn.com/FoUJaV4r5L0bM0414mGWEIuCLEdL","parent_name":"林玄","device":3}
]

device 3 means Android, 4 means iOS

Clone this wiki locally