curl --request POST \
--url https://api.scoutworks.app/api/v1/equipment-checkouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dueBackAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.scoutworks.app/api/v1/equipment-checkouts"
payload = {
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dueBackAt": "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({
equipmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
dueBackAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.scoutworks.app/api/v1/equipment-checkouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkedOutToUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"checkedOutAt": "2023-11-07T05:31:56Z",
"dueBackAt": "2023-11-07T05:31:56Z",
"returnedAt": "2023-11-07T05:31:56Z",
"quantityTaken": 0,
"quantityReturned": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkedOutToUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"checkedOutAt": "2023-11-07T05:31:56Z",
"dueBackAt": "2023-11-07T05:31:56Z",
"returnedAt": "2023-11-07T05:31:56Z",
"quantityTaken": 0,
"quantityReturned": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Check equipment out
Lends an item to an adult, optionally for an event, until dueBackAt. Its parts go with it, as in the app. An item that is already out, in repair, retired or lost answers 409 not_available; a consumable with too few left answers 409 insufficient_stock. Nobody is notified. Made as the admin who created the key, and marked with the key, so Scoutworks shows a script did it. 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.
You may send an Idempotency-Key header (unique per check-out) so a retry after a timeout cannot make it twice. For 24 hours, the same key with the same body answers 200 with the first check-out and an Idempotent-Replayed: true header; with a different body it answers 400; while the first request is still running it answers 409 conflict.
curl --request POST \
--url https://api.scoutworks.app/api/v1/equipment-checkouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dueBackAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.scoutworks.app/api/v1/equipment-checkouts"
payload = {
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dueBackAt": "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({
equipmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
dueBackAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.scoutworks.app/api/v1/equipment-checkouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkedOutToUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"checkedOutAt": "2023-11-07T05:31:56Z",
"dueBackAt": "2023-11-07T05:31:56Z",
"returnedAt": "2023-11-07T05:31:56Z",
"quantityTaken": 0,
"quantityReturned": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkedOutToUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"checkedOutAt": "2023-11-07T05:31:56Z",
"dueBackAt": "2023-11-07T05:31:56Z",
"returnedAt": "2023-11-07T05:31:56Z",
"quantityTaken": 0,
"quantityReturned": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Authorizations
Headers
Body
A field not listed here is refused with a 400.
The adult taking it: an adult in your group. Leave it out to check it out to the admin who created the key.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$