Create a vehicle estimate given the distance traveled in meters and the type of vehicle

POST {{baseUrl}}/v1/estimates/vehicle

Creates an estimate and calculates the amount of CO2 to be compensated depending on the distance and the vehicle. An order in the draft state may be created based on the parameters, linked to the estimate.

Request Body

{"distance_m"=>59800, "make"=>"Subaru", "model"=>"Outback", "year"=>2010, "create_order"=>false}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: Created

{"success":false,"error":{},"data":{"id":"proident","production":false,"type":"cillum ipsum fugiat magna occa","mass_g":-39773289,"order":{"id":"occaecat reprehenderit dolor dolor","mass_g":665420585,"production":true,"state":"draft","allocation_state":"partially_allocated","price_cents_usd":"non Duis","patch_fee_cents_usd":"aliqua aute adipisicing magna","allocations":[{"id":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"production":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"mass_g":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},{"id":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"production":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"mass_g":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}],"metadata":{}}}}