Get API key
Release notes

Changelog

Every developer-facing change lands here. Subscribe via RSS or the email digest for breaking-change advance notice.

v1.54
Current

Shipment detail: pricing basis of the final fee

For orders where inbound-date pricing is in effect, final freight and surcharges are charged at the rate card in effect on the day the parcel is checked in at the warehouse; all other orders are settled as before. `billing` on shipment detail now reports which rate table the final fee used, when this basis was recorded.

  • addedGET /api/v1/shipments/{shipment_id}: billing has a new optional field pricing_basis with inbound_at (ISO 8601 or null), rate_table_code, rate_table_version and repriced (true when the rate table in effect at check-in differs from the one used for the quote at booking). It appears only on a settled shipment whose settlement recorded this basis and is absent otherwise. It is null when the shipment was settled on its booking quote and no check-in time was recorded.
  • changedpre_charge_hkd (and pre_charge for USD-wallet accounts) is an estimate. For an order where inbound-date pricing is in effect, the final freight and surcharges follow the rate card in effect on the check-in day, so charged_hkd can then differ from it for the same weight; other orders are settled as before. Existing billing fields keep their names, types and meaning.
v1.53

Pickups and self drop-off: destination warehouse follows your pickup rules

The warehouse that each parcel goes to for a pickup or a self drop-off is now decided by the pickup rules set for your account. Fields, enum values and error codes are unchanged; `destination_mode` stays as a compatibility field.

  • changedGET /api/v1/pickups/eligible-shipments, POST /api/v1/pickups/preview and POST /api/v1/pickups: the destination of each shipment, the pickups created and route_dates follow the pickup rules of your account. The rules can send YunExpress parcels, Globavend parcels, or both, to the iMile warehouse, so two carriers of one account can now have different destinations. Read destination of each shipment and of each pickup instead of inferring it from the carrier.
  • changeddestination_mode (in the pickup preview, the self drop-off record and GET /api/v1/pickups/self-dropoffs/config) is kept only for compatibility. It is imile_hub when both YunExpress and Globavend parcels go to the iMile warehouse, and per_carrier in every other case, including when only one of them is redirected. An account with no special rules gets the same values as before.
  • addedParcels whose carrier is imile can now appear in GET /api/v1/pickups/eligible-shipments with destination set to imile, and can be arranged for pickup or declared for self drop-off. Parcels of other carriers keep their rule destination.
  • changedPOST /api/v1/pickups/self-dropoffs: parcels are grouped by the same rules, so a pickup and a self drop-off of the same parcels go to the same warehouse; the warehouse_key of each record is the warehouse. Parcels whose rule destination is not YunExpress, Globavend or iMile (for example KediGlobal parcels) are still refused with carrier_pickup_disabled. destination_mode.mode of the configuration is no longer blocked.
  • changedNo field was removed or renamed and no enum value changed. If you validate responses against a pinned copy of the OpenAPI schema, nothing needs to change; only the descriptions of destination_mode were updated.
v1.52

Error messages: English message with a parallel Chinese version

API error responses now carry an English `message` and a Chinese `message_zh` (Traditional or Simplified, chosen in Settings). Existing fields, HTTP statuses, `sysCode` values and error keys are unchanged.

  • addedEvery error response of the /api/v1 endpoints has two new optional string fields: message_zh (the same message in Chinese) and message_zh_locale (zh-hk for Traditional, zh-cn for Simplified). message itself is always English. Free text that used to be inserted in Chinese (the reason in carrier rejections and pre-check failures, for example) is now English in message and Chinese in message_zh.
  • addedChoose the Chinese variant under Settings → API error language; the default is Traditional. The setting belongs to the main account and sub-accounts follow it. Failures before authentication (401, request body too large, invalid JSON) always use Traditional.
  • addedPOST /api/v1/shipments: the dispatch object in a 201 response has a new error_zh (string | null) next to error; it is null when the booking succeeded.
  • changedPOST /api/v1/rates: in a 400 response, message and data.errors are now English and the new data.errors_zh lists the same reasons in Chinese, one entry per entry of data.errors. data.field is unchanged.
  • changedCarrier rejection (422 1500039 and 9900027), pre-check failure (400 9900026), last-mile rejection (422 1500200) and service-unavailable messages now state the specific reason and the next step in English, without carrier names or internal codes.
  • changed504 HANDLER_TIMEOUT (1500006) now says that the outcome is not yet known and asks you to retry with the same Idempotency-Key and the same body (409 means the request is still processing). Do not retry with a new key. The 30-second limit and the behavior are unchanged.
  • changedReplays return the first response as it was, including its Chinese version, even if you change the setting in between: an idempotent replay (24 hours) and a replay of a rejected payload (data.negative_cache: true, 1 hour). Responses stored before this release can still replay in the old format for up to 24 hours.
  • changedDo not parse the text of message. Branch on sysCode, the error key (for example YUN_DISPATCH_REJECTED) and dispatch.error_code. If your client validates responses against a pinned copy of the OpenAPI schema, update it to accept message_zh, message_zh_locale, dispatch.error_zh and data.errors_zh.
v1.51

Shipment create: declaration adjustment fields for some US orders

For some orders to the United States, `POST /api/v1/shipments` may adjust the English item name and HS code when the shipment is created, and the response reports what was declared. The request format and existing error codes are unchanged.

  • addedPOST /api/v1/shipments (and the MCP create_shipment tool): for some orders to the United States, the system may adjust an item's English description and hs_code when the shipment is created. The adjusted values are the ones sent to the carrier and stored on the shipment. Chinese item names, quantities, prices, declared value and the quoted price are never changed.
  • addedThe create response has a new optional boolean declaration_adjusted. It appears only on the orders described above: true when at least one item was adjusted, false when no item was adjusted and everything was sent as submitted. Adjustment is decided item by item, so a single order can contain both adjusted and unchanged items. When the system cannot confirm that an order is eligible, the field (and items) may be absent. Other orders do not include this field.
  • addedWhen declaration_adjusted is true, the response also has an optional items array that lists every item in the order you submitted, each with description and hs_code (string or null) as now declared. An item that was adjusted additionally carries original (description, hs_code): the value after the system's standard normalisation, before the AI adjustment. It can therefore differ slightly from the exact text you submitted, for example in letter case or HS code formatting. When declaration_adjusted is false or absent, items is not returned.
  • changedFor these orders the create request can take up to about 8 seconds longer than before while the declaration is checked. The check never uses time needed to complete the order: when the request has too little time left, the check is skipped. A failure is handled per item: an item that cannot be matched keeps its original values, the other items are still adjusted, and the shipment is always created. Retrying with the same Idempotency-Key returns the stored response and does not run the check again.
  • changedExisting request fields, HTTP statuses and error codes are unchanged. If your client validates create responses against a pinned copy of the OpenAPI schema, update it so that it accepts the two new optional fields.
v1.50

Shipment create: sanitized dispatch.error, new error_code and will_retry

`POST /api/v1/shipments` now returns `dispatch.error` as a sanitized description and adds `dispatch.error_code` and `dispatch.will_retry`. HTTP statuses and the rules for a failed booking are unchanged.

  • changedPOST /api/v1/shipments (and the MCP create_shipment tool): dispatch.error keeps its type (string | null) but is now a sanitized English description for people to read. Its wording can change at any time, so do not parse it.
  • addeddispatch.error_code (string | null): a stable classification for programmatic handling. Values: DISPATCH_FAILED, DISPATCH_TEMPORARY_FAILURE, DISPATCH_DUPLICATE_REFERENCE, DISPATCH_DESTINATION_UNREACHABLE, DISPATCH_SERVICE_CONFIGURATION, DISPATCH_ITEM_DESCRIPTION_REJECTED, DISPATCH_TAX_PREPAY_UNAVAILABLE, DISPATCH_DECLARED_VALUE_LIMIT, DISPATCH_INVALID_FIELD, DISPATCH_RULE_REJECTED, DISPATCH_BOOKING_VERIFICATION_REQUIRED and DISPATCH_SERVICE_UNAVAILABLE. Treat a value you do not recognise as DISPATCH_FAILED.
  • addeddispatch.will_retry (boolean): true only when the platform will retry the carrier booking automatically for a shipment it kept. A carrier booking that fails during creation is still rejected with HTTP 422 and no shipment is kept, so 201 responses currently return false.
  • changedWhen the booking succeeded, dispatch.error and dispatch.error_code are null and dispatch.will_retry is false. dispatch is still null for test-mode creates. When dispatch.error_code is DISPATCH_BOOKING_VERIFICATION_REQUIRED the booking outcome is unconfirmed: keep the shipment, do not create it again, and contact support.
  • changedThe dispatch object in the OpenAPI schema is closed (additionalProperties: false) and now lists error_code and will_retry as required properties. If your client validates responses against a pinned copy of the schema, update it before relying on these fields.
v1.49

Service-restriction unavailable_code values renamed

The service-restriction `unavailable_code` values introduced in v1.44 now use the `SERVICE_` prefix. Meanings, HTTP statuses and response shapes are unchanged.

  • changedPOST /api/v1/rates and POST /api/v1/shipments (and the MCP create_shipment tool): unavailable_code now returns SERVICE_DESTINATION_UNSUPPORTED, SERVICE_EU_TAX_MODE_REQUIRED, SERVICE_OWN_VOEC_UNSUPPORTED, SERVICE_UK_VAT_UNSUPPORTED, SERVICE_SIGNATURE_UNSUPPORTED, SERVICE_INSURANCE_UNSUPPORTED, SERVICE_BATTERY_UNSUPPORTED, SERVICE_DISPATCH_MODE_UNSUPPORTED or SERVICE_BOOKING_PAUSED for these cases. The codes previously returned for them are no longer sent; if your integration matches on them, switch to the new values. unavailable_reason is unchanged.
  • changedPOST /api/v1/pickups/{pickup_id}/cancel: when the carrier side could not confirm the cancellation, the 502 PICKUP_CANCEL_UPSTREAM_FAILED response now reports data.reason_code carrier_cancel_failed. This replaces the value previously returned for that case; if your integration matches on the old value, switch to carrier_cancel_failed. The status code, error code and response shape are unchanged.
