> For the complete documentation index, see [llms.txt](https://docs.neox.vn/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neox.vn/docs/global/global-collections/integration/trade-orders/get-detail-trade-order.md).

# Get Detail Trade Order

#### Endpoint: GET /v2/gc/trade-orders/{requestId}

#### Description: Retrieve the full details of a trade order identified by the merchant-supplied request ID.

## Request

#### Request Params Field Descriptions

| Field Name    | Type   | Required | Description                                                                               |
| ------------- | ------ | -------- | ----------------------------------------------------------------------------------------- |
| subMerchantId | string | No       | Sub-merchant identifier. Include when the trade order belongs to a specific sub-merchant. |

### Response

#### Response Field Descriptions

| Field Name    | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| code          | number | Response code.                   |
| state         | number | State of the response.           |
| data          | object | Trade order details.             |
| message       | string | Response message.                |
| neoResponseId | string | Unique NeoX response identifier. |

#### `data` object fields:

| Field Name    | Type        | Description                                                                                                             |
| ------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
| tradeOrderId  | string      | NeoX identifier assigned to the trade order.                                                                            |
| requestId     | string      | Merchant-supplied request ID used to create or last update the trade order.                                             |
| tradeType     | string      | Type of trade. Enum: `GOODS_TRADE_COLLECTION`, `SERVICES_TRADE_COLLECTION`.                                             |
| currency      | string      | Currency of the trade order (e.g. `USD`, `EUR`, `HKD`).                                                                 |
| amount        | number      | Total trade amount in the specified `currency`.                                                                         |
| status        | string      | Current status of the trade order. Enum: `INIT`, `WAIT_MATCH`, `COMPLETED`.                                             |
| matchedAmount | number      | Cumulative amount already matched to collection orders.                                                                 |
| canModifyType | string      | Indicates what modifications are allowed on the trade order. Enum: `FORBIDDEN_MODIFY`, `SUPPLY_MATERIAL`, `ALL_MODIFY`. |
| createdAt     | date string | Timestamp when the trade order was created (ISO 8601).                                                                  |
| updatedAt     | date string | Timestamp when the trade order was last updated (ISO 8601).                                                             |

#### Response sample

```json
{
  "code": 1,
  "state": 2,
  "data": {
    "tradeOrderId": "TO-20240301-000182",
    "requestId": "c7d8e9f0-1234-4a56-b789-abcdef012345",
    "tradeType": "GOODS_TRADE_COLLECTION",
    "currency": "USD",
    "amount": 15800.00,
    "status": "WAIT_MATCH",
    "matchedAmount": 0.00,
    "canModifyType": "ALL_MODIFY",
    "createdAt": "2024-03-01T08:30:00Z",
    "updatedAt": "2024-03-01T08:30:00Z"
  },
  "message": "Successful",
  "neoResponseId": "a1b2c3d4-ef56-4789-0abc-123456789def"
}
```

## Example cURL

```bash
curl -X GET "https://{base_url_openapi}/v2/gc/trade-orders/{requestId}?subMerchantId=SM-00098761" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Accept-Language: en"
```

### Notes

* Requires Bearer token in the Authorization header.
* The Accept-Language header can be used to specify the response language (Support: "vi", "en").
* No request body required.
* Replace `{requestId}` with the merchant-generated request ID used when creating the trade order.
* Include the `subMerchantId` query parameter when the trade order was created under a sub-merchant account.
* `canModifyType=FORBIDDEN_MODIFY` indicates the trade order cannot be changed; `SUPPLY_MATERIAL` allows supplementary documents to be added; `ALL_MODIFY` permits full updates.
