curl --request PATCH \
--url https://api.scoutworks.app/api/v1/transactions/{transactionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.scoutworks.app/api/v1/transactions/{transactionId}"
payload = { "updatedAt": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({updatedAt: '2023-11-07T05:31:56Z'})
};
fetch('https://api.scoutworks.app/api/v1/transactions/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-12-25",
"type": "income",
"amount": "<string>",
"bankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restrictedFundId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethod": "bank_transfer",
"source": "csv",
"reconciliationStatus": "unreconciled",
"isReconciled": true,
"isTransfer": true,
"isGiftAidEligible": true,
"giftAidType": "declaration",
"giftAidAmount": "<string>",
"splits": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restrictedFundId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isGiftAidEligible": true,
"giftAidType": "declaration",
"giftAidAmount": "<string>",
"description": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"counterparty": "<string>",
"description": "<string>",
"reference": "<string>",
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "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"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Update a transaction
Categorises any line GET /transactions lists: its category, section, event, member, fund, budget, Gift Aid and labels. Changes only the fields you send. Send the updatedAt you last read: if the line has changed since, it answers 412 stale_write.
amount, date, type and bankAccountId change only on a line with source: api that is not reconciled; on any other line, and on either leg of a transfer, the request answers 409 source_locked. A date in a closed accounting year 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.
Send the ETag you last read for the transaction as If-Match: if the transaction has changed since, the request answers 412 stale_write and changes nothing. Optional, and recommended.
curl --request PATCH \
--url https://api.scoutworks.app/api/v1/transactions/{transactionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.scoutworks.app/api/v1/transactions/{transactionId}"
payload = { "updatedAt": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({updatedAt: '2023-11-07T05:31:56Z'})
};
fetch('https://api.scoutworks.app/api/v1/transactions/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-12-25",
"type": "income",
"amount": "<string>",
"bankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restrictedFundId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethod": "bank_transfer",
"source": "csv",
"reconciliationStatus": "unreconciled",
"isReconciled": true,
"isTransfer": true,
"isGiftAidEligible": true,
"giftAidType": "declaration",
"giftAidAmount": "<string>",
"splits": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restrictedFundId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isGiftAidEligible": true,
"giftAidType": "declaration",
"giftAidAmount": "<string>",
"description": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"counterparty": "<string>",
"description": "<string>",
"reference": "<string>",
"memberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "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"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Authorizations
Headers
Path Parameters
Body
null clears a link. amount, date, type and bankAccountId change only on an unreconciled transaction the API added. A field not listed here is refused with a 400.