curl --request GET \
--url https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}"
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))
}HttpResponse<String> response = Unirest.get("https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"kind": "bulletin",
"identifier": "<string>",
"title": "<string>",
"status": "final",
"publishedDate": "2023-12-25",
"firstSeenAt": "2023-11-07T05:31:56Z",
"toiCodes": [
"<string>"
],
"impactTags": [
"<string>"
],
"summary": "<string>",
"effectiveDate": "2023-12-25",
"legalRefs": [
"<string>"
],
"sourceUrl": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}Get a regulatory document
Get one document’s fields, summary, cited laws, source page and stored source file. Read its text with getRegulatoryDocumentText and its citation links with listRegulatoryDocumentReferences. Costs $0.003; failed requests are free.
curl --request GET \
--url https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}"
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))
}HttpResponse<String> response = Unirest.get("https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.canary.effectiveai.app/api/v2/insurance/regulatory-documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"kind": "bulletin",
"identifier": "<string>",
"title": "<string>",
"status": "final",
"publishedDate": "2023-12-25",
"firstSeenAt": "2023-11-07T05:31:56Z",
"toiCodes": [
"<string>"
],
"impactTags": [
"<string>"
],
"summary": "<string>",
"effectiveDate": "2023-12-25",
"legalRefs": [
"<string>"
],
"sourceUrl": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}Authorizations
Effective API key. Send Authorization: Bearer sk-eai-...
Path Parameters
Document id from listRegulatoryDocuments.
Response
The stored document.
Document identity. A duplicate cleanup can delete an ID; find the document again.
Two-letter jurisdiction code, or ALL for national NAIC material.
Document kind. New values can be added; tolerate values you do not recognize.
bulletin, circular_letter, data_call, examination_standards, filing_requirement, form_checklist, guideline, informational_memo, legislative_bill, mcas_scorecard, meeting_materials, model_law, model_law_adoption, news_release, order, reference_document, regulation, statute, survey The publisher's identifier, such as 28 TAC § 5.7013. Null when the source gave none. Not unique within a state.
The source title. Statute titles are path slugs today.
Lifecycle status, one flat set across kinds. Bills use introduced, passed_chamber, enacted, vetoed, withdrawn and failed; other kinds use final, informational, emergency, proposed, withdrawn and superseded. New values can be added; tolerate values you do not recognize. Null means the source gave none.
final, informational, emergency, proposed, withdrawn, superseded, introduced, passed_chamber, enacted, vetoed, failed, null The publisher's date, as stored. It can be null or wrong. A year-only date is stored as 1 January.
When the corpus first stored this document, UTC. Backfills and changed source URLs can make an old document look new.
TOI values, including H, L, T and ALL. Null means never classified; [] means classified and none apply.
Impact tags, normally values of V2RegulatoryImpactTag; a few stored tags fall outside that set. Same null and [] rule as toiCodes.
A research aid, not the source. Null for most documents.
The effective date, when the source gives one.
Laws the document cites, as written. Null means never extracted. A cited law can be missing from references.
The publisher's page for this document.
The stored source file, when we hold one. Download it with GET /files/{fileId}/download. Recent documents often have none.