v1.48

Shipment detail: warehouse-measured parcel dimensions

Authenticated shipment detail now includes a nullable `measured` block for warehouse dimensions, while billing and tracking continue to use their existing fields.

  • addedGET /api/v1/shipments/{id} now returns measured: { length_cm, width_cm, height_cm } in centimetres for the packed parcel. All three values must be positive finite numbers; absent, partial or invalid measurements return null. This does not describe the unpacked item's dimensions.
  • addedMeasurements come from the existing YunExpress capture, with an iMile capture as fallback. The endpoint keeps the same account and live/test-mode filters; shipment lists and public tracking do not expose this block. The change is read-only and does not alter billing, settlement or measurement collection.
v1.47

IOSS filing: preserve confirmed approval and separate retry diagnostics

IOSS re-filing preserves the last confirmed carrier result when a later attempt fails. Latest-attempt diagnostics are separate, and the sandbox registration sequence is now explicit in the integration guides.

  • fixedPOST /api/v1/ioss and GET /api/v1/ioss: filing.status and filing.filed retain the last confirmed carrier result. A failed retry does not erase an earlier approved result or change its confirmed filed value to false. The separate optional filing.last_attempt_status reports in_progress, succeeded or failed; succeeded does not itself mean carrier approval.
  • addedA latest failed attempt keeps filing.error_code as IOSS_FILING_FAILED and adds optional nullable filing.carrier_error_code and filing.carrier_error_message. Numeric carrier codes preserve leading zeroes, including 02039207 (IOSS agreement not accepted) and 02039188 (registration country not an EU member). Messages use fixed safe text for known codes and a generic explanation otherwise; the original provider response is never returned. Clients must accept absent or null optional diagnostics and unknown carrier codes.
  • changedSandbox setup is documented explicitly: with an mk_test_* key, first register the number through POST /api/v1/ioss for the same account, then send that ioss_number to POST /api/v1/rates and POST /api/v1/shipments. The sandbox registry is separate from live; a live registration or live default alone does not authorize an explicit sandbox override (400 IOSS_NOT_OWNED). Sandbox registration never files with the carrier or changes the live default. Omitting ioss_number keeps the existing account-default fallback behavior.
v1.46

Destination local delivery now covers Mexico

`order_type` `domestic_delivery` now also covers Mexico (`MX`), in addition to Colombia. Everything here is additive: Colombia, every other service and every existing request and response are unchanged.

  • addedGET /api/v1/service_tiers?order_type=domestic_delivery lists the Mexico service for accounts that have been enabled for it, and POST /api/v1/rates and POST /api/v1/shipments accept it with recipient.country_code MX. recipient.district (the state, for example Nuevo León) and recipient.city are both required, and recipient.postal_code must be a five-digit Mexican postal code covered by the service. A postal code outside the coverage makes the service unavailable in POST /api/v1/rates, and an order for it is refused before any wallet hold or shipment is created.
  • addedThe Mexico service is priced in Mexican pesos and charged in US dollars. POST /api/v1/rates converts the peso price at the MXN to USD exchange rate of the moment, rounded up to the next cent, and returns it in the existing US dollar fields (pricing_currency USD, total_usd, pricing_fx); total_hkd is what the wallet is charged, converted at the USD/HKD rate in pricing_fx. POST /api/v1/shipments charges the same amounts and keeps them in pricing_snapshot. No response field is added. If an exchange rate cannot be resolved, POST /api/v1/shipments returns 503 FX_RATE_UNAVAILABLE before any wallet hold or shipment is created.
  • addedLimits of the Mexico service: one parcel per order (more than one entry in parcels returns 400 INVALID_FIELD); when dimensions are sent, the longest side must be at most 80 cm and the three sides together at most 120 cm; the chargeable weight is the larger of the actual weight and the volumetric weight (length x width x height / 5000), at least 1 kg, billed in 1 kg steps, up to 30 kg. A parcel outside these limits makes the service unavailable in POST /api/v1/rates.
  • addedThe Mexico service accepts general cargo only: a goods_category other than general (for example goods with batteries, cosmetics or health products) makes it unavailable. 3C electronics (computers, communications, consumer electronics and peripherals) and fragile goods (ceramics, glass, jewelry, alcohol) are not accepted, and prohibited goods are listed in the terms of service; these are not detected automatically.
  • addedThe sender rules of domestic_delivery are unchanged: a complete sender located in Mexico (MX) is used as given, and an omitted, incomplete or non-Mexican sender is replaced, as a whole, by the Monterrey warehouse of the service.
v1.45

Destination local delivery: sender is optional

For `order_type` `domestic_delivery`, the sender is now optional. When it is missing, incomplete or not in the destination country, the destination warehouse of the chosen service is used as the sender. This replaces the earlier requirement for a complete Colombian sender. `full_service` is unchanged.

  • changedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): for domestic_delivery, every sender field is optional. A complete sender located in the destination country (for example CO for Colombia) is used as given. If sender is omitted, null, empty, incomplete, or located in another country (for example HK or CN), the destination warehouse of the chosen service is used as the sender instead, as a whole: the warehouse name, phone, city and address replace your values and are not mixed with them. The sender postal code is optional.
  • changedThe earlier rules that required a complete sender with a postal code in Colombia for such a service no longer apply to domestic_delivery: a sender in another country is no longer refused with 400 SENDER_COUNTRY_NOT_ACCEPTED (1500049), and a partial sender is accepted. Type and length limits of each field still apply. The services of domestic_delivery now report sender_requirement optional. recipient.postal_code is checked as before, so an unsupported Colombian postal code still returns 400 CO_POSTAL_UNSUPPORTED (1500050).
  • changedThe sender in the response of POST /api/v1/shipments is the sender actually used for the order: your own address when it was complete and in the destination country, otherwise the destination warehouse. The input you sent is kept on the order for the record and is shown as the original sender details in OMS; the order is marked as filled in by the system there. Orders are not changed afterwards when a warehouse setting changes. If the warehouse of a service has no phone or city set up, the service cannot be ordered: POST /api/v1/shipments returns 400 ORDER_TYPE_DISABLED (1500040) in the production environment and 400 ORDER_TYPE_SERVICE_MISMATCH (1500042) in non-production environments.
  • fixedGET /api/v1/shipments/{id} does not return sender; earlier release notes describing a nullable sender in the detail view did not match the implementation. full_service is unchanged: leaving out sender still falls back to your account default sender address, and a provided sender must be complete.
v1.44

New unavailable_code values and carrier_changed conflicts when a service cannot be booked

A service can now be marked unavailable for a specific shipment for additional reasons, with a machine-readable code. Everything here is additive except one error mapping, noted below.

  • addedPOST /api/v1/rates: unavailable_code may now also be one of SERVICE_DESTINATION_UNSUPPORTED, SERVICE_EU_TAX_MODE_REQUIRED, SERVICE_OWN_VOEC_UNSUPPORTED, SERVICE_UK_VAT_UNSUPPORTED, SERVICE_SIGNATURE_UNSUPPORTED, SERVICE_INSURANCE_UNSUPPORTED, SERVICE_BATTERY_UNSUPPORTED, SERVICE_DISPATCH_MODE_UNSUPPORTED or SERVICE_BOOKING_PAUSED. The option is returned with available: false and unavailable_reason set; choose another service or change the shipment details. Accounts and services to which this does not apply see no change.
  • addedPOST /api/v1/shipments (and the MCP create_shipment tool): a service that cannot be booked for the shipment is refused before any wallet hold or shipment is created. The 400 INVALID_FIELD carries data.unavailable_code; when the condition appears only at the final re-quote, the 409 PRICING_QUOTE_CHANGED carries it in data.current_option.unavailable_code.
  • changedIf the booking channel of a service changes between the pre-check and the final check of one create request, POST /api/v1/shipments now returns 409 PRICING_QUOTE_CHANGED with data.reason carrier_changed and the current option, instead of 400 INVALID_FIELD. No wallet hold or shipment is created; call POST /api/v1/rates again and retry.
v1.43

Documentation: actual error responses and code reference

The developer documentation now describes the error bodies returned by the API, and the error-code reference reads from the runtime definitions. This corrects the documentation only; API behavior is unchanged.

  • fixedError examples use top-level status (number), sysCode (string) and message, with optional data. Read message for the failure reason and X-Request-Id for support; there is no nested error.message or guaranteed message_zh field.
  • fixedValidation examples describe the real Zod 400 response (Bad Request with issues in data and no sysCode), and document the legacy shape returned for unexpected 500 errors. The HTTP status reference distinguishes these responses from shipment and dispatch lifecycle statuses.
  • fixedThe code reference is derived from the public API error namespace and the shared errors used by v1, replacing invented codes and incorrect HTTP mappings. OpenAPI also documents the shared middleware failures and the 422 returned when carrier booking fails.
v1.42

IOSS registration and carrier filing API

Register an existing IOSS number and submit its details for carrier filing through the API, using the same account registry as OMS Settings.

  • addedPOST /api/v1/ioss registers or re-files a number; GET /api/v1/ioss lists active registrations and their latest recorded filing results. They use shipments:write and shipments:read. Registration requires Idempotency-Key, does not issue a tax number and does not change your account default. Live registrations are shared with OMS Settings and can be supplied as ioss_number when quoting or creating shipments.
  • addedA successful HTTP 200 means the local registration was saved. Inspect filing.status for carrier approval or review; failed carries IOSS_FILING_FAILED. A repeat with the same idempotency key replays its original result for 24 hours; use GET for the latest result, or a new key to retry filing. Test keys keep isolated simulated registrations and never contact the carrier or change live IOSS ownership.
  • addedOMS Settings now offers a filing retry action using the saved registration details, a refresh action, and bounded status refresh after submission. It continues to distinguish filing failure, submission and pending carrier review from approval.
v1.41

USD-priced services and Colombia domestic delivery: US dollar prices, frozen exchange rate, one parcel per order

