curl --request POST \
--url https://api.scoutworks.app/api/v1/budget-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>"
}
'import requests
url = "https://api.scoutworks.app/api/v1/budget-transfers"
payload = {
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<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({
sourceBudgetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destinationBudgetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>'
})
};
fetch('https://api.scoutworks.app/api/v1/budget-transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"budgets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "income",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"available": "<string>",
"spent": "<string>",
"remaining": "<string>",
"sectionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"eventIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"budgets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "income",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"available": "<string>",
"spent": "<string>",
"remaining": "<string>",
"sectionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"eventIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"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"
]
}Move money between budgets
Moves an amount from one budget to another of the same type in the same accounting year. No money moves in the bank: it changes what each budget has available. Moving more than the source has left is allowed. In an open accounting year only: a closed one answers 409 period_closed. An id from another group answers 400. A change is made as the admin who created the key, and the record names 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 transfer) 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 transfer 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/budget-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>"
}
'import requests
url = "https://api.scoutworks.app/api/v1/budget-transfers"
payload = {
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<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({
sourceBudgetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destinationBudgetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>'
})
};
fetch('https://api.scoutworks.app/api/v1/budget-transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"budgets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "income",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"available": "<string>",
"spent": "<string>",
"remaining": "<string>",
"sectionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"eventIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationBudgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"budgets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "income",
"periodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"available": "<string>",
"spent": "<string>",
"remaining": "<string>",
"sectionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"eventIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"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"
]
}Authorizations
Headers
Body
A field not listed here is refused with a 400.