Laws.Africa Developer Guide
  • Laws.Africa Developer Guide
  • Get Started
    • Introduction
    • Quick start
    • Works and expressions
    • Webhooks
    • Changelog
  • Tutorial
    • About the tutorial
    • Module 1: Build a legislation reader
      • Introductory concepts
      • Create a basic Django app
      • Create database models
      • Fetching the data
      • Work listing page
      • Expression detail page
      • Styling with Law Widgets
      • Adding interactivity
      • Staying up to date
    • Module 2: Enrichments and interactivity
      • Basic enrichments
      • Advanced enrichments
      • Advanced interactivity
    • Module 3: Text extraction for search and analysis
      • Why extracting text is important
      • Basics of text extraction
      • Advanced text extraction
      • Extracting text for analysis and machine learning
  • Content API Reference
    • About the Content API
    • Authentication
    • Pagination
    • Places
    • All work expressions
    • Single work expression
      • Commencements
      • Embedded images
      • Publication document
      • Table of Contents
      • Timeline
    • Taxonomy topics
    • Enrichment datasets
  • AI API Reference
    • About the AI API
    • Authentication
    • Knowledge Bases
  • How-to Guides
    • How to use the Table of Contents API
    • How to download images
Powered by GitBook
On this page
  1. Content API Reference

Enrichment datasets

Enrichment datasets add additional detail to provisions of a work.

PreviousTaxonomy topicsNextAbout the AI API

Last updated 1 year ago

The provisions (chapters, sections, paragraphs, etc.) of a work can be enriched with additional information. This information is stored separately to the content of the provision.

Explore the tutorial for working with enrichment datasets.

Module 2: Enrichments and interactivity

These enrichments are grouped into enrichment datasets. An enrichment dataset contains multiple enrichments for multiple works.

An enrichment dataset has a root taxonomy topic. This is the root of the taxonomy tree that the enrichment dataset uses. Provisions enriched by the dataset can be tagged with a taxonomy topic that is part of the enrichment dataset's taxonomy tree.

An enrichment is made up of:

  • the work being enriched

  • the eId of the provision being enriched

  • the enrichment data:

    • a topic in the taxonomy topic tree associated with the enrichment dataset

An enrichment applies to a provision across all expressions of a work.

List enrichment datasets

Get details of an enrichment dataset

get

API for fetching details of enrichment datasets that contain provision-level enrichments for works.

Authorizations
Query parameters
pageintegerOptional

A page number within the paginated result set.

page_sizeintegerOptional

Number of results to return per page.

updated_at__gtestring · date-timeOptional
updated_at__ltestring · date-timeOptional
Responses
200Success
application/json
get
GET /v3/enrichment-datasets HTTP/1.1
Host: 
Accept: */*
200Success
{
  "count": 123,
  "next": "text",
  "previous": "text",
  "results": [
    {
      "id": 1,
      "name": "text",
      "description": "text",
      "url": "https://example.com",
      "created_at": "2025-05-14T22:17:48.686Z",
      "updated_at": "2025-05-14T22:17:48.686Z"
    }
  ]
}
get

API for fetching details of enrichment datasets that contain provision-level enrichments for works.

Authorizations
Path parameters
idintegerRequired

A unique integer value identifying this enrichment dataset.

Responses
200Success
application/json
get
GET /v3/enrichment-datasets/{id} HTTP/1.1
Host: 
Accept: */*
200Success
{
  "id": 1,
  "name": "text",
  "description": "text",
  "url": "https://example.com",
  "created_at": "2025-05-14T22:17:48.686Z",
  "updated_at": "2025-05-14T22:17:48.686Z",
  "enrichments": [
    {
      "id": 1,
      "provision_id": "text",
      "taxonomy_topic": "text",
      "work": "text"
    }
  ],
  "taxonomy": {
    "name": "text",
    "slug": "text",
    "id": 1,
    "children": [
      {
        "name": "text",
        "slug": "text",
        "id": 1,
        "children": [
          "[Circular Reference]"
        ]
      }
    ]
  }
}
  • List enrichment datasets
  • GET/v3/enrichment-datasets
  • Get details of an enrichment dataset
  • GET/v3/enrichment-datasets/{id}