A service can now be priced in US dollars; the first use is Colombia domestic delivery (`order_type` `domestic_delivery`). Everything here is additive: HKD-priced services and every existing request and response are unchanged, and none of the new fields appears for them.

  • addedPOST /api/v1/rates options of a USD-priced service carry pricing_currency (USD), freight_usd, reg_fee_usd, surcharge_total_usd, total_usd, pricing_fx (rate, rate_type, fetched_at, stale: the USD/HKD rate the quote was converted at) and, for flat per-weight-bracket price tables, freight_presentation (flat_bracket: show freight_usd and reg_fee_usd as one delivery fee). Each surcharge line also has amount_usd. The *_hkd fields keep their meaning in HKD: every line is converted at pricing_fx.rate and total_hkd is what your wallet is charged.
  • addedPOST /api/v1/shipments freezes the same rate: the pricing_snapshot in the response carries the USD fields above, and GET /api/v1/shipments and GET /api/v1/shipments/{id} return pricing_currency, total_usd and pricing_fx for such orders. Settlement uses the frozen rate and never fetches a new one. expected_total_hkd is still compared against the HKD total, so a rate move between your quote and the order returns 409 PRICING_QUOTE_CHANGED with the current option.
  • changedDuty and tax prepaid on a USD-priced service are calculated from the declared value in USD. Send items with country_of_manufacture on POST /api/v1/rates and POST /api/v1/shipments so the free-trade-agreement origin can be applied; an item without it is treated as non-free-trade-agreement origin. The MCP get_rates tool now accepts declared_value_usd.
  • changedA service can limit an order to one parcel. POST /api/v1/shipments with more parcels than the service allows returns 400 INVALID_FIELD (service_tier_id (this service accepts at most 1 parcel per order; place separate orders)). When no USD/HKD rate can be resolved, a USD-priced service returns 503 FX_RATE_UNAVAILABLE at quote and at order time; HKD-priced services are not affected.
  • changedMCP get_rates: each entry of items now accepts the same fields as items of create_shipment (including country_of_manufacture and unit_price), plus declared_currency (HKD or USD), so the quote is priced from the same inputs as the order.
  • addedorder_type domestic_delivery (destination local delivery) for Colombia: POST /api/v1/rates accepts it, GET /api/v1/service_tiers?order_type=domestic_delivery lists its services and POST /api/v1/shipments places the order with the service_tier_id of such a service (service_tier_id must be a service of the same order type). Services are matched on the destination only, so the same options are returned whatever sender country or origin_country is sent (or if none is sent).
  • changedA service that is dispatched in Colombia needs a complete sender located in Colombia (CO) with a postal code: any other sender.country_code is refused with 400 SENDER_COUNTRY_NOT_ACCEPTED (1500049), and a missing sender postal code with 400 INVALID_FIELD. For a recipient in Colombia, recipient.postal_code must be a supported six-digit Colombian postal code, otherwise 400 CO_POSTAL_UNSUPPORTED (1500050). These checks run before any wallet hold or shipment is created.
v1.40

Chinese item names for YunExpress Hong Kong-to-Croatia shipments

Every item on a YunExpress shipment from Hong Kong to Croatia requires a non-blank Chinese customs name. Existing API clients using that route must include this field in their item declarations.

  • changedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): when the selected service is YunExpress with Hong Kong (HK) origin and the recipient country is Croatia (HR), every item must include a non-blank description_zh. A missing or whitespace-only name returns 400 INVALID_FIELD, with the affected items[i].description_zh paths in data.field, before any wallet hold or shipment is created.
  • changedExisting API clients on that route that omit description_zh are refused and must update their item declarations. The existing rule for CN-prefixed Product Codes remains in force; no new requirement is added for other carriers or other routes.
v1.39

Per-account destination restrictions: unavailable_code on rates

An administrator can now restrict, per account and per Product Code, which destination countries may be booked. A restricted service stays in the quote but is marked unavailable, and creating a shipment to that destination is refused with the same reason code.

  • addedPOST /api/v1/rates: each option may carry a new optional field unavailable_code. It is currently emitted only as CLIENT_PRODUCT_COUNTRY_DISABLED, meaning your account has not enabled that destination for the option's Product Code; the option is returned with available: false, unavailable_reason set and its prices unchanged. Other unavailable options keep carrying unavailable_reason alone.
  • addedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): a service whose destination is not enabled is refused before any wallet hold or shipment is created. If the destination is already restricted when the create request starts (even if you quoted before the restriction), the 400 INVALID_FIELD (data.field service_tier_id) carries data.unavailable_code CLIENT_PRODUCT_COUNTRY_DISABLED and data.unavailable_reason. Only if the restriction takes effect after that first check has passed, before the final re-quote inside the same create request, does the 409 PRICING_QUOTE_CHANGED carry the same value in data.current_option.unavailable_code.
  • changedGET /api/v1/service_tiers is not narrowed by these restrictions and still lists every destination the Product Code supports. Use available and unavailable_code on POST /api/v1/rates to know whether a destination can be booked. Contact customer support to have a destination enabled for your account.
  • changedBackward compatible: accounts without a restriction see no change, and options that are available or unavailable for any other reason do not gain the new field.
v1.38

Self drop-off API: declare, list and follow self drop-offs

Declare through the API that you will take Hong Kong-origin shipments to the carrier warehouse yourself, instead of arranging a pickup, and follow each declaration to the warehouse. It uses the pickup scopes, costs nothing and cannot be cancelled by you.

  • addedFour endpoints under /api/v1/pickups/self-dropoffs: GET /pickups/self-dropoffs/config (allowed dates per destination warehouse, warehouse addresses, destination mode, cap per declaration), POST /pickups/self-dropoffs (declare; a required Idempotency-Key), GET /pickups/self-dropoffs (list) and GET /pickups/self-dropoffs/{self_dropoff_id}. They use the scopes pickups:read and pickups:write; there is no new scope. A declaration is free and creates one record per destination warehouse. See the Pickups guide. Until the self drop-off API is switched on for your environment the config and declaration endpoints answer 503 PICKUP_FEATURE_DISABLED (1500103) with data.reason_code public_api_self_dropoff_disabled; the list and detail endpoints only need the pickup API to be on.
  • addedHong Kong origin only: through the API a declaration accepts only shipments sent from Hong Kong. If any shipment in the request is Chinese-origin, or its origin cannot be determined, the whole request is refused with 400 SELF_DROPOFF_ORIGIN_NOT_SUPPORTED (1500117) and nothing is created, so send Hong Kong-origin shipments in their own request. The dropoff_date must be allowed for every warehouse the shipments go to, that is, in the dates those warehouses have in common (otherwise 400 PICKUP_INVALID_DATE_OR_SLOT, 1500111).
  • addedWhen a record is for Globavend the Globavend pre-alert email is sent as soon as the declaration is confirmed. You cannot cancel or change a declaration through the API: POST /pickups/{pickup_id}/cancel does not apply to it and pickups:cancel has no effect; contact customer service to have a declaration released. A shipment held by a declaration refuses POST /shipments/{shipment_id}/cancel with 409 SHIPMENT_HAS_ACTIVE_PICKUP (1500116).
  • addedRetries are protected twice. For 24 hours the same Idempotency-Key with the same body returns the first response unchanged; the same key with a different body is 409 IDEMPOTENCY_KEY_REUSED. After 24 hours the same Idempotency-Key with the same shipments, from the same API key, still returns the original records with idempotent: true (their status may have moved on) and creates nothing, even if dropoff_date differs; the same key with different shipments is 409 IDEMPOTENCY_KEY_REUSED. Use a new key for every new declaration.
  • addedTest keys (mk_test_) run self drop-offs on a simulator: nothing is sent to any carrier, no email is sent, only test shipments can be declared and the records (livemode: false, simulated: true) are kept apart from live data. About 60 seconds after the declaration a record moves from declared to arrived_at_warehouse; simulation: {"outcome": "cancelled"} (test keys only; a live key gets 400) makes it move to cancelled instead, as if our operations team had cancelled it.
  • addedThree self_dropoff.* webhook events: self_dropoff.declared, self_dropoff.arrived_at_warehouse and self_dropoff.cancelled, one per committed status change, delivered at-least-once like the pickup.* events. The list, the detail endpoint and the events also cover self drop-offs your team declared in the web portal. Only transitions after pickup events were switched on are published: earlier history is not sent. GET /webhooks/{webhook_id}/sample accepts the new event types (for example self_dropoff.declared).
  • addedMCP: four self drop-off tools (get_self_dropoff_config, list_self_dropoffs, get_self_dropoff, declare_self_dropoff) with the existing pickup scopes. declare_self_dropoff needs confirmed=true and sends an Idempotency-Key derived from the declaration.
  • changedA webhook endpoint subscribed to * also receives the three self_dropoff.* events once the self drop-off API is switched on, including for declarations made in the web portal. List explicit event names if you only want some events.
v1.37

Pickups API: arrange, follow and cancel pickups

Arrange a courier pickup for your shipments, follow it to the warehouse and cancel it through the API, with the same eligibility, fees and cancellation rules as the web pickup page.

  • addedSeven endpoints under /api/v1/pickups: GET /pickups/eligible-shipments, GET /pickups/addresses, POST /pickups/preview, POST /pickups, GET /pickups, GET /pickups/{pickup_id} and POST /pickups/{pickup_id}/cancel, with the scopes pickups:read, pickups:write and pickups:cancel. Arranging is two calls: the preview prices and validates and saves nothing, then the booking repeats the selection with the preview_token (valid 5 minutes) and a required Idempotency-Key. See the Pickups guide. Until pickup arrangement is switched on for your environment every pickup endpoint answers 503 PICKUP_FEATURE_DISABLED (1500103); the sixteen pickup error codes 1500101–1500116 are in the error table.
  • addedPickup address: send it inline (a Hong Kong address; one equal to an address on file is reused, otherwise it is saved) or as address_id with address_resolved_version. Important: the first pickup arranged through the API switches the account to multiple pickup addresses. This cannot be undone and changes the layout of the pickup page in the web portal. The preview reports will_enable_multi_pickup beforehand and never switches anything.
  • addedTest keys (mk_test_) run pickups on a simulator: no courier is contacted, no money moves, the account is not switched, and an arranged pickup walks through submitted, driver_dispatched, picked_up and arrived_at_warehouse within about four minutes. simulation: {"outcome": "failure"} ends it as failed; cancel a failed test pickup within one hour, because it keeps holding its shipments until then.
  • addedSeven pickup.* webhook events (pickup.scheduled, pickup.submitted, pickup.confirmed, pickup.picked_up, pickup.arrived_at_warehouse, pickup.failed, pickup.cancelled), one per committed status change, delivered at-least-once about one to two minutes later. The transition fields are fixed per event_id; the pickup state fields are a snapshot from when the event was first emitted, so read GET /pickups/{pickup_id} for the latest state. GET /webhooks/{webhook_id}/sample takes an optional event_type (for example pickup.confirmed).
  • addedMCP: seven pickup tools (list_pickup_eligible_shipments, list_pickup_addresses, preview_pickup, book_pickup, list_pickups, get_pickup, cancel_pickup) and the OAuth scopes pickups:read, pickups:write and pickups:cancel. book_pickup and cancel_pickup need confirmed=true. Connections made earlier keep the scopes they were granted: reconnect iMile Express to approve the new ones.
  • changedA webhook endpoint subscribed to * also receives the pickup.* events once pickup events are switched on. List explicit event names if you only want shipment events.
