Skip to content
GitmoapAPIBeta
Identity & platformlegal
GET/legal/{document_key}/versions/{version}

One published version of a legal document, exactly as it was published

get_legal_document_version
  • Public
    This operation declares no security requirement: it takes no token.
  • Cacheable · immutable SHA

    x-gitmoap-cache: {"kind":"immutable_sha"}

  • Conditional · 304
    Declares 304 Not Modified.

The permanent address of a version: its text never changes, and its SHA-256 is the one the version was published with, so a saved copy can be checked against it. No sign-in is needed.

Parameters

Path
  • document_keyLegalDocumentKeyterms-of-serviceacceptable-use-policycontent-reporting-policysecurity-disclosure-policyprivacy-statementcookie-statementdata-processing-addendumsubprocessorsentityThe document
  • versionLegalVersion (string)The version: v1, v2, and so on

Responses

200The version, as publishedapplication/json
  • bodystringIts text, as markdown. Links name other documents as <document_key>.md.
  • content_sha256stringThe SHA-256 of body.
  • document_keyLegalDocumentKeyterms-of-serviceacceptable-use-policycontent-reporting-policysecurity-disclosure-policyprivacy-statementcookie-statementdata-processing-addendumsubprocessorsentityThe document.
  • effective_dateCalendarDate (string)The day it takes effect, in UTC.
  • kindLegalDocumentKindagreementpolicynoticeaddendumannexWhat it is.
  • titlestringIts title.
  • versionLegalVersion (string)The version.
  • change_summarystring or nulloptionalWhat changed since the version before it, as its publisher summarised it. None for a first version.
200 exampleSynthesized example
{
"body": "Renders each region as density contours of its operations.",
"content_sha256": "content-sha256-9060",
"document_key": "terms-of-service",
"effective_date": "effective-date-c824",
"kind": "agreement",
"title": "Inline scalar newtypes but keep their brand",
"version": "version-9618",
"change_summary": "change-summary-37ba"
}
304The caller already holds it

No body.

400The version is not of the form v1, v2, …application/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-3b7a",
"message": "Inline scalar newtypes but keep their brand"
}
}
404No such document, or that version was never publishedapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-add4",
"message": "Stream pipeline status into the run header"
}
}

CLI

gitmoap legal get-version

  • --document-keyenumThe document
  • --versionidThe version: v1, v2, and so on