← ZORT integration

Dispatching a ZORT order

There are two dispatch paths, and shipment means something different in each. Pick the wrong one and the dispatch fails.

Which path is this?

Read integrationName on the order (zort_get_order). If it names a channel like Shopee, Lazada, or TikTok Shop, this is a marketplace order. Empty means your own channel.

Own-channel orders

Here shipment is the carrier, and ZORT can call the carrier for you:

zort_ready_to_ship(order_number: "SO-0042", shipment: "flashexpress", booking: true)

With booking: true ZORT contacts the carrier and the response carries trackingNo and labelUrl. Booking works with Flash Express (flashexpress), J&T (jtexpress), and Kerry (kerry).

If you already have a tracking number from somewhere else, leave booking off and pass trackingno yourself.

Marketplace orders

Here shipment names the marketplace's own method, not a carrier. Booking does not apply, because the marketplace arranges the courier.

channelshipmentalso required
Shopeepickup or dropoffaddress, the pickup postcode, when using pickup
Lazadalex, or the order's own shipping channel
TikTok Shoppickup or dropoff

If a Lazada order has no shipping channel set, use lex.

For Shopee pickup you can also pass pickuptime as yyyy-MM-dd HH:mm. Leave it blank and ZORT picks the earliest slot, which is usually what you want.

What ready-to-ship actually does

It moves the order to Waiting, and on a marketplace order it also tries to mark the order ready in the marketplace. So Waiting means "dispatched as far as ZORT can take it", not "nothing has happened yet". That one trips people up when triaging a board.

Getting the labels

Once orders are booked, fetch labels in a batch:

zort_get_shipment_labels(order_numbers: ["SO-0042", "SO-0043"])

Each label comes back with a url, a type naming the carrier or marketplace, and a format of PDF, HTML, or URL.

Recording what you did

An order's status cannot express "I chased the carrier and I am waiting". Put that in a tag:

zort_tag_order(order_number: "SO-0042", tag: "awaiting-carrier")

Tags persist between runs, so the next person sees what has already been tried.

At volume

List endpoints cap at 500 rows per page. Above a few hundred orders a day you are paging, so filter first (by status, by date) rather than pulling everything and sorting client side. ZORT publishes no rate limit, so keep the sweep scheduled rather than tight.