Introduction

Drivexpert Webservices is a RESTful service for …​

Overview

HTTP verbs

Drivexpert Webservices tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

Verb Usage

GET

Used to retrieve a resource

POST

Used to create a new resource

PATCH

Used to update an existing resource, including partial updates

PUT

Used to update an existing resource, full updates only

DELETE

Used to delete an existing resource

HTTP status codes

Drivexpert Webservices tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

Standard response for successful HTTP requests.

The actual response will depend on the request method used.

In a GET request, the response will contain an entity corresponding to the requested resource.

In a POST request, the response will contain an entity describing or containing the result of the action.

201 Created

The request has been fulfilled and resulted in a new resource being created.

204 No Content

The server successfully processed the request, but is not returning any content.

400 Bad Request

The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

404 Not Found

Resources

Vehicle cost configurations

Add vehicle cost

A POST request will create a vehicle cost configuration with given body

Request structure

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/add/path-parameters.adoc[] Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/add/request-fields.adoc[]

Example request

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/add/curl-request.adoc[]

Response structure

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/add/response-fields.adoc[]

Example response

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/add/http-response.adoc[]

Getting vehicle cost configurations

A GET request will retrieve vehicle cost configurations with a vehicle identifier

Request structure

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/path-parameters.adoc[] Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/request-parameters.adoc[]

Example request

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/curl-request.adoc[]

Response structure

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/response-fields.adoc[]

Example response

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/http-response.adoc[]

Getting current vehicle cost configuration

A GET request will retrieve the current vehicle cost configuration according to given vehicle identifier

Request structure

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/last/path-parameters.adoc[]

Example request

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/last/curl-request.adoc[]

Response structure

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/last/response-fields.adoc[]

Example response

Unresolved directive in index.adoc - include::C:\_WORK\git_repository\drivexpert\drivexpert-webservices\drivexpert-webservices-rest\target/generated-snippets/v3/vehiclecost/get/last/http-response.adoc[]