Update cash application
curl --request PATCH \
--url https://api.entendre.finance/v1/cash-applications/{application_id} \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"allocations": [
{
"target_type": "invoice",
"target_id": "inv_507f1f77bcf86cd799439011",
"amount": "100.00"
}
]
}
'const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
allocations: [
{
target_type: 'invoice',
target_id: 'inv_507f1f77bcf86cd799439011',
amount: '100.00'
}
]
})
};
fetch('https://api.entendre.finance/v1/cash-applications/{application_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.entendre.finance/v1/cash-applications/{application_id}"
payload = { "allocations": [
{
"target_type": "invoice",
"target_id": "inv_507f1f77bcf86cd799439011",
"amount": "100.00"
}
] }
headers = {
"If-Match": "<if-match>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "ca_507f1f77bcf86cd799439011",
"organization_id": "org_507f1f77bcf86cd799439011",
"legal_entity_id": "le_507f1f77bcf86cd799439011",
"deposit_transaction_id": "txn_507f1f77bcf86cd799439011",
"status": "applied",
"stripe_status": "pending",
"match_type": "exact",
"total_amount": "100.00",
"applied_amount": "100.00",
"unapplied_amount": "0.00",
"deposit_memo": null,
"txn_date": null,
"allocations": [
{
"target_type": "invoice",
"target_id": "inv_507f1f77bcf86cd799439011",
"invoice_number": "INV-100",
"amount": "100.00",
"customer_name": "Example Customer"
}
],
"applied_by": null,
"journal_entry_id": "je_507f1f77bcf86cd799439011",
"stripe_marked_paid_at": null,
"confirmed_by": null,
"confirmed_at": null,
"created_at": null,
"updated_at": null,
"error_message": null,
"etag": "\"v_example\""
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid path, query or request body.",
"request_id": "req_example"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient access to organization",
"request_id": "req_example"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"request_id": "req_example"
}
}{
"error": {
"code": "CONFLICT",
"message": "The resource state does not allow this operation.",
"request_id": "req_example"
}
}{
"error": {
"code": "PRECONDITION_FAILED",
"message": "The resource changed. Read it again before you update it.",
"request_id": "req_example"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 30s.",
"request_id": "req_example"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"request_id": "req_example"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable.",
"request_id": "req_example"
}
}Cash Application
Update cash application
Updates the allocations of a draft cash application.
PATCH
/
v1
/
cash-applications
/
{application_id}
Update cash application
curl --request PATCH \
--url https://api.entendre.finance/v1/cash-applications/{application_id} \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"allocations": [
{
"target_type": "invoice",
"target_id": "inv_507f1f77bcf86cd799439011",
"amount": "100.00"
}
]
}
'const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
allocations: [
{
target_type: 'invoice',
target_id: 'inv_507f1f77bcf86cd799439011',
amount: '100.00'
}
]
})
};
fetch('https://api.entendre.finance/v1/cash-applications/{application_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.entendre.finance/v1/cash-applications/{application_id}"
payload = { "allocations": [
{
"target_type": "invoice",
"target_id": "inv_507f1f77bcf86cd799439011",
"amount": "100.00"
}
] }
headers = {
"If-Match": "<if-match>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "ca_507f1f77bcf86cd799439011",
"organization_id": "org_507f1f77bcf86cd799439011",
"legal_entity_id": "le_507f1f77bcf86cd799439011",
"deposit_transaction_id": "txn_507f1f77bcf86cd799439011",
"status": "applied",
"stripe_status": "pending",
"match_type": "exact",
"total_amount": "100.00",
"applied_amount": "100.00",
"unapplied_amount": "0.00",
"deposit_memo": null,
"txn_date": null,
"allocations": [
{
"target_type": "invoice",
"target_id": "inv_507f1f77bcf86cd799439011",
"invoice_number": "INV-100",
"amount": "100.00",
"customer_name": "Example Customer"
}
],
"applied_by": null,
"journal_entry_id": "je_507f1f77bcf86cd799439011",
"stripe_marked_paid_at": null,
"confirmed_by": null,
"confirmed_at": null,
"created_at": null,
"updated_at": null,
"error_message": null,
"etag": "\"v_example\""
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid path, query or request body.",
"request_id": "req_example"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient access to organization",
"request_id": "req_example"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"request_id": "req_example"
}
}{
"error": {
"code": "CONFLICT",
"message": "The resource state does not allow this operation.",
"request_id": "req_example"
}
}{
"error": {
"code": "PRECONDITION_FAILED",
"message": "The resource changed. Read it again before you update it.",
"request_id": "req_example"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 30s.",
"request_id": "req_example"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"request_id": "req_example"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable.",
"request_id": "req_example"
}
}Send the
etag of the application in If-Match. A missing or changed value returns HTTP 412.Authorizations
Your organization API key. Some operations also need a key that is associated with a user; their pages say so.
Headers
Required. The etag from List cash applications. A missing or stale value returns HTTP 412.
Path Parameters
ID of the application.
Minimum string length:
1Body
application/json
Invoice allocations.
Minimum array length:
1Show child attributes
Show child attributes
Response
The request succeeded.
A deposit and the invoices that it pays.
Show child attributes
Show child attributes