Skip to content

Example of creating new school

Insane edited this page Sep 9, 2015 · 1 revision

URL: https://www.cocobabys.com/kindergarten/12345679

JSON:

{
"school_id": 12345679, 
"phone": "12391111111",
"timestamp": 0,
"desc": "学校描述",
"school_logo_url": "学校图片",
"name": "学校名称"
}

URL: https://www.cocobabys.com/kindergarten/12345679/class

JSON:

{"school_id":12345679,"class_id":12,"name":"希腊神话班"}
{"school_id":12345679,"class_id":14,"name":"北欧神话班"}
{"school_id":12345679,"class_id":27,"name":"东方神话班"}

URL: https://www.cocobabys.com/kindergarten/12345679/child

JSON:

{"school_id":17345671,"class_id":12,"child_id":"2_17345671_7","name":"陈富贵","nick":"陈123","gender":1,"birthday":"2007-09-08","portrait":"","address":"aabb","memo":""}
{"school_id":17345671,"class_id":27,"child_id":"2_17345671_113","name":"张二喜","nick":"2b","gender":1,"birthday":"2007-08-18","portrait":"","address":"a2","memo":"b2"}
{"school_id":17345671,"class_id":14,"child_id":"2_17345671_89","name":"王小茂","nick":"王王","gender":0,"birthday":"2008-01-15","portrait":"","address":"a1","memo":"b1"}

URL: https://www.cocobabys.com/kindergarten/12345679/parent

JSON:

{"school_id":17345671,"parent_id":"1_17345671_112","name":"小郭","gender":1,"phone":"13399998888","telephone":"028-77665543","birthday":"1979-08-08","company":"tttt","social_id":"310987654321456567","portrait":"","memo":"bb"}
{"school_id":17345671,"parent_id":"1_17345671_113","name":"二狗","gender":1,"phone":"13356754678","telephone":"","birthday":"1979-03-03","company":"5564","social_id":"618987654325678954","portrait":"","memo":"cc"}
{"school_id":17345671,"parent_id":"1_17345671_114","name":"小郭","gender":1,"phone":"13399998889","telephone":"028-77665543","birthday":"1979-08-08","company":"tttt","social_id":"310987654321456567","portrait":"","memo":"bb"}

URL1: https://www.cocobabys.com/kindergarten/12345679/relationship/0001234567

JSON:

{"relationship": "爷爷", "parent": {"phone": "13112345678"}, "child": {"child_id":"2_17345671_7"}}

URL2: https://www.cocobabys.com/kindergarten/12345679/relationship/0011234568

JSON:

{"relationship": "爸爸", "parent": {"phone": "13899998888"}, "child": {"child_id":"2_17345671_113"}}

URL3: https://www.cocobabys.com/kindergarten/12345679/relationship/0021234569

JSON:

{"relationship": "妈妈", "parent": {"phone": "88856754678"}, "child": {"child_id":"2_17345671_89"}}

URL:https://www.cocobabys.com/kindergarten/12345679/employee/13258249821

JSON:

{
"id":"3_93740362_1122",
"name":"刘老师",
"phone":"13258249821",
"gender":0,
"workgroup":"教师组",
"workduty":"教师",
"birthday":"1986-06-04",
"school_id":12345679,
"login_name":"e0001"
}

Notes:

  1. child's id 从create child的返回中获取

  2. relationship, card_number不是随parents传入,而是随关系传入。

  3. 所有单词为小写,词之间用下划线_分割

  4. 接口描述中的必选字段不可忽略,且value类型必须正确(即:字符串有引号,数字没有引号),否则返回值都是400

  5. 老师的id,phone,login_name必须全局唯一,创建后的老师默认密码暂时与用户名相同,后续会改为和手机号相同。

Clone this wiki locally