Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uber API v1.2/get/estimates/price - does it support surge_multiplier or not?

Tags:

uber-api

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?

like image 789
Irina Mostkova Avatar asked Oct 28 '22 18:10

Irina Mostkova


1 Answers

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.

like image 130
Sasa Jovanovic Avatar answered Jan 02 '23 21:01

Sasa Jovanovic