POST /efris/preview endpoint is designed to generate a preview of an invoice based on the provided seller and buyer details, along with the items being purchased. This endpoint is useful for users who want to review the invoice details before finalizing the transaction.{
"data": {
"sellerDetails": {
"referenceNo": "Tb005"
},
"basicInformation": {
"currency": "UGX",
"invoiceType": 1,
"invoiceKind": 1,
"invoiceIndustryCode": "101"
},
"buyerDetails": {
"buyerBusinessName": "Buyer Name",
"buyerLegalName": "Buyer Legal Name",
"buyerType": "1",
"buyerTin": ""
},
"itemsBought": [
{
"itemCode": "Airline Insurance",
"quantity": 1,
"unitPrice": 45600,
"total": 45600,
"taxForm": "101",
"taxRule": "STANDARD",
"discountFlag": 2,
"discountTotal": 0,
"exciseFlag": "2",
"exciseRate": "",
"exciseUnit": "",
"exciseTax": "",
"exciseCurrency": "UGX"
}
]
}
}
{
"status": "success",
"message": "Invoice preview generated successfully.",
"invoicePreview": {
// Invoice details will be included here
}
}
curl --location --request POST 'https://auth.efris.kakasa.xyz/api/v1/efris/preview' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"sellerDetails": {
"referenceNo": "Tb005"
},
"basicInformation": {
"currency": "UGX",
"invoiceType": 1,
"invoiceKind": 1,
"invoiceIndustryCode": "101"
},
"buyerDetails": {
"buyerBusinessName": "Buyer Name",
"buyerLegalName": "Buyer Legal Name",
"buyerType": "1",
"buyerTin": ""
},
"itemsBought": [
{
"itemCode": "Airline Insurance",
"quantity": 1,
"unitPrice": 45600,
"total": 45600,
"taxForm": "101",
"taxRule": "STANDARD", //EXEMPT//ZERORATED
"discountFlag": 2,
"discountTotal": 0,
"exciseFlag": "2",
"exciseRate": "",
"exciseUnit": "",
"exciseTax": "",
"exciseCurrency": "UGX"
}
]
}
}'{}