curl --request POST \
--url https://api.scoutworks.app/api/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"description": "<string>"
}
'import requests
url = "https://api.scoutworks.app/api/v1/transfers"
payload = {
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"description": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
fromBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>',
date: '2023-12-25',
description: '<string>'
})
};
fetch('https://api.scoutworks.app/api/v1/transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"destinationDate": "2023-12-25",
"fromTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "csv",
"isReconciled": true,
"description": "<string>",
"reference": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "<string>",
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"destinationDate": "2023-12-25",
"fromTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "csv",
"isReconciled": true,
"description": "<string>",
"reference": "<string>",
"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"
]
}Record a transfer between your accounts
Books both lines of a transfer you have made between two of the group’s open accounts, such as savings to current, as the app’s transfer form does. Send destinationDate when the second statement shows a different day. A line on a bank account waits for its statement line to be matched; a line on a cash tin is settled at once. Nothing moves in the bank: this records a transfer the group has already made. A date in a closed accounting year answers 409 period_closed. An account from another group answers 400. A change is made as the admin who created the key, and both lines name 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.
Send an Idempotency-Key header (unique per transfer) so a retry after a timeout cannot make it twice; without one the request answers 400. 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/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"description": "<string>"
}
'import requests
url = "https://api.scoutworks.app/api/v1/transfers"
payload = {
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"description": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
fromBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>',
date: '2023-12-25',
description: '<string>'
})
};
fetch('https://api.scoutworks.app/api/v1/transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"destinationDate": "2023-12-25",
"fromTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "csv",
"isReconciled": true,
"description": "<string>",
"reference": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "<string>",
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"date": "2023-12-25",
"destinationDate": "2023-12-25",
"fromTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "csv",
"isReconciled": true,
"description": "<string>",
"reference": "<string>",
"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.
The day it arrived, when that statement shows a different day. At most 7 days from date. Defaults to date.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$