Skip to main content

Register a physical facility

POST 

/sites

Adds a Site to the warehouse map. The site code becomes the first segment of every LocationCode inside the facility, so it must be uppercase alphanumeric and unique across the service. Site code uniqueness is enforced here in the application layer rather than in the aggregate: a single aggregate cannot see its siblings. A newly registered Site is Active, and publishes SiteRegistered.

siteRole (ADR-0037) is optional: omitted means UNSPECIFIED. An unknown role is 422 invalid-site-role. The role never sets the transfer capability (ADR-0035 stays the only writer; see GET /site-roles/transfer-defaults for the per-role defaults).

gln (ADR-0045) is an optional GS1 Global Location Number. It must be 13 digits ending in the GS1 mod-10 check digit (otherwise 422 invalid-gln) and a GLN identifies exactly one location across sites, zones and slots (otherwise 409 gln-already-assigned). A site registered without a gln is exactly as valid as before.

Request​

Responses​

Site registered.

Response Headers
    Idempotency-Replayed

    true when this response is the stored answer of an earlier request with the same Idempotency-Key (a 2xx or a refusal that cannot change on a retry); never present on the first execution, and never on a refusal that releases the key.

    Location

    Path of the newly created Site.