Table of Contents
Fetching the Table of Contents for an expression.
You can get a description of the table of contents (TOC) of a work. This includes the chapters, parts, sections and schedules that make up the legislation.
How to use the Table of Contents APIGet the Table of Contents for an expression
API that returns a description of the table of contents (TOC) for a work.
The FRBR URI of the work or work expression, without the first slash, such as akn/za/act/1994/2/
GET /v3/{frbr_uri}/toc HTTP/1.1
Host:
Accept: */*
{
"toc": [
{
"type": "text",
"component": "text",
"title": "text",
"basic_unit": true,
"num": "text",
"id": "text",
"heading": "text",
"children": [
{
"type": "text",
"component": "text",
"title": "text",
"basic_unit": true,
"num": "text",
"id": "text",
"heading": "text",
"children": [
"[Circular Reference]"
],
"url": "https://example.com"
}
],
"url": "https://example.com"
}
]
}
Individual parts, chapters and sections
You can use the url
field from an item in the Table of Contents to fetch the details of just that item in XML or HTML.
Content for a single part, chapter or section
GET
https://api.laws.africa/v3/:frbr-uri/:toc-item.:format
Get the content of a particular Table of Contents item.
Path Parameters
frbr-uri
string
The full FRBR URI for the expression.
toc-item
string
The Table of Contents item to fetch.
format
string
Response format: XML or HTML.
<section class="akn-section" id="section-9" data-id="section-9"><h3>9. The rescue of stray dogs</h3>
<section class="akn-paragraph akn--no-indent" id="section-9.paragraph-0" data-id="section-9.paragraph-0">
<span class="akn-content"><span class="akn-p">A <span class="akn-term" data-refersTo="#term-person" id="trm257" data-id="trm257">person</span> who rescues a stray <span class="akn-term" data-refersTo="#term-dog" id="trm258" data-id="trm258">dog</span> shall report the date and time of the rescue and a description of the <span class="akn-term" data-refersTo="#term-dog" id="trm259" data-id="trm259">dog</span> to the <span class="akn-term" data-refersTo="#term-Council" id="trm260" data-id="trm260">Council</span> within twenty four hours.</span></span></section></section>
Last updated