Students and attend are added to the course(multiple)

Add student/audit (multiple) under the course, requiring SID, safekey, timeStamp, course ID, student or audit identification,Whether automatic registration is required (0 is not registered, 1 is registered),An array of student or audit accounts to be added, including the account number and account name for each account, with an optional password (the registered password will not change),Unregistered password default is 123456), student/audit UID.Returns the added details for each account。The user can pass custom fields and the interface will return the parameters as they are。No pass, no return。Students added under the course can take all classes under the course。note: the default number of auditors can be added to 20.

URL

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

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
identity Yes Null Student and audit identification(1 is student,2 is attend) Null
studentJson Yes A maximum of 20 people can be added to the audit An array of accounts to be added Null
└ Student 1 account information Yes Null Need to add student account information Null
  └ account No To be deprecated at 1st May!Please use uid. Format: 00 country number - mobile phone number;note: China's mobile phone number does not include the country number, and the first mobile phone number cannot be 0。If the account and uid are both passed at the same time, the uid 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
  └ 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
  └ uid No If the uid and account are both passed at the same time, the uid parameter shall prevail Students UID Register the user UID returned by the user interface
└ ······ No Null Need to add student account information Null
  └ account No To be deprecated at 1st May!Please use uid. Format: 00 country number - mobile phone number;note: China's mobile phone number does not include the country number, and the first mobile phone number cannot be 0。If the account and uid are both passed at the same time, the uid 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
  └ 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
  └ uid No If the uid and account are both passed at the same time, the uid parameter shall prevail Students UID Register the user UID returned by the user interface

Response data

key Type Sample value meaning
data array [] Returns an array of data information
└ data Return message 1 object Return information object
  └ customColumn string 123 User - defined identity
  └ errno number 1 The error code
  └ error string "程序正常执行" 错误详Error details情
└ data返回信息2 object Return information object
  └ customColumn string 123 User - defined identity
  └ errno number 1 The error code
  └ error string "程序正常执行" Error details
└ ······ object Return information object
  └ customColumn string 123 User - defined identity
  └ errno number ··· The error code
  └ error string ··· Error details
error_info object Return information object
└ errno number 1 The error code
└ error string "Routine execution" Error details

Sample

  • HTTP request
POST /partner/api/course.api.php?action=addCourseStudentMultiple HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=e98b01228fca036bf2ab060f7a8a6ec3&timeStamp=1493725870&courseId=490583&identity=1&studentJson=[{"uid":"1001001","name":"Mary","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 "identity=1" \
        -d 'studentJson=[{"uid":"1001001","name":"学生一"},{"uid":"1002001","name":"学生二"}]' \
        "https://api.eeo.cn/partner/api/course.api.php?action=addCourseStudentMultiple"
    

Response sample (normal return json packet sample)

{
  "data": [
    {
      "customColumn": "123",
      "errno": 1,
      "error": "程序正常执行"
    }
  ],
  "error_info": {
    "errno": 1,
    "error": "程序正常执行"
  }
}

Error code description

Error code Description
1 Expression successful execution.
100 Expression parameter not all or error.
102 Expression dont have permissions(Security verification failed).
104 Expression operation failure(An unknown error).
131 Expression registration failed.
114 Expression server exception.
125 Expression student cell phone number is illegal.
129 Expression teacher accounts cannot be added to students.
130 Expression students exceed the number of additions.
131 Expression registration failed.
133 Expression have existed (passed student or attend account number have repeated,the error will be prompted)
134 Expression Cell phone number is illegal.
144 Expression there is no such course under the agency.
147 Expression no such course information.
149 Expression courses have been deleted.
153 Expression the course has expired.
155 Expression the data array must not be empty.
163 Expression there are already students on the same phone number.
164 Expression in the course, there is an audit of the same phone number.
174 Expression the teacher account cannot be added to audit.
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.
400 Indicates that the request data is not valid

results matching ""

    No results matching ""