Returns a specific document type based on the ID

GET /api/configuration/document-types/{documentTypeId}

Success: 200 OK

Overview

Reads a single document type by its id — the name, key and flags behind an id you already hold, typically one recorded against a member's document.

An id that does not exist returns 404 with the plain-text body GetDocumentType could not find the id {id}. That is the same shape of message the medical condition type endpoints return as a 400, so do not assume a shared convention across Gladstone configuration reads.

If you need more than one type, prefer Returns all document types: fetching the whole list once costs no more than fetching one type and saves you the round trips. Both endpoints can return data up to six hours old after a document type changes.

Ids are assigned per tenant and are not portable between environments. Where you need to recognise a specific type in code, match on key rather than id — DDMandate is the one key the platform itself behaves differently for.

Endpoint

GET {base_url}/api/configuration/document-types/{documentTypeId}

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
documentTypeIdinteger (int32)YesThe id of the document type to read, as returned in the id field of Returns all document types or recorded against a member's document. Must parse as a 32-bit integer; a non-numeric value is rejected before the request is processed. An id that does not exist returns 404.

Sample request

cURL
curl -X GET '{base_url}/api/configuration/document-types/{documentTypeId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Response fields

FieldTypeDescription
idinteger (int32)The id you supplied, echoed back. This is the value to send as documentTypeId when uploading or creating a document for a member. Unique within the tenant only.
keystringA short stable code for the type, maximum 55 characters and never null. This — not id or name — is what platform logic recognises: uploading a document against a type with key DDMandate also creates a Direct Debit mandate. Not enforced unique, so treat a duplicate as a configuration error rather than assuming one match.
namestringThe type's display name, and the field the API treats as its identity: required, at most 255 characters, and unique across document types. This is the value operators see when filing a document, and it is the untranslated base text — document types carry per-language translations elsewhere in the platform, but this endpoint neither returns nor applies them.
descriptionstringA longer explanation of what the type is for, up to 500 characters. Optional, so null where the operator supplied none. Distinct from name: name is the unique label, this is free-text detail with no uniqueness constraint.
isSensitivebooleanMarks the type as holding sensitive personal data, and acts as a floor rather than a default. Upload a document against a type with this set and the document's own sensitivity is forced true even if the request asked for false — an individual document can be more sensitive than its type, never less.
isAttachmentbooleanWhether documents of this type are treated as email attachment content.
isSystembooleanWhether Gladstone supplied the type rather than the operator. true types are locked: Updates a document type returns 409 with Document Type ID {id} cannot be changed because it is system, and Deletes a document type returns 409 with The documentType ID {id} is system. Check this before offering the record as editable.

Sample response

200 OK
{
  "id": 12345,
  "key": "string",
  "name": "string",
  "description": "string",
  "isSensitive": true,
  "isAttachment": true,
  "isSystem": true
}

Errors

StatusMeaningWhen
404Not foundNo document type exists with that id. The body is the plain string GetDocumentType could not find the id {id}, with your id interpolated.
500Internal server errorAn unexpected server-side failure reading the record. The response has no body.

This page as markdown · All pages · llms.txt