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>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"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).
How many sides a change has depends on its kind, and each is a complete answer:
amended— both sides. This is the only kind where one side alone is not a partial answer but no answer.added— after side only. There is no before side by definition, and the full text of a newly published section is precisely what the notification is for.removed— before side only, the last text we held.
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.
You are charged only for a diff that answers the question its kind asks, and creditsConsumed always reports what was actually billed. Refunded in full (creditsConsumed: 0): an amended change missing either side, an amended change whose two sides resolve to identical text (a capture artifact on our side, not a change on the publisher’s), and any change resolving no text at all. A one-sided added or removed diff is the complete answer 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>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Insufficient API credits."
}Was this page helpful?

