Churpy_Etims Public API
Churpy_Etims Public API
curl -i -X POST \ 'https://docs-etims.churpy.co/_mock/openapi/import-items/link_item/{import_item_id}' \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_API_KEY_HERE' \ -d '{ "item_id": "clk5c8y380000p5wtae2mz7gr" }'
{ "id": "clk46402x0000p5xll4gs2ye4", "task_code": "202302081365045", "declaration_date": "2023-02-02T21:00:00.000Z", "item_sequence": 1, "declaration_number": "23BUSIM400040606", "hs_code": "30049000", "item_name": "MEDICAMENT; NORMAL SALINE 0.9% I.V. [ NS ]; CT; 1450; 500ML; N/A; H; N/A; 1;", "origin_nation_code": "UG", "import_item_status_code": "2", "export_nation_code": "UG", "package": 17, "package_unit_code": "KGM", "quantity": 23925, "quantity_unit_code": "KGM", "gross_weight": 24650, "net_weight": 23925, "supplier_name": "ABACUS PARENTERAL DRUGS LIMITED", "agent_name": "Kandito International Company Kenya Limited", "invoice_foreign_currency_amount": 14355, "invoice_foreign_currency_code": "USD", "invoice_foreign_currency_rate": 124.45, "import_item_status": "UPDATED", "item_id": "clkassyhm00vtp5rw5bl3pdkq", "item_class_code": "30103604", "item_code": "KE2CRM0000015" }
Indicates whether the item is a stock item or not. Can either be true or false. Default is false
The callback URL to call when we have new information about the item, 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
curl -i -X POST \ https://docs-etims.churpy.co/_mock/openapi/items \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_API_KEY_HERE' \ -d '{ "item_class_code": "30111600", "item_type_code": "3", "item_name": "Churpy_Etims Service 01", "origin_nation_code": "KE", "package_unit_code": "NT", "quantity_unit_code": "U", "tax_type_code": "D", "default_unit_price": 1, "import_item_ref": "202302081365045", "is_stock_item": false, "callback_url": "https://webhook.site" }'
{ "item_class_code": 30111600, "item_type_code": 3, "item_name": "Churpy_Etims Service 01", "origin_nation_code": "KE", "package_unit_code": "NT", "quantity_unit_code": "U", "tax_type_code": "D", "default_unit_price": 1, "id": "clw7hepe200j86e177r8yozaf", "etims_item_code": "KE3NTU1929751", "is_stock_item": false, "running_balance": 0, "active": false }
curl -i -X GET \ 'https://docs-etims.churpy.co/_mock/openapi/items?limit=10&page=1' \ -H 'X-API-Key: YOUR_API_KEY_HERE'
[ { "pagination": { … }, "data": [ … ] } ]
curl -i -X POST \ https://docs-etims.churpy.co/_mock/openapi/items/item_composition \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_API_KEY_HERE' \ -d '{ "item_id": "clu6souzx00mjfasxm4s6cweg", "composition": [ { "composition_item_id": "clqgg0b3500ans601uam4dyqw", "composition_item_quantity": 30 } ] }'
[ { "id": "clka4fmy30005p5f6ev8jojr6", "item_id": "clu6souzx00mjfasxm4s6cweg", "composition_item_id": "clqgg0b3500ans601uam4dyqw", "composition_item_quantity": 30, "item_code": "DT-00359-foq1WiLaNS", "composition_item_code": "DT-78727-3Ahsf7EDUc", "registration_id": "ADMIN", "registration_name": "ADMIN", "application_id": "cljytzvci0002p5i2tcdwjabk", "queue_status": "un_queued" } ]
curl -i -X PUT \ 'https://docs-etims.churpy.co/_mock/openapi/items/{itemId}' \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_API_KEY_HERE' \ -d '{ "active": true, "item_name": "Churpy_Etims Product 01", "default_unit_price": 1000 }'
{ "item_class_code": 30111600, "item_type_code": 3, "item_name": "Churpy_Etims Service 01", "origin_nation_code": "KE", "package_unit_code": "NT", "quantity_unit_code": "U", "tax_type_code": "D", "default_unit_price": 1, "id": "clw7hepe200j86e177r8yozaf", "etims_item_code": "KE3NTU1929751", "is_stock_item": false, "running_balance": 0, "active": true }
curl -i -X GET \ 'https://docs-etims.churpy.co/_mock/openapi/items/{itemId}' \ -H 'X-API-Key: YOUR_API_KEY_HERE'
{ "item_class_code": 30111600, "item_type_code": 3, "item_name": "Churpy_Etims Service 01", "origin_nation_code": "KE", "package_unit_code": "NT", "quantity_unit_code": "U", "tax_type_code": "D", "default_unit_price": 1, "id": "clw7hepe200j86e177r8yozaf", "etims_item_code": "KE3NTU1929751", "is_stock_item": false, "running_balance": 0, "active": true }
curl -i -X DELETE \ 'https://docs-etims.churpy.co/_mock/openapi/items/{itemId}' \ -H 'X-API-Key: YOUR_API_KEY_HERE'
{ "item_class_code": 30111600, "item_type_code": 3, "item_name": "Churpy_Etims Service 01", "origin_nation_code": "KE", "package_unit_code": "NT", "quantity_unit_code": "U", "tax_type_code": "D", "default_unit_price": 1, "id": "clw7hepe200j86e177r8yozaf", "etims_item_code": "KE3NTU1929751", "is_stock_item": false, "running_balance": 0, "active": false }
curl -i -X POST \ https://docs-etims.churpy.co/_mock/openapi/items/from_purchase \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_API_KEY_HERE' \ -d '{ "purchase_id": "clk5c8y380000p5wtae2mz7gr", "items": [ { "item_sequence": 1, "unit_price": 300, "is_stock_item": false } ] }'
{ "data": [ { … } ], "pagination": { "current_page": 1, "has_next": false, "limit": 1, "total_count": 1, "total_pages": 1 } }