← SHIPPOP integration

Pricing, booking and following a SHIPPOP parcel

SHIPPOP puts Thailand's parcel couriers behind one API: Flash Express, Kerry Express (KEX), Thailand Post EMS, J&T, DHL and more. A parcel goes through four steps.

  1. Price it (shippop_get_pricelist). Give the origin and destination postcodes, the weight in grams and the size in cm. You get back every courier that serves the destination postcode, cheapest first, with any island or remote-area surcharge. Couriers that don't serve it are listed with the reason, such as ERR_POSTCODE. Couriers charge for the larger of the real weight and width × length × height / 5000 kg, so give real sizes.
  2. Book it (shippop_create_booking). Book with a courier_code from the price list. You get a purchase_id and the SHIPPOP tracking code (SP…). Nothing has gone to the courier yet. Fill in district (sub-district), state (district) and province when you know them. Ko Samui's Bo Phut, for example, is บ่อผุด / เกาะสมุย / สุราษฎร์ธานี, postcode 84320. Cash on delivery needs a list of the products in the parcel.
  3. Confirm it (shippop_confirm_booking). This hands the parcel to the courier, charges the account and calls a pickup, so it asks a person first. Thailand Post is not picked up: take EMS parcels to a post office. Once confirmed, a parcel can no longer be edited.
  4. Label and follow it. shippop_get_label saves the label as a file: sticker4x6 for 100 × 150 mm thermal printers, or A4, A5 or A6. Each status change arrives as the stream shippop:status_changed:<tracking_code>, with order_status set to booking, shipping, complete, problem, return, cancel and so on. Await it rather than polling shippop_track_parcel.

Common courier codes: FLE (Flash Express), KRYX (Kerry, picked up), EMST (Thailand Post EMS), JNTP (J&T, picked up). The price list is the authority on which codes an account can use.

Getting status updates

SHIPPOP has no API for setting a webhook. Its developer team sets one on request through LINE @DEVSHIPPOP. Send them the URL shown on the account's card in Daslab. Its path identifies the account, so keep it private. Ask for JSON; form-encoded bodies work too.