Courier API integration: checks before the first shipment
Validate data and avoid creating the same parcel twice.

In short: Before the first API shipment: keep keys only in the private integration settings, send a real order with a full address, and check it appears at the courier with the same reference and collection amount. If sending fails, search the courier account by reference before retrying, so the parcel isn’t created twice.
Connecting your store to a courier by API saves retyping every parcel and lets you follow statuses from your dashboard. But the first days are when mistakes happen: a parcel created twice, a wrong amount to collect, an incomplete address that brings the parcel back. Here is a practical check before and after the first shipment.
Before connecting
- The account: an active merchant account with the courier, with credentials issued directly by them.
- Confidentiality: keys go only into the private integration settings. Never send them on WhatsApp or show them in screenshots.
- Pickup address: your collection address is correct on the courier’s side.
The first test shipment
- Pick a real confirmed order with a complete address (governorate, district, address, number).
- Check the amount to collect: price + delivery if the customer pays it.
- Send the parcel to the courier from the dashboard.
- Check it appears on their side with the same reference and amount.
- Follow the status: did it change, and when?
If sending fails
The worst case: you send, the response fails (network issue), you send again, and the parcel is created twice. The rule: before retrying, search the courier account by reference. If it is there, do not resend.
Checklist
| Check | Why |
|---|---|
| One reference links order and parcel | Find any parcel quickly |
| Amount to collect | A mistake means missing money or a refusal |
| Governorate and district | Many couriers reject incomplete addresses |
| Status updates | Each courier works differently: automatic, periodic or manual |
| Returned parcels | Recorded and restocked when they physically arrive |
After the first week
- Compare parcels in your store with the courier’s: same number, same statuses?
- Match transfers with delivered orders. Read reconciling cash-on-delivery payouts.
- Log each incident with its date and cause, so you can discuss numbers with the courier.
In Matjri you connect your courier account under Integrations; see the connected companies.
Frequently asked questions
Do statuses always update automatically?
It depends on the courier: some push updates directly, others at intervals. Check with yours.
Can I switch couriers after connecting?
Yes, but parcels already sent finish their journey with the first courier. Don’t switch mid-route.
Related guides for the next step
- Choosing a courier in Tunisia: a measured pilot instead of a universal ranking
- Reconciling COD payouts in Tunisia: match courier transfers to orders
Sources and further reading
Editorial review: 30 November 2026. Examples and figures are illustrative; tools and fees may vary by account, supplier and courier.