A webshop shipping integration connects bpost, PostNL and DHL by creating one shipment record per order that requests labels, stores tracking numbers and receives status events from each carrier. Returns reuse that same record, so a parcel stays traceable from checkout to refund.
Key takeaways
- One shipment record per order keeps labels, tracking and returns in a single place.
- Each carrier has its own service products and label rules, so the integration must map them separately.
- Tracking should update order status from carrier events rather than from manual copying.
- Returns should reuse the original shipment so the refund path stays traceable.
- Most failures come from address data, status mapping and retries rather than from the label request itself.
What does a webshop shipping integration need to do?
A webshop shipping integration must request a label when an order is ready, store the tracking number against that order, receive status changes from the carrier, and handle returns without creating a second record. If any of these steps lives in a spreadsheet or an inbox, the flow breaks at that point.
The integration sits between three systems: the shop, the carrier and the warehouse or back-office tool that decides when a parcel leaves. Each uses its own identifiers. The shop uses an order number, the carrier uses a shipment or barcode number, and the warehouse may use a picking reference. The core job of the integration is keeping those identifiers linked.
Services at bpost, PostNL and DHL differ in products, delivery windows, parcel size limits and label formats, and these rules change over time. Check each carrier's current documentation for your contract. Start with the official sites: bpost, PostNL and DHL. If you are weighing a custom build against a plug-in, the system integration service page describes how these connections are typically scoped.
How do label requests work across three carriers?
A label request sends shipment data such as sender, recipient, weight, dimensions and service product, and receives a printable label and a tracking number. Most integrations trigger the request when an order moves to a ready-to-ship status, not at checkout.
Choose the trigger carefully
Creating labels at checkout produces labels for orders that are later cancelled or split. Creating them at packing is safer, because the real weight and parcel count are known. The trade-off is that customers receive tracking information later.
Map shop options to carrier products
A shop may offer next-day delivery, a parcel locker or a home delivery option. Each option must map to a specific carrier product code. An unmapped option is a common cause of rejected requests, so validate every mapping before go-live.
Handle label formats and printing
Labels arrive in different formats and sizes, and your warehouse printers must support them. Store the label file with the shipment so that reprinting never triggers a second request to the carrier.
Should tracking updates change order status automatically?
Yes, for most shops. Carrier events should move orders to shipped, out for delivery and delivered, so customers get accurate notifications without staff involvement. Automation fails when carrier status codes are mapped loosely.
Carriers deliver events differently. Some push notifications to a callback address, while others require polling. Design for both: polling needs rate limits and deduplication, and push needs a secured endpoint plus a way to replay missed events.
Map statuses deliberately
Build a table that links each carrier event to one internal status. Log unknown events for review instead of ignoring them or forcing them into a status. A late in-transit event must never move an order backwards.
Show the tracking link everywhere
Include the carrier's tracking link in the shipping confirmation and keep it on the order record. Support staff then see the same status the customer sees, which removes a common source of duplicate questions.
How do returns fit into the same flow?
Returns fit the same flow when the return label is linked to the original order and shipment. The customer receives a return label, the parcel is scanned on arrival, and the refund decision uses the same record.
Return products differ by carrier. Some issue return labels through the shop, while others let customers drop off at a service point with a code. Confirm which return products your contract includes before designing the return page.
Link each return to the original shipment
Store the original order number on the return shipment. Without it, returned parcels arrive as unknown items and must be matched by hand.
Trigger refunds from receipt
A return request is a customer intention, not a received parcel. Refund when the warehouse scans the parcel, or after an agreed inspection step, so refunds track parcels actually received.
Where do these integrations usually fail?
Most failures come from data rather than from the carrier connection. The usual causes are address format problems, unmapped service products, duplicate requests after timeouts and status events arriving out of order.
- Address data: normalise postcodes, house numbers and country codes before sending the request, since Belgian, Dutch and Luxembourgish addresses are written differently.
- Timeouts: a request that times out may still have created a label, so check for an existing shipment before retrying.
- Outages: queue label requests and show staff a clear pending status instead of failing the order.
- Credentials: test and production keys are usually different, so rotate them through a documented process.
Log every request and response with the order number attached. This turns a vague complaint into a traceable problem within minutes. A ready-made shop plug-in is quicker for standard services with simple rules, while a custom integration suits businesses with special service rules, several warehouses or order flows driven by an ERP. If orders also live in an ERP, the ERP and CRM integration service covers how order and shipment data stay in sync. Background on API design is in the system integration and API articles.
What about personal data under GDPR?
Shipping data includes names, addresses and contact details, so the flow processes personal data. The General Data Protection Regulation sets the rules for lawful basis, data minimisation and retention. The official text is published on EUR-Lex.
This article is general information and not legal or tax advice.
In practice, send carriers only the fields they need, set retention periods for returned parcel data, and confirm that each carrier's terms match your privacy notice. Rui Codex provides technical implementation support for these flows only.
Hypothetical examples of how the flow plays out
Here are two hypothetical scenarios:
In the first, a clothing shop ships from one warehouse, using DHL for parcels and bpost for Belgian addresses. Labels are created at packing, status mapping moves orders to delivered, and each return is linked to its original shipment so the warehouse matches it on arrival.
In the second, a parts distributor serving the Netherlands and Luxembourg uses PostNL. A timeout creates a risk of a duplicate label, but the integration checks for an existing shipment first, so staff never have to cancel a second label by hand.