Students are added to the class section
deprecated
Add students for multiple classes under the course, need SID, safekey, timeStamp, course ID, student account, student name, class array (required class ID).The data returned includes a post-execution note for each lesson.
URL
https://api.eeo.cn/partner/api/course.api.php?action=addCourseClassStudent
HTTP Request Methods
- POST
Coding format
- UTF-8
Request data
key | Required | More Restrictions | Instructions | Description |
---|---|---|---|---|
SID | Yes | Null | School ID | It is available through the eeo.cn application |
safeKey | Yes | Fixed 32-bit all lowercase characters | School authentication security key | safeKey=MD5(SECRET+timeStamp) |
timeStamp | Yes | Null | Imestamp used by safeKey | Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970 |
courseId | Yes | Null | Course ID | Null |
studentAccount | No | To be deprecated at 1st May. Format: 00 country number - mobile phone number; note: mobile phone Numbers in mainland China do not include country .Either studentUid or studentUid. If studentAccount is passed to studentUid at the same time, the studentUid parameter shall prevail | Student account | For example: us mobile phone number 1 (800) 643-7676 filled 001-8006437676;The phone number of mainland China is 15800000001 |
studentUid | No | Either studentAccount(Deprecated at 1st May) or studentAccount. If studentUid is passed to studentAccount at the same time, the studentUid parameter shall prevail | Students in the UID | Register the user UID returned by the user interface |
studentName | Yes | Null | Student name | Null |
classJson | Yes | Null | Class ID Array | Null |
└ ID of class 1 | Yes | Null | Class ID | Null |
└ ID of class 2 | No | Null | Class ID | Null |
└ ······ | No | Null | Class ID | Null |
Response data
Key | Type | Sample value | meaning |
---|---|---|---|
data | array | [] | Returns an array of Data information |
└ data return information 1 | object | Return message object | |
└ errno | number | 1 | Error code |
└ error | string | "Normal execution" | Error list |
└ data return message 2 | object | return message object | |
└ errno | number | 1 | Error code |
└ error | string | "Normal execution" | Error list |
└ ······ | object | return message object | |
└ errno | number | ··· | Error code |
└ error | string | ··· | Error list |
error_info | object | return message object | |
└ errno | number | 1 | Error code |
└ error | string | "Normal execution" | Error list |
Sample
- HTTP request
POST /partner/api/course.api.php?action=addCourseClassStudent HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=dcbc0d041c043f3a4decabe6d24e61dd&timeStamp=1493712683&courseId=490583&studentUid=1001001&studentName=Jeck&classJson=[1395045,1395044,1395043]
Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \ -d "SID=1234567" \ -d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \ -d "timeStamp=1484719085" \ -d "courseId=123456" \ -d "studentUid=1001001" \ -d "studentName=小红" \ -d "classJson=[1212131,1212123]" \ "https://api.eeo.cn/partner/api/course.api.php?action=addCourseClassStudent"
Response sample(The normal return json
packet example)
{
"data": [
{
"errno": 1,
"error": "程序正常执行"
}
],
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
Error code instruction
Error code | Instruction |
---|---|
1 | Expression successful execution. |
100 | Expression parameter not all or error. |
102 | Expression dont have permissions(Security verification failed). |
113 | Expression the mobile phone account is not registered. |
114 | Expression server exception. |
128 | Expression The school account cannot be added as a student. |
129 | Expression teacher accounts cannot be added to students. |
134 | Expression cell phone number is illegal. |
142 | Expression this course does not have this section information. |
144 | Expression no such course information. |
145 | Expression the class is over. |
149 | Expression courses have been deleted. |
153 | Expression the course has expired. |
155 | Expression the student array must not be empty. |
157 | Expression the number of students is out of class. |
158 | Expression the students failed in the class. |
164 | Expression in the course, there is an audit of the same phone number. |
166 | Expression there are already students on the same phone number. |
212 | Expression this section has been deleted. |
332 | Expression the course teacher or assistant can not be added to the course student or audit. |
333 | Expression the head teacher cannot be added as a course student. |
369 | Expression open class does not support this operation. |
400 | Indicates that the request data is not valid |