Environmentv1 · en
Sandbox
https://dev-gw.metfone.com.kh/tms-partner/api/v1
Production
https://gw-express.metfone.com.kh/tms-partner/api/v1
API version
v1
API language
en
On this page

Authentication and environments

Header Requirement Value / meaning
X-Api-Token Required ${API_TOKEN}: environment-specific token issued by TMS
X-Client-Source Required ${PARTNER_CODE}: partner code paired with the token
Content-Type With a JSON body application/json
Accept Required by source application/json
Accept-Language Optional vn, en, my, km, lo

Contact TMS technical support for separate token/partner-code pairs for sandbox and production. Do not mix environments. The portal locale is vi, but the declared Accept-Language value is vn; several source examples use vi, so confirm provider behavior. Khmer, Lao, and Burmese have translated interfaces; missing document translations disclose the actual page language and fallback.

export BASE_URL="https://dev-gw.metfone.com.kh/tms-partner/api/v1"
# API_TOKEN and PARTNER_CODE must be supplied by your private environment.
# Never put production secrets into examples or AI prompts.

Integration journey

  1. Load provinces, then districts/villages; retain current IDs/codes.
  2. Find a post office if branch drop-off/collection is needed.
  3. Discover services for the route and goods.
  4. Calculate prices for selected service codes.
  5. Create the order, resend moneyCollection, compare cod, and save the response.
  6. Create a template, then retrieve HTML before expiry.
  7. Receive webhooks, look up status as needed; cancel only when eligible.
Diagram
Diagram; View source
View source
flowchart LR
  A["Addresses"] --> B["Services"]
  A --> P["Optional post office"]
  B --> C["Pricing"]
  C --> D["Order and COD"]
  D --> E["Label template"]
  E --> F["Printable HTML"]
  D --> G["Journey webhooks"]
  D --> H["Status lookup"]

Request sequence

Diagram
Diagram; View source
View source
sequenceDiagram
  participant P as Partner
  participant T as TMS Partner
  P->>T: GET address levels 1, 2, 3
  T-->>P: IDs and codes
  P->>T: POST pricing/get-service
  T-->>P: Service codes and selection flags
  P->>T: POST pricing/get-all
  T-->>P: Pre-VAT fee breakdown
  P->>T: POST order with moneyCollection
  T-->>P: id, cod, full creation response
  P->>T: POST order/label/presigned
  T-->>P: securePath, exp
  P->>T: GET order/label/securePath
  T-->>P: text/html
  T->>P: POST status webhook
  P-->>T: HTTP 200 receipt acknowledgement

AI resources

Give your AI assistant the current company’s documentation, Markdown pages, and OpenAPI contract.

Source
Help me integrate with Metfone Express (v1).
Read https://mfexpress-partner-docs.zhst.app/mfexpress/en/llms.txt first, then https://mfexpress-partner-docs.zhst.app/mfexpress/en/llms-full.txt and https://mfexpress-partner-docs.zhst.app/mfexpress/en/openapi.json.
Use only the documented endpoints, authentication, schemas and examples. Ask me about my application stack and the operation I need before writing code. Identify any documented limitations or inconsistencies. Keep credentials in environment variables, never in client-side code. Use the sandbox for examples; do not execute requests or change production data without my explicit approval.
Documentation locale: en. API language value: en.
Current page: https://mfexpress-partner-docs.zhst.app/mfexpress/en/overview.