Pharma Commercial Mock
GET/api/google-docs/documents

Google Doc full content (documents.get)

Google Docs documents.get — full structural content of a document.

Mocks Docs API v1 documents.get. Returns the full body.content[] StructuralElement array: paragraphs with elements[]/textRun.content/textStyle + paragraphStyle.namedStyleType (TITLE, HEADING_2, NORMAL_TEXT). Includes documentStyle (margins, page size), namedStyles, and (empty in mock) lists / inlineObjects / headers / footers / footnotes.

Query parameters

NameTypeDescription
documentIdrequiredstring
Drive file ID from /api/google-docs/files.
e.g. 1V3lTRxLaunchPlanH1_2026_xyz12345AbCdEfGhIjKlMn

Response schema

PathTypeDescription
documentIdstring
Echo of the documentId param.
titlestring
Document title.
revisionIdstring
Versioning token.
body.content[]array
Structural elements — each entry has exactly one of: paragraph | sectionBreak | table | tableOfContents.
body.content[].paragraph.elements[]array
Paragraph children. Each carries a textRun.
body.content[].paragraph.elements[].textRun.contentstring
Text segment ending in newline.
body.content[].paragraph.elements[].textRun.textStyleobject
{ bold, italic, fontSize, ... } as applicable.
body.content[].paragraph.paragraphStyle.namedStyleTypeenum
TITLE | SUBTITLE | HEADING_1 | HEADING_2 | HEADING_3 | NORMAL_TEXT.
Source: Docs API NamedStyleType
documentStyleobject
Margins, page size (US Letter).
namedStyles.styles[]array
Style definitions per NamedStyleType.
lists / inlineObjects / headers / footers / footnotesobject
Empty in mock; included for API shape parity.

Behaviour notes

  • ·First paragraph is always TITLE-styled.
  • ·Short non-period-terminated lines are inferred as HEADING_2.
  • ·All other paragraphs are NORMAL_TEXT.
  • ·Unknown documentId returns 404 with Google's standard error shape.

Examples

Launch plan document
curl 'http://localhost:3000/api/google-docs/documents?documentId=1V3lTRxLaunchPlanH1_2026_xyz12345AbCdEfGhIjKlMn'
G-BA lessons learned (2024)
curl 'http://localhost:3000/api/google-docs/documents?documentId=1K7GBADossier2024Lessons_efg321HiJkLmNoPqRsTuVwX'

Sources