Skip to main content
DELETE
Delete truck event
The Delete Truck Event endpoint cancels a scheduled truck event. The event stops blocking the truck in the dispatch planner and is no longer returned by Get truck event or Search truck events. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.
This endpoint requires the truck:update scope. See Authentication.

If-Match is required

This endpoint uses optimistic concurrency. Send the event’s current ETag in the If-Match header. The ETag response header of Get truck event, of Create truck event, and of every successful update carries it. Search truck events does not return ETags, so get the event by id first.
  • If you omit If-Match, the request is rejected with 428 Precondition Required.
  • If the event changed after you read it, the request is rejected with 412 Precondition Failed. Get the event again and retry with the new ETag.

Events created by maintenance work orders

An event created by a maintenance work order in Alvys follows that work order. It is returned by Get truck event and Search truck events, but it cannot be changed or deleted through the API: the request is rejected with 422 Unprocessable Entity and the problem type https://api.alvys.com/errors/UnprocessableEntity/AssetEventOwnedByWorkOrder. Update the work order instead.

Request parameters

The following parameters are required in the URL path: The following header is required:

Example cURL request

Replace YOUR_ACCESS_TOKEN with your actual Bearer token and the If-Match value with the event’s current ETag.

Response

A successful request returns 204 No Content with an empty body.

Status codes


Rate limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the Rate Limits section. This page is interactive, allowing you to try a request by specifying the API version and the event id in the URL path. As you fill out the parameters, the cURL command on the right side of the page will be automatically updated.

Authorizations

Authorization
string
header
required

OAuth 2.0 client-credentials access token. Obtain one from https://auth.alvys.com/oauth/token (grant_type=client_credentials, audience=https://api.alvys.com/public/), then paste it here. The playground sends it as Authorization: Bearer <token>.

Headers

If-Match
string
required

The event's current ETag (the ETag response header of your most recent GET, POST or PATCH), for optimistic concurrency. Required; if omitted the request is rejected with 428.

Path Parameters

id
string
required
version
string
default:1.0
required

API version (e.g., 1.0)

Example:

"1.0"

Response

No Content