curl --request POST \
--url https://api.scoutworks.app/api/v1/badge-requirements/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"requirementId": "<string>",
"completed": true
}
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/badge-requirements/bulk"
payload = { "items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"requirementId": "<string>",
"completed": True
}
] }
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({
items: [
{
memberId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
badgeId: '<string>',
requirementId: '<string>',
completed: true
}
]
})
};
fetch('https://api.scoutworks.app/api/v1/badge-requirements/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"index": 4503599627370495,
"status": "created",
"id": "<string>",
"error": {
"code": "invalid_api_key",
"message": "<string>"
}
}
],
"summary": {
"created": 0,
"updated": 0,
"unchanged": 0,
"failed": 0
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Sign off badge requirements
Signs requirements off for young people, or takes a sign-off back with completed: false: a badge evening’s ticks, or a sync from another tracker. After the write the badge’s completion is worked out again, as in Scoutworks: signing off the last requirement completes the badge, ready to award. A requirement completed by recording activities (nights away, hikes) is refused. notify: true also sends the notice the app sends a Young Leader for a sign-off. Badge and requirement ids come from GET /badge-catalogue. A young person must be an active member of your group. A change is recorded as made by the admin who created the key, who may award any badge to any young person in the group, as in Scoutworks. No parent is emailed. Writes count towards the key’s usual limit and a second one of 30 changes a minute. A group whose subscription has lapsed answers 402.
Send up to 100 items. Each sign-off is checked and written on its own and answered in data, in the order sent: a bad item gets its own error and the rest are still written. The whole request counts as one write against the write limit. It is safe to send again after a timeout: an item already written answers unchanged. You may also send an Idempotency-Key header: while a request with the same key is still running, another answers 409 conflict; for 24 hours, the same key with the same body runs the items again and answers with an Idempotent-Replayed: true header; with a different body it answers 400.
curl --request POST \
--url https://api.scoutworks.app/api/v1/badge-requirements/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"requirementId": "<string>",
"completed": true
}
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/badge-requirements/bulk"
payload = { "items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"requirementId": "<string>",
"completed": True
}
] }
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({
items: [
{
memberId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
badgeId: '<string>',
requirementId: '<string>',
completed: true
}
]
})
};
fetch('https://api.scoutworks.app/api/v1/badge-requirements/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"index": 4503599627370495,
"status": "created",
"id": "<string>",
"error": {
"code": "invalid_api_key",
"message": "<string>"
}
}
],
"summary": {
"created": 0,
"updated": 0,
"unchanged": 0,
"failed": 0
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}