v1.36

Idempotency keys are bound to method, path and body

An Idempotency-Key is now tied to the endpoint that first used it. Reusing one key for a different endpoint can no longer replay the first endpoint's response.

  • changedEvery POST that takes an Idempotency-Key: a key is bound to the HTTP method, path and request body of the first request that used it. The same key with the same method, path and body still replays the stored response for 24 hours. The same key with a different body, or on a different endpoint, now returns 409 IDEMPOTENCY_KEY_REUSED (1500003) and the request is not run. Previously a bodyless POST sent with the same key to two different resources could replay the first resource's response. Use one new key per logical operation.
  • changedPOST /v1/shipments/{shipment_id}/cancel (and the MCP cancel_shipment tool, which calls it): a shipment that a pickup currently holds now returns 409 SHIPMENT_HAS_ACTIVE_PICKUP (1500116) and nothing is changed — no status change, no carrier cancel, no wallet movement. The refusal is not cached. If a pickup arrangement holds the shipment, cancel that pickup first; if a self drop-off declaration holds it there is no pickup to cancel, so contact customer service to release it. Then retry the same request, with the same Idempotency-Key if you like.
v1.35

Order types: optional order_type, off by default

Shipments, quotes and service lists gain an optional order type: full_service (end-to-end shipping, the existing behaviour) or domestic_delivery (destination local delivery). Everything here is additive and switched off by default: until the platform enables order types, requests without these fields behave exactly as before and no response carries a new field.

  • addedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): optional order_type (full_service or domestic_delivery; omitted means full_service). service_tier_id must be a service of the same order type. For domestic_delivery, sender may be omitted: it is then stored as null and your account default sender address is not applied.
  • addedPOST /api/v1/rates accepts order_type and GET /api/v1/service_tiers accepts the query parameter order_type; each order type only returns its own services (no order_type means full_service, so domestic_delivery services never appear unless you ask for them). POST /api/v1/rates options and GET /api/v1/service_tiers items have three new optional fields: order_type, sender_requirement (required, optional or not_required: whether the sender must be supplied) and origin_country (ISO-2 origin country, or null when it cannot be determined uniquely). POST /api/v1/shipments, GET /api/v1/shipments and GET /api/v1/shipments/{id} return order_type. For domestic_delivery orders the sender in the detail view can be null.
  • addedNew error codes, all returned before any wallet hold or shipment is created: 400 ORDER_TYPE_DISABLED (1500040), 400 ORDER_TYPE_INVALID (1500041), 400 ORDER_TYPE_SERVICE_MISMATCH (1500042; the service is not of the requested order type, or its setting changed since the quote, so quote again) and 400 DOMESTIC_DELIVERY_DESTINATION_MISMATCH (1500046; the recipient country is not the destination warehouse country of the domestic_delivery service).
  • changedBackward compatible: requests that omit order_type are accepted, priced and stored exactly as before, and order_type: "full_service" is the same as omitting it. While order types are not enabled, no response carries order_type, sender_requirement or origin_country, and domestic_delivery returns 400 ORDER_TYPE_DISABLED. Once enabled, full_service responses also carry order_type, sender_requirement and origin_country: if your client validates responses strictly, accept these optional fields. An unknown value, an empty string or null for order_type always returns 400 ORDER_TYPE_INVALID.
  • changedFor full_service the request rules do not change: leaving out sender still falls back to your account default sender address, and carrier sender checks are unchanged. sender_requirement: "required" on a service only tells you that the web order form asks for a sender.
  • addedGET /api/v1/shipments and GET /api/v1/shipments/{id}: optional order_type_anomaly (the single value unrecognized_stored_value) appears only when the order type stored on a shipment is not recognised, which is a data anomaly. order_type is then omitted and the shipment must not be treated as full_service; contact support. POST /api/v1/rates (and the MCP get_rates tool, which now also accepts items with only a description and a quantity) quotes order_type: "domestic_delivery" for items that carry only a description and a quantity, with no unit price, in the same way as POST /api/v1/shipments: no exchange rate is needed, no zero-value declaration is made and value-based surcharges are not calculated; a service that requires unit prices is returned as unavailable. A domestic_delivery service that only needs names and quantities does not require hs_code (Brazil) or the EU product identifiers. If sender is supplied for domestic_delivery it must be complete (contact_name, phone, country_code, city and address); a partial sender is rejected, never stored.
v1.34

Failed carrier bookings no longer leave a shipment or IM number

A failed carrier booking now rolls back the customer shipment and releases its wallet reservation. Integrations receive an error instead of a created shipment without a carrier label.

  • changedPOST /api/v1/shipments: when carrier dispatch returns failed or skipped_no_creds, the failed creation is rolled back. No customer shipment or IM tracking number is retained or returned, and any wallet hold for the attempt is released.
  • addedGeneral provider failures and timeouts return HTTP 422 SHIPMENT_BOOKING_FAILED (1500039). Recognised permanent_data rejections continue to return HTTP 422 YUN_DISPATCH_REJECTED (9900027) with the existing one-hour negative cache for an identical payload; that negative cache does not apply to the new error code.
  • changedA dispatched result remains a successful shipment even if the PDF label is temporarily unavailable. It keeps its IM tracking number and wallet hold; label availability alone does not trigger rollback.
  • changedUse a new Idempotency-Key for each new submission after a failed booking. Under the existing idempotency rules, the old key replays the same 422 response for the same payload for up to 24 hours; changing the payload under that key returns 409 IDEMPOTENCY_KEY_REUSED (1500003).
  • changedA timeout can occur after the provider has accepted the booking. The system retains an internal reference for reconciliation and does not automatically redispatch the failed attempt. API users must check the provider booking result before submitting again to avoid duplicate bookings.
v1.33

Declare shipment value in 17 currencies

Besides HKD and USD, a shipment can now be declared in 15 more currencies, with the original currency and amounts kept on the order for those currencies (an HKD request is the exception, see below). The new currency values are accepted once multi-currency declaration is enabled on the platform; until then they return 400 `INVALID_FIELD`. Separately from that switch, carriers now always receive the declared value in USD, and this takes effect as soon as this release is deployed, for HKD shipments too.

  • addedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): declared_currency accepts HKD, USD, EUR, GBP, JPY, AUD, CNY, CAD, SGD, NZD, TWD, MXN, BRL, COP, CLP, MYR and THB. For any currency other than HKD, every item must carry unit_price in that currency; an item with only unit_price_hkd, or with both price fields, returns 400 INVALID_FIELD (the same rule as an explicit "USD"). KRW and other currencies are not supported. insured_amount is read in the declared currency. The currency applies to the whole shipment. For USD and the 15 additional currencies the original currency and amounts are stored on the order; an HKD request is the exception described below.
  • addedBilling stays in HKD. For the 15 additional currencies the HKD billing value is the declared amount converted at two rates frozen when the order is placed: the currency to USD rate, then the USD to HKD rate. Each of the two rates is chosen independently: the platform's daily rate is used, falling back to the monthly average rate, then to the last known good rate (stale is true when the last known good rate is used); if no rate can be resolved the request returns 503 FX_RATE_UNAVAILABLE, and it is safe to retry with the same Idempotency-Key.
  • addedPOST /api/v1/shipments, GET /api/v1/shipments and GET /api/v1/shipments/{id}: a new optional declared_conversion object, { version, source_currency, source_to_usd: { rate, rate_type, fetched_at, stale }, frozen_at }, holds the currency to USD rate frozen for the order (1 unit of source_currency = rate USD). It is present only when declared_currency is one of the 15 additional currencies and is omitted for HKD, USD and older shipments. declared_fx keeps its meaning on every order: the frozen USD to HKD rate.
  • changeddeclared_currency in shipment responses can now be any of the 17 currencies above. If your client validates it against HKD/USD only, accept the others.
  • changedThe carrier always receives the declared value in USD, whichever currency you declare in (HKD included). This is independent of the multi-currency switch and takes effect immediately when this release is deployed: a new or re-dispatched HKD shipment is now sent to every carrier in USD, converted at the rate frozen on the order (some carriers previously received HKD). For a shipment in one of the 15 additional currencies the USD value is each unit price converted at the frozen currency to USD rate and rounded to 2 decimal places.
  • changedNot affected on the API request side: requests that omit declared_currency, or send HKD or USD, are accepted, billed and stored exactly as before, including how an omitted declared_currency is read from the price field you use. A request in HKD is still converted to USD at the frozen rate and stored as a USD shipment (declared_currency reads back "USD"), and billing still uses the HKD figure you sent.
v1.32

Quote with your IOSS number and items; 409 PRICING_QUOTE_CHANGED returns the current quote

