# 获取订单

获取指定订单。

Endpoint: GET /v2/project/{project_id}/order/{order_id}
Version: 2.0.0
Security: AuthForCart

## Path parameters:

  - `project_id` (integer, required)
    项目ID。您可以在发布商帐户的项目名称旁找到此参数；使用项目时，也可以在浏览器地址栏中找到此参数。URL格式如下：https://publisher.xsolla.com//projects/。
    Example: 44056

  - `order_id` (string, required)
    订单ID。
    Example: "656"

## Response 200 fields (application/json):

  - `order_id` (integer)
    订单ID。
    Example: 1

  - `status` (string)
    订单状态。详细状态说明请参阅[订单生命周期](https://developers.xsolla.com/zh/api/catalog/order-life-cycle)部分。
    Enum: "new", "paid", "done", "canceled", "expired"

  - `content` (object)
    订单详细信息。

  - `content.price` (object)
    订单价格。

  - `content.price.amount` (string)
    订单折扣价格。
    Example: "30"

  - `content.price.amount_without_discount` (string)
    订单价格。
    Example: "30"

  - `content.price.currency` (string)
    订单价格币种。符合[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)标准的三字母代码。
    Example: "USD"

  - `content.virtual_price` (object)
    以虚拟货币表示的订单价格。

  - `content.virtual_price.amount` (string)
    订单折扣价格。
    Example: "100"

  - `content.virtual_price.amount_without_discount` (string)
    订单价格。
    Example: "150"

  - `content.virtual_price.currency` (string)
    订单中使用的虚拟货币SKU。
    Example: "test_vc"

  - `content.is_free` (boolean)
    如果为true，则该订单免费。

  - `content.items` (array)
    商品列表。
    Example: [{"sku":"com.xsolla.item_1","quantity":1,"is_free":false,"price":{"amount":"30","amount_without_discount":"30","currency":"USD"}}]

  - `content.items.sku` (string)
    唯一商品ID。SKU只能包含大小写英文字母、数字、句点、短横线和下划线。
    Example: "some_sku"

  - `content.items.quantity` (integer)
    商品数量。
    Example: 1

  - `content.items.is_free` (boolean)
    该商品是否免费。

  - `content.items.price` (object)
    商品价格。

  - `content.items.price.amount` (string)
    商品折后价格。
    Example: "30"

  - `content.items.price.amount_without_discount` (string)
    商品价格。
    Example: "30"

  - `content.items.price.currency` (string)
    商品价格币种。符合[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)标准的三字母代码。
    Example: "USD"

## Response 404 fields (application/json):

  - `statusCode` (integer)
    Example: 404

  - `errorCode` (integer)
    Example: 9001

  - `errorMessage` (string)
    Example: "[0401-9001]: Order not found"


