The total percent distributed must equal 100%
When posting the payload below to api.sky.blackbaud.com/accountspayable/v1/invoices we get an error saying that the distributions must equal 100%.
The invoice includes two expenses, one of them actually a credit, correctly balanced against the AP account. There are no distribution splits, so the percents are always 100.
Could you please help me find the error?
{
"Error": "Failed to save invoice",
"Details": [
"The total percent distributed must equal 100%."
]
}
Payload:
{
"vendor_id": 874,
"amount": 1499,
"description": "October 2024",
"invoice_number": "October 2024",
"approval_status": "Approved",
"due_date": "2024-11-08T00:00:00",
"payment_details": {
"payment_method": "EFT"
},
"invoice_date": "2024-11-08T00:00:00",
"post_status": "NotYetPosted",
"post_date": "2024-11-08T00:00:00",
"distributions": [
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2040.00",
"type_code": "Debit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 1650
}
]
},
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Credit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 1650
}
]
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.4045.06",
"type_code": "Credit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 151
}
]
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Debit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 151
}
]
}
]
}
Comments
-
@Mauro Di Masso I think the issue is that you are including amount and percent. From the documentation you referenced (though far down on the page):
“Only one of Amount or Percent can be specified.”0 -
@Erik Leaver thank you for this clue. However, the error is the same when removing the percent or amount properties from the distribution_split objects. I also tried leaving the distribution_split as an empty list since no real split is being applied. The error keeps saying that the total percent must be 100%.
I think the issue might be in the particular accounting for this invoice, since we have been able to post other invoices with the initial payload before (even if it goes against the documentation) when all the expenses are debits.
This is an invoice for 1499 with two expense lines, one debit and one credit. Each balanced against the AP account.
Debit 1650 from 01.2040.00
Credit 1650 to 01.2010.00 (AP)
Credit 151 to 01.4045.06
Debit 151 from 01.2010.00 (AP)The AP account 01.2010.00 ends up with a 1499 credit.
You can see below the three attempts.
Payload 1:
{
"vendor_id": "874",
"amount": "1499.00",
"description": "October 2024",
"invoice_number": "October 2024",
"approval_status": "Approved",
"due_date": "2024-11-08T00:00:00",
"payment_details": {
"payment_method": "EFT"
},
"invoice_date": "2024-11-08T00:00:00",
"post_status": "NotYetPosted",
"post_date": "2024-11-08T00:00:00",
"distributions": [
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2040.00",
"type_code": "Debit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 1650
}
]
},
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Credit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 1650
}
]
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.4045.06",
"type_code": "Credit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 151
}
]
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Debit",
"distribution_splits": [
{
"transaction_code_values": [],
"amount": 151
}
]
}
]
}
Payload 2:
{
"vendor_id": "874",
"amount": "1499.00",
"description": "October 2024",
"invoice_number": "October 2024",
"approval_status": "Approved",
"due_date": "2024-11-08T00:00:00",
"payment_details": {
"payment_method": "EFT"
},
"invoice_date": "2024-11-08T00:00:00",
"post_status": "NotYetPosted",
"post_date": "2024-11-08T00:00:00",
"distributions": [
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2040.00",
"type_code": "Debit",
"distribution_splits": [
{
"transaction_code_values": [],
"percent": 100
}
]
},
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Credit",
"distribution_splits": [
{
"transaction_code_values": [],
"percent": 100
}
]
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.4045.06",
"type_code": "Credit",
"distribution_splits": [
{
"transaction_code_values": [],
"percent": 100
}
]
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Debit",
"distribution_splits": [
{
"transaction_code_values": [],
"percent": 100
}
]
}
]
}
Payload 3:
{
"vendor_id": "874",
"amount": "1499.00",
"description": "October 2024",
"invoice_number": "October 2024",
"approval_status": "Approved",
"due_date": "2024-11-08T00:00:00",
"payment_details": {
"payment_method": "EFT"
},
"invoice_date": "2024-11-08T00:00:00",
"post_status": "NotYetPosted",
"post_date": "2024-11-08T00:00:00",
"distributions": [
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2040.00",
"type_code": "Debit",
"distribution_splits": []
},
{
"amount": 1650,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Credit",
"distribution_splits": []
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.4045.06",
"type_code": "Credit",
"distribution_splits": []
},
{
"amount": 151,
"description": "October 2024",
"account_number": "01.2010.00",
"type_code": "Debit",
"distribution_splits": []
}
]
}0 -
@Mauro Di Masso
I used your JSON and is not working neither (updating to use my FE NXT data). However, i created a sample one that does work and created the invoice in my FE test environment. maybe you can see how mine differs to update yours.{
"vendor_id": 2138,
"amount": 503.43,
"description": "FLB-Temp Help for Office week ended 1/2/2015",
"invoice_number": "999999999999",
"invoice_date": "2021-11-01T00:00:00",
"due_date": "2021-11-03T00:00:00",
"balance": 0,
"total_paid": 503.43,
"payment_details": {
"payment_method": "Check"
},
"post_status": "NotYetPosted",
"post_date": "2021-11-03T00:00:00",
"distributions": [
{
"distribution_splits": [
{
"ui_project_id": "UNREST",
"transaction_code_values": [],
"amount": 503.43
}
],
"amount": 503.43,
"account_number": "10-5260-750",
"type_code": "Debit"
},
{
"distribution_splits": [
{
"ui_project_id": "UNREST",
"transaction_code_values": [],
"amount": 503.43
}
],
"amount": 503.43,
"account_number": "10-2000-750",
"type_code": "Credit"
}
]
}0 -
@Alex Wong thank you but we have no problem when using just two lines. The key to my issue I think is the fact that one of the expenses is a debit and one is a credit.
Would you please try following my sample or at least try so that you have both a credit and a debit to the AP account?0 -
@Mauro Di Masso
first try this:{
"vendor_id": "874",
"amount": "1499.00",vendor_id is the system record id of the vendor, which needs to be a number, don't put double quote around it.
amount is also in “string” data type as well, remove the double quote.
{
"vendor_id": 874,
"amount": 1499,0 -
@Alex Wong thank you, but that does not change the error. I'll edit the initial post to match but that is not it.
0 -
@Mauro Di Masso
I see what you mean by the “amount” situation, so the invoice has a “discount” or “deduction” of some sort. I am not sure how you would account for that.One method is, try to manually create an invoice in FE NXT directly, then use API to GET the invoice by system id and see how the JSON look.
0 -
@Alex Wong we found the issue. Expsense lines on invoices should always be of type Debit, regardless of their sign. That means you can end up with negative debit and credit lines.
The correct coding, then, is:
Debit 1650 from 01.2040.00
Credit 1650 to 01.2010.00 (AP)
Debit -151 from 01.4045.06
Credit -151 to 01.2010.00 (AP)1
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 940 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 249 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 795 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

