Skip to content

What changed in the law

POST
/v1/changes
curl --request POST \
--url 'https://api.pandex.io/v1/changes?format=json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": "example", "jurisdiction": "example", "lang": "example", "limit": 1, "offset": 1, "since": "example", "source": "example", "until": "example" }'

What changed in a law, or in the laws of a source or country: the articles whose wording changed, was inserted or repealed, newest first, with the day. A wording not yet in force is listed too. One law by its id gives all the changes held; a source or a jurisdiction goes five years back.

The MCP tool get_changes takes the same arguments.

format
string
Allowed values: json text

Json (default), or text: the answer written for a model to read, as the MCP tool gives it.

Media typeapplication/json
object
id

One law: an id from a result, or an identifier or citation.

string
jurisdiction

Or the laws of one jurisdiction (“ch”).

string
lang

Two-letter language, for texts that exist in several.

string
limit

Lines to return, 1–500. Default 50.

integer
offset

Lines to skip, for the next page.

integer
since

Only changes from this day on, YYYY-MM-DD.

string
source

Or the laws of one source id from list_sources.

string
until

Only changes up to this day, YYYY-MM-DD.

string

Example generated

{
"id": "example",
"jurisdiction": "example",
"lang": "example",
"limit": 1,
"offset": 1,
"since": "example",
"source": "example",
"until": "example"
}

The answer: JSON, or with format=text the text the MCP tool gives a model.

object
as_of

The day the source was last read.

string | null
changes

Newest first.

Array<object>
object
change

Amended, inserted or repealed.

string
coming

From is after today.

boolean
element

The article.

string
from

The day this wording took effect; for repealed the day the last one ended.

string
id

The law.

string
label

Its number.

string
lang

The language.

string
path

Where it stands.

string | null
previous_from

The day the wording before took effect.

string | null
short_title

Its short name.

string | null
title

Its title.

string
to

The day it ended.

string | null
held_from

The day the lines of a source or a country go back to.

string | null
note

A word on the answer.

string | null
offset

Lines skipped.

integer
since

From.

string | null
total

Lines in the window, before limit and offset.

integer
until

Until.

string | null

Example generated

{
"as_of": "example",
"changes": [
{
"change": "example",
"coming": true,
"element": "example",
"from": "example",
"id": "example",
"label": "example",
"lang": "example",
"path": "example",
"previous_from": "example",
"short_title": "example",
"title": "example",
"to": "example"
}
],
"held_from": "example",
"note": "example",
"offset": 1,
"since": "example",
"total": 1,
"until": "example"
}

An argument is missing or wrong, or no text was found for an id. The message says what to pass instead.

Media typeapplication/json
object
error
required

What was wrong, and what to pass instead.

string

Example generated

{
"error": "example"
}

The key is not known or was switched off.

Media typeapplication/json
object
error
required

What was wrong, and what to pass instead.

string

Example generated

{
"error": "example"
}

The request came from a page in a browser on another site. Call the API from a server.

Media typetext/plain
string

The limit of the key, or of the address without one, is reached. The message says when to ask again.

Media typeapplication/json
object
error
required

What was wrong, and what to pass instead.

string

Example generated

{
"error": "example"
}