Update Mismatch Alerts

Updates trailer mismatch observation alerts for the authenticated customer.

Authentication

  • Include your Access-Token and x-api-key in the header of your requests.

Permissions

The external-api-mismatch-observations or admin permission is required to access this endpoint.

Endpoint

  • URL: https://api.genlogs.io/mismatch-observations/{mismatch-alert-id}

  • Method: PATCH

Headers

  • Access-Token: (string, required): Access token obtained from the "Create Access Token" endpoint.

  • x-api-key (string, required): The API key provided by GenLogs.

Request body (partial update — at least one field that “counts” is required):

  • usdot (str, int, optional): New USDOT for this single mismatch alert. null clears USDOT in stored criteria. Empty or whitespace-only strings are ignored (not update and not clear).

  • mc (str, optional): New MC number for this alert; same rules as usdot (string/number, null clears, blank ignored).

  • alert_name (str, optional): Client-facing label. null or blank/whitespace becomes no name (stored as null).

  • is_disabled (bool, optional): Whether the alert is disabled.

Compared to creation

Creation (POST)
Update (PATCH)

usdots / mcs — lists of values; at least one list must be non-empty

usdot / mc — one string each (this endpoint updates one observation by id)

One row per list entry

Updates the row identified by {observation_id}

Other notes

  • Unknown JSON keys are rejected.

  • If the body is empty, only has ignored blank usdot/mc, or no applicable fields, the API returns 400 (“no updatable fields”).

  • Patching usdot/mc still runs the same validation as create; invalid combinations can return 400.

Request Example:

Response:

  • 200 OK: A JSON object containing the confirmation values of the updated alert.

  • 400 Bad Request: If one of the request parameters incorrect.

  • 401 Unauthorized: If the authentication credentials (Access-Token) is missing or incorrect.

  • 403 Forbidden: If the permission has not been set to your user.

  • 500 Internal Server Error: If there is an issue on the server that prevents processing the request.

Response Body:

200 OK

400 Bad Request (e.g. empty object {})

401 Forbidden

403 Forbidden

Update a mismatch observation

patch

Partial update of USDOT (usdot), MC (mc), display name (alert_name), and/or is_disabled. Send at least one field. Requires permission external-api-mismatch-observations or admin. Only alerts belonging to the JWT customer_id can be updated; otherwise 403. Returns the full updated observation (same shape as list items).

Authorizations
Access-TokenstringRequired
x-api-keystringRequired
Path parameters
observation_idstring · uuidRequired

Mismatch observation (alert) identifier.

Body

At least one property must be present (after applying ignore rules). Omitted fields are left unchanged. Empty string or whitespace-only usdot / mc values are ignored (they do not clear the field). JSON null for usdot / mc still clears that side of the criteria when present. USDOT/MC validation matches create rules (numeric after normalization).

usdotstring · nullableOptional

New USDOT value; null clears when paired with MC update rules.

mcstring · nullableOptional

New MC value; null clears when paired with USDOT update rules.

logosstring[] · nullableOptional

Trailer logos list. Pass [] or null to clear. Max list size is limited by server configuration (MISMATCH_ALERTS_MAX_LOGOS).

alert_namestring · nullableOptional

Display name; blank or whitespace-only is stored as null.

is_disabledbooleanOptional

Whether the observation is disabled.

Responses
chevron-right
200

Full updated mismatch observation.

application/json
idstring · uuidRequired

Alert row identifier.

alert_namestring · nullableOptional

Optional display name; may be null if not set.

usdotstring · nullableRequired

USDOT value from stored criteria.

mcstring · nullableRequired

MC value from stored criteria.

logosstring[]Optional

Trailer logos from logos. Empty when not configured.

Default: []
is_disabledbooleanRequired

Whether this mismatch observation alert is disabled.

created_atstring · date-time · nullableOptional

Creation timestamp when available.

last_run_atstring · date-time · nullableOptional

Last run timestamp in ISO-8601 format; null when not run yet.

patch
/mismatch-observations/{observation_id}

Last updated