curl --request POST \
--url https://api.scoutworks.app/api/v1/badge-awards/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"awardedOn": "2023-12-25",
"level": 50
}
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/badge-awards/bulk"
payload = { "items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"awardedOn": "2023-12-25",
"level": 50
}
] }
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>',
awardedOn: '2023-12-25',
level: 50
}
]
})
};
fetch('https://api.scoutworks.app/api/v1/badge-awards/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"
]
}Record badge awards
Records that badges were presented, on the day you give. Each award takes the badge from stock, as an award in Scoutworks does, and can complete a Chief Scout’s Award. A badge already awarded answers unchanged and takes no stock. 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 award 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-awards/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"awardedOn": "2023-12-25",
"level": 50
}
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/badge-awards/bulk"
payload = { "items": [
{
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"badgeId": "<string>",
"awardedOn": "2023-12-25",
"level": 50
}
] }
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>',
awardedOn: '2023-12-25',
level: 50
}
]
})
};
fetch('https://api.scoutworks.app/api/v1/badge-awards/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"
]
}