Mark a Supplier-held Document as stored
curl --request POST \
--url https://sandbox-api.terabusinessfinance.com/v1/supplier-submissions/documents/finalize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_reference": "<string>",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_reference: '<string>',
document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://sandbox-api.terabusinessfinance.com/v1/supplier-submissions/documents/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.terabusinessfinance.com/v1/supplier-submissions/documents/finalize"
payload = {
"external_reference": "<string>",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"document_id": "11111111-1111-4111-8111-111111111111",
"category": "bank_statements",
"scan_status": "pending_scan"
}{
"error": {
"code": "bad_request",
"message": "Malformed JSON"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed"
}
}{
"error": {
"code": "forbidden",
"message": "Credential is not authorised for this operation"
}
}{
"error": {
"code": "not_found",
"message": "Submission not found"
}
}{
"error": {
"code": "validation_error",
"message": "Request does not match the submission contract",
"details": [
{
"path": "funding_amount",
"message": "Minimum amount is £1,000"
}
]
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Retry after the Retry-After header."
}
}{
"error": {
"code": "service_unavailable",
"message": "Operation could not be completed"
}
}Documents
Mark a Supplier-held Document as stored
POST
/
v1
/
supplier-submissions
/
documents
/
finalize
Mark a Supplier-held Document as stored
curl --request POST \
--url https://sandbox-api.terabusinessfinance.com/v1/supplier-submissions/documents/finalize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_reference": "<string>",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_reference: '<string>',
document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://sandbox-api.terabusinessfinance.com/v1/supplier-submissions/documents/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.terabusinessfinance.com/v1/supplier-submissions/documents/finalize"
payload = {
"external_reference": "<string>",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"document_id": "11111111-1111-4111-8111-111111111111",
"category": "bank_statements",
"scan_status": "pending_scan"
}{
"error": {
"code": "bad_request",
"message": "Malformed JSON"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed"
}
}{
"error": {
"code": "forbidden",
"message": "Credential is not authorised for this operation"
}
}{
"error": {
"code": "not_found",
"message": "Submission not found"
}
}{
"error": {
"code": "validation_error",
"message": "Request does not match the submission contract",
"details": [
{
"path": "funding_amount",
"message": "Minimum amount is £1,000"
}
]
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Retry after the Retry-After header."
}
}{
"error": {
"code": "service_unavailable",
"message": "Operation could not be completed"
}
}Authorizations
Canonical form uses underscore only: tcs_test_<public_id> or tcs_live<public_id>_. Scopes: supplier_submissions:create:basic, supplier_submissions:create:application, supplier_submissions:read, supplier_submissions:correct, supplier_submissions:promote. Effective permission is account ∩ credential ∩ environment. HMAC pepper is SUPPLIER_API_KEY_PEPPER.
Headers
Optional caller correlation id. Tera always returns X-Request-Id; that header is the only correlation identifier.
Required string length:
1 - 128Body
application/json
Response
Supplier-held Document stored against the supplier reference.
Pattern:
^([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)$Available options:
bank_statements, accounts, id Allowed value:
"pending_scan"