# 检索订单历史记录 ![检索订单历史记录的三个步骤](https://docs.equinix.com/zh-Hans/assets/images/RetrieveOrderHistory-4dfd19548a651999578abad41e902124.png) ## 先决条件[​](#先决条件 "直接链接至先决条件") 验证-提交您的用户凭据,客户端ID和客户端机密以进行OAuth2验证。有关如何致电OAuth API以验证和验证您的凭据的说明,请参阅[API验证](https://docs.equinix.com/zh-Hans/equinix-api/api-authentication.md)。 ## 检索订单历史记录[​](#检索订单历史记录-1 "直接链接至检索订单历史记录") 要检索订单历史记录,请将请求发送`POST`至[/colocations/v2/orderId}](https://docs.equinix.com/zh-Hans/api-catalog/ordersv2/orders/get%20order%20details.md)端点。 cURL 请求示例: 已为提交的Smart Hands订单提交订单历史请求,该订单关联到IBX数据中心DC3和DC4中姓氏为订购或通知联系人`smith`,并定义了 自此请求提交之日起的日期范围。 ``` curl -X POST "https://api.equinix.com/v1/retrieve-orders" -H "content-type: application/json" -H "authorization: Bearer " -d '{     "filters": {     "orderStatus": [         "SUBMITTED",         "IN_PROGRESS"     ],     "productTypes": [         "SMART_HANDS"     ],     "ibxs": [         "DC3",         "DC4"         ],         "dateRange": "PAST_YEAR"     },     "sorts": [         {             "name": "CREATED_ON",             "direction": "DESC"         }     ],     "source": [         "CONTACT_LAST_NAME"     ],     "page": {         "number": 0,         "size": 1     },     "q": "smith" } ``` 请求正文中包含的参数特定于此示例。参数及其说明的完整列表,请参见[API参考手册](https://docs.equinix.com/zh-Hans/api-catalog/ordersv2/orders/get%20order%20details.md)。 cURL 请求示例: 已为提交的Smart Hands订单提交订单历史请求,该订单关联到IBX DC3和DC4中姓氏并定义 两个特定日期之间的日期范围的订购或通知联系人`smith`。 ``` curl -X POST "https://api.equinix.com/v1/retrieve-orders" -H "content-type: application/json" -H "authorization: Bearer " -d '{     "filters": {     "orderStatus": [         "SUBMITTED",         "IN_PROGRESS"     ],     "productTypes": [         "SMART_HANDS"     ],     "ibxs": [         "DC3",         "DC4"      ],      "fromDate": "09/02/2019",      "toDate": "09/15/2019"     },     "sorts": [      {         "name": "CREATED_ON",         "direction": "DESC"      }     ],     "source": [         "CONTACT_LAST_NAME"     ],     "page": {         "number": 0,         "size": 1     },     "q": "smith" } ``` 请求正文中包含的参数特定于此示例。参数及其说明的完整列表,请参见[API参考手册](https://docs.equinix.com/zh-Hans/api-catalog/ordersv2/orders/get%20order%20details.md)。 示例回答: ``` {     "links": [         {             "rel": "self",             "href": "https://api.equinix.com/v1/orders-history/"         },         {             "rel": "next",             "href": "https://api.equinix.com/v1/orders-history/?page=1"         }     ],     "content": [         {             "orderNumber": "1-190123456789",             "createdAt": "2019-09-17T22:49:34Z",             "orderStatus": "SUBMITTED",             "orderSource": "Portal",             "account": {                 "accountName": "John Doe Corp",                 "accountNumber": "12345"             },             "uiMetaData": {                 "pricingEnforcementFlag": "false"             },             "orderingContacts": {                 "firstName": "James",                 "lastName": "Smith",                 "workPhone": "(972) 123-4567",                 "contactUCId": "234432",                 "username": "JSmith123",                 "emailAddress": "jsmith@johndoecorp.com"             },             "notificationContacts": [                 {                 "phone": "972-890-1234",                 "workPhone": "972-123-4567",                 "lastName": "Smith",                 "firstName": "James",                 "contactUCId": "234432",                 "emailAddress": "jsmith@johndoecorp.com",                 "username": "JSmith123"                 }             ],             "ibx": [                 "PAA"             ],             "type": [                 "Smart Hands"             ],             "customerReferenceNumber": "RQT12345",             "poNumbers": [                 "1-1007"             ],             "piiHoldFlag": false,             "technicalContacts": [                 {                 "firstName": "James",                 "lastName": "Smith",                 "workPhone": "(972) 123-4567",                 "contactUCId": "234432",                 "username": "JSmith123",                 "emailAddress": "jsmith@johndoecorp.com"                 }             ],             "pendingCustomerInputFlag": false,             "awaitingCustomerResponse": false,             "srNumber": "9-191234567890",             "cancellable": true,             "modifiable": true,             "links": [                 {                 "rel": "orderFullDetails",                 "href": "https://api.equinix.com/v1/orders-history/1-190123456789"                 }             ]         }     ],     "page": {         "size": 1,         "totalElements": 19,         "totalPages": 19,         "number": 0     } } ``` 响应负载包括在请求正文中定义的配置参数。有关可能参数及其说明的完整列表,请参阅[API参考手册](https://docs.equinix.com/zh-Hans/api-catalog/ordersv2/orders/get%20order%20details.md)。