Skip to main content
A common requirement when fulfilling orders is getting a shipment’s tracking number into Base so it can be passed back to the order source — whether that’s a marketplace like Allegro or Alza, or your own e-shop. There are two basic approaches, and in practice they’re often combined.

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 using createPackageManual.
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:
  1. createPackage — generates the label with the carrier.
  2. getOrderPackages — fetches label IDs for an order. Only needed for multi-package shipments; for a single package the ID is already returned in the createPackage response.
  3. 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.
The response includes package_id, package_number (the tracking number), and courier_inner_number.

getOrderPackages and getLabel

Call getOrderPackages to retrieve label IDs when you have multiple packages on an order:
Then call getLabel with either package_id or package_number — one is sufficient:
The response includes 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 with deleteCourierPackage.
For Alza integrations: once a label has been sent to Alza (Shipment Departure has occurred), never delete it. Set the order status to Rejected instead — see Order Statuses. Deleting a label after transmission will cause reconciliation errors on the Alza side.
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).