The Bilabonnement API provides endpoints to manage information related to cars, customers, damage reports, and subscriptions. It allows you to perform CRUD operations (Create, Read, Update, Delete) on these entities.
Endpoint: GET /cars
Description: Retrieve a list of all cars.
Response: List of Car objects.
Endpoint: GET /cars/{id}
Description: Retrieve details of a specific car by providing its ID.
Parameters: id (Path Variable): ID of the car.
Response: Car object.
Endpoint: POST /cars
Description: Create a new car.
Request Body: Car object.
Response: Created Car object.
Endpoint: PUT /cars/{id}
Description: Update details of a specific car by providing its ID.
Parameters: id (Path Variable): ID of the car.
Request Body: Updated Car object.
Response: Updated Car object.
Endpoint: DELETE /cars/{id}
Description: Delete a specific car by providing its ID.
Parameters: id (Path Variable): ID of the car.
Response: No content.
Endpoint: GET /customers
Description: Retrieve a list of all customers.
Response: List of Customer objects.
Endpoint: GET /customers/{id}
Description: Retrieve details of a specific customer by providing their ID.
Parameters: id (Path Variable): ID of the customer.
Response: Customer object.
Endpoint: POST /customers
Description: Create a new customer.
Request Body: Customer object.
Response: Created Customer object.
Endpoint: PUT /customers/{id}
Description: Update details of a specific customer by providing their ID.
Parameters: id (Path Variable): ID of the customer.
Request Body: Updated Customer object.
Response: Updated Customer object.
Endpoint: DELETE /customers/{id}
Description: Delete a specific customer by providing their ID.
Parameters: id (Path Variable): ID of the customer.
Response: No content.
Endpoint: GET /damagereports
Description: Retrieve a list of all damage reports.
Response: List of DamageReport objects.
Endpoint: GET /damagereports/{id}
Description: Retrieve details of a specific damage report by providing its ID.
Parameters: id (Path Variable): ID of the damage report.
Response: DamageReport object.
Endpoint: POST /damagereports
Description: Create a new damage report.
Request Body: DamageReport object.
Response: Created DamageReport object.
Endpoint: PUT /damagereports/{id}
Description: Update details of a specific damage report by providing its ID.
Parameters: id (Path Variable): ID of the damage report.
Request Body: Updated DamageReport object.
Response: Updated DamageReport object.
Endpoint: DELETE /damagereports/{id}
Description: Delete a specific damage report by providing its ID.
Parameters: id (Path Variable): ID of the damage report.
Response: No content.
Endpoint: GET /subscriptions
Description: Retrieve a list of all subscriptions.
Response: List of Subscription objects.
Endpoint: GET /subscriptions/{id}
Description: Retrieve details of a specific subscription by providing its ID.
Parameters: id (Path Variable): ID of the subscription.
Response: Subscription object.
Endpoint: POST /subscriptions
Description: Create a new subscription.
Request Body: Subscription object.
Response: Created Subscription object.
Endpoint: PUT /subscriptions/{id}
Description: Update details of a specific subscription by providing its ID.
Parameters: id (Path Variable): ID of the subscription.
Request Body: Updated Subscription object.
Response: Updated Subscription object.
Endpoint: DELETE /subscriptions/{id}
Description: Delete a specific subscription by providing its ID.
Parameters: id (Path Variable): ID of the subscription.
Response: No content.
In case of an error, the API will return an appropriate HTTP status code along with a JSON response containing details about the error.