POST /v1/rates now takes the same IOSS number and items you send to POST /v1/shipments, so the quoted total_hkd matches the order-time price for the same inputs. When the price does change, the 409 now tells you the current quote.

  • addedPOST /api/v1/rates accepts an optional ioss_number — same format and ownership rule as on POST /api/v1/shipments (a number not registered to your account returns 400 IOSS_NOT_OWNED). With an IOSS number the EU VAT prepay surcharge VAT_HANDLING is not quoted and ioss_notice.using_ioss is true. Sending it together with NO_VOEC_PREPAY in selected_surcharges returns 400 VOEC_PREPAY_CONFLICT. vat_prepay is also accepted, with the same rules as at create (mutually exclusive with ioss_number: 400 IOSS_AND_PREPAY_CONFLICT; your account's default IOSS number is then not applied).
  • changedWhen ioss_number is omitted, POST /api/v1/rates now applies your account's default IOSS number, as POST /api/v1/shipments already does. If your account has a default IOSS number, EU quotes no longer include VAT_HANDLING — previously the quote included it and the order did not, so an expected_total_hkd copied from the quote was rejected. Accounts without a default IOSS number see no change.
  • addedPOST /api/v1/rates accepts optional items (the same item shape as POST /api/v1/shipments) and declared_currency. With items, the per-item temporary levy TEMP_LEVY is quoted and the declared value is computed from the items exactly as at order time; do not also send declared_value_hkd or declared_value_usd (400 INVALID_FIELD). declared_currency without items returns 400 INVALID_FIELD. Requests without these fields are unchanged.
  • added409 PRICING_QUOTE_CHANGED (1500015) on POST /api/v1/shipments now carries data: reason (price_changed, carrier_changed, service_unavailable or discount_unavailable), quoted_at, service_tier_id, expected and current_option — the current quote in the same shape as a POST /api/v1/rates option, or null. After the customer confirms the new price, copy current_option.total_hkd and current_option.discount.rule_id (or null) into the retry. As before, nothing is charged and no shipment is created.
  • changed409 PRICING_QUOTE_CHANGED is no longer cached against the Idempotency-Key: retrying with the same key re-quotes instead of replaying the old rejection, and you may retry with the same key and a new expected_total_hkd. This replaces the v1.11 note that this 409 is cached for 24h.
v1.31

EU shipments require product identifiers from 23 October 2026

EU customs, via the carrier, requires a merchant product identifier and a non-standardised manufacturer product identifier for every item of a parcel sent to an EU member state. The API now reports missing or malformed identifiers straight away, and refuses such orders from 2026-10-23 09:00 Hong Kong time (2026-10-23 01:00 UTC).

  • changedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): for a shipment bound for an EU member state, every item must carry merchant_product_id (M-PID) and mfr_id_nonstd (NS-PID). From 2026-10-23 09:00 Hong Kong time a missing value returns 400 EU_PID_REQUIRED (1500037) and a malformed value returns 400 EU_PID_INVALID (1500038) at order creation, before any wallet hold or shipment is created. When both problems occur, EU_PID_REQUIRED is returned and its message lists every offending field. Other destinations are unaffected.
  • addedAutomatic fill, effective immediately for EU destinations: when merchant_product_id is omitted, sku is used as merchant_product_id (if sku meets the format rules); when mfr_id_nonstd is omitted, a valid mfr_id_std (GTIN) is used as mfr_id_nonstd. The substituted values are stored on the shipment and sent to the carrier. A sku that breaks the format rules is not substituted.
  • addedPOST /api/v1/shipments: the 201 response has a new optional warnings array of { code, message }. Before 2026-10-23 09:00 Hong Kong time, an EU order with a missing or malformed identifier is still created and lists the problem here (code is EU_PID_REQUIRED or EU_PID_INVALID, with the same message the 400 will carry later). The key is omitted entirely for compliant and non-EU orders, so existing integrations are unaffected.
  • changedFormat rules for the three identifier fields, applied to EU destinations only: English half-width ASCII characters only; several identifiers separated by a half-width comma, each 2–70 characters; no placeholders (N/A, NONE, 0, *** and similar), no single repeated character (AAAA, 999999), no 4+ digit running sequence (1234), no empty or duplicated entries. mfr_id_std must be a valid GTIN: 8, 12, 13 or 14 digits with a correct GS1 check digit. The overall field limit of 200 characters is unchanged.
  • changedIf you retry with corrected item data after a 400, use a NEW Idempotency-Key — reusing the old key replays the original 400 (existing idempotency rule).
v1.30

Optional UK VAT number for YunExpress shipments

You can now supply a dedicated UK VAT registration number when creating a UK shipment using a direct YunExpress B2C service. Register the number with the carrier in advance.

  • addedPOST /api/v1/shipments and MCP create_shipment accept optional vat_number: 1–100 characters after trimming, with recipient.country_code: "GB". Omit this field when unused; an empty or whitespace-only supplied value fails request validation. The value is stored separately and forwarded as customs_number.vat_code.
  • changedA supplied vat_number for a non-GB destination or an unsupported service returns 400 INVALID_FIELD before any wallet hold or shipment is created. Support is currently limited to direct YunExpress B2C; VAT orders stay on the direct channel and cannot fail over to a carrier that would omit the number. This field does not request tax prepayment. tax_number (VOEC/RUT), ioss_number and EU-only vat_prepay are unchanged.
v1.29

Your reference_no is printed on the label

Shipments created through the API now carry your `reference_no` to the carrier, so it appears at the bottom of the shipping label and you can match parcels to your own orders.

  • changedPOST /api/v1/shipments (and the MCP create_shipment tool): the reference_no you send is now printed at the bottom of the shipping label. The API request and response are unchanged.
  • changedIf the carrier rejects the reference_no as already used — most often when you cancel a shipment and create a new one with the same reference_no — the shipment is still created and the label prints the iMile tracking number (IM…) instead. To keep your own reference on every label, use a new reference_no for each shipment, including re-created ones.
v1.28

Cash on delivery is paused

No carrier currently collects cash on delivery for these shipments, so a COD order would ship without the recipient ever being asked to pay. COD is now rejected at order creation until collection is available.

  • changedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): payment_type: "cod" now returns 400 COD_NOT_AVAILABLE (1500034) at order creation, with no quote, hold or shipment created. payment_type: "prepaid" (the default) is unaffected. If you retry with "prepaid", use a NEW Idempotency-Key — reusing the old key with the corrected payload returns 409 IDEMPOTENCY_KEY_REUSED (1500003).
v1.27

Insurance rejected instead of silently dropped when unsupported

