Churpy_Etims Public API
Churpy_Etims Public API
Add sale and credit notes. The difference between a sale and a credit note is the receipt_type_code
which is a required field. A sale has a receipt type code of S while a credit note has a receipt type code of R. When adding a credit note, the original invoice number is required. For a Sale: receipt_type_code
is "S" For a Credit note: receipt_type_code
is "R" and original_invoice_number
is required. Note: original_invoice_number
is a numeric value (This should be an existing eTIMS invoice number of the sale invoice you intend to credit) Note: trader_invoice_number
should be unique, unless you deactivated the sale or the sale queue_status is "failed".
This is a required field when adding a credit note. It should be an existing eTIMS invoice number of the sale invoice you intend to credit
The callback URL to call when we have new information about the sale, usually after syncing with eTIMS. Review this guide page for more information: https://docs.etims.churpy.co/docs/callback-urls During testing you can get a unique URL here: https://webhook.site
A URL generated on the client side to give status update to a customer/business about the sale. Review this guide page for more information: https://docs.etims.churpy.co/docs/offline-urls
Contains details about the invoice authentication for reverse or third party invoicing
Review this guide page for more information: https://docs.etims.churpy.co/docs/reverse-invoicing
This is the unit price for the item in this invoice. Decimal places are optional (If included, it should be not more that 2 decimal places)
curl -i -X POST \ https://docs-etims.churpy.co/_mock/openapi/sales \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_API_KEY_HERE' \ -d '{ "customer_pin": "P123456789P", "customer_name": "John Doe", "trader_invoice_number": "12345678901", "receipt_type_code": "S", "payment_type_code": "07", "invoice_status_code": "01", "original_invoice_number": 12, "callback_url": "https://webhook.site", "offline_url": "https://etims.ke/r/business_id/trader_invoice_number", "general_invoice_details": "General invoice details", "invoice_auth": { "type": "REVERSE", "issuer": "clsal91m300o7runidp910438" }, "items": [ { "id": "clu6souzx00mjfasxm4s6cweg", "quantity": 1.5, "unit_price": 3500.8, "discount_rate": 0, "discount_amount": 0, "metadata": { "invoice_desc": "Churpy_Etims service 01" } } ] }'
{ "date": "10/05/2023", "time": "04:16:11 pm", "Churpy_Etims_id": "clw70klzn18xwzpdhu4yujv5f", "trader_invoice_number": "12345678901", "receipt_number": 38, "serial_number": "KRACU0400000001", "internal_data": null, "receipt_signature": null, "etims_url": null, "sale_detail_url": "https://api.etims.churpy.co/sales/clw70klzn18xwzpdhu4yujv5f", "customer_name": "John Doe", "customer_pin": "P123456789P", "customer_phone_number": "+254112685368", "customer_email": "info@churpy.co", "queue_status": "paused", "invoice_number": 38, "sales_tax_summary": { "taxable_amount_a": 0, "taxable_amount_b": 517.24, "taxable_amount_c": 0, "taxable_amount_d": 0, "taxable_amount_e": 0, "tax_rate_a": 0, "tax_rate_b": 16, "tax_rate_c": 0, "tax_rate_d": 0, "tax_rate_e": 8, "tax_amount_a": 0, "tax_amount_b": 82.76, "tax_amount_c": 0, "tax_amount_d": 0, "tax_amount_e": 0 } }
curl -i -X GET \ 'https://docs-etims.churpy.co/_mock/openapi/sales?limit=10&page=1' \ -H 'X-API-Key: YOUR_API_KEY_HERE'
{ "pagination": { "total_count": 106, "total_pages": 11, "limit": 10, "current_page": 1, "has_next": true }, "data": [ { … } ] }
curl -i -X GET \ 'https://docs-etims.churpy.co/_mock/openapi/sales/{saleId}' \ -H 'X-API-Key: YOUR_API_KEY_HERE'
{ "date": "10/05/2023", "time": "04:16:11 pm", "Churpy_Etims_id": "clw70klzn18xwzpdhu4yujv5f", "trader_invoice_number": "12345678901", "receipt_number": 38, "serial_number": "KRACU0400000001", "internal_data": "PB3ZSZP3RZR3AUPYBYLUTFJDIA", "receipt_signature": "3JYZVPTPMYBGHG4A", "etims_url": "https://etims-sbx.kra.go.ke/common/link/etims/receipt/indexEtimsReceiptData?Data=P000000001G02JHEURBU6RQAMEF3Y", "sale_detail_url": "https://staging.api.etims.churpy.co/sales/YKSWCIiuvx", "customer_name": "John Doe", "customer_pin": "P123456789P", "customer_phone_number": "+254112685368", "customer_email": "info@churpy.co", "queue_status": "pending", "invoice_number": 38, "sales_tax_summary": { "taxable_amount_a": 0, "taxable_amount_b": 517.24, "taxable_amount_c": 0, "taxable_amount_d": 0, "taxable_amount_e": 0, "tax_rate_a": 0, "tax_rate_b": 16, "tax_rate_c": 0, "tax_rate_d": 0, "tax_rate_e": 8, "tax_amount_a": 0, "tax_amount_b": 82.76, "tax_amount_c": 0, "tax_amount_d": 0, "tax_amount_e": 0 } }