Combine open invoices into one
curl --request POST \
--url https://my.server.express/api/v1/client/invoices/consolidate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoiceIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({invoiceIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://my.server.express/api/v1/client/invoices/consolidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/invoices/consolidate"
payload = { "invoiceIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>",
"covers": 123
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}Invoices
Combine open invoices into one
Mints a new invoice that collects 2–50 of your open (UNPAID/OVERDUE) invoices so they can be paid in one go. They must share a currency and billing entity, none may already combine others, and none may already be covered by another open combined invoice (409). Requires a complete billing address (428).
POST
/
v1
/
client
/
invoices
/
consolidate
Combine open invoices into one
curl --request POST \
--url https://my.server.express/api/v1/client/invoices/consolidate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoiceIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({invoiceIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://my.server.express/api/v1/client/invoices/consolidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/invoices/consolidate"
payload = { "invoiceIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>",
"covers": 123
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}Authorizations
bearerAuthapiToken
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Body
application/json
Required array length:
2 - 50 elements