检索订单历史记录

先决条件
身份验证 - 请提交您的用户凭据、客户端 ID 和客户端密钥以进行 OAuth2 身份验证。有关如何调用 OAuth API 来验证和确认您的凭据的说明,请参阅API 身份验证。
检索订单历史记录
要检索您的订单历史记录,请向 /colocations/v2/orders/{orderId} 发送 POST 请求。%20Order%20details)端点。
cURL 请求示例:
已对IBX DC3和DC4中与姓氏为“smith”的订购或通知联系人关联的已提交Smart Hands订单执行了订单历史记录请求,并定义了日期范围。 自提交此请求之日起生效。
curl -X
POST "https://api.equinix.com/v1/retrieve-orders"
-H "content-type: application/json"
-H "authorization: Bearer <token>"
-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 参考。%20Order%20个细节)。
cURL 请求示例:
针对在 IBXs DC3 和 DC4 中与姓氏为“smith”的订购或通知联系人关联的已提交 Smart Hands 订单,并指定日期范围,执行了订单历史记录请求。 在两个特定日期之间。
curl -X
POST "https://api.equinix.com/v1/retrieve-orders"
-H "content-type: application/json"
-H "authorization: Bearer <token>"
-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 参考。%20Order%20个细节)。
示例回答:
{
"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 参考。%20Order%20个细节)。