Approach A — Record a tracking number from your own carrier integration
If you generate labels outside Base (for example, through your own GLS, DPD, or similar integration in your WMS), you simply write the finished tracking number into Base usingcreatePackageManual.
courier_code still matters here — it tells Base which carrier was used so it can pass that information along to the marketplace correctly.Approach B — Use Base’s built-in carrier integration
Most commonly used for marketplace-specific shipping such as Allegro (“Wysyłam z Allegro”) or Alza Shipping. You need the relevant shipping integration connected and configured in Base first. From there, three methods work in sequence:createPackage— generates the label with the carrier.getOrderPackages— fetches label IDs for an order. Only needed for multi-package shipments; for a single package the ID is already returned in thecreatePackageresponse.getLabel— downloads the label itself (base64-encoded, format depends on carrier settings: PDF, ZPL, EPL, DPL, HTML, or GIF).
createPackage — parameters
For cash-on-delivery shipments, add
{"id": "cod", "value": "123.40"} to fields. Use a decimal dot, not a comma.package_id, package_number (the tracking number), and courier_inner_number.
getOrderPackages and getLabel
CallgetOrderPackages to retrieve label IDs when you have multiple packages on an order:
getLabel with either package_id or package_number — one is sufficient:
extension (one of pdf, html, gif, png, epl, zpl, dpl) and label as a base64-encoded string.
How the tracking number gets back to the order source
Depending on the integration’s settings in Base, the tracking number is forwarded to the order source either:- Immediately after it is added, or
- When the order is set to a specific status — note this is not instant; it runs in batches, typically around 9:00, 10:00, 13:00, 16:00, and 23:00 (± a few minutes). For Alza integrations, the cut-off time (COT) setting also plays a role.
Deleting a shipment
A created shipment can be deleted withdeleteCourierPackage.
In practice, both approaches are often combined — your own integration for standard carriers (GLS, DPD, etc.) and Base’s built-in integration for marketplace-specific shipping (Alza, Allegro).