Register a carrier
PUT/carriers/:scac
Puts the carrier with this SCAC in the registry (RegisterCarrier). Idempotent by SCAC: a new SCAC is created ACTIVE and answered 201
with a Location; a SCAC that is already registered with exactly this data is a no-op answered 200 (the mc is compared in its
normalised form, so 654321 and MC-654321 are the same); a SCAC registered with DIFFERENT data is refused with 409
carrier-already-registered: change a registered carrier with PATCH instead. Idempotent by method, no Idempotency-Key needed.
Publishes CarrierRegistered (not on a no-op).
Request
Responses
- 200
- 201
- 400
- 409
- 422
- 500
The carrier was already registered with this data; nothing changed.
Response Headers
The weak entity tag of the appointment or carrier, W/"<version>".
The carrier is registered.
Response Headers
The URL of the created resource.
The weak entity tag of the appointment or carrier, W/"<version>".
Malformed JSON body, an unknown field, an invalid path, query or header parameter, or a NUL byte in a body.
The appointment or carrier is in the wrong state for the command, the door is booked in an overlapping window, a closure collides, another request changed the aggregate first, or the Idempotency-Key was already used with a different request (idempotency-key-reused).
The request is well formed JSON but a value-object or reference rule refuses it (invalid door code, carrier or window, invalid SCAC, USDOT, MC, carrier name or suspension reason, window in the past, unknown door, door flow mismatch, unknown ASN, missing outbound reference, invalid operating hours or settings).
Unexpected server error.