uber RUSH API沙箱交付is_fragile值不正确,bug?

时间:2016-12-05 19:27:39

标签: uber-api

在尝试使用uber交付API沙箱时,我注意到当我发送到https://sandbox-api.uber.com/v1/deliveries以创建带有项目[]的新项目的交付时。"是脆弱的":是的,响应从沙箱中错误地显示项目[]。"是脆弱的":false。至少我认为这是不正确的,我没有看到它被列为沙箱的已知限制。这是一个错误吗?

更多信息:

  • 操作系统:Ubuntu 16.04.1 LTS
  • 客户:Postman 4.9.0

对网址https://sandbox-api.uber.com/v1/deliveries

的POST请求
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": "tomb@cryptocracy.net",
            "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": "tomb@cryptocracy.net",
            "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": "tomb@cryptocracy.net"
    },
    "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": "tomb@cryptocracy.net"
    },
    "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"
}

1 个答案:

答案 0 :(得分:0)

这似乎是Uber沙盒环境中Deliveries API的一个错误。