【问题标题】:Uber /requests api response status "409 surge" with empty response bodyUber /requests api 响应状态“409 激增”,响应主体为空
【发布时间】:2016-09-05 10:48:37
【问题描述】:

如文档https://developer.uber.com/docs/v1-requests中所述

响应应该是

{ “元”:{ “浪涌确认”:{ "href": "https://api.uber.com/v1/surge-confirmations/e100a670", “surge_confirmation_id”:“e100a670”, “乘数”:1.4, “expires_at”:1459191276 } }, “错误”:[ { “状态”:409, “代码”:“浪涌”, "title": "此产品目前正在实施激增定价。" } ] }

我正在我的一个应用程序中实现 Uber API,测试激增定价功能。在沙盒模式下,它们是 /requests api 的空响应,http 状态为 409 激增。

他们还有其他方法来测试激增定价功能吗?

【问题讨论】:

  • @alec 你能回答这个问题吗?

标签: uber-api


【解决方案1】:

您能否展示一些示例代码,它会为您提供一个 409 且响应为空的情况?在沙盒中,您需要为您想要的产品设置一个激增乘数,然后再请求您希望看到激增的产品。您可以在https://developer.uber.com/docs/sandbox 阅读更多内容,并在下方查看模板卷曲

curl -X PUT -H "Authorization: Bearer {{YOUR_TOKEN}}" -H "Content-Type: application/json" -d '{"surge_multiplier": 2.2, "drivers_available": true}' "https://sandbox-api.uber.com/v1/sandbox/products/{{YOUR_PRODUCT_ID}}

【讨论】:

    猜你喜欢
    • 2019-11-27
    • 2015-10-13
    • 2012-11-25
    • 2015-10-20
    • 2011-09-02
    • 2020-02-14
    • 1970-01-01
    • 1970-01-01
    • 2019-08-01
    相关资源
    最近更新 更多