Cart

Shopping cart

Options

Enable CORS by returning correct headers

SecurityNone
Responses
200

Enable CORS by returning correct headers

options/v1/cart/calculate-prices

Calculate prices for the given items

SecurityOAuth2 or JifelineAuthorizer
Request
Request Body schema: application/json
required

Products, vehicle and vouchercode to calculate totals for

voucher
string

Voucher code for discount

vehicle_model_id
required
integer

The vehicle model id

vehicle_model_variant_id
required
integer

The vehicle model variant id

vin
string or null = 17 characters ^[a-zA-Z0-9]{17}$

VIN of the vehicle

prepared_ticket_id
string or null <uuid>

The identifier of the prepared ticket

product_ids
required
Array of integers

products to calculate the prices for

Responses
200

Cart items with corresponding prices

400

Returned when a client sends a bad request

401

Returned when a request is performed without or with an incorrect OIDC token

403

Returned when a client requests a resource it's not authorized for.

500

Returned when an error occurs on the server

post/v1/cart/calculate-prices
Request samples
application/json
{
  • "voucher": "234MD23",
  • "vehicle_model_id": 23423,
  • "vehicle_model_variant_id": 23423,
  • "vin": "JFL91010104591010",
  • "prepared_ticket_id": "ca09a970-6519-4280-b6a6-65727e2894e3",
  • "product_ids": [
    ]
}
Response samples
application/json
{
  • "voucher": "23MDU53",
  • "voucher_discount": {
    },
  • "vehicle_model_id": 23423,
  • "vehicle_model_variant_id": 23423,
  • "needs_confirmation_for_unattended_service": true,
  • "sub_total": {
    },
  • "voucher_sub_total": {
    },
  • "original_equipment_service_fee": {
    },
  • "total": {
    },
  • "items": [
    ]
}