Integration guides
How Hazchem connects to the systems healthcare already runs on. Where a partner has no API, we meet them with files.
Wholesalers (EDI / CSV)
UPD, CJ Distribution, Transpharm, Alpha Pharm and regional wholesalers
Method: CSV or EDI over SFTP, or email parsing. SA wholesalers publish no public APIs, so files are the norm.
- Agree the manifest template (below) and cut-off times per lane.
- Hazchem issues an SFTP folder per DC; drop one file per wave.
- Each row becomes a job; validation errors come back in a .err file within 2 minutes.
- A POD return file (CSV) lands in /outbound after each delivery, with seal and signature links.
Data exchanged: Order and tote IDs, consignee sites, temperature class. No patient data on wholesale lanes.
order_id,consignee_site,consignee_name,drop_window,totes,temperature_class,schedule_max,un_number,reference
SO-448120,ph-4,CarePoint Pharmacy Irene,10:00-12:00,3,ambient,S4,,PO 99812
SO-448121,ph-7,Highveld Pharmacy Kempton,10:00-12:00,1,2-8C,S4,,PO 99815Pharmacy dispensing software
Independent and chain pharmacies
Method: Hazchem Partner portal by default; API (partner:orders) or CSV for chains; vendor link where the dispensing vendor supports it.
- Mark an order ready from the dispensary: POST /v1/partner/orders/{id}/ready with the sealed bag number.
- Quote availability and SEP + dispensing fee via POST /v1/partner/quotes (patient chooses the pharmacy).
- Receive delivery.completed and delivery.failed webhooks to close or restock the order.
- Stock feed (optional): POST /v1/partner/stock-feed as JSON or CSV.
Data exchanged: Order ID, patient name, address, phone and OTP only. Medicine details stay with the pharmacy; riders see sealed bags.
Lab LIS
Pathology labs, depots and referral labs
Method: REST API + webhooks; manifests via POST /v1/manifests; HL7 or CSV bridge where the LIS cannot call REST.
- Create recurring routes for clinic pick-ups (POST /v1/routes).
- Push the specimen manifest per route or STAT job (barcodes, UN3373 or UN1845).
- Subscribe to custody.scanned and temperature.excursion to flag specimens before they arrive.
- Pull Proof-of-Custody certificates for accreditation audits (GET /v1/certificates/{id}).
Data exchanged: Specimen IDs and barcodes; patient names only where they are on the outer label.
CarTrack telematics
Hazchem fleet (account THER00642)
Method: CarTrack fleet API + signed webhook into POST /v1/telemetry/cartrack.
- Positions every 30 s feed the live map and ETAs.
- Geofence entry at pickup and drop-off triggers arrival events automatically.
- Harsh driving events feed the DriveSmart score in the Driver app.
- Webhook signatures are verified before ingestion.
Data exchanged: Vehicle positions, trips, geofence entry and exit, harsh events.
WhatsApp (360dialog)
Patients and client coordinators
Method: WhatsApp Business API via 360dialog; SMS fallback for recipients without a smartphone.
- Approved utility templates: booking confirmed, rider on the way, OTP, delivered, failed handover.
- Health Cart ordering by WhatsApp: script photo upload, encrypted and visible only to the chosen pharmacy.
- Inbound replies route to the support desk with job context.
- Utility messages cost about R0.17 each; marketing about R0.68.
Data exchanged: Templates, replies, media (scripts). Consent captured per POPIA s69.
PayFast (with Paystack)
Health Cart patients and pay-per-job B2B clients
Method: Payment API + ITN webhooks; split payments release seller funds on ePOD.
- Checkout charges goods (seller's invoice) and the flat delivery fee separately.
- Funds for the goods are held and released to the pharmacy, lab or rental partner on signed ePOD.
- Refunds and failed handovers reverse through the same provider.
- No percentage commission is taken on medicine value.
Data exchanged: Payments, refunds, splits, payouts.
Xero (or Sage per TOTG finance) [VERIFY]
Hazchem finance
Method: Accounting API: invoices, credit notes, payments, account codes.
- POD-verified jobs roll into invoices per client and cost centre.
- Statements issue by the 3rd business day of the month.
- Payments reconcile back to the invoice and update the client's billing standing.
- Fuel-clause rate changes post as approved rate-card versions, never retroactively.
Data exchanged: Invoices, credit notes, payments. Client invoices are also available via GET /v1/invoices.
Need another system connected? Email the integration team with your system name and the scopes you need, for example jobs:write and tracking:read.
