List all Trucks
GET
/trucks
Returns a list of trucks. By default, non-archived trucks are returned, sorted by code ascending.
Authorizations
Bearer
JWT Authorization header using the Bearer scheme.
TypeHTTP (bearer)
Parameters
Header Parameters
x-api-version
Typestring
Default
"1.0"Query Parameters
term
Fuzzy search by: code, name, description
Typestring
code
Filter by code (exact)
Typestring
includeArchived
Include archived trucks
Typeboolean
Default
falsesort
Sorting property
Typestring
Valid values
"code""name"Default
"code"dir
The direction of sorting
Typestring
Valid values
"asc""desc"Default
"asc"page
The page number of the results to fetch
Typeinteger
Example
1Format
"int64"Default
1size
Maximum number of items returned in a single response (max 100)
Typeinteger
Examples
102050Format
"int64"Default
10Responses
OK
application/json
{
"items": [
{
"id": "string",
"code": "string",
"name": "string",
"description": "string",
"type": "string",
"plantId": "string",
"isArchived": true
}
],
"pagination": {
"total": 100,
"pages": 10
}
}
Create a Truck
POST
/trucks
Authorizations
Bearer
JWT Authorization header using the Bearer scheme.
TypeHTTP (bearer)
Request Body
application/json
{
"code": "string",
"name": "string",
"description": "string",
"type": "string",
"plantId": "string"
}
Responses
OK
application/json
{
"id": "string",
"code": "string",
"name": "string",
"description": "string",
"type": "string",
"plantId": "string",
"isArchived": true
}
Get Truck details
GET
/trucks/{id}
Returns the details of the specified Truck
Authorizations
Bearer
JWT Authorization header using the Bearer scheme.
TypeHTTP (bearer)
Parameters
Header Parameters
x-api-version
Typestring
Default
"1.0"Path Parameters
id*
The identifier of the specified Truck
Typestring
RequiredResponses
OK
application/json
{
"id": "string",
"code": "string",
"name": "string",
"description": "string",
"type": "string",
"plantId": "string",
"isArchived": true
}
Update a Truck
PUT
/trucks/{id}
Authorizations
Bearer
JWT Authorization header using the Bearer scheme.
TypeHTTP (bearer)
Request Body
application/json
{
"code": "string",
"name": "string",
"description": "string",
"type": "string",
"plantId": "string",
"isArchived": true
}
Responses
OK
application/json
{
"id": "string",
"code": "string",
"name": "string",
"description": "string",
"type": "string",
"plantId": "string",
"isArchived": true
}