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

Single work expression

Fetch a single work expression using an FRBR URI.

PreviousAll work expressionsNextCommencements

Last updated 11 months ago

Fetch a single work expression

Supported content types: JSON, HTML, PDF, ePub, zip.

Query Parameters for HTML Content

When fetching HTML content (using the .html endpoint), you can control some aspects of how the HTML is generated using query parameters.

For example, usually you will want to make links to other legislation relative to your website. You can do this by using ?resolver=none when fetching the HTML.

Name
Type
Description

coverpage

string

Should the response include a generated coverpage? Use 1 for true, anything else for false. Default: 1. HTML-only.

media-url

string

The fully-qualified URL prefix to use when generating links to embedded media, such as images.

resolver

string

The fully-qualified URL to use when resolving references to other Akoma Ntoso documents. Use no or none to disable. Defaults to using the Laws.Africa resolver.

standalone

number

If this is 1 , the response will be a complete HTML document, including CSS, that can stand on its own. Otherwise it will be an HTML fragment. Default: false. HTML-only.

Expressions at specific points in time

Works may be amended and change over time. You can fetch different amended versions of a work by specifying the language and date in the FRBR URI of the request.

The available points in time of a work are listed in the points_in_time field of the JSON description of the work. Each point in time includes a date and a list of expressions available at that date, one for each available language.

To fetch the very first expression of a work, use frbr-uri/:language@, for example: /akn/za/act/1998/5/eng@.

To fetch a specific point in time, use frbr-uri/:language@:date, for example: /akn/za/act/1998/5/eng@2014-01-17.

To fetch the most recent point in time at or before a specific date, use frbr-uri/:language::date, for example /akn/za/act/1998/5/eng:2014-01-17.

The .format part of the FRBR URI is placed after the @YYYY-MM-DD part.

If you use @ to specify a particular date and the API doesn't have a version at exactly that date, it will return a 404 response. If you need the expression of the work closest to a particular date, use : instead.

Date formats for specific points in time

Date Format

Meaning

Example Expression FRBR URI

@

Very first expression of a work.

/akn/za/act/1998/55/eng@

@YYYY-MM-DD

Expression at the specific date.

/akn/za/act/1998/55/eng@2014-01-17

:YYYY-MM-DD

Most recent expression at or before a date.

/akn/za/act/1998/55/eng:2015-01-01

(none)

The most recent expression at or before today's date. Equivalent to using : with today's date.

/akn/za/act/1998/55/eng

Retrieve a work expression by FRBR URI.

get

Get details of a work expression (or a partion of one) using either a work or expression FRBR URI.

  • /akn/za/act/1994/2.json: Act 2 of 1992 in JSON format.
  • /akn/za/act/1994/2/eng@1994-01-01.json: Act 2 of 1992, English version at 1994-01-01, in JSON format.
Authorizations
Path parameters
frbr_uristringRequired

The FRBR URI of the work or work expression, without the first slash, such as akn/za/act/1994/2/

Query parameters
formatstring ยท enumOptionalPossible values:
Responses
200Success
get
GET /v3/{frbr_uri} HTTP/1.1
Host: 
Accept: */*
200Success
{
  "url": "https://example.com",
  "title": "text",
  "created_at": "2025-05-14T21:54:27.491Z",
  "updated_at": "2025-05-14T21:54:27.491Z",
  "country": "text",
  "locality": "text",
  "nature": "text",
  "subtype": "text",
  "actor": "text",
  "year": "text",
  "number": "text",
  "frbr_uri": "text",
  "expression_frbr_uri": "text",
  "publication_date": "2025-05-14",
  "publication_name": "text",
  "publication_number": "text",
  "publication_document": {
    "url": "https://example.com",
    "filename": "text",
    "mime_type": "text",
    "size": 1
  },
  "commenced": true,
  "commenced_in_full": true,
  "commencement_date": "2025-05-14",
  "commencing_work": {
    "frbr_uri": "text",
    "title": "text"
  },
  "assent_date": "2025-05-14",
  "repeal": {
    "date": "2025-05-14",
    "repealing_title": "text",
    "repealing_uri": "text"
  },
  "parent_work": {
    "frbr_uri": "text",
    "title": "text"
  },
  "expression_date": "2025-05-14",
  "language": "text",
  "points_in_time": [
    {
      "date": "2025-05-14",
      "expressions": [
        {
          "url": "https://example.com",
          "language": "text",
          "expression_frbr_uri": "text",
          "expression_date": "2025-05-14",
          "title": "text"
        }
      ]
    }
  ],
  "amendments": [
    {
      "date": "2025-05-14",
      "amending_title": "text",
      "amending_uri": "text"
    }
  ],
  "work_amendments": [
    {
      "date": "2025-05-14",
      "amending_title": "text",
      "amending_uri": "text"
    }
  ],
  "stub": true,
  "principal": true,
  "numbered_title": "text",
  "taxonomy_topics": [
    "text"
  ],
  "as_at_date": "2025-05-14",
  "custom_properties": null,
  "type_name": "text",
  "amendments_made": "text",
  "enacted_as": "text",
  "repeals_made": "text",
  "commencements_made": "text",
  "links": [
    {
      "rel": "text",
      "title": "text",
      "href": "https://example.com",
      "media_type": "text"
    }
  ],
  "disclaimer": "text",
  "aliases": [
    "text"
  ]
}
  • Fetch a single work expression
  • GETRetrieve a work expression by FRBR URI.
  • Query Parameters for HTML Content
  • Expressions at specific points in time
  • Date formats for specific points in time