Skip to content

Get a single document as XML

Request

Fetches a document by id from Studio and applies the transformation rule tagged {projectId} to produce XML. If the rule has addBinaryFile enabled, the binary attachment is inlined as base64.

Security
OAuth2(Required scopes: documents.read)
Path
idstringrequired

Studio document identifier.

Query
projectIdstringrequired

Project identifier. Also selects the XSLT transformation rule applied to the Studio response ({projectId} for single documents, {projectId}-list for lists).

curl -i -X GET \
  'https://api.cloud.hypatos.ai/v2/document-xml/documents/{id}?projectId=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Transformed XML document.

Bodyapplication/xml
string, (xml)(DocumentXml)

XML document produced by applying the project-specific single-document transformation (XSLT) to the Studio response. May include inlined base64 attachments when the rule has addBinaryFile enabled.

Response
<root>&lt;document id=&quot;...&quot;&gt;
  &lt;attachment contentType=&quot;application/pdf&quot;&gt;BASE64...&lt;/attachment&gt;
&lt;/document&gt;
</root>