2016-12-05 69 views
0

在嘗試使用超級傳送API沙箱時,我注意到當我通過https://sandbox-api.uber.com/v1/deliveries發佈郵件時,使用item []創建新郵件。「is fragile」:true,來自沙箱的響應錯誤地顯示item []。是脆弱的「:錯誤。至少我認爲這是不正確的,我沒有看到它被列爲沙箱的已知限制。這是一個錯誤?超級RUSH API沙盒交付is_fragile值不正確,錯誤?

的更多信息:

  • OS:Ubuntu的16.04.1 LTS
  • 客戶:郵差4.9.0

POST請求到URL從https://sandbox-api.uber.com/v1/deliveries

POST /v1/deliveries HTTP/1.1 
Host: sandbox-api.uber.com 
Authorization: [redacted] 
Content-Type: application/json 
Cache-Control: no-cache 
Postman-Token: [redacted] 

{ 
    "items": [ 
     { 
      "title": "Fragile Item", 
      "quantity": 1, 
      "price": 30, 
      "is_fragile": true, 
      "currency_code": "USD", 
     } 
    ], 


    "dropoff": { 
     "location": { 
      "address": "530 W 113th Street", 
      "address_2": "Floor 2", 
      "city": "New York", 
      "country": "US", 
      "postal_code": "10025", 
      "state": "NY" 
     }, 
     "contact": { 
      "first_name": "Alice", 
      "last_name": "Dropoff", 
      "email": "[email protected]", 
      "phone": { 
       "number": "+19177447934", 
       "sms_enabled": "true", 
      }, 
     } 
    }, 
    "pickup": { 
     "location": { 
      "address": "636 W 28th Street", 
      "address_2": "Floor 2", 
      "city": "New York", 
      "country": "US", 
      "postal_code": "10001", 
      "state": "NY" 
     }, 
     "contact": { 
      "first_name": "Bob", 
      "last_name": "Pickup", 
      "email": "[email protected]", 
      "phone": { 
       "number": "+19177447934", 
       "sms_enabled": "true", 
      }, 
     }, 
    }, 
} 

響應沙箱:

{ 
    "status": "processing", 
    "dropoff": { 
    "eta": 12, 
    "signature_required": false, 
    "contact": { 
     "first_name": "Alice", 
     "last_name": "Dropoff", 
     "send_sms_notifications": true, 
     "send_email_notifications": true, 
     "phone": { 
     "sms_enabled": true, 
     "number": "+19177447934" 
     }, 
     "email": "[email protected]" 
    }, 
    "special_instructions": "", 
    "location": { 
     "city": "New York", 
     "country": "US", 
     "longitude": -73.963863, 
     "state": "NY", 
     "postal_code": "10025", 
     "address_2": "Floor 2", 
     "address": "530 W 113th Street", 
     "latitude": 40.805264 
    }, 
    "signature_image": { 
     "url": "", 
     "expires_at": "-62135596800" 
    }, 
    "courier_notes": {} 
    }, 
    "fee": 5, 
    "quote_id": "c7e135da-957e-40b7-a2c5-5d468dc1d686", 
    "courier": null, 
    "items": [ 
    { 
     "weight": 0, 
     "title": "Bottle 3", 
     "price": 30, 
     "is_fragile": false, 
     "height": 0, 
     "width": 0, 
     "length": 0, 
     "currency_code": "USD", 
     "quantity": 1 
    } 
    ], 
    "created_at": 1480961485, 
    "delivery_id": "21b1b8de-2cea-4bc4-a316-2fd7598787c7", 
    "pickup": { 
    "eta": 7, 
    "signature_required": false, 
    "contact": { 
     "first_name": "Bob", 
     "last_name": "Pickup", 
     "send_sms_notifications": true, 
     "send_email_notifications": true, 
     "phone": { 
     "sms_enabled": true, 
     "number": "+19177447934" 
     }, 
     "email": "[email protected]" 
    }, 
    "special_instructions": "", 
    "location": { 
     "city": "New York", 
     "country": "US", 
     "longitude": -74.0064109, 
     "state": "NY", 
     "postal_code": "10001", 
     "address_2": "Floor 2", 
     "address": "636 W 28th Street", 
     "latitude": 40.7527293 
    }, 
    "signature_image": { 
     "url": "", 
     "expires_at": "-62135596800" 
    }, 
    "courier_notes": {} 
    }, 
    "order_reference_id": "", 
    "tracking_url": "https://api.uber.com/v1/sandbox/map", 
    "currency_code": "USD" 
} 

回答

0

這似乎是Delberies API的優步沙箱環境中的一個錯誤。

+0

有沒有辦法讓我提交這個錯誤報告? –

+0

是的。從這個線程我內部創建了一個bug。解決後我會發布更新。這個錯誤隻影響我們的沙箱環境。 –

+0

是的,我知道它隻影響沙箱。感謝您提交報告! –