Charges
Calculate a charge distribution
Calculates how a total charge amount is distributed across the leases of an estate, using the distribution key identified by key_id.
Returns the per-lease shares together with a human-readable explanation of each computation.
Usage Example
curl -X POST https://api.faireplace.com/api/charges/distributions/dd0e8400-e29b-41d4-a716-446655440008/calculate-distribution \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"estate_id": "aa0e8400-e29b-41d4-a716-446655440005",
"total_amount": 1200.00
}'
Response:
{
"key_id": "dd0e8400-e29b-41d4-a716-446655440008",
"total_amount": 1200.00,
"distributions": [
{
"lease_id": "660e8400-e29b-41d4-a716-446655440001",
"amount": 600.00,
"calculation_details": "50.00% (tantièmes: 500 / 1000)"
}
]
}
post/charges/distributions/{key_id}/calculate-distribution
Request
- Base URL: https://api.faireplace.com/api
- URL: https://api.faireplace.com/api/charges/distributions/{key_id}/calculate-distribution
- Auth: HTTP bearer
Path parameters
key_idstring uuid required
Charge distribution key ID
Request body
Example request
{
"estate_id": "aa0e8400-e29b-41d4-a716-446655440005",
"total_amount": 1200
}Response
Distribution calculated successfully
Example response
{
"key_id": "dd0e8400-e29b-41d4-a716-446655440008",
"total_amount": 1200,
"distributions": [
{
"lease_id": "660e8400-e29b-41d4-a716-446655440001",
"amount": 600,
"calculation_details": "50.00% (tantièmes: 500 / 1000)"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.