Features Modules Driver App Download Driver App (APK) Pricing About API Documentation ภาษาไทย
Theme
→ Login
Integration API · v1

OrcaTMS API Documentation

A REST API for external systems (WMS/ERP) to create jobs, check status, cancel, fetch proof-of-delivery (POD) and push GPS into OrcaTMS. Every endpoint returns JSON and authenticates with an API key.

01Overview

The OrcaTMS Integration API connects a WMS or ERP to transport operations automatically — create jobs from orders, track status through delivery, and receive POD back in the source system.

  • All requests and responses are JSON
  • Authenticated with an API key (no user login) — bound to a tenant by the key itself
  • Job creation is idempotent via external_ref — safe to retry with no duplicates

02Base URL

EnvironmentBase URL
Productionhttps://tms.trs-nextgen.com/api/public/api/v1
Dev (Laragon)http://tms-project.test/backend-api/public/api/v1

Examples below use {BASE} for the base URL above

03Authentication

Send the API key with every request via a header (either form):

X-API-Key: tmsk_xxxxxxxx_yyyyyyyyyyyyyyyy
# or
Authorization: Bearer tmsk_xxxxxxxx_yyyyyyyyyyyyyyyy

Creating an API key

Admins create keys at Dashboard → Settings → System Usage → “External API” tab

  • Pick a scope for the key
  • The full key is shown only once at creation — store it safely (only a hash is kept)
  • Revoke a key at any time

04Scopes

ScopePurpose
public.readRead jobs / vehicles / location / POD
jobs.writeCreate / cancel jobs
gps.ingestPush GPS positions
💡
A WMS that creates jobs + tracks status needs jobs.write + public.read

05Rate limit

  • Read (public.read): 120 req/min per key
  • Write (jobs.write): 120 req/min per key
  • GPS ingest: 600 req/min per key
  • Over quota → 429 with Retry-After, X-RateLimit-Remaining

06Response format

// success
{ "status": "success", "data": { ... } }
// error
{ "status": "error", "message": "..." }
HTTPMeaning
200OK / idempotent (already exists)
201Created
400 / 422Invalid data
401Invalid / revoked key
403Missing required scope
404Not found
409State not allowed
429Too many requests / over quota

07Create a job

POST{BASE}/jobsscope: jobs.write

Create a new job from a WMS order · idempotent via external_ref

Request body

{
  "external_ref": "WMS-ORD-100245",
  "customer": { "name": "Acme Co., Ltd.", "phone": "0891234567" },
  "pickup": { "name": "Warehouse A, Laem Chabang", "latitude": 13.0827, "longitude": 100.8836 },
  "deliveries": [
    { "name": "Central Chonburi", "latitude": 13.3611, "longitude": 100.9847 },
    { "name": "Lotus Rayong", "latitude": 12.6807, "longitude": 101.2812 }
  ],
  "dest_province": "Chonburi",
  "booking_no": "BK-778", "requested_date": "2026-07-20"
}
FieldReq.Notes
external_refrec.WMS reference (dedupe + lookup)
customer{"id":5} or {"name","phone"}
pickupPickup — name + coords or url
deliveriesAt least 1 stop — supports multi-drop
dest_provinceUsed for auto-dispatch

Response 201

{ "status": "success", "data": { "id": 251, "job_number": "J26070001", "status": "confirmed" } }

08List / search jobs

GET{BASE}/jobsscope: public.read

Fetch jobs, filter via query string e.g. ?status=on_trip, ?external_ref=WMS-ORD-100245, ?page=1

09Job detail / status

GET{BASE}/jobs/{id}scope: public.read

Returns job details with current status, pickup/drops, assigned driver/vehicle and progress.

10Proof of delivery (POD)

GET{BASE}/jobs/{id}/podscope: public.read

Fetch delivery evidence — signatures, photos, SHA-256, timestamps and per-drop recipients (multi-drop).

11Cancel a job

POST{BASE}/jobs/{id}/cancelscope: jobs.write

Cancel a job that is not yet closed · a completed job returns 409

{ "reason": "Customer cancelled the order" }

12Vehicles & location

GET{BASE}/vehiclesscope: public.read
GET{BASE}/vehicles/{id}/locationscope: public.read

Your organization’s vehicles and each vehicle’s latest position (lat/long, speed, updated time).

13Push GPS positions

PUT{BASE}/gps/cartrackscope: gps.ingest

Ingest positions from an external GPS provider (e.g. Cartrack) into tracking — tenant-bound by the key, high-throughput.

14Job statuses

statusMeaning
draftDraft, not confirmed
confirmedConfirmed, awaiting dispatch
assigned / acceptedAssigned / driver accepted
on_trip / in_progressIn transit
completedDelivered and closed
cancelledCancelled

15Webhooks — push updates back to WMS

Configure a webhook URL at Dashboard → Settings → Webhooks · the system sends POST to your URL when a job status changes

POST <your-webhook-url>
X-TMS-Signature: sha256=...
{
  "event": "job.status_changed",
  "job_number": "J26070001",
  "external_ref": "WMS-ORD-100245",
  "status": "completed",
  "occurred_at": "2026-07-20T15:22:01Z"
}
🔒
Verify the X-TMS-Signature with your signing secret before processing to confirm the request is genuinely from OrcaTMS.
Need an API key or help integrating? Contact the teamLogin