Update delivery tracking
Sends the courier or technician, the position and the arrival time for an order that you deliver yourself. The customer sees the phone number masked.
Changes in 2026-09-27This operation is not available in this version.
PUT /api/v1/commerce/orders/{order_id}/trackingSince 2026-09-27
Authentication
Secret key (Bearer)
Headers
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
TapPay-Version | string | no | ||
TapPay-Timestamp | string | no | ||
TapPay-Nonce | string | no | ||
TapPay-Signature | string | no |
Path parameters
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
order_id | string (uuid) | yes |
Request body
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
agent | object | no | ||
agent.name | string | yes | ||
agent.phone | string | yes | ||
agent.photo_url | string (uri) | no | ||
agent.provider_label | string | no | ||
location | object | no | ||
location.lat | number | yes | ||
location.lng | number | yes | ||
eta_at | string (date-time) | no | ||
tracking_url | string (uri) | no |
Response 200
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
success | boolean | yes | true | |
data | object | yes | ||
data.order_id | string (uuid) | yes | ||
data.order_no | string | yes | ||
data.channel | string | yes | ||
data.status | string | yes | CREATED, ACCEPTED, AWAITING_PAYMENT, CONFIRMED, IN_PROGRESS, READY, COMPLETED, CANCELLED, REJECTED, EXPIRED, FAILED | |
data.version | integer | yes | ||
data.merchant | object | yes | ||
data.merchant.merchant_code | string | yes | ||
data.merchant.name | string | yes | ||
data.location_id | string (uuid) | yes | ||
data.fulfillment | object | yes | ||
data.fulfillment.mode | string | yes | ||
data.fulfillment.label | string | yes | ||
data.fulfillment.address | object | null | yes | ||
data.fulfillment.address.label | string | null | yes | ||
data.fulfillment.address.text | string | yes | ||
data.fulfillment.address.entrance | string | null | no | ||
data.fulfillment.address.floor | string | null | no | ||
data.fulfillment.address.door | string | null | no | ||
data.fulfillment.address.note | string | null | no | ||
data.fulfillment.address.location | object | null | yes | ||
data.fulfillment.address.location.lat | number | yes | ||
data.fulfillment.address.location.lng | number | yes | ||
data.fulfillment.address.district | string | null | no | ||
data.fulfillment.address.khoroo | string | null | no | ||
data.fulfillment.scheduled_at | string | null | yes | ||
data.fulfillment.ends_at | string | null | yes | ||
data.lines | array<object> | yes | ||
data.lines[].line_id | string | yes | ||
data.lines[].offering_id | string | yes | ||
data.lines[].name | string | yes | ||
data.lines[].quantity | integer | yes | ||
data.lines[].variant_id | string | null | yes | ||
data.lines[].option_ids | array<string> | yes | ||
data.lines[].inputs | object | yes | ||
data.lines[].amount | number | yes | ||
data.lines[].status | string | yes | ||
data.lines[].final_amount | number | null | yes | ||
data.breakup | array<object> | yes | ||
data.breakup[].kind | string | yes | ||
data.breakup[].label | string | yes | ||
data.breakup[].amount | number | yes | ||
data.breakup[].ref | string | null | no | ||
data.total | number | yes | ||
data.fees | array<object> | yes | ||
data.fees[].kind | string | yes | ||
data.fees[].label | string | yes | ||
data.fees[].amount | number | yes | ||
data.fees[].estimated | boolean | yes | ||
data.payable_total | number | yes | ||
data.authorization_type | string | yes | ||
data.authorization_amount | number | null | yes | ||
data.accepted_total | number | null | yes | ||
data.final_amount | number | null | yes | ||
data.stage | object | null | yes | ||
data.stage.code | string | yes | ||
data.stage.label | string | yes | ||
data.stage.description | string | null | no | ||
data.timeline | array<object> | yes | ||
data.timeline[].at | string | yes | ||
data.timeline[].label | string | yes | ||
data.timeline[].status | string | null | no | ||
data.eta_at | string | null | yes | ||
data.tracking | object | null | yes | ||
data.tracking.agent | object | null | yes | ||
data.tracking.agent.name | string | yes | ||
data.tracking.agent.phone_masked | string | null | yes | ||
data.tracking.agent.photo_url | string | null | yes | ||
data.tracking.agent.provider_label | string | null | yes | ||
data.tracking.location | object | null | yes | ||
data.tracking.location.lat | number | yes | ||
data.tracking.location.lng | number | yes | ||
data.tracking.location.at | string | yes | ||
data.tracking.eta_at | string | null | yes | ||
data.tracking.tracking_url | string | null | yes | ||
data.tracking.static_map_url | string | null | yes | ||
data.artifacts | array<object> | yes | ||
data.artifacts[].artifact_id | string | yes | ||
data.artifacts[].kind | string | yes | ||
data.artifacts[].label | string | yes | ||
data.artifacts[].value | string | null | no | ||
data.artifacts[].url | string | null | no | ||
data.artifacts[].valid_from | string | null | no | ||
data.artifacts[].valid_to | string | null | no | ||
data.artifacts[].fallback_url | string | yes | ||
data.actions | array<object> | yes | ||
data.actions[].kind | string | yes | ||
data.actions[].allowed | boolean | yes | ||
data.actions[].deadline | string | no | ||
data.actions[].label | string | yes | ||
data.actions[].url | string | no | ||
data.next_action | object | null | yes | ||
data.next_action.type | string | yes | ||
data.next_action.intent_id | string | no | ||
data.next_action.diff | object | no | ||
data.next_action.diff.lines | array<object> | yes | ||
data.next_action.diff.lines[].offering_id | string | yes | ||
data.next_action.diff.lines[].before | object | null | yes | ||
data.next_action.diff.lines[].before.quantity | integer | yes | ||
data.next_action.diff.lines[].before.amount | number | yes | ||
data.next_action.diff.lines[].after | object | null | yes | ||
data.next_action.diff.lines[].after.quantity | integer | yes | ||
data.next_action.diff.lines[].after.amount | number | yes | ||
data.next_action.diff.total_before | number | yes | ||
data.next_action.diff.total_after | number | yes | ||
data.next_action.diff.schedule | object | no | ||
data.next_action.diff.schedule.before | object | yes | ||
data.next_action.diff.schedule.before.scheduled_at | string | null | yes | ||
data.next_action.diff.schedule.before.ends_at | string | null | no | ||
data.next_action.diff.schedule.after | object | yes | ||
data.next_action.diff.schedule.after.scheduled_at | string | null | yes | ||
data.next_action.diff.schedule.after.ends_at | string | null | no | ||
data.next_action.url | string | no | ||
data.next_action.until | string | no | ||
data.web_url | string | yes | ||
data.payment_id | string | null | yes | ||
data.cancelled_by | string | null | yes | ||
data.reason_code | string | null | yes | ||
data.created_at | string | yes | ||
data.updated_at | string | yes | ||
data.promotions | array<object> | no | ||
data.promotions[].promotion_id | string (uuid) | yes | ||
data.promotions[].kind | string | yes | ||
data.promotions[].amount | number | yes | ||
data.customer | object | yes | ||
data.customer.contact_name | string | null | yes | ||
data.customer.contact_phone | string | null | yes | ||
data.note | string | null | yes | ||
data.accept_due_at | string | null | yes | ||
data.pending_reschedule | object | null | yes | ||
data.pending_reschedule.scheduled_at | string | yes | ||
data.pending_reschedule.ends_at | string | null | yes | ||
data.handler_system | string | yes | ||
data.payment_due_at | string | null | yes | ||
data.source | object | yes | ||
data.source.channel | string | yes | ||
data.source.partner_name | string | null | yes | ||
data.source.sticker | object | null | yes | ||
data.source.sticker.name | string | null | yes |
Errors
| Code | Status | Message |
|---|---|---|
AUTH-001 | 401 | The API key is missing, invalid or revoked. |
EVT-206 | 401 | Production keys are not accepted in the sandbox. Use a sandbox key (sk_test_/pk_test_). |
EVT-207 | 401 | Sandbox keys are not accepted in production. Use a production key (sk_live_/pk_live_). |
AUTH-018 | 403 | The request came from an IP address that is not on the key's allowlist. |
AUTH-058 | 403 | The API key does not have the scope this operation requires. |
SIG-002 | 401 | The request timestamp is outside the allowed time window. |
SIG-003 | 401 | The request signature is missing or does not match. |
SIG-005 | 409 | This request nonce was already used. |
VAL-014 | 400 | The TapPay-Version header is not a known API version. |
BIZ-004 | 403 | The terminal is not active. |
BIZ-005 | 403 | The merchant account is not in a state that allows this request. |
ORD-001 | 409 | The order is not in a state that allows this action. |
ORD-010 | 403 | This order is handled by another system. |
ORD-014 | 404 | Order not found. |
DLV-002 | 409 | The delivery is not in a state that allows this action. |
DLV-003 | 409 | Delivery progress is managed by the dispatcher. |
DLV-004 | 404 | Delivery not found. |
curl -sS -X PUT "https://api.tappay.mn/api/v1/commerce/orders/ORDER_ID/tracking" \
-H "Authorization: Bearer sk_test_YOUR_SECRET_KEY" \
-H "TapPay-Version: 2026-09-27" \
-H "Content-Type: application/json" \
-d '{"agent":{"name":"Courier Dorj","phone":"+97699000000"},"location":{"lat":47.9195,"lng":106.925},"eta_at":"2026-10-03T08:50:00.000Z"}'import { TapPay } from '@tappay-mn/node';
const tappay = new TapPay({ apiKey: 'sk_test_YOUR_SECRET_KEY' });
const result = await tappay.commerce.putTracking({
order_id: 'ORDER_ID',
body: {
agent: {
name: 'Courier Dorj',
phone: '+97699000000',
},
location: {
lat: 47.9195,
lng: 106.925,
},
eta_at: '2026-10-03T08:50:00.000Z',
},
});
console.log(JSON.stringify(result));<?php
require 'vendor/autoload.php';
use TapPay\TapPay;
$tappay = new TapPay(['apiKey' => 'sk_test_YOUR_SECRET_KEY']);
$result = $tappay->commerce->putTracking([
'order_id' => 'ORDER_ID',
'body' => [
'agent' => [
'name' => 'Courier Dorj',
'phone' => '+97699000000',
],
'location' => [
'lat' => 47.9195,
'lng' => 106.925,
],
'eta_at' => '2026-10-03T08:50:00.000Z',
],
]);
echo json_encode($result);import json
import tappay
client = tappay.TapPay("sk_test_YOUR_SECRET_KEY")
result = client.commerce.put_tracking({
"order_id": "ORDER_ID",
"body": {
"agent": {
"name": "Courier Dorj",
"phone": "+97699000000",
},
"location": {
"lat": 47.9195,
"lng": 106.925,
},
"eta_at": "2026-10-03T08:50:00.000Z",
},
})
print(json.dumps(result)){
"success": true,
"data": {
"order_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f02",
"order_no": "A-1001",
"channel": "WALLET",
"status": "IN_PROGRESS",
"version": 6,
"merchant": {
"merchant_code": "M-SANDBOX-01",
"name": "Sandbox Cafe"
},
"location_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f01",
"fulfillment": {
"mode": "DELIVERY",
"label": "Delivery",
"address": {
"label": "Home",
"text": "Peace Avenue 10, apartment 5",
"entrance": null,
"floor": null,
"door": null,
"note": null,
"location": {
"lat": 47.9201,
"lng": 106.9312
},
"district": null,
"khoroo": null
},
"scheduled_at": null,
"ends_at": null
},
"lines": [
{
"line_id": "l1",
"offering_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f03",
"name": "Latte (M)",
"quantity": 2,
"variant_id": null,
"option_ids": [],
"inputs": {},
"amount": 18000,
"status": "ACTIVE",
"final_amount": null
}
],
"breakup": [
{
"kind": "ITEM",
"label": "Latte (M) x 2",
"amount": 18000,
"ref": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f03"
}
],
"total": 18000,
"fees": [],
"payable_total": 18000,
"authorization_type": "FINAL",
"authorization_amount": null,
"accepted_total": 18000,
"final_amount": null,
"stage": null,
"timeline": [
{
"at": "2026-10-03T08:15:00.000Z",
"label": "Order created",
"status": "CREATED"
},
{
"at": "2026-10-03T08:20:00.000Z",
"label": "Order accepted",
"status": "ACCEPTED"
},
{
"at": "2026-10-03T08:20:00.000Z",
"label": "Paid",
"status": "CONFIRMED"
}
],
"eta_at": "2026-10-03T08:50:00.000Z",
"tracking": {
"agent": {
"name": "Courier Dorj",
"phone_masked": "+976 99** **00",
"photo_url": null,
"provider_label": null
},
"location": {
"lat": 47.9195,
"lng": 106.925,
"at": "2026-10-03T08:35:00.000Z"
},
"eta_at": "2026-10-03T08:50:00.000Z",
"tracking_url": "https://example.com/track/A-1001",
"static_map_url": null
},
"artifacts": [],
"actions": [],
"next_action": null,
"web_url": "https://pay.tappay.mn/o/ord_7f3k2m9q",
"payment_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f04",
"cancelled_by": null,
"reason_code": null,
"created_at": "2026-10-03T08:15:00.000Z",
"updated_at": "2026-10-03T08:35:00.000Z",
"promotions": [],
"customer": {
"contact_name": "Bat",
"contact_phone": "+97699000000"
},
"note": null,
"accept_due_at": null,
"pending_reschedule": null,
"handler_system": "MERCHANT_SYSTEM",
"payment_due_at": null,
"source": {
"channel": "WALLET",
"partner_name": "Sandbox Bank",
"sticker": null
}
}
}
For the full flow, read the orders guide.