API ReferenceContracts
Audit trail: signers, events, hash-chain check and document hash
GET /api/v1/contracts/{id}/audit-trail: Audit trail: signers, events, hash-chain check and document hash. API keys and OAuth tokens need scope contracts:read.
AuthorizationBearer <token>
API key cl_live_… or OAuth access token eco_at_… in Authorization: Bearer. Public operations (x-econtract-auth: public) need no credential.
In: header
Path Parameters
id*string
Response Body
application/json
curl -X GET "https://api.econtract.online/api/v1/contracts/string/audit-trail"{
"contract": {
"id": "string",
"code": "string",
"title": "string",
"status": "string",
"createdAt": "string",
"completedAt": {}
},
"signers": [
{
"id": "string",
"name": {},
"email": "string",
"signerType": "internal",
"status": "string",
"signOrder": 0,
"notifiedAt": {},
"viewedAt": {},
"signedAt": {},
"rejectedAt": {},
"rejectionReason": {},
"ipAddress": {}
}
],
"events": [
{
"type": "string",
"source": "activity",
"actorName": {},
"actorEmail": {},
"at": "string",
"ip": {},
"userAgent": {},
"details": {}
}
],
"chain": {
"valid": true,
"checkedAt": "string",
"totalEvents": 0,
"chainedEvents": 0,
"verifiedEvents": 0,
"unchainedEvents": 0,
"brokenAt": 0
},
"documentSha256": {},
"documentVersion": "signed"
}Code Examples
curl -X GET "https://api.econtract.online/api/v1/contracts/abc123/audit-trail" \
-H "Authorization: Bearer cl_live_your_key_here"const res = await fetch("https://api.econtract.online/api/v1/contracts/abc123/audit-trail", {
headers: { "Authorization": "Bearer cl_live_your_key_here" },
}).then(r => r.json());
console.log(res);import requests
res = requests.get(
"https://api.econtract.online/api/v1/contracts/abc123/audit-trail",
headers={"Authorization": "Bearer cl_live_your_key_here"},
).json()
print(res)package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.econtract.online/api/v1/contracts/abc123/audit-trail", nil)
req.Header.Set("Authorization", "Bearer cl_live_your_key_here")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.econtract.online/api/v1/contracts/abc123/audit-trail");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer cl_live_your_key_here",
"Content-Type: application/json",
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.econtract.online/api/v1/contracts/abc123/audit-trail"))
.header("Authorization", "Bearer cl_live_your_key_here")
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer cl_live_your_key_here");
var response = await client.GetAsync("https://api.econtract.online/api/v1/contracts/abc123/audit-trail");
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);Download the contract PDF
version=signed (409 DOCUMENT_NOT_SIGNED until completed), version=original (404 ORIGINAL_NOT_AVAILABLE when not retained), default: signed when completed else the current file. Headers X-Document-Version and X-Document-Sha256.
Accept AI suggestions and update contract title/description
Next Page