GuideLab Docs

Restore an earlier revision as the newest one

POST
/compliance/documents/{id}/restore

Authorization

__Secure-guidelab-prod.session_token<token>

Production session cookie set for the guidelab.co domain by Better Auth

In: cookie

Path Parameters

id*string
Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/compliance/documents/string/restore" \  -H "Content-Type: application/json" \  -d '{    "baseRevisionNumber": 1,    "revisionNumber": 1  }'
{  "document": {    "id": "string",    "typeKey": "string",    "subjectKey": "string",    "shared": true,    "latestRevision": {      "number": 1,      "source": "generated",      "language": "en",      "templateVersion": 1,      "note": "string",      "createdAt": "string",      "createdByName": "string",      "issuedOn": "string",      "expiresOn": "string",      "file": {        "name": "string",        "contentType": "string",        "sizeBytes": 0      }    }  },  "revision": {    "number": 1,    "source": "generated",    "language": "en",    "templateVersion": 1,    "note": "string",    "createdAt": "string",    "createdByName": "string",    "issuedOn": "string",    "expiresOn": "string",    "file": {      "name": "string",      "contentType": "string",      "sizeBytes": 0    },    "content": {      "version": 1,      "doc": {        "type": "doc",        "attrs": {          "property1": null,          "property2": null        },        "content": [          {            "type": "doc",            "attrs": {              "property1": null,              "property2": null            },            "content": [],            "text": "string",            "marks": [              {                "type": "bold"              }            ]          }        ],        "text": "string",        "marks": [          {            "type": "bold"          }        ]      }    }  },  "revisions": [    {      "number": 1,      "source": "generated",      "language": "en",      "templateVersion": 1,      "note": "string",      "createdAt": "string",      "createdByName": "string",      "issuedOn": "string",      "expiresOn": "string",      "file": {        "name": "string",        "contentType": "string",        "sizeBytes": 0      }    }  ]}
{  "error": "string"}
{  "error": "string"}
{  "error": "string",  "latestRevisionNumber": 0}
{  "error": "string"}