> ## Documentation Index
> Fetch the complete documentation index at: https://docs.closient.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Link-type Sections

> Add, update, list, and remove an organization's GS1 documents (GDTI), coupons (GCN) and service relations (GSRN) -- the programmatic equivalent of the dashboard's link-type sections page.

Programmatic equivalent of the dashboard's `products/<gtin>/link-types/` page.

## When to use

* A brand owner wants a certificate, specification or other document to resolve from its
  GS1 Global Document Type Identifier (GDTI).
* A brand wants a coupon to resolve from its Global Coupon Number (GCN), or a service
  relationship from its Global Service Relation Number (GSRN).
* A record on file has a new URL, a new validity window or a corrected title.

## Auth

`X-API-Key` header or OAuth token. Reading needs membership of the organization; writing
needs the contribute role (Editor or Manager). A read-only key is refused with `403` on a
write; an organization the caller cannot view answers `404`, so the API never confirms it
exists.

## Flow

The records belong to the organization, not to one product.

```
GET    /resolver/api/v1/organizations/{organization_id}/link-type-documents
POST   /resolver/api/v1/organizations/{organization_id}/link-type-documents
GET    /resolver/api/v1/organizations/{organization_id}/link-type-documents/{id}
PATCH  /resolver/api/v1/organizations/{organization_id}/link-type-documents/{id}
DELETE /resolver/api/v1/organizations/{organization_id}/link-type-documents/{id}
```

`link-type-coupons` (GCN) and `link-type-service-relations` (GSRN) take the same five
routes. Fields are listed in the OpenAPI document at `/resolver/api/v1/openapi.json`.

* **List** -- the organization's records of that kind, newest first, paginated.
* **Create** -- the body carries the GS1 key plus the record's fields. A malformed key
  (a GDTI is 13 to 30 digits, a GCN 13 to 25, a GSRN 18) is `422`, and a key is unique across Closient (`409` if another
  record holds it). URLs must be http(s) addresses of at most 2048 characters.
* **Update** -- `PATCH` only the fields to change. Send `null` to clear a nullable field.
* **Delete** -- removes the record permanently; its GS1 key stops resolving.
* **Read back** -- every write returns the saved record.

Returns `403` for a read-only key, `404` for an organization or record the caller cannot
see, `409` for a key that is taken, and `422` for an invalid value.

## Notes

Never invent a GS1 key: it comes from the brand's own GS1 numbering. Hosting a document
file is an upload the dashboard performs; through the API a document points at its
`external_url`.

The fields a brand writes on each record are defined once on the model
(`BRAND_EDITABLE_FIELDS`); the dashboard form and both API schemas are pinned to that set,
apart from the dashboard-only document `file`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.