Skip to content
Insane edited this page Sep 9, 2015 · 1 revision

1. GET /kindergarten/:kg/relationship

parameters:

parent: return relationships of the parent who owns given phone number

child: return relationships of the child who has the given child_id

class_id: return relationships of the child who study in the given class

json response:

[
{"parent":{"parent_id":"2_93740362_456","school_id":93740362,"name":"林玄","phone":"13880498549","portrait":"","gender":1,"birthday":"1800-01-01","timestamp":0,"member_status":1,"status":1,"company":"4455hhyh"},
"child":{"child_id":"1_93740362_456","name":"李小华","nick":"小苹果","birthday":"2008-09-09","gender":0,"portrait":"","class_id":777999,"class_name":"香蕉班","timestamp":1387649057933,"school_id":93740362},"card":"0001234568","relationship":"妈妈"},
{"parent":{"parent_id":"2_93740362_789","school_id":93740362,"name":"袋鼠","phone":"13408654680","portrait":"","gender":0,"birthday":"1800-01-01","timestamp":0,"member_status":1,"status":1,"company":"门口偶"},
"child":{"child_id":"1_1391836223533","name":"张光","nick":"大苹果","birthday":"2007-06-04","gender":1,"portrait":"http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg","class_id":777888,"class_name":"苹果班","timestamp":1387360036,"school_id":93740362},"card":"0001234567","relationship":"妈妈"}
]

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

json response:

{"parent":{"parent_id":"2_93740362_789","school_id":93740362,"name":"袋鼠","phone":"13408654680","portrait":"","gender":0,"birthday":"1800-01-01","timestamp":0,"member_status":1,"status":1,"company":"门口偶"},"child":{"child_id":"1_1391836223533","name":"张光","nick":"大苹果","birthday":"2007-06-04","gender":1,"portrait":"http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg","class_id":777888,"class_name":"苹果班","timestamp":1387360036,"school_id":93740362},"card":"0001234567","relationship":"妈妈"}

3. POST /kindergarten/:kg/relationship/:card

create new card for particular relationship with a new card number,

or update an exists one if the card number exists

request payload:

{"relationship": "爷爷", "parent": {"phone": "13880498549"},
"child": {"child_id":"1_93740362_374"}}

json response:

{"parent":{"parent_id":"2_93740362_456","school_id":93740362,"name":"林玄","phone":"13880498549","portrait":"","gender":1,"birthday":"1800-01-01","timestamp":0,"member_status":1,"status":1,"company":"4455hhyh"},
"child":{"child_id":"1_93740362_456","name":"李小华","nick":"小苹果","birthday":"2008-09-09","gender":0,"portrait":"","class_id":777999,"class_name":"香蕉班","timestamp":1387649057933,"school_id":93740362},"card":"0001234568","relationship":"妈妈"}

4. DELETE /kindergarten/:kg/relationship/:card

response: 1

Clone this wiki locally