> ## 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` | 托管支付页面或二维码地址，可能为空 |
| `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.