Add patrol points
curl --request POST \
--url https://api.scoutworks.app/api/v1/patrol-scores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"reference": "<string>",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"points": 0,
"patrolId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"awardedAt": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/patrol-scores"
payload = { "items": [
{
"reference": "<string>",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"points": 0,
"patrolId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"awardedAt": "2023-11-07T05:31:56Z"
}
] }
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: [
{
reference: '<string>',
sectionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
points: 0,
patrolId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
memberId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '<string>',
eventId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
awardedAt: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.scoutworks.app/api/v1/patrol-scores', 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"
]
}Recognition
Add patrol points
Adds 1 to 100 awards in one request, each to a patrol (patrolId, from GET /patrol-standings) or a young person (memberId). The whole request counts as one write. Recorded as made by the admin who created the key, and marked with the key, so Scoutworks shows a script did it. Nobody is notified. 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.
Safe to retry: an item whose reference was already written answers unchanged and adds nothing. Each item is written or refused on its own, and the answer has one result per item, in the order sent; a bad item does not stop the others.
POST
/
patrol-scores
Add patrol points
curl --request POST \
--url https://api.scoutworks.app/api/v1/patrol-scores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"reference": "<string>",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"points": 0,
"patrolId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"awardedAt": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/patrol-scores"
payload = { "items": [
{
"reference": "<string>",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"points": 0,
"patrolId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"awardedAt": "2023-11-07T05:31:56Z"
}
] }
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: [
{
reference: '<string>',
sectionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
points: 0,
patrolId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
memberId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '<string>',
eventId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
awardedAt: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.scoutworks.app/api/v1/patrol-scores', 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"
]
}Authorizations
Headers
Body
application/json