0
votes

As mentioned in the doc https://developer.uber.com/docs/v1-requests

The response should be

{ "meta": { "surge_confirmation": { "href": "https://api.uber.com/v1/surge-confirmations/e100a670", "surge_confirmation_id": "e100a670", "multiplier": 1.4, "expires_at": 1459191276 } }, "errors":[ { "status": 409, "code": "surge", "title": "Surge pricing is currently in effect for this product." } ] }

I am implementing Uber API in one of my app, Testing the surge pricing feature. In sandbox mode their is empty response of /requests api with http status 409 surge.

Is their any other way to test the surge pricing feature?

1
@alec can you please answer to this question? - Onkar Janwa

1 Answers

0
votes

Can you show some example code that gives you a 409 with an empty response? In sandbox you need to PUT a surge multiplier for the product you want before making a request for that product that you want to see surging. You can read more here https://developer.uber.com/docs/sandbox and see a template curl below

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}}