curl --request GET \
--url https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"changeId": 91,
"changeKind": "amended",
"beforeText": "An application for approval of a new drug...",
"afterText": "An application for approval of a new drug or amended new drug...",
"hasBefore": true,
"hasAfter": true
},
"meta": {
"processingTimeMs": 41,
"creditsConsumed": 4
}
}{
"detail": "Insufficient API credits."
}{
"detail": "Insufficient API credits."
}{
"detail": "Insufficient API credits."
}{
"detail": "Insufficient API credits."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Insufficient API credits."
}Old-vs-new text for one change
The section’s text before and after this specific change, when available (see hasDiff on the change list above). Only meaningful for amended (both sides) and removed (before only); added has nothing to diff against, so hasBefore/hasAfter are always false there.
A missing side is not an error: hasBefore/hasAfter say which text is actually present, so a caller can render a graceful ‘diff unavailable’ state for older changes or a snapshot that failed to capture, instead of treating null as a failure.
Cost: 4 credits per call (see /api-credits/pricing). This is the only metered route in the alerts family: every other board and watch endpoint, including the /changes list this reads from, is free. A diff that resolves NEITHER side is refunded in full and reports creditsConsumed: 0 — an empty envelope is not an answer. A one-sided diff IS the complete answer for a removed or added change and is charged normally.
curl --request GET \
--url https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vaquill.ai/api/v1/watches/{watch_id}/changes/{change_id}/diff"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"changeId": 91,
"changeKind": "amended",
"beforeText": "An application for approval of a new drug...",
"afterText": "An application for approval of a new drug or amended new drug...",
"hasBefore": true,
"hasAfter": true
},
"meta": {
"processingTimeMs": 41,
"creditsConsumed": 4
}
}{
"detail": "Insufficient API credits."
}{
"detail": "Insufficient API credits."
}{
"detail": "Insufficient API credits."
}{
"detail": "Insufficient API credits."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Insufficient API credits."
}Was this page helpful?

