5

Uber API v1.2 Documentation GET /estimates/price contains an ambiguity in the definition of surge_multiplier support: it is declared as one of the parameters of the response but not presented in the example of response

Additionally I checked answer and comments on the similar Question and found mutually exclusive info given there: "surge multiplier should not be returned in v1.2." vs the answer with an example of the response containing surge_multiplier

so what is valid and expected behaviour for this endpoint?

Isantipov
  • 19,491
  • 2
  • 26
  • 41
  • 1
    I am also facing the same issue: we are getting the surge_multiplier always 1 (timeestimate request). Same time uber app and google map shows surge for same product in same location. We have tried the requests in live (sandbox false) .(iOS, objective c). – Zeesha Feb 14 '18 at 11:14
  • 1
    @Irina, can you check the updated answer on: https://stackoverflow.com/questions/46402129/uber-api-get-estimates-price-response-surge-multiplier-disappeared - I don't want to repeat it again here. – Sasa Jovanovic Feb 15 '18 at 00:09
  • 1
    @SasaJovanovic I've read your updated answer and I'm afraid it is not releavant to the problem we're trying to resolve here :( . Topic Started asked you about `GET /estimates/price` request and specifically about `surge_multiplier` as it is ambigously declared in the docs: https://developer.uber.com/docs/riders/references/api/v1.2/estimates-price-get . Whereas you've updated you answer to have more details on `POST /v1.2/requests/estimate`. Can you elaborate on if/under what circumstances `GET /estimates/price` request is expected to respond with `surge_multiplier` present in the response? – Isantipov Feb 15 '18 at 16:33

1 Answers1

2

Related to the "GET /estimates/price" endpoint following is stated in Uber documentation:

When surge is active for a particular product, its surge_multiplier will be greater than 1, but the price estimate already factors in this multiplier.

Documentation also state that there is a option to get "surge_multiplier":

surge_multiplier float Expected surge multiplier. Surge is active if surge_multiplier is greater than 1. Price estimate already factors in the surge multiplier.

So if there is no "surge_multiplier" returned - it is always assumed to be equal to 1. If "surge_multiplier" is greater then 1 than this parameter should be displayed. But besides if this parameter is displayed or not - if there is a surge in place for the product - price estimate already factors in this multiplier.

Sasa Jovanovic
  • 857
  • 5
  • 8
  • Thanks for the answer. All the examples from the v1.2 docs miss the `surge_multiplier` field - so the docs look confusing and provoke questions like this one. Why don't you have an example with `surge_multiplier` field included in the docs? – Isantipov Feb 19 '18 at 09:20