Selecting insurance on a service that cannot carry it used to be accepted and silently priced without insurance, so the order shipped uninsured. It is now rejected.

  • changedPOST /v1/shipments: when selected_surcharges includes "INSURANCE" but the final selected option does not carry insurance — its opt_in_availability marks INSURANCE as not selectable or omits it, or no insurance fee is priced for it (for example, the destination's rate card has no insurance line for that service, or the carrier product behind it cannot carry insurance) — the request now returns 400 INSURANCE_UNSUPPORTED (1500031) instead of being accepted with insurance silently dropped and no fee charged for it. Requests that also send insured_amount are unaffected: an option that does not offer a custom insured amount still returns 400 INVALID_FIELD (insured_amount).
  • changedCheck opt_in_availability on POST /v1/rates before sending "INSURANCE"; only options that list it as selectable accept it.
  • changedStandard insurance ("INSURANCE") is now offered on more options wherever the rate card lists it: options fulfilled by Globavend or iMile (including the CNBIML postal service codes) and YunExpress postal-line options. Custom insured amounts remain limited to the options that already offered them.
v1.26

Chile shipments require the recipient's RUT

Chilean customs clears on the recipient's tax ID (RUT), and the carrier returns parcels whose RUT is missing or invalid. The API now requires it at order creation instead of letting the shipment be returned later.

  • changedPOST /api/v1/shipments (and the MCP create_shipment tool, which calls it): for a shipment bound for Chile (recipient.country_code: "CL"), tax_number (the recipient's RUT) is now required. Omitting it returns 400 CL_TAX_NUMBER_REQUIRED (1500033) at order creation, with no quote, hold or shipment created; an empty or whitespace-only tax_number is rejected earlier by request validation, as for every destination (400 Bad Request, with a data entry whose path is ["tax_number"]). Only presence is checked — the RUT's format and check digit are not validated. Every other destination is unaffected. If you retry with the RUT added, use a NEW Idempotency-Key — reusing the old key with the corrected payload returns 409 IDEMPOTENCY_KEY_REUSED (1500003), and the original 400 itself keeps replaying for 24h under the key that produced it.
v1.25

Cancel is refused while an interception request is in progress

Customers can now request an interception on a `label_created` shipment from the Merdi portal (the carrier is asked to hold the parcel when it reaches the warehouse). Cancelling such a shipment would delete the carrier order under the hold, so the cancel endpoint now refuses it until the request is withdrawn or closed.

  • changedPOST /v1/shipments/{shipment_id}/cancel (and the MCP cancel_shipment tool, which calls it): a shipment with an interception request in progress now returns 409 SHIPMENT_CANCEL_INTERCEPT_IN_PROGRESS (1500032) and nothing is changed — no status change, no carrier cancel, no wallet movement. Withdraw the request on the shipment page in the Merdi portal (Package disposition) and retry; if it can no longer be withdrawn, contact support. Shipments without such a request are unaffected.
v1.24

Custom insured amount follows the declared currency

The custom insured amount from v1.23 is now entered in the shipment's declared currency and capped at USD 2,500. The feature is still switched off for all accounts, so no existing integration is affected.

  • changedPOST /v1/shipments: insured_amount_hkd is replaced by insured_amount, in the shipment's declared currency — the same currency as unit_price (see declared_currency). Must be > 0 with at most 2 decimal places and at most USD 2,500; an HKD amount is converted at the frozen declared_fx rate before the cap is checked. On an HKD shipment for which no USD/HKD rate can be resolved, supplying it returns 503 FX_RATE_UNAVAILABLE. The INSURANCE fee is 0.7% × the amount converted to HKD at the frozen rate, min HKD 9.
  • changedPOST /v1/rates: insured_amount_hkd stays in HKD (the same currency as declared_value_hkd on this endpoint) and is now capped at USD 2,500 at the day's rate. The custom_insured_amount object on the INSURANCE entry of opt_in_availability is now { max_usd } (was { max_hkd }).
  • addedPOST /v1/shipments (pricing_snapshot) and GET /v1/shipments/{shipment_id} (top level): new optional custom_insured_amount_usd — the frozen insured amount in USD. custom_insured_amount_hkd is now its HKD equivalent at the frozen rate, the basis the fee was priced on.
  • addedNot yet available via MCP: create_shipment / get_rates do not accept a custom insured amount yet — use the REST endpoints directly for now.
v1.23

Custom insured amount for enrolled accounts

Insurance has always been priced off freight + declared value. Accounts enrolled for custom insured amount can now choose the amount to insure instead (today: the cosmetics lane only). Enrollment is per account — contact your account manager.

  • addedPOST /v1/rates and POST /v1/shipments: new optional field insured_amount_hkd — a custom declared-value insurance amount in HKD, replacing the standard insurance pricing basis (0.7% × (freight + declared value), min HKD 9) with 0.7% × this amount (same minimum). Available only to accounts enrolled for custom insured amount, and only when the selected option's opt_in_availability INSURANCE entry carries custom_insured_amount (see below) — today that means the cosmetics lane. Must be > 0, <= 20,000, with at most 2 decimal places — any other value returns 400 INVALID_FIELD on both endpoints. POST /v1/shipments also returns 400 INVALID_FIELD when "INSURANCE" is not in selected_surcharges or the selected option doesn't support it; POST /v1/rates instead prices such an option at standard insurance and, when INSURANCE is selected, notes it in that option's surcharge_conflicts.
  • addedPOST /v1/rates: each option's opt_in_availability entry for INSURANCE now carries custom_insured_amount: { max_hkd } when your account is enrolled and this option supports it — absent otherwise, meaning insured_amount_hkd is not accepted for that option.
  • addedPOST /v1/shipments: response pricing_snapshot gains optional custom_insured_amount_hkd; GET /v1/shipments/{shipment_id} returns the same value as an optional top-level custom_insured_amount_hkd. Either is the frozen amount, present only when the shipment used it.
  • addedNot yet available via MCP: create_shipment / get_rates do not accept insured_amount_hkd yet — use the REST endpoints directly for now.
v1.22

Shipment detail returns the fee actually charged

Until now the API returned no money figures for a shipment, so the only amount an integration could show was the quote from booking. Once the carrier has measured the parcel, the shipment detail now also returns the fee actually charged and the weight it was charged on.

  • addedGET /api/v1/shipments/{shipment_id}: new field billing (HKD) — status (settled | pending), pre_charge_hkd (the quote frozen at booking; also the amount held from your balance, unless your account is exempt from booking holds), charged_hkd and chargeable_weight_kg (the final fee and the carrier-measured weight it was computed from; null until settled), declared_weight_kg, settled_at, and adjustments_hkd (later refunds, manual adjustments and service fees on this shipment; charged_hkd + adjustments_hkd is what it has cost you so far). billing is null only for old shipments with no stored price. Some carrier routes never report a final fee; those shipments stay pending. The list endpoint and the public tracking endpoint are unchanged.
v1.20

unit_price without declared_currency is now read as USD

Until now, a request that omitted declared_currency was read as HKD. If a caller's unit_price actually held a USD amount without declaring the currency, it was read as HKD instead, so the declared value ended up at roughly 1/7.8 of what was intended — typically without the request being rejected, though a low enough HKD-read unit_price (for example 0.01) could round to USD 0.00 and return 400. Callers whose unit_price was genuinely an HKD amount were unaffected. The web and bulk-upload order flows have accepted USD only since 2026-09-07, and USD is the declaration currency we recommend for the API. The API's reading of unit_price now matches.

  • changedPOST /api/v1/shipments: when declared_currency is omitted and any item carries unit_price, the shipment is now read as USD — unit_price is a USD amount (previously HKD). Items with no unit price are still accepted and declared at 0. As with an explicit declared_currency: "USD", an unresolvable exchange rate now returns 503 FX_RATE_UNAVAILABLE (1500018) for these requests; it is safe to retry with the same Idempotency-Key. Because the declared value is read differently, value-based surcharges and pricing_snapshot.total_hkd can differ, a destination's declared-value cap can apply, and a create bound with expected_total_hkd can return 409 PRICING_QUOTE_CHANGED if that total was quoted for a different declared value. If your integration sends HKD amounts in unit_price without declared_currency, add declared_currency: "HKD" or switch to unit_price_hkd — otherwise those amounts will be read as USD, roughly 7.8× higher.
  • changedPOST /api/v1/shipments: when declared_currency is omitted, mixing unit_price and unit_price_hkd across the items of one shipment now returns 400 INVALID_FIELD; the message names the items involved. A shipment has one declared currency: use the same price field on every item, or send declared_currency explicitly (with "HKD", both fields are HKD amounts, as before).
  • changedNot affected: unit_price_hkd is always HKD, so requests whose items use only unit_price_hkd (or carry no unit price) with declared_currency omitted are handled as before; requests that send declared_currency explicitly ("USD" or "HKD") are handled as before, including the rule that an explicit "USD" requires unit_price on every item. We recommend always sending declared_currency.
  • changedMCP create_shipment forwards to this endpoint and follows the same rules; its field descriptions now say so. MCP clients that cached the previous tool descriptions should reconnect to pick them up.
v1.19

items is now required on shipment create

A shipment created with no declared items was previously accepted and returned 201. In live mode, we observed such orders being rejected by the carrier at dispatch for missing declaration details — declared contents are required for customs. The API now rejects the request up front instead of letting it fail silently downstream.

  • changedPOST /api/v1/shipments: items is now required — at least one item (description, quantity). This applies identically to live and test (mk_test_*) keys. A missing or empty items array now returns 400 Bad Request with an entry in data whose path is ["items"] (not guaranteed to be data[0] if the request has other validation errors). If you retry with a corrected body, use a NEW Idempotency-Key — reusing the old key with a different payload returns 409 IDEMPOTENCY_KEY_REUSED (1500003), and the original 400 itself continues to replay for 24h under the key that produced it. unit_price / unit_price_hkd remain optional and unchanged.
v1.18

Brazil shipments require an 8-digit HS code

Brazil customs (via the carrier) rejects declarations whose HS code isn't exactly 8 digits (Brazil NCM). The API now blocks this at order creation instead of the shipment failing silently later at carrier forecast.

  • changedPOST /api/v1/shipments: for a shipment bound for Brazil (recipient.country_code: "BR"), every item's hs_code must be exactly 8 digits after symbols are removed. A missing, empty, or non-8-digit hs_code, or a Brazil shipment with no items, now returns 400 HS_CODE_BR_8_DIGITS_REQUIRED (1500030) at order creation — previously the shipment was created successfully and only rejected later when the carrier processed the customs forecast. Every other destination is unaffected. If you retry with corrected item data, use a NEW Idempotency-Key — reusing the old key replays the original 400 (existing idempotency rule).
v1.17

Optional recipient email on shipment create

Some destinations (for example Colombia) require a recipient email at the carrier. The API now accepts one.

  • addedPOST /api/v1/shipments: optional recipient.email. An empty string is treated as not provided.
  • changedWhen recipient.email is not provided, your account email is passed to the carrier for carriers that need a recipient email.
v1.16

Daily quota ×10, Hong Kong-time reset, self-explaining 429s, terminal-shipment caching

Rate-limit defence pass after a customer integration spent 10 hours in a 429 loop overnight. Quotas are now a ceiling, not a cliff, and every 429 tells you why.

  • changedDefault daily quota raised from 10,000 to 100,000 requests per key. The per-second cap (100) is unchanged.
  • changedDaily quota now resets at 00:00 Hong Kong time (UTC+8) instead of 00:00 UTC. X-RateLimit-Reset-Day reflects the new boundary.
  • added429 responses carry data.reason (per_second | per_day), data.retry_after_seconds, data.day_reset_at, and an X-RateLimit-Reason header. Rejected requests no longer consume daily quota.
  • addedGET /api/v1/tracking/{tn} for delivered / cancelled / returned shipments is served from a 6-hour server cache (X-Merdi-Cache header).
  • addedPOST /api/v1/shipments: re-sending a canonical-JSON-identical payload that the carrier's data rule rejected (422 9900027) within 1 hour replays the rejection (data.negative_cache: true) instead of hitting the carrier again. Fixing the data must use a NEW Idempotency-Key — reusing the old key returns 409 1500003; the existing 422 under the same key is itself replayed for 24h by the idempotency layer, and this 1-hour negative cache only applies when a new key resends the identical payload.
v1.15

Norway VOEC prepay service

Shipments to Norway can now skip the VOEC tax registration number entirely by having the carrier prepay the VOEC VAT on your behalf.

  • addedPOST /api/v1/shipments accepts an optional tax_number (1–100 characters after trimming) — the destination tax registration number, e.g. Norway's VOEC number. Required for shipments to Norway (recipient.country_code: "NO") unless voec_prepay is true.
  • addedPOST /api/v1/shipments accepts an optional voec_prepay boolean — set it true to have the carrier prepay Norway's VOEC VAT on your behalf instead of supplying tax_number. Available for Norway destinations on the standard-goods lane (service_tier_id HKASTDGGSTCM) and the cosmetics lane (HKASTDCSSTCM); equivalent to including "NO_VOEC_PREPAY" in selected_surcharges (case-insensitive) — either form is honoured. Charged at declared value × 27% (25% VAT + 2% handling) on the quote; the standard-goods lane additionally adds HKD 3/shipment and silently switches the carrier product to HK-ASS-PF, while the cosmetics lane keeps its own carrier product and has no per-shipment fee.
  • changedSending voec_prepay together with tax_number, ioss_number, or vat_prepay now returns 400 VOEC_PREPAY_CONFLICT (1500027) — choose one. voec_prepay for a destination other than Norway, or on a lane that does not support it (e.g. the postal-standard lane), returns 400 VOEC_PREPAY_UNSUPPORTED (1500028). While the feature is being rolled out, any use of voec_prepay returns 400 VOEC_PREPAY_DISABLED (1500026).
  • changedA Norway-bound shipment with neither tax_number nor voec_prepay now returns 400 TAX_NUMBER_REQUIRED (1500029) at order creation, instead of being accepted and rejected later at carrier dispatch (which previously auto-cancelled the shipment and refunded the wallet hold). This is a breaking behavior change for the request shape (a request that previously reached carrier dispatch with no tax_number field now 400s immediately) — but the public API has never produced a single successful Norway shipment in production, so no existing integration relies on the old (always-failing-downstream) behavior.
v1.14

HKD-declared shipments are now recorded in USD

A shipment declared in HKD (via unit_price_hkd, or an omitted/"HKD" declared_currency) is now converted to USD at the exchange rate frozen when the order is placed and stored as a USD shipment. Billing is unaffected — it still uses the HKD figure you originally sent.

  • changedA shipment created with unit_price_hkd (or declared_currency omitted / "HKD") now has its item prices converted to USD at the live rate frozen at order creation and is stored with declared_currency: "USD" and a frozen declared_fx — this is what POST /api/v1/shipments, GET /api/v1/shipments, and GET /api/v1/shipments/{id} return for it going forward. unit_price_hkd remains fully accepted and every input field is unchanged; billing continues to use the HKD number you supplied, so charged amounts do not change. If the USD/HKD rate is temporarily unavailable, the shipment is created as before — recorded in HKD, with no declared_fx — rather than being rejected.
  • changedAn item whose HKD price rounds to USD 0.00 after conversion (a positive unit_price_hkd below roughly HK$0.04, depending on the current rate) is now rejected with 400 INVALID_FIELD. An item priced at exactly 0 is unaffected.
v1.13

Sales platform name required for Japan shipments

YunExpress rejects every Japan-bound shipment that omits a sales platform name — the field is now validated at order creation instead of failing later at carrier dispatch.

  • addedPOST /api/v1/shipments accepts an optional sales_platform_name (free text, 1–50 characters) — the marketplace or storefront name the shipment was sold through (e.g. "Amazon", "Shopee", "Own Store"). Required when recipient.country_code is JP; optional for other destinations, but when supplied it is still forwarded to the carrier.
  • changedA Japan-bound shipment without sales_platform_name now returns 400 1500025 (SALES_PLATFORM_NAME_REQUIRED) at order creation, instead of the order being accepted and then rejected later at carrier dispatch (which previously auto-cancelled the shipment and refunded the wallet hold). This is not a breaking change for any working integration — the Japan lane has never produced a single successful shipment in production, so no existing integration relies on the old (always-failing) behavior.
v1.12

Authenticated label download for partner-carrier-channel shipments

A new endpoint downloads a shipment's label PDF for every carrier — including shipments where label_pdf_url stays permanently null.

  • addedGET /api/v1/shipments/{shipment_id}/label — authenticated (shipments:read) label PDF download, for EVERY carrier and channel, including shipments booked through a partner carrier channel whose label_pdf_url never becomes non-null. Same 404 collapsing (unknown / cross-account / cross-mode) as the doorstep-POD endpoint; returns 502 if the label exists but could not be downloaded, or 503 if a partner-channel label has not finished generating yet (retry shortly — not a permanent failure).
  • addedlabel_available: boolean on both GET /v1/shipments (list rows) and GET /v1/shipments/{id} (detail) — true when a label SOURCE exists, either directly at label_pdf_url or via the new label endpoint. This does not guarantee the label bytes are downloadable at this exact instant: for a partner-carrier-channel shipment the label endpoint may briefly return 503 (with a Retry-After header) right after dispatch while the carrier finishes generating it — poll again after that many seconds. Poll this instead of label_pdf_url alone if your integration needs to work uniformly across every carrier and channel.
  • changedlabel_pdf_url now stays permanently null (not a pending/polling state) for a shipment booked through a partner carrier channel — use the new GET /v1/shipments/{shipment_id}/label endpoint for those instead.
v1.11

Account-state rejections are no longer cached by Idempotency-Key

Settle an overdue invoice or top up, then retry with the SAME Idempotency-Key — the request is re-evaluated instead of replaying the old rejection.

  • fixedRejections that depend on account state rather than the payload are no longer cached against the Idempotency-Key: 1500009 (insufficient available balance), 1500012 (overdue-invoice freeze), 1500013, 1500014, 1500016 (credit floor / limit). Previously these were cached for 24h like any other 4xx, so a customer who paid mid-batch kept receiving the stale rejection on every same-key retry until the window expired — the only workarounds were minting fresh keys or waiting out the 24 hours. These responses now behave like 5xx: the same key re-runs the request and the wallet, credit and freeze gates are evaluated again. No shipment is ever created by a rejected attempt, so retrying cannot duplicate an order.
  • changedPayload-level 4xx (400 / 403 / 404, and 409 PRICING_QUOTE_CHANGED) are unchanged — still cached for 24h, since the same body produces the same outcome. 2xx replay, IDEMPOTENCY_KEY_REUSED conflict detection, the in-flight 409 and the 24h window are all unchanged.
v1.10

Multiple IOSS numbers + carrier VAT prepay

Accounts can now register several IOSS numbers with their own labels, and choose per shipment between an IOSS number and carrier VAT prepay.

  • addedPOST /api/v1/shipments accepts an optional vat_prepay boolean — set it true to have the carrier prepay destination VAT on your behalf (EU destinations only) instead of supplying ioss_number. Charged at the same rate as today's no-IOSS default (declared value × destination VAT rate + 2% handling) — no new fee, no price change.
  • changedSending both ioss_number and vat_prepay on the same request now returns 400 IOSS_AND_PREPAY_CONFLICT — choose one.
  • changedvat_prepay is only honoured on carriers that support it (currently YunExpress only); a shipment routed to a carrier without support returns 400 VAT_PREPAY_UNSUPPORTED — use ioss_number instead. While the feature is being rolled out, any use of vat_prepay returns 400 VAT_PREPAY_DISABLED.
v1.9

Last-mile doorstep POD photo download

Customers can now download the last-mile courier's doorstep delivery photo through the authenticated Public API.

  • addedGET /api/v1/shipments/{shipment_id}/pod returns the shipment's last-mile doorstep POD photo as a JPEG attachment. It requires shipments:read, enforces account + live/sandbox isolation, and returns 404 when no current photo is available.
  • securityThe upstream storage URL is never exposed. iMile proxies the image with an allowlisted host, manual redirect handling, a 10-second timeout, and a 25 MB response cap.
  • changedThis API deliberately excludes the YunExpress-issued POD certificate PDF. Webhook documentation now states that shipment.delivered does not embed a doorstep photo; integrations should call the download endpoint when needed.
v1.8

IOSS ownership check on shipment create

An ioss_number override on POST /v1/shipments must now belong to your account. Numbers saved in settings are auto-filed with the carrier.

  • changedPOST /api/v1/shipments ioss_number override is now ownership-checked: it must be your account's saved IOSS (settings 報關資料) or a marketplace platform IOSS registered to your account — anything else returns 400 IOSS_NOT_OWNED. Previously only the format was validated. Orders without an override (account default) are unaffected.
  • addedSaving an IOSS in settings now auto-files (备案) it with the carrier — a carrier-side prerequisite before EU orders can carry the number. Filing normally takes effect immediately. To register a marketplace platform IOSS (e.g. Amazon's) on your account, contact support.
v1.7

Service-pricing model v2 — Product Codes, Service Codes, live rate quotes

The service catalog moved to a three-layer model: Product Code (entitlement container, e.g. HKASTD) → Service Code (the orderable unit you put in service_tier_id, e.g. HKASTDGGSTCM) → versioned rate tables. Rates are live, service_tiers is entitlement-scoped, and five legacy tier codes are retired.

  • changedLegacy tier codes RETIRED (breaking): US-GEN-PUB-001, US-GEN-PUB-002, HK-ST-GG-01, HK-US-SE-GG-01 and HKUSSTCS01 were deleted on 2026-06-10 — shipments referencing them now fail. Migrate to HKASTDGGSTCM (standard line) or the matching line from GET /api/v1/service_tiers. The only legacy code still live is HKUSSEGG01. See the new Service Codes guide for the mapping.
  • addedPOST /api/v1/rates is LIVE (the docs previously listed it as not-implemented/501). Entitlement-scoped quotes wrapping the internal billing engine: AU destinations price by postal-code zone (destination_postal_code → zone; without it zoned options return available:false + reason), per-option opt_in_availability gates the SIGNATURE/INSURANCE checkboxes, surcharge_conflicts lists opt-ins that couldn't apply, and EU lanes carry an ioss_notice block. Engine rejections return 400 with the engine's real reason and data.field classification (rate_card / declared_value_hkd / parcels).
  • changedGET /api/v1/service_tiers is now entitlement-scoped: it returns only the Service Codes your account can book (Product Code entitlements + assigned rate cards), not the whole platform catalog — matching what the docs always promised. Tiers now expose product_code, service_options[] (cargo/air/last-mile dimensions) and is_standard_service. Note product_code (iMile container, e.g. HKASTD) ≠ carrier.product_code (the upstream carrier's own reference). No entitlements → 200 + empty list.
  • addedPOST /api/v1/shipments request fields documented: selected_surcharges (e.g. ["SIGNATURE","INSURANCE"] — eligibility is per service code + destination; on the US priority line signature and insurance are mutually exclusive) and ioss_number (IM + 10 digits; overrides the account-level IOSS default; EU destinations only — shipped 2026-06-10 with the EU IOSS work, documented now).
  • addedNew Service Codes guide: the three-layer model, code anatomy (HKASTD + cargo GG/CS + air ST/PR + last-mile CM/PS), standard vs value-added lines, ETA conventions (standard ~8-12 business days, priority ~6-10), fetching your codes, and the two-product_codes disambiguation.
v1.6

Last-mile tracking number on shipment detail

The final-mile carrier number (e.g. USPS) is now on the shipment-detail API — the number you actually push to marketplaces.

  • addedGET /api/v1/shipments/{id} now returns last_mile_tracking_number — the final-mile carrier's own number (e.g. USPS 9214…), populated once the upstream carrier hands the parcel to the last-mile carrier. Null until that handoff. This is typically the number to push to eBay/Amazon and show the buyer, since the delivering carrier's tracker recognises it.
  • changedThe "which number do I use?" guide now lists three numbers — tracking_number (iMile canonical), waybill_number (first-leg carrier, e.g. Yun YT…), and last_mile_tracking_number (final-mile, e.g. USPS). Rule of thumb: prefer the last-mile number for marketplaces once it's non-null, else fall back to the waybill.
v1.5

Wallet balance, webhook redeliver, integration-feedback hardening

Driven by a real third-party integration's feedback — proactive balance monitoring, self-serve redelivery, and docs that match the wire.

  • addedGET /api/v1/wallet/balance — read your prepaid wallet { balance, available, held, currency }. Poll available to top up before a batch hits insufficient funds, instead of discovering it mid-run. (available = balance − open holds.)
  • addedPOST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver — re-send a previously-failed delivery (re-fires the original event_id so your receiver can dedupe). Also surfaced as a 「重發」 button on the dashboard delivery viewer.
  • addedWebhook event payload schema is now published in the docs + OpenAPI (WebhookEventEnvelope): the delivered body is { event_id, event_type, livemode, created_at, data } — you no longer have to reverse-engineer it from a sample. Full event-type catalog included.
  • changedIdempotency-Key is now OPTIONAL on naturally-idempotent operations — DELETE /webhooks/{id} and POST /shipments/{id}/cancel no longer 400 when it's absent (still honoured for replay if you send it). It remains REQUIRED on create endpoints. The idempotency guide now has a per-endpoint requirement table.
  • fixedDocs ↔ wire consistency: corrected every remaining prose reference to the webhook signature header — it is X-Merdi-Signature (some guide paragraphs dropped the X- prefix). A CI lint now blocks this drift from recurring.
  • addedDocs clarity: a "which tracking number do I push to marketplaces?" section (carrier-native waybill_number for eBay/Amazon vs iMile-canonical tracking_number), the buyer-facing tracking page URL, the dispatch-is-synchronous timing contract, and the base URL https://merdiexpress.com/api/v1/ made prominent in Quickstart.
v1.4

Offline webhook verification, X-Request-Id, idempotency normalisation

Webhook integration hardening — verify your signature handling end-to-end before production, even from private staging or CI.

  • addedGET /api/v1/webhooks/{id}/sample — returns a genuinely-signed sample event WITHOUT delivering it anywhere. Feed the returned raw_body + X-Merdi-Signature straight into your receiver's verification code and confirm — before production — that your HMAC check accepts a real iMile signature. Works behind NAT / on localhost / in CI, where POST .../test (which actually delivers) can't reach you.
  • addedX-Request-Id response header on every API response (including 401s and 5xx). Echo your own X-Request-Id request header and we preserve it. Quote it when reporting an issue and we can pull the exact request from our logs.
  • changedIdempotency-Key payload matching now normalises JSON key order. Retrying the same logical request with fields in a different order (e.g. {a,b} vs {b,a}) is correctly treated as the SAME request — no more spurious 409 Conflict. Array order is still significant (a parcel list ≠ its reverse).
  • addedWebhooks guide expanded: a prominent ⚠ warning to verify against the RAW request body (the #1 integration bug), an at-least-once deduplication section (dedup on X-Merdi-Event-Id, stable across retries), and an offline-verification walkthrough using the new sample endpoint.
  • addedEvery public response shape is now in the OpenAPI spec (/openapi.json → 30 schemas). Shipment detail/summary, rate quotes, service tiers, and all webhook shapes are now fully documented + Postman-importable, not just the request bodies.
v1.3

Webhook rotation, sandbox carrier, Postman collection, live try-it console

Big polish pass — most asked-for endpoints + tooling so first-touch integration takes 5 minutes, not 5 hours.

  • addedPOST /api/v1/webhooks/{id}/rotate — rotate a webhook signing secret in place. Endpoint id, url, events, history all preserved. New plaintext secret returned EXACTLY ONCE. Recommended pattern: accept both old + new for an overlap window during rollover.
  • addedSandbox carrier (carrier_code = "sandbox"). Generates a real-looking waybill_number + a placeholder label_pdf_url so you can exercise the full label-fetch path in integration tests without paying for a real shipment. Works in both live and test modes.
  • addedPostman collection auto-published at https://merdiexpress.com/postman-collection.json. One click → import all endpoints with {{base_url}} + {{api_key}} variables ready to fill. Linked from the docs footer.
  • added/developers/api try-it console now hits the real API live (was a mock with a Math.random success rate). Use a mk_test_* key from your dashboard to exercise endpoints without leaving the docs site.
  • addedSelf-serve webhook delivery viewer at /dashboard/developers/webhooks/{id}/deliveries. State / event type / HTTP status / latency / response body excerpt per attempt. Cursor-paginated 20 at a time. Lets you self-debug receiver issues without filing a support ticket.
  • changedRemoved stale @merdiexpress/node SDK references from the quickstart + landing samples. That package was vapourware — the docs now show raw fetch / requests / curl. A real SDK is in the roadmap.
  • fixedRate-limit guide listed generic header names (X-RateLimit-Limit); corrected to our actual X-RateLimit-Limit-Second, X-RateLimit-Limit-Day, X-RateLimit-Reset-Day etc. Existing header behaviour unchanged.
  • security5xx outage alerter — internal change. Server errors now post to an ops Slack channel via ERROR_ALERT_WEBHOOK_URL (throttled per-route, per-5-min). Future prod outages should get noticed in minutes, not after a customer complains.
v1.2

Labels, base-URL hardening, secret-at-rest encryption

Polish pass driven by the first external integration feedback. Spec is easier to parse, labels are easier to retrieve, and customer signing secrets are encrypted at rest.

  • addedlabel_pdf_url and waybill_number now returned on GET /api/v1/shipments/{id} (and surfaced in the OpenAPI schema). Recommended polling pattern: 1s × up to 30s after the synchronous POST until label_pdf_url !== null or dispatch_status === "failed". URL is presigned OSS — fetch directly, no Authorization header.
  • addedNew /developers/guides/labels guide covering when the PDF is ready, the polling pattern, fetching + caching the PDF, and test-mode behaviour (dispatch skipped, dispatch=null).
  • addedBase URL is now embedded inside every paths key in the OpenAPI spec (e.g. /api/v1/shipments), with servers: [{url: "https://merdiexpress.com"}] at root. SDK generators that ignore the servers field now resolve correctly.
  • addedCompat redirect: any request to https://merdiexpress.com/v1/* returns HTTP 308 Permanent Redirect → /api/v1/* (preserves method + body — works for POST with Idempotency-Key). If your SDK config has the wrong base URL it will still work, but please update — 308 is cacheable.
  • securityWebhook signing secrets are now encrypted at rest in our database (AES-256-GCM envelopes, per-row IVs). A DB backup leak no longer exposes signing material. The secret you receive on POST /api/v1/webhooks is unchanged; this is a server-side hardening, no client action needed.
  • securityDependency security sweep: cleared 45 of 46 open vulnerability advisories on our build (the remaining one is bundled inside the Next.js framework itself and waits on the upstream release). Includes a major nodemailer bump and removal of unused auth chains.
  • fixedDeploy crashloop guard. If a build half-completes, the next deploy now refuses to start a broken process; the previously-good build keeps serving until a clean build replaces it. Closes a ~15 min / returning 502 incident on 2026-05-28.
  • changedSpec version bumped 1.0.0 → 1.1.0. info.description now leads with an explicit "BASE URL: every endpoint is served from https://merdiexpress.com/api/v1/" note.
v1.1

Shipment creation goes live

Order placement + cancel on the API surface. Wallet-debited live mode, free-and-safe test mode.

  • addedPOST /v1/shipments — create a shipment server-side: quote engine re-priced bit-for-bit, pricing snapshot frozen into the record, label-created tracking event emitted. Requires Idempotency-Key.
  • addedPOST /v1/shipments/{id}/cancel — state-machine cancellation for pre-pickup shipments (label_created only). Live mode refunds the wallet by the original total; test mode never deducts so refund is always 0. Cancelling twice returns the same snapshot.
  • addedPOST /v1/rates — real billing-engine quote (was a 501 placeholder in v1.0). Accepts weight_kg, destination_country, goods_category + optional surcharges; returns freight + reg fee + per-line surcharges + total HKD.
  • addedCORS preflight on /v1/* so browser clients (try-it consoles, single-page integrations) work without a proxy.
  • addedWebhook delivery worker with exponential backoff retries (5 attempts over ~30 min) + auto-disable after 10 consecutive failures.
  • addedSelf-serve key + webhook management in the dashboard at /dashboard/developers/{keys,webhooks} — no more admin-CLI dependency for onboarding.
  • fixedGET /v1/shipments/{id} and GET /v1/shipments (list) now correctly resolve account → client ID; previously returned 404 for own-shipment lookups.
v1.0

Phase A/B foundation launch

First public release. Tracking, shipments (read-only), service tiers, webhooks. Rates endpoint reserved.

  • addedBearer auth with mk_live_* and mk_test_* key prefixes; per-key rate limit (100/sec, 10k/day).
  • addedIdempotency-Key header support on all POST endpoints; safe to retry for 24h.
  • addedWebhooks: HMAC-SHA256 signatures on X-Merdi-Signature header (Stripe-style t=,v1= format); signing_secret returned once on create.
  • addedEndpoints: shipments list+detail, tracking by number, service tiers, countries, webhooks CRUD + test-fire.
  • changedWire format adopts snake_case across all request and response bodies.
v0.9.3

Pre-launch beta — partner program

Beta cohort: 8 HK 3PLs. Feedback loop into v1.0 surface.

  • addedTest-mode keys (mk_test_* prefix) — same endpoints and same merdiexpress.com/api host as live, but no carrier dispatch and no wallet deduct. Mint from /dashboard/developers/keys.
  • changedRenamed pickup_eta → eta on tracking responses.
  • fixedCheckpoint ordering now stable when two scans share a timestamp.
v0.9.0

Internal dogfood

API surface frozen pending external review.

  • addedOpenAPI 3.1 spec published internally.
  • securityKey prefixes (mk_test_, mk_live_) introduced to prevent accidental cross-env writes.
You've reached the bottom of history.