Check invoice amount upon applying the rate
This endpoint needs your API key
Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.
Request
curl -X POST "https://api.leapa.co/v2/invoices/rates" \
-H "Authorization: Bearer $LEAPA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"products": [
{
"quantity": 1,
"product_id": "prd_84c2e7f019",
"rate_ids": []
}
],
"rate_id": "rat_20b6df3c9e",
"currency": "BIF"
}'Response
Created
{
"currency": "BIF",
"amount_due": 45000,
"rate_id": "rat_20b6df3c9e"
}Request body
application/json
Required. Send it as JSON.
productsarray of ItemRequestrequiredList of product and quantity. Constraints: Not null, Not Empty
quantityinteger<int64>requiredQuantity for this product. Constraints: Not null
product_idstringrequiredProduct Identifications. Constraints: Not Null
rate_idsarray of stringRateIds
rate_idstringRate Id that can be used on this invoice.
currencystringrequiredCurrency to be used on this invoice.
Allowed values:BIFUSDKESXAF
Response
application/json
currencystringCurrency of the amount in the invoice.
Allowed values:BIFUSDKESXAFamount_dueinteger<int64>amount upon applying the rate to be paid for this Invoice.
rate_idstringRate Id that can be used on this invoice.
Status codes
201Created400Bad request401Unauthorized402Payment required403Forbidden404Not found428Precondition required500Server error