Record daily attendance for many students
Record up to 200 records in one request. Scope: attendance-daily. Same records and rules as POST /attendance/daily. Returns one result per record, in request order. A failed record doesn’t block the others; a 500 fails that date’s records, which are safe to resend. Repeats of a student and date apply in order.
POST
/
attendance
/
daily
/
bulk
Record daily attendance for many students
curl --request POST \
--url https://api.teachwithscout.com/v1/attendance/daily/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"studentId": "<string>",
"date": "<string>",
"attendanceCode": "<string>",
"arrivalTime": "<string>",
"comment": "<string>"
}
]
'import requests
url = "https://api.teachwithscout.com/v1/attendance/daily/bulk"
payload = [
{
"studentId": "<string>",
"date": "<string>",
"attendanceCode": "<string>",
"arrivalTime": "<string>",
"comment": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
studentId: '<string>',
date: '<string>',
attendanceCode: '<string>',
arrivalTime: '<string>',
comment: '<string>'
}
])
};
fetch('https://api.teachwithscout.com/v1/attendance/daily/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.teachwithscout.com/v1/attendance/daily/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'studentId' => '<string>',
'date' => '<string>',
'attendanceCode' => '<string>',
'arrivalTime' => '<string>',
'comment' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.teachwithscout.com/v1/attendance/daily/bulk"
payload := strings.NewReader("[\n {\n \"studentId\": \"<string>\",\n \"date\": \"<string>\",\n \"attendanceCode\": \"<string>\",\n \"arrivalTime\": \"<string>\",\n \"comment\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.teachwithscout.com/v1/attendance/daily/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"studentId\": \"<string>\",\n \"date\": \"<string>\",\n \"attendanceCode\": \"<string>\",\n \"arrivalTime\": \"<string>\",\n \"comment\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teachwithscout.com/v1/attendance/daily/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"studentId\": \"<string>\",\n \"date\": \"<string>\",\n \"attendanceCode\": \"<string>\",\n \"arrivalTime\": \"<string>\",\n \"comment\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"summary": {
"recorded": 123,
"updated": 123,
"duplicate": 123,
"failed": 123
},
"results": [
{
"index": 123,
"status": "recorded",
"studentId": "<string>",
"date": "<string>",
"mappedStatus": "Absent",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>"
}
}
]
}{
"summary": {
"recorded": 123,
"updated": 123,
"duplicate": 123,
"failed": 123
},
"results": [
{
"index": 123,
"status": "recorded",
"studentId": "<string>",
"date": "<string>",
"mappedStatus": "Absent",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>"
}
}
]
}{
"status": 400,
"message": "<string>"
}{
"status": 403,
"message": "<string>"
}Authorizations
Bearer access token from POST /oauth/token (OAuth 2.0 client credentials; the OneRoster /ims/oneroster/v1p1/token and /v1p2/token URLs are aliases). Send it as Authorization: Bearer <access_token>. Tokens expire after 1 hour and carry your API client's granted scopes — an endpoint outside them returns 403.
Body
application/json
Required array length:
1 - 200 elements⌘I
Record daily attendance for many students
curl --request POST \
--url https://api.teachwithscout.com/v1/attendance/daily/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"studentId": "<string>",
"date": "<string>",
"attendanceCode": "<string>",
"arrivalTime": "<string>",
"comment": "<string>"
}
]
'import requests
url = "https://api.teachwithscout.com/v1/attendance/daily/bulk"
payload = [
{
"studentId": "<string>",
"date": "<string>",
"attendanceCode": "<string>",
"arrivalTime": "<string>",
"comment": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
studentId: '<string>',
date: '<string>',
attendanceCode: '<string>',
arrivalTime: '<string>',
comment: '<string>'
}
])
};
fetch('https://api.teachwithscout.com/v1/attendance/daily/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.teachwithscout.com/v1/attendance/daily/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'studentId' => '<string>',
'date' => '<string>',
'attendanceCode' => '<string>',
'arrivalTime' => '<string>',
'comment' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.teachwithscout.com/v1/attendance/daily/bulk"
payload := strings.NewReader("[\n {\n \"studentId\": \"<string>\",\n \"date\": \"<string>\",\n \"attendanceCode\": \"<string>\",\n \"arrivalTime\": \"<string>\",\n \"comment\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.teachwithscout.com/v1/attendance/daily/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"studentId\": \"<string>\",\n \"date\": \"<string>\",\n \"attendanceCode\": \"<string>\",\n \"arrivalTime\": \"<string>\",\n \"comment\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teachwithscout.com/v1/attendance/daily/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"studentId\": \"<string>\",\n \"date\": \"<string>\",\n \"attendanceCode\": \"<string>\",\n \"arrivalTime\": \"<string>\",\n \"comment\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"summary": {
"recorded": 123,
"updated": 123,
"duplicate": 123,
"failed": 123
},
"results": [
{
"index": 123,
"status": "recorded",
"studentId": "<string>",
"date": "<string>",
"mappedStatus": "Absent",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>"
}
}
]
}{
"summary": {
"recorded": 123,
"updated": 123,
"duplicate": 123,
"failed": 123
},
"results": [
{
"index": 123,
"status": "recorded",
"studentId": "<string>",
"date": "<string>",
"mappedStatus": "Absent",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>"
}
}
]
}{
"status": 400,
"message": "<string>"
}{
"status": 403,
"message": "<string>"
}