Add students to the class(multiple)

Need SID, safekey, timeStamp, course ID, class ID, student identification (1 is student) ,whether to need to register (0 is not registered, 1 is registration), your account of the need to add an array, including student accounts,Custom identification, student's name and password (if you don't fill in, new registered user password defaults to 123456, the registered password will not change). The return is a description of each account added. Note: no audit can be added to the class.

URL

https://api.eeo.cn/partner/api/course.api.php?action=addClassStudentMultiple

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
classId Yes Null Class ID Null
identity Yes Null Students identify(1 for the students) Null
isRegister No Null Automatic registration(0 is not registered,1 is Automatic registration) Null
studentJson Yes Null You need to add an account array Null
└ Student 1 account information object Yes Null You need to add student information objects Null
  └ uid Yes NULL student UID Register the user UID returned by the user interface
  └ name Yes Null Student name Null
  └ customColumn No 1-50 words,No distinction between Chinese and English,More than 50 will automatically intercept 50 words User custom identity Do not return as empty,The field is not returned for empty
└ Student 2 account information object Yes Null You need to add student information objects Null
  └ uid Yes NULL student UID Register the user UID returned by the user interface
  └ name Yes Null Student name Null
  └ customColumn No 1-50 words,No distinction between Chinese and English,More than 50 will automatically intercept 50 words User custom identity Do not return as empty,The field is not returned for empty
└ ······ Yes Null You need to add student information objects Null
  └ uid Yes NULL student UID Register the user UID returned by the user interface
  └ name Yes Null Student name Null
  └ customColumn No 1-50 words,No distinction between Chinese and English,More than 50 will automatically intercept 50 words User custom identity Do not return as empty,The field is not returned for empty

Response parameters

key Type Sample value meaning
data array [] Returns an array of Data information
└ data Return information1 object Return message object
  └ errno number 1 Error code
  └ error string "Normal execution" Error list
└ data Return information2 object Return message object
  └ errno number 1 The 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=addClassStudentMultiple HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=a82c69dc799d6520e631f07f69ac6c96&timeStamp=1493726450&courseId=523689&classId=1419691&identity=1&studentJson=[{"uid":"1001001","name":"小丫","password":"123456","customColumn":123},{"uid":"1001002","name":"小白","password":"123456","customColumn":123}]
  • 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=442447 " \
        -d "classId=23456" \
        -d "identity=1" \
        -d "isRegister=1" \
        -d 'studentJson = \
        [ \
              { \
                "uid":"1001011", \
                "name":"学生1", \
                "password":"123456" \
              }, \
              { \
                "uid":"1001001", \
                "name":"学生2", \
                "password":"123456" \
              } \
        ]' \
        "https://api.eeo.cn/partner/api/course.api.php?action=addClassStudentMultiple"

Response sample(The normal return json packet example)

{
  "data": [
    {
      "customColumn": "123",
      "errno": 1,
      "error": "程序正常执行"
    },
    {
      "customColumn": "123",
      "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 Mobile phone number is not registered.
114 Expression server exception.
125 Expression student phone number is illegal.
128 Expression The institution account cannot be added to the student.
129 Expression teacher accounts cannot be added to students.
131 Expression registration failed.
142 Expression this course does not have this section information.
143 Expression Cell phone number is illegal.
144 Expression there is no information about this section.
145 Expression the class is over.
155 Expression the student array must not be empty.
157 Expression the number of students is out of class.
158 Expression the add students failed in the class.
159 Expression at this time, only students are supported.
164 Expression the same phone number already exists in the course.
166 Expression there are already students on the same phone number.
212 Expression this section has been deleted.
288 Expression this account is illegal.
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.

results matching ""

    No results matching ""