Invoices
Record invoice financing
Record a factoring or invoice financing event in Alvys for one or more carrier invoices, including funder, funded amount, reserve, and remittance details.
POST
/
api
/
p
/
v
{version}
/
invoices
/
financing
Record invoice financing
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/invoices/financing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"LoadNumber": "<string>",
"AmountFunded": 123,
"Fee": 123,
"ReferenceNumber": "<string>",
"DateFunded": "2023-11-07T05:31:56Z",
"ReserveEscrowAmount": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
LoadNumber: '<string>',
AmountFunded: 123,
Fee: 123,
ReferenceNumber: '<string>',
DateFunded: '2023-11-07T05:31:56Z',
ReserveEscrowAmount: 123
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/invoices/financing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/invoices/financing"
payload = {
"LoadNumber": "<string>",
"AmountFunded": 123,
"Fee": 123,
"ReferenceNumber": "<string>",
"DateFunded": "2023-11-07T05:31:56Z",
"ReserveEscrowAmount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/invoices/financing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'LoadNumber' => '<string>',
'AmountFunded' => 123,
'Fee' => 123,
'ReferenceNumber' => '<string>',
'DateFunded' => '2023-11-07T05:31:56Z',
'ReserveEscrowAmount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/invoices/financing"
payload := strings.NewReader("{\n \"LoadNumber\": \"<string>\",\n \"AmountFunded\": 123,\n \"Fee\": 123,\n \"ReferenceNumber\": \"<string>\",\n \"DateFunded\": \"2023-11-07T05:31:56Z\",\n \"ReserveEscrowAmount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integrations.alvys.com/api/p/v{version}/invoices/financing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"LoadNumber\": \"<string>\",\n \"AmountFunded\": 123,\n \"Fee\": 123,\n \"ReferenceNumber\": \"<string>\",\n \"DateFunded\": \"2023-11-07T05:31:56Z\",\n \"ReserveEscrowAmount\": 123\n}")
.asString();{
"LoadNumber": "<string>",
"Status": "<string>",
"TotalFunded": {
"Amount": 123,
"Currency": 123
},
"TotalFees": {
"Amount": 123,
"Currency": 123
}
}{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}This endpoint records a financing transaction for a load.
Financing represents funds advanced against an invoice, typically by a factoring provider.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| version | string | Yes | API version (e.g., 1.0) |
Request Body
Content-Type:application/json-patch+json
| Field | Type | Required | Description |
|---|---|---|---|
| LoadNumber | string | Yes | Load number the financing should be applied to |
| AmountFunded | number | Yes | Amount funded for the load |
| Fee | number | No | Financing fee associated with the transaction |
| DateFunded | string (date-time) | No | Date when the financing was issued. Defaults to the current UTC time if omitted |
| ReserveEscrowAmount | number | No | Amount retained in reserve or escrow |
| ReferenceNumber | string | Yes | External reference number used for idempotency and tracking |
Example Request
{
"LoadNumber": "string",
"AmountFunded": 0,
"Fee": 0,
"DateFunded": "2026-03-16T14:15:18.848Z",
"ReserveEscrowAmount": 0,
"ReferenceNumber": "string"
}
Response Body
| Field | Type | Description |
|---|---|---|
| LoadNumber | string | Load number the financing was applied to |
| Status | string | Current load status after applying the financing |
| TotalFunded | object | Total amount funded for the load |
| TotalFees | object | Total financing fees recorded for the load |
Money Object
| Field | Type | Description |
|---|---|---|
| Amount | number | Monetary amount |
| Currency | integer | Currency identifier |
Example Response
{
"LoadNumber": "string",
"Status": "string",
"TotalFunded": {
"Amount": 0,
"Currency": 0
},
"TotalFees": {
"Amount": 0,
"Currency": 0
}
}
Related Load Fields Updated After Successful Financing
Successful requests may update the related load status toFinanced and increase cumulative funded / fee totals used for load payment and factoring workflows.
Notes
- This endpoint records financing transactions for loads.
-
The request body content type exposed by the API is
application/json-patch+json. -
ReferenceNumberis required and used for idempotency. Repeating the sameReferenceNumberfor the same load returns the original financing record instead of creating a duplicate. -
Successful financing requests may update the related load to financing-related status values such as
Financed. -
Financing can only be recorded when the load is in one of the following statuses:
InvoicedCompletedFinanced
-
Loads in non-payable statuses such as
Dispatchedare rejected with:
400 Bad Request
Load must be in one of: Invoiced, Completed, Financed.
- If the
LoadNumberdoes not exist, the endpoint returns:
404 Not Found
- If
AmountFundedis negative or zero, the endpoint returns:
400 Bad Request
AmountFunded must be greater than zero.
- If
Feeis negative, the endpoint returns:
400 Bad Request
Fee cannot be negative.
Authorizations
OAuth 2.0 client-credentials access token. Obtain one from https://auth.alvys.com/oauth/token (grant_type=client_credentials, audience=https://api.alvys.com/public/), then paste it here. The playground sends it as Authorization: Bearer <token>.
Path Parameters
API version (e.g., 1.0)
Example:
"1.0"
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
⌘I
Record invoice financing
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/invoices/financing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"LoadNumber": "<string>",
"AmountFunded": 123,
"Fee": 123,
"ReferenceNumber": "<string>",
"DateFunded": "2023-11-07T05:31:56Z",
"ReserveEscrowAmount": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
LoadNumber: '<string>',
AmountFunded: 123,
Fee: 123,
ReferenceNumber: '<string>',
DateFunded: '2023-11-07T05:31:56Z',
ReserveEscrowAmount: 123
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/invoices/financing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/invoices/financing"
payload = {
"LoadNumber": "<string>",
"AmountFunded": 123,
"Fee": 123,
"ReferenceNumber": "<string>",
"DateFunded": "2023-11-07T05:31:56Z",
"ReserveEscrowAmount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/invoices/financing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'LoadNumber' => '<string>',
'AmountFunded' => 123,
'Fee' => 123,
'ReferenceNumber' => '<string>',
'DateFunded' => '2023-11-07T05:31:56Z',
'ReserveEscrowAmount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/invoices/financing"
payload := strings.NewReader("{\n \"LoadNumber\": \"<string>\",\n \"AmountFunded\": 123,\n \"Fee\": 123,\n \"ReferenceNumber\": \"<string>\",\n \"DateFunded\": \"2023-11-07T05:31:56Z\",\n \"ReserveEscrowAmount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integrations.alvys.com/api/p/v{version}/invoices/financing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"LoadNumber\": \"<string>\",\n \"AmountFunded\": 123,\n \"Fee\": 123,\n \"ReferenceNumber\": \"<string>\",\n \"DateFunded\": \"2023-11-07T05:31:56Z\",\n \"ReserveEscrowAmount\": 123\n}")
.asString();{
"LoadNumber": "<string>",
"Status": "<string>",
"TotalFunded": {
"Amount": 123,
"Currency": 123
},
"TotalFees": {
"Amount": 123,
"Currency": 123
}
}{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}