> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# 取得 AceDataCloud 平台訂單詳情

> Platform 整合指南 - Ace Data Cloud

透過訂單 ID 查詢訂單。該端點支援兩種讀取模式：匿名存取只返回支付頁面所需的最小欄位；訂單擁有者攜帶 Account Token 時返回完整詳情。

## 介面概覽

| 項 | 內容 |
| - | - |
| 方法 | `GET` |
| URL | `https://platform.acedata.cloud/api/v1/orders/{order_id}` |
| 驗證 | 可選；匿名為最小投影，已驗證擁有者為完整投影 |

`/orders/{id}` 與 `/orders/{id}/` 目前都可用。訂單 ID 是支付連結的一部分，應視為敏感的不透明識別碼，不要公開傳播。

## 匿名查詢

支付頁面在登入狀態遺失時可以直接讀取：

```shell theme={null}
export ORDER_ID='你的訂單 ID'
curl "https://platform.acedata.cloud/api/v1/orders/${ORDER_ID}" \
  -H 'Accept: application/json'
```

匿名回應只包含 `id`、`description`、`price`、`state`、`pay_way`、`pay_url`、`expired_at`、`created_at`。它不會返回帳戶、Application、Package、支付內部識別碼或 metadata。

## 已驗證查詢

```shell theme={null}
export PLATFORM_TOKEN='你的帳戶權杖'
curl "https://platform.acedata.cloud/api/v1/orders/${ORDER_ID}" \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}"
```

訂單擁有者會收到完整 Order 詳情，包括 `application` / `applications`、`package` / `packages`、`bank_details`、`invoice_automation` 及模型欄位。若已驗證但不是訂單擁有者，返回 `403`；超級管理員除外。

## 關鍵欄位

| 欄位 | 說明 |
| - | - |
| `state` | `Pending`、`Paid`、`Finished`、`Expired`、`Failed` 或 `Refunded` |
| `pay_way` | 訂單目前支付方式；欄位名稱不是 `payment_method` |
| `pay_url` | 託管支付頁面或 QR Code 位址，可能為空 |
| `price` | 訂單最終應付金額，目前訂單模型不提供 `final_price` 欄位 |
| `amount` | 方案額度數量；僅已驗證完整回應可見 |
| `finished_at` | 訂單完成時間；欄位名稱不是 `paid_at` |

完整回應可能隨支付方式附加欄位，客戶端應視需要讀取，並始終避免記錄完整回應中的敏感 metadata。

## 錯誤處理

* `404`：訂單 ID 不存在。
* `403`：已登入但不是訂單擁有者。
* 匿名請求不會返回 `401`；它只得到最小公開投影。

## 相關介面

* [取得訂單清單](https://platform.acedata.cloud/documents/platform-order-list)
* [建立儲值訂單](https://platform.acedata.cloud/documents/platform-order-create)
* [支付訂單](https://platform.acedata.cloud/documents/platform-order-pay)
* [重新整理訂單狀態](https://platform.acedata.cloud/documents/platform-order-refresh)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.