Get a legal document
Gets a legal revision, including draft or published state.
Gets a legal revision, including draft or published state.
- Path
GET https://api.sylphx.com/v1/orgs/acme/projects/shop/legal_documents/legal-document - Scope
auth:read - Effect
read— nothing is written. - Collection legal_documents
Request
| Field | Type | What it is |
|---|---|---|
name | string | Canonical name of the legal revision. Required. |
Response
| Field | Type | What it is |
|---|---|---|
name | string | Canonical Resource name. |
uid | string | Server-assigned immutable ID. Output only. |
meta | ResourceMeta | Resource metadata. |
spec | LegalDocumentSpec | The immutable agreement text and publication policy. Required. |
status | LegalDocumentStatus | Computed hash and publication state. Output only. |
ResourceMeta
| Field | Type | What it is |
|---|---|---|
generation | int64 | Increases by one on every change to spec. Output only. |
etag | string | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only. |
create_time | timestamp | When the Resource was created. Output only. |
update_time | timestamp | When the Resource last changed. Output only. |
delete_time | timestamp | Set while the Resource is being deleted. Output only. |
labels | map<string, string> | Caller-writable, indexed labels (AIP-122 label rules). |
annotations | map<string, string> | Caller-writable, unindexed annotations. |
display_name | string | Caller-writable human-readable name. |
creator | string | The principal that created the Resource. Output only. |
LegalDocumentSpec
| Field | Type | What it is |
|---|---|---|
doc_slug | string | A stable agreement kind, e.g. terms, privacy, dpa, eula. Required. |
version | string | An opaque immutable version label, not used for ordering. Required. |
canonical_text | string | Exact plain UTF-8 text shown to the user. Auth never normalizes it. Required. |
document_url | string | An external HTTPS reference. Auth's canonical text, not this link, is evidence. Required. |
change_summary | string | User-facing summary of the changes. Required. |
major_reconsent_required | bool | Whether previously accepted versions become insufficient. |
effective_time | timestamp | When a published revision takes effect. Required. |
LegalDocumentStatus
| Field | Type | What it is |
|---|---|---|
observed_generation | int64 | The spec generation observed by Auth. Output only. |
conditions | Condition[] | Observed conditions. Output only. |
document_sha256 | string | Lowercase hex SHA-256 of the exact UTF-8 bytes of canonical_text. Output only. |
publish_time | timestamp | Unset for drafts. No field can change after publication. Output only. |
Condition
| Field | Type | What it is |
|---|---|---|
type | string | The condition type, for example Ready. |
status | ConditionStatus | Whether the condition holds. One of true, false, unknown. |
observed_generation | int64 | The generation this observation was made against. |
reason | string | A machine-readable UpperCamelCase reason. |
message | string | A customer-safe human-readable message. |
severity | Severity | How severe a FALSE condition is. One of info, warning, error. |
transition_time | timestamp | When status last changed. |
Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.
Every error arrives in the body Errors describes.
Examples
curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/legal_documents/legal-document" \
-H "Authorization: Bearer $SYLPHX_API_KEY"