# Захиалгын жагсаалт

> Таны системийн хүлээн авдаг салбаруудын захиалгыг шинээс нь эхлэн буцаана.

Эх: https://docs.tappay.mn/mn/reference/orders/list/

Таны системийн хүлээн авдаг салбаруудын захиалгыг шинээс нь эхлэн буцаана. `status` эсвэл `location_id`-аар шүүнэ.

`GET /api/v1/commerce/orders` Хувилбар 2026-09-27

### Нэвтрэлт

Secret key (Bearer)

### Header

| Нэр | Төрөл | Заавал | Утга | Тайлбар |
| - | - | - | - | - |
| `TapPay-Version` | string | үгүй | | |
| `TapPay-Timestamp` | string | үгүй | | |
| `TapPay-Nonce` | string | үгүй | | |
| `TapPay-Signature` | string | үгүй | | |

### Query параметр

| Нэр | Төрөл | Заавал | Утга | Тайлбар |
| - | - | - | - | - |
| `status` | string | үгүй | `CREATED`, `ACCEPTED`, `AWAITING_PAYMENT`, `CONFIRMED`, `IN_PROGRESS`, `READY`, `COMPLETED`, `CANCELLED`, `REJECTED`, `EXPIRED`, `FAILED` | |
| `location_id` | string (uuid) | үгүй | | |
| `cursor` | string | үгүй | | |
| `limit` | integer | үгүй | | |

### Хариу 200

