Assign a postal prefix to a delivery station (AssignServiceArea)
PUT/service-areas/:postalPrefix
Creates or reassigns the prefix under a strictly higher assignmentVersion (ASSIGNED to ASSIGNED). The region is taken from the station and must be a defined Region. Publishes ServiceAreaAssigned.
Request
Responses
- 200
- 400
- 404
- 409
- 413
- 422
Assignment stored.
Response Headers
Present, with the value true, only when the response replays the first answer stored for the Idempotency-Key (a stored 2xx or a stored refusal that is final for the request; a 5xx and a refusal that depends on state another request can change are never stored).
idempotency-key-required (no Idempotency-Key header), idempotency-key-invalid (not 1-128 printable ASCII characters), malformed-request-body (invalid JSON, an empty body, trailing data, an unknown field, a wrongly typed field or a NUL character), or malformed-request-query (a NUL character in the query string).
not-found (ErrNotFound): an unknown nodeId in the path or body.
not-a-delivery-station (ErrNotADeliveryStation), stale-assignment-version (ErrStaleAssignmentVersion), handoff-node-not-usable (ErrHandoffNodeNotUsable), or concurrent-update (ErrConcurrentUpdate); or idempotency-key-reused (the Idempotency-Key was already used with a different request).
request-body-too-large (the request body is larger than 64 KiB).
unknown-region (ErrUnknownRegion), carrier-options-invalid (ErrCarrierOptionsInvalid), or validation-failed.