physical (a physical location, GS1
Application Identifier 414), invoicing (an invoicing party, AI 415) or
legal (a legal entity, AI 417). Only GS1 issues GLNs, through the brand’s GS1
company prefix: never make one up or derive one from a GTIN.
When to use
- The brand has GLNs from GS1 that are not on Closient yet.
- The brand’s primary GLN has changed.
- A GLN no longer belongs to the brand.
Auth
X-API-Key header or OAuth token. Reading needs any member of the organization
that owns the brand (or any API key of it). Writing needs an OWNER, MANAGER or
EDITOR (or an API key with the EDITOR role or above): a read-only key gets
403. A brand of an organization the caller does not belong to is 404.
Flow
{id} is the id of the brand-to-GLN link, as the list returns it, not the GLN
itself.
-
GET .../glns— every GLN linked to the brand, primary first:id,gln,gln_type,ai_code,label,is_primary,created. -
POST .../glns— link a GLN. Body:gln— the 13 digits, check digit included. A wrong check digit is422.gln_type—physical,invoicingorlegal. A GLN already registered on Closient under another classification is409: one GLN has one classification everywhere, so report it rather than retrying with another type.label— optional, such asHead office.is_primary— optional;truedemotes the current primary. The first GLN a brand gets is primary whatever this says.
409. Returns201and the new link. -
POST .../glns/{id}/primary— make that GLN the brand’s primary, demoting the current one. Idempotent. -
DELETE .../glns/{id}— unlink the GLN from the brand (204). The GLN stays in Closient’s registry. When the primary is unlinked, the brand’s next GLN becomes primary.
Verify
GET .../glnsagain and confirm each GLN you linked is there with the classification you intended, and exactly one is primary.- Confirm no GLN you did not mean to touch was unlinked.