Add a lane preference, optionally blocked
Adds a lane for this carrier by hand. Every other path that creates lane preferences is driven by freight that already moved — an offer, a truck list, a TMS sync — so before this endpoint a carrier could only be blocked on lanes they had already run, which inverts the point of a block. Omit both destination fields for an ‘<origin> -> Anywhere’ lane: a block on one of those spans every lane out of that origin, including lanes created later. Sending only one destination field is rejected as a typo rather than silently widening the block. Set dnu with a dnu_reason to block it on creation, in the same transaction. Find-or-create: an existing lane is reused, and a carrier that already has a row on that lane gets it edited rather than a second row stacked beside it. Admin-only.
Authentication: Bearer token required.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Headers
A unique key (up to 255 printable ASCII characters, e.g. a UUID) that makes a retry of this request safe. Envoy stores the response for 24 hours; a retry with the same key and the same request returns it again with Idempotent-Replayed: true instead of running twice. The same key with a different request returns 422 idempotency_key_reused; while the first request is still running, 409 idempotency_key_in_progress. 5xx and 429 responses are not stored.
Request
Allowed values for AuditLog.reason. DB-enforced via Postgres ENUM.
The set is intentionally shared across all entity_type contexts; the
same code (service_quality, compliance, other) means
different things depending on whether the audited row is a carrier or a
lane preference. Disambiguating is the caller’s job — the frontend
renders different human labels per context. Free-text justification
lands on AuditLog.reason_note — required when OTHER is chosen,
optional (but preserved) for any other code.

