Treaties API
An API exposing details of the treaties laid before Parliament.
Data & analytics#openapi#open-data
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
An API exposing details of the treaties laid before Parliament.
Endpoints 6
BusinessItem
- GETReturns business item by ID.
/api/BusinessItem/:id
GovernmentOrganisation
- GETReturns all government organisations.
/api/GovernmentOrganisation
SeriesMembership
- GETReturns all series memberships.
/api/SeriesMembership
Treaty
- GETReturns a list of treaties.
/api/Treaty?SearchText=string&GovernmentOrganisationId=1&Series=CountrySeriesMembership&ParliamentaryProcess=NotConcluded&DebateScheduled=true&MotionToNotRatify=true&RecommendedNotRatify=true&House=Commons&Skip=0&Take=0 - GETReturns a treaty by ID.
/api/Treaty/:id - GETReturns business items belonging to the treaty with ID.
/api/Treaty/:id/BusinessItems
API details
- Authentication
- None declared in the description
- Operations
- 6 operations on 6 pathsGET 6
- Main resources
- Treaty 3BusinessItem 1GovernmentOrganisation 1SeriesMembership 1
- Response formats
application/jsontext/jsontext/plain- Description format
- OpenAPI 3.0.1, API version
v1 - Links
- OpenAPI document · Support
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Treaties API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Treaties API collection, without the publisher's secrets.
- Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
- Send a requestPick an endpoint, for example “Returns business item by ID.” (GET /api/BusinessItem/:id), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Treaties API?
An API exposing details of the treaties laid before Parliament. It is listed under Data & analytics and has 6 endpoints.
Who publishes the Treaties API?
It is listed from Parliament's public API description (an OpenAPI document), not published by Parliament on Swastik Codes. Anyone who controls parliament.uk can claim the profile by adding a DNS TXT record.
How do I authenticate with the Treaties API?
Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.
How many endpoints does the Treaties API have?
6 operations on 6 paths (6 GET). The largest groups are Treaty, BusinessItem, GovernmentOrganisation, SeriesMembership.
Is forking the Treaties API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.