# 订购机笼护送 ![](https://docs.equinix.com/zh-Hans/assets/images/OrderCageEscort-03d9712dd9f2ca9087dc6e55dfd1714d.png) ## 先决条件[​](#先决条件 "直接链接至先决条件") 1. 验证-提交您的用户凭据,客户端ID和客户端机密以进行OAuth2验证。有关如何致电OAuth API以验证和验证您的凭据的说明,请参阅[API验证](https://docs.equinix.com/zh-Hans/equinix-api/api-authentication.md)。 2. 获取因工到访订单编号-向端点发送`GET`请求[`/colocations/v2/orders/{orderId}`](https://docs.equinix.com/zh-Hans/api-catalog/ordersv2/orders/get%20order%20details.md),以检索已安排因工到访的订单编号。要安排新的因工到访,请向端点发送`POST`请求[`colocations/v2/orders/workVisits`](https://docs.equinix.com/zh-Hans/api-catalog/workvisitsv2/work-visit/schedule%20work%20visit%20services.md)。您必须具有`IBX Access Services`安排因工到访的权限。如果您已有因工到访订单编号,可以跳过此步骤。 3. 要获取Smart Hands详细信息,用户必须具有`Smart Hands`订购权限。 4. 获取Smart Hands类型-向端点发送`GET`获取所有Smart Hands订单类型的请求[`/v1/orders/smarthands/types`](https://docs.equinix.com/zh-Hans/api-catalog/smarthandsv1/smarthands/smarthandtypes.md)。如果您已经知道Smart Hands订单类型,可以跳过此步骤。 5. 获取位置信息-向端点发送`GET`请求[`/v1/orders/smarthands/locations`](https://docs.equinix.com/zh-Hans/api-catalog/smarthandsv1/smarthands/getlocation.md),以检索您有权访问的可用IBX位置。如果您已知道网点信息,可以跳过此步骤。 ## 订购机笼护送 - 简单示例[​](#订购机笼护送---简单示例 "直接链接至订购机笼护送 - 简单示例") 要为访客订购IBX安全护送以访问您的机笼,请向端点发送`POST`请求[`/smarthands/cageEscort`](https://docs.equinix.com/zh-Hans/api-catalog/smarthandsv1/smarthands.md)。 cURL 请求示例: ``` curl -X POST "https://api.equinix.com/v1/orders/smarthands/cageEscort" -H "content-type: application/json" -H "authorization: Bearer " -d '{     "ibxLocation": {     "ibx": "AM1",     "cages": [         {         "cage": "AM1:0J:00JD11",         "accountNumber": "126854"         }     ]     },     "serviceDetails": {     "workVisitOrderNumber": "1-19864326570532",     "openCabinetForVisitor": true,     "supervisionReqForVisitor": true,     "durationVisit": "4 Hours",     "scopeOfWork": "If staff from customer company is unable to attend, please continue to accompany the visitor."     },     "schedule": {     "scheduleType": "SCHEDULED_MAINTENANCE",     "requestedStartDate": "2019-08-30T22:00:49.776Z",     "requestedCompletionDate": "2019-08-31T22:00:49.776Z"     },     "contacts": [     {         "contactType": "ORDERING",         "userName": "johndoe"     },     {         "contactType": "TECHNICAL",         "userName": "johndoe",         "workPhonePrefToCall": "ANYTIME"     },     {         "contactType": "NOTIFICATION",         "userName": "johndoe"     }     ] }' ``` 示例回答: ``` {     "OrderNumber": "1-19876653568916" } ``` 响应表明订单已成功,并返回订单号。 ## 订购机笼护送 - 扩展示例[​](#订购机笼护送---扩展示例 "直接链接至订购机笼护送 - 扩展示例") cURL 请求示例: 要为访客订购IBX安全护送以访问您的机笼,请向端点发送`POST`请求[`/smarthands/cageEscort`](https://docs.equinix.com/zh-Hans/api-catalog/smarthandsv1/smarthands.md)。在请求正文中提供服务详情。使用`attachments`对象包括技术人员的其他详细信息。 > **注意** > > 创建带有附件的订单之前,请致电[`Attachments File`](https://docs.equinix.com/zh-Hans/api-catalog/attachmentsv1/attachments/createattachment.md)端点。 ``` curl -X POST "https://api.equinix.com/v1/orders/smarthands/cageEscort" -H "content-type: application/json" -H "authorization: Bearer " -d '{     "ibxLocation": {     "ibx": "AM1",     "cages": [         {             "cage": "AM1:0J:00JD11",             "cabinets": [                 "AM1:0J:00JD11:0001"             ],             "accountNumber": "126854"         }       ]     },     "serviceDetails": {         "workVisitOrderNumber": "1-19864326570532",         "openCabinetForVisitor": true,         "supervisionReqForVisitor": true,         "durationVisit": "4 Hours",         "scopeOfWork": "If staff from customer company is unable to attend, please continue to accompany the visitor.",         "needSupportFromASubmarineCableStationEngineer": true     },     "attachments": [      {         "id": "fcb2k8763-2947-456e-8d68-f280753d60ba",         "name": "WorkVisitInstructions.docx"      }   ],   "schedule": {     "scheduleType": "SCHEDULED_MAINTENANCE",     "requestedStartDate": "2019-08-30T22:00:49.776Z",     "requestedCompletionDate": "2019-08-31T22:00:49.776Z"   },     "customerReferenceNumber": "EQX-PO2019-08-001",     "purchaseOrder": {         "purchaseOrderType": "EXEMPTED",         "attachment": {             "id": "abc1fd2e-345f-67g4-hi89-01jk234l5m6n",             "name": "PurchaseOrderExemptionForm123.docx"     }   },   "contacts": [     {         "contactType": "ORDERING",         "userName": "johndoe"     },     {         "contactType": "TECHNICAL",         "name": "Jane Smith",         "email": "janesmith@corporation.com",         "workPhoneCountryCode": "+44",         "workPhone": "0148211111",         "workPhonePrefToCall": "MY_BUSINESS_HOURS",         "workPhoneTimeZone": "Europe/London",         "mobilePhoneCountryCode": "+44",         "mobilePhone": "0123456789",         "mobilePhonePrefToCall": "MY_BUSINESS_HOURS",         "mobilePhoneTimeZone": "Europe/London"     },     {         "contactType": "NOTIFICATION",         "userName": "johndoe"     },     {         "contactType": "NOTIFICATION",         "userName": "jillsnow"     }   ] }' ``` 有关主体参数和描述的完整列表,请参阅[API参考手册](https://docs.equinix.com/zh-Hans/api-catalog/smarthandsv1/smarthands.md)。