| Нэр | Төрөл | Заавал | Утга | Тайлбар |
| - | - | - | - | - |
| `success` | boolean | тийм | `true` | |
| `data` | object | тийм | | |
| `data.items` | array\<object> | тийм | | |
| `data.items[].order_id` | string (uuid) | тийм | | |
| `data.items[].order_no` | string | тийм | | |
| `data.items[].channel` | string | тийм | | |
| `data.items[].status` | string | тийм | `CREATED`, `ACCEPTED`, `AWAITING_PAYMENT`, `CONFIRMED`, `IN_PROGRESS`, `READY`, `COMPLETED`, `CANCELLED`, `REJECTED`, `EXPIRED`, `FAILED` | |
| `data.items[].version` | integer | тийм | | |
| `data.items[].merchant` | object | тийм | | |
| `data.items[].merchant.merchant_code` | string | тийм | | |
| `data.items[].merchant.name` | string | тийм | | |
| `data.items[].location_id` | string (uuid) | тийм | | |
| `data.items[].fulfillment` | object | тийм | | |
| `data.items[].fulfillment.mode` | string | тийм | | |
| `data.items[].fulfillment.label` | string | тийм | | |
| `data.items[].fulfillment.address` | object \| null | тийм | | |
| `data.items[].fulfillment.address.label` | string \| null | тийм | | |
| `data.items[].fulfillment.address.text` | string | тийм | | |
| `data.items[].fulfillment.address.entrance` | string \| null | үгүй | | |
| `data.items[].fulfillment.address.floor` | string \| null | үгүй | | |
| `data.items[].fulfillment.address.door` | string \| null | үгүй | | |
| `data.items[].fulfillment.address.note` | string \| null | үгүй | | |
| `data.items[].fulfillment.address.location` | object \| null | тийм | | |
| `data.items[].fulfillment.address.location.lat` | number | тийм | | |
| `data.items[].fulfillment.address.location.lng` | number | тийм | | |
| `data.items[].fulfillment.address.district` | string \| null | үгүй | | |
| `data.items[].fulfillment.address.khoroo` | string \| null | үгүй | | |
| `data.items[].fulfillment.scheduled_at` | string \| null | тийм | | |
| `data.items[].fulfillment.ends_at` | string \| null | тийм | | |
| `data.items[].lines` | array\<object> | тийм | | |
| `data.items[].lines[].line_id` | string | тийм | | |
| `data.items[].lines[].offering_id` | string | тийм | | |
| `data.items[].lines[].name` | string | тийм | | |
| `data.items[].lines[].quantity` | integer | тийм | | |
| `data.items[].lines[].variant_id` | string \| null | тийм | | |
| `data.items[].lines[].option_ids` | array\<string> | тийм | | |
| `data.items[].lines[].inputs` | object | тийм | | |
| `data.items[].lines[].amount` | number | тийм | | |
| `data.items[].lines[].status` | string | тийм | | |
| `data.items[].lines[].final_amount` | number \| null | тийм | | |
| `data.items[].breakup` | array\<object> | тийм | | |
| `data.items[].breakup[].kind` | string | тийм | | |
| `data.items[].breakup[].label` | string | тийм | | |
| `data.items[].breakup[].amount` | number | тийм | | |
| `data.items[].breakup[].ref` | string \| null | үгүй | | |
| `data.items[].total` | number | тийм | | |
| `data.items[].fees` | array\<object> | тийм | | |
| `data.items[].fees[].kind` | string | тийм | | |
| `data.items[].fees[].label` | string | тийм | | |
| `data.items[].fees[].amount` | number | тийм | | |
| `data.items[].fees[].estimated` | boolean | тийм | | |
| `data.items[].payable_total` | number | тийм | | |
| `data.items[].authorization_type` | string | тийм | | |
| `data.items[].authorization_amount` | number \| null | тийм | | |
| `data.items[].accepted_total` | number \| null | тийм | | |
| `data.items[].final_amount` | number \| null | тийм | | |
| `data.items[].stage` | object \| null | тийм | | |
| `data.items[].stage.code` | string | тийм | | |
| `data.items[].stage.label` | string | тийм | | |
| `data.items[].stage.description` | string \| null | үгүй | | |
| `data.items[].timeline` | array\<object> | тийм | | |
| `data.items[].timeline[].at` | string | тийм | | |
| `data.items[].timeline[].label` | string | тийм | | |
| `data.items[].timeline[].status` | string \| null | үгүй | | |
| `data.items[].eta_at` | string \| null | тийм | | |
| `data.items[].tracking` | object \| null | тийм | | |
| `data.items[].tracking.agent` | object \| null | тийм | | |
| `data.items[].tracking.agent.name` | string | тийм | | |
| `data.items[].tracking.agent.phone_masked` | string \| null | тийм | | |
| `data.items[].tracking.agent.photo_url` | string \| null | тийм | | |
| `data.items[].tracking.agent.provider_label` | string \| null | тийм | | |
| `data.items[].tracking.location` | object \| null | тийм | | |
| `data.items[].tracking.location.lat` | number | тийм | | |
| `data.items[].tracking.location.lng` | number | тийм | | |
| `data.items[].tracking.location.at` | string | тийм | | |
| `data.items[].tracking.eta_at` | string \| null | тийм | | |
| `data.items[].tracking.tracking_url` | string \| null | тийм | | |
| `data.items[].tracking.static_map_url` | string \| null | тийм | | |
| `data.items[].artifacts` | array\<object> | тийм | | |
| `data.items[].artifacts[].artifact_id` | string | тийм | | |
| `data.items[].artifacts[].kind` | string | тийм | | |
| `data.items[].artifacts[].label` | string | тийм | | |
| `data.items[].artifacts[].value` | string \| null | үгүй | | |
| `data.items[].artifacts[].url` | string \| null | үгүй | | |
| `data.items[].artifacts[].valid_from` | string \| null | үгүй | | |
| `data.items[].artifacts[].valid_to` | string \| null | үгүй | | |
| `data.items[].artifacts[].fallback_url` | string | тийм | | |
| `data.items[].actions` | array\<object> | тийм | | |
| `data.items[].actions[].kind` | string | тийм | | |
| `data.items[].actions[].allowed` | boolean | тийм | | |
| `data.items[].actions[].deadline` | string | үгүй | | |
| `data.items[].actions[].label` | string | тийм | | |
| `data.items[].actions[].url` | string | үгүй | | |
| `data.items[].next_action` | object \| null | тийм | | |
| `data.items[].next_action.type` | string | тийм | | |
| `data.items[].next_action.intent_id` | string | үгүй | | |
| `data.items[].next_action.diff` | object | үгүй | | |
| `data.items[].next_action.diff.lines` | array\<object> | тийм | | |
| `data.items[].next_action.diff.lines[].offering_id` | string | тийм | | |
| `data.items[].next_action.diff.lines[].before` | object \| null | тийм | | |
| `data.items[].next_action.diff.lines[].before.quantity` | integer | тийм | | |
| `data.items[].next_action.diff.lines[].before.amount` | number | тийм | | |
| `data.items[].next_action.diff.lines[].after` | object \| null | тийм | | |
| `data.items[].next_action.diff.lines[].after.quantity` | integer | тийм | | |
| `data.items[].next_action.diff.lines[].after.amount` | number | тийм | | |
| `data.items[].next_action.diff.total_before` | number | тийм | | |
| `data.items[].next_action.diff.total_after` | number | тийм | | |
| `data.items[].next_action.diff.schedule` | object | үгүй | | |
| `data.items[].next_action.diff.schedule.before` | object | тийм | | |
| `data.items[].next_action.diff.schedule.before.scheduled_at` | string \| null | тийм | | |
| `data.items[].next_action.diff.schedule.before.ends_at` | string \| null | үгүй | | |
| `data.items[].next_action.diff.schedule.after` | object | тийм | | |
| `data.items[].next_action.diff.schedule.after.scheduled_at` | string \| null | тийм | | |
| `data.items[].next_action.diff.schedule.after.ends_at` | string \| null | үгүй | | |
| `data.items[].next_action.url` | string | үгүй | | |
| `data.items[].next_action.until` | string | үгүй | | |
| `data.items[].web_url` | string | тийм | | |
| `data.items[].payment_id` | string \| null | тийм | | |
| `data.items[].cancelled_by` | string \| null | тийм | | |
| `data.items[].reason_code` | string \| null | тийм | | |
| `data.items[].created_at` | string | тийм | | |
| `data.items[].updated_at` | string | тийм | | |
| `data.items[].promotions` | array\<object> | үгүй | | |
| `data.items[].promotions[].promotion_id` | string (uuid) | тийм | | |
| `data.items[].promotions[].kind` | string | тийм | | |
| `data.items[].promotions[].amount` | number | тийм | | |
| `data.items[].customer` | object | тийм | | |
| `data.items[].customer.contact_name` | string \| null | тийм | | |
| `data.items[].customer.contact_phone` | string \| null | тийм | | |
| `data.items[].note` | string \| null | тийм | | |
| `data.items[].accept_due_at` | string \| null | тийм | | |
| `data.items[].pending_reschedule` | object \| null | тийм | | |
| `data.items[].pending_reschedule.scheduled_at` | string | тийм | | |
| `data.items[].pending_reschedule.ends_at` | string \| null | тийм | | |
| `data.items[].handler_system` | string | тийм | | |
| `data.items[].payment_due_at` | string \| null | тийм | | |
| `data.items[].source` | object | тийм | | |
| `data.items[].source.channel` | string | тийм | | |
| `data.items[].source.partner_name` | string \| null | тийм | | |
| `data.items[].source.sticker` | object \| null | тийм | | |
| `data.items[].source.sticker.name` | string \| null | тийм | | |
| `data.nextCursor` | string \| null | тийм | | |

