curl --request PATCH \
--url https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/merge-patch+json' \
--data '
{
"sourceRevision": 2
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/merge-patch+json'
},
body: JSON.stringify({sourceRevision: 2})
};
fetch('https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}"
payload = { "sourceRevision": 2 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}"
payload := strings.NewReader("{\n \"sourceRevision\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/merge-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/merge-patch+json")
.body("{\n \"sourceRevision\": 2\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"sourceRevision\": 2\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
Update selected Receivable fields
Change some descriptive fields of a Receivable without resending the whole record. Requires receivables:write. Applies RFC 7396 JSON Merge Patch, then validates the complete closed Receivable before one transactional projection. Exactly one responsible Customer must be primary, Customer IDs must be unique, and any balance breakdown must sum to recoverableAmount. Changed descriptions require a newer sourceRevision. Financial balances and obligation types cannot be overwritten by descriptive updates. See https://docs.paypathiq.com/errors-and-retries#retry-policy.
curl --request PATCH \
--url https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/merge-patch+json' \
--data '
{
"sourceRevision": 2
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/merge-patch+json'
},
body: JSON.stringify({sourceRevision: 2})
};
fetch('https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}"
payload = { "sourceRevision": 2 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}"
payload := strings.NewReader("{\n \"sourceRevision\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/merge-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/merge-patch+json")
.body("{\n \"sourceRevision\": 2\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/receivables/{externalReceivableId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"sourceRevision\": 2\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
Authorizations
Integration-owned environment-specific API key. Never paste a production key into documentation tools.
Path Parameters
Stable non-sensitive Client code authorized by the Integration grant.
^[A-Za-z0-9_-]{1,128}$Opaque Receivable identifier supplied by the Integration; capitalization must match.
^[A-Za-z0-9_-]{1,128}$Body
One uncompressed resource representation, limited to 256 KiB.
x <= 9007199254740991All four amounts are required when a breakdown is supplied; use 0.00 where needed.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
loan_instalment, accelerated_balance, loan_balance, service_charge_demand ^(?:(?:\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])))$At most one assertion per type; ordering is semantically irrelevant.
3Show child attributes
Show child attributes
Show child attributes
Show child attributes
Customer identifiers must be unique and exactly one role must be primary.
1 - 8 elementsShow child attributes
Show child attributes
1 - 200Response
Receivable updated, or patch was a safe no-op.
- Option 1
- Option 2
Each financial type requires exactly its industry context. The balance breakdown must sum exactly to recoverableAmount.
Show child attributes
Show child attributes
loan_instalment, accelerated_balance, loan_balance x <= 9007199254740991^(?:(?:\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])))$Show child attributes
Show child attributes
Customer identifiers must be unique and exactly one role must be primary.
1 - 8 elementsShow child attributes
Show child attributes
1 - 200^[A-Za-z0-9_-]{1,128}$active, paused, closed ^(?:(?:\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])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$All four amounts are required when a breakdown is supplied; use 0.00 where needed.
Show child attributes
Show child attributes
At most one assertion per type; ordering is semantically irrelevant.
3Show child attributes
Show child attributes
Present on reads. sourceAmount is the declared accounting authority's position, workingAmount is the safe collection balance after confirmed allocated Payments, and confirmedUnreconciledAmount is the allocated confirmed amount the Source has not yet acknowledged. Unapplied funds appear in none of them.
Show child attributes
Show child attributes