ClientCasa
API

Document Versions

Read-only audit trail of issued document versions for smart-files, invoices, and standalone contracts.

Every time a smart-file, invoice, or standalone contract is sent (issued), the spine seals an immutable version. This resource is the read-only audit trail of those issued versions.

Read-only. Versions are minted by the platform when documents are issued — there are no write operations. Only issued versions are returned; internal draft checkpoints are never exposed.

What's exposed: version number + sub-version, status (issued / superseded / voided), content hash, currency, and the lifecycle timestamps (issued, viewed, accepted, superseded, voided, converted, expires), plus lineage ids — the version that superseded this one, the parent version, and the engagement project a quote→cash conversion created. The frozen document content and the client-facing access tokens are deliberately not exposed.

Filter by documentType (smart-file | invoice | standalone-contract), documentId (a smart-file), invoiceId, or contractId. Requires the document-versions:read scope.

GET
/api/v1/document-versions
x-api-key<token>

In: header

Query Parameters

page?integer
Default1
Range1 <= value
pageSize?integer
Default25
Range1 <= value <= 100
documentType?string
Value in"smart-file" | "invoice" | "standalone-contract"
documentId?string

Filter to a smart-file (client-document) id.

Formatuuid
invoiceId?string

Filter to an invoice id.

Formatuuid
contractId?string

Filter to a standalone-contract id.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.clientcasa.com/api/v1/document-versions"
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "documentType": "smart-file",
      "documentId": "550e8400-e29b-41d4-a716-446655440000",
      "documentRef": {
        "relationTo": "invoices",
        "value": "string"
      },
      "versionNumber": 0,
      "subVersionNumber": 0,
      "versionStatus": "issued",
      "contentHash": "string",
      "currency": "string",
      "issuedAt": "2019-08-24T14:15:22Z",
      "viewedAt": "2019-08-24T14:15:22Z",
      "acceptedAt": "2019-08-24T14:15:22Z",
      "acceptedBy": "client",
      "supersededAt": "2019-08-24T14:15:22Z",
      "supersededByVersionId": "550e8400-e29b-41d4-a716-446655440000",
      "voidedAt": "2019-08-24T14:15:22Z",
      "quoteConvertedAt": "2019-08-24T14:15:22Z",
      "expiresAt": "2019-08-24T14:15:22Z",
      "engagementProjectId": "550e8400-e29b-41d4-a716-446655440000",
      "parentVersionId": "550e8400-e29b-41d4-a716-446655440000",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 1,
    "total": 0,
    "totalPages": 0,
    "hasMore": true
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
GET
/api/v1/document-versions/{id}
x-api-key<token>

In: header

Path Parameters

id*string

UUID v4

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.clientcasa.com/api/v1/document-versions/550e8400-e29b-41d4-a716-446655440000"
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "documentType": "smart-file",
  "documentId": "550e8400-e29b-41d4-a716-446655440000",
  "documentRef": {
    "relationTo": "invoices",
    "value": "string"
  },
  "versionNumber": 0,
  "subVersionNumber": 0,
  "versionStatus": "issued",
  "contentHash": "string",
  "currency": "string",
  "issuedAt": "2019-08-24T14:15:22Z",
  "viewedAt": "2019-08-24T14:15:22Z",
  "acceptedAt": "2019-08-24T14:15:22Z",
  "acceptedBy": "client",
  "supersededAt": "2019-08-24T14:15:22Z",
  "supersededByVersionId": "550e8400-e29b-41d4-a716-446655440000",
  "voidedAt": "2019-08-24T14:15:22Z",
  "quoteConvertedAt": "2019-08-24T14:15:22Z",
  "expiresAt": "2019-08-24T14:15:22Z",
  "engagementProjectId": "550e8400-e29b-41d4-a716-446655440000",
  "parentVersionId": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}