Identity & platformlegal
GET/legal/{document_key}
The version of a legal document in force today, with its text and every version published
get_legal_document
Public
This operation declares no security requirement: it takes no token.Cacheable · ref addressed
x-gitmoap-cache: {"kind":"ref_addressed"}
Conditional · 304
Declares304 Not Modified.
The text is markdown; a link to another legal document names it as <document_key>.md. The
version that will take this one's place, when one is published, is named so it can be read
first, and every published version is listed with the address it stays readable at. No sign-in
is needed.
Parameters
Path
- document_keyLegalDocumentKeyterms-of-serviceacceptable-use-policycontent-reporting-policysecurity-disclosure-policyprivacy-statementcookie-statementdata-processing-addendumsubprocessorsentityThe document
Responses
200The version in forceapplication/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 took effect, in UTC.
historyarray of LegalVersionSummaryEvery published version, newest first, each readable at its own permanent address.
- The LegalVersionSummary schema
- content_sha256stringThe SHA-256 of its text, as the published body hashes.
- effective_dateCalendarDate (string)The day it takes effect, in UTC.
- versionLegalVersion (string)The version.
- change_summarystring or nulloptionalWhat changed since the version before it, as its publisher summarised it. None for a first version.
- kindLegalDocumentKindagreementpolicynoticeaddendumannexWhat it is.
- titlestringIts title.
- versionLegalVersion (string)The version in force today.
- change_summarystring or nulloptionalWhat changed since the version before it, as its publisher summarised it. None for a first version.
upcomingLegalVersionSummary or nulloptionalThe version that will next take its place, when one is published.
- The LegalVersionSummary schema
- content_sha256stringThe SHA-256 of its text, as the published body hashes.
- effective_dateCalendarDate (string)The day it takes effect, in UTC.
- 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-7785",
"document_key": "terms-of-service",
"effective_date": "effective-date-7cba",
"history": [
{
"content_sha256": "content-sha256-d987",
"effective_date": "effective-date-ac80",
"version": "version-0e10"
},
{
"content_sha256": "content-sha256-4147",
"effective_date": "effective-date-506c",
"version": "version-776e"
}
],
"kind": "agreement",
"title": "Label every synthesized example",
"version": "version-eb52",
"change_summary": "change-summary-dc90",
"upcoming": {
"content_sha256": "content-sha256-a4dd",
"effective_date": "effective-date-a597",
"version": "version-89f6",
"change_summary": "change-summary-89a4"
}
}
304Nothing changed since the caller's `If-None-Match`
No body.
404No such document, or none of it is in force yetapplication/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
reasonorcode. - fieldstring or nulloptionalOn a
400that 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 oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): 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-0985",
"message": "Pin a page's payload to the build that rendered it"
}
}
CLI
gitmoap legal get
- --document-keyenumThe document