### Алдаа

| Код | Status | Мессеж |
| - | - | - |
| [`AUTH-001`](https://docs.tappay.mn/mn/errors.md#AUTH-001) | 401 | API key байхгүй, буруу эсвэл хүчингүй болсон байна. |
| [`EVT-206`](https://docs.tappay.mn/mn/errors.md#EVT-206) | 401 | Production key sandbox-д хүлээн авахгүй. Sandbox key (sk_test\_/pk_test\_) ашиглана уу. |
| [`EVT-207`](https://docs.tappay.mn/mn/errors.md#EVT-207) | 401 | Sandbox key production-д хүлээн авахгүй. Production key (sk_live\_/pk_live\_) ашиглана уу. |
| [`AUTH-018`](https://docs.tappay.mn/mn/errors.md#AUTH-018) | 403 | Хүсэлт түлхүүрийн зөвшөөрөгдсөн IP жагсаалтад ороогүй хаягаас ирсэн. |
| [`AUTH-058`](https://docs.tappay.mn/mn/errors.md#AUTH-058) | 403 | API key-д энэ үйлдэлд шаардлагатай scope байхгүй байна. |
| [`SIG-002`](https://docs.tappay.mn/mn/errors.md#SIG-002) | 401 | Хүсэлтийн цагийн тэмдэг зөвшөөрөгдсөн хугацааны гадна байна. |
| [`SIG-003`](https://docs.tappay.mn/mn/errors.md#SIG-003) | 401 | Хүсэлтийн гарын үсэг байхгүй эсвэл таарахгүй байна. |
| [`SIG-005`](https://docs.tappay.mn/mn/errors.md#SIG-005) | 409 | Энэ хүсэлтийн nonce өмнө нь ашиглагдсан байна. |
| [`VAL-014`](https://docs.tappay.mn/mn/errors.md#VAL-014) | 400 | TapPay-Version header нь мэдэгдэх API хувилбар биш байна. |
| [`BIZ-004`](https://docs.tappay.mn/mn/errors.md#BIZ-004) | 403 | Terminal идэвхгүй байна. |
| [`BIZ-005`](https://docs.tappay.mn/mn/errors.md#BIZ-005) | 403 | Мерчантын данс энэ хүсэлтийг зөвшөөрөх төлөвт байхгүй байна. |

Playground-д туршиж үзэх: https://docs.tappay.mn/mn/reference/orders/list/

```bash title="curl"
curl -sS "https://api.tappay.mn/api/v1/commerce/orders?status=CONFIRMED&limit=20" \
  -H "Authorization: Bearer sk_test_YOUR_SECRET_KEY" \
  -H "TapPay-Version: 2026-09-27"
```

```js title="Node.js"
import { TapPay } from '@tappay-mn/node';

const tappay = new TapPay({ apiKey: 'sk_test_YOUR_SECRET_KEY' });
const page = await tappay.commerce.list({ query: { status: 'CONFIRMED', limit: 20 } }).firstPage();
console.log(JSON.stringify(page));
```

```php title="PHP"
<?php
require 'vendor/autoload.php';

use TapPay\TapPay;

$tappay = new TapPay(['apiKey' => 'sk_test_YOUR_SECRET_KEY']);
$page = $tappay->commerce->list(['query' => ['status' => 'CONFIRMED', 'limit' => 20]])->firstPage();
echo json_encode(['data' => $page->data, 'hasMore' => $page->hasMore, 'nextCursor' => $page->nextCursor]);
```

```python title="Python"
import json
import tappay

client = tappay.TapPay("sk_test_YOUR_SECRET_KEY")
page = client.commerce.list({"status": "CONFIRMED", "limit": 20}).first_page()
print(json.dumps({"data": page.data, "has_more": page.has_more, "next_cursor": page.next_cursor}))
```

```json title="Response"
{
  "success": true,
  "data": {
    "items": [
      {
        "order_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f02",
        "order_no": "A-1001",
        "channel": "WALLET",
        "status": "CONFIRMED",
        "version": 4,
        "merchant": {
          "merchant_code": "M-SANDBOX-01",
          "name": "Sandbox Cafe"
        },
        "location_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f01",
        "fulfillment": {
          "mode": "PICKUP",
          "label": "Pickup",
          "address": 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": null,
        "tracking": 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:20: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
        }
      }
    ],
    "nextCursor": null
  }
}
```

Бүтэн урсгалыг [захиалгын гарын авлагаас](https://docs.tappay.mn/mn/guides/orders.md) үзнэ үү.
