Endpoints

Endpoints

This section describes all available endpoints in the METI API v2.0.0. Each endpoint includes authentication requirements, usage details, parameters, and examples.


Base URL

All API requests use the following base URL:

https://api.millpont.com

Authentication (Required)

The METI API now uses Auth0 OAuth2 Client Credentials. You must obtain an access token and include it in every request:

Authorization: Bearer <access_token>

How to Get a Token

curl -X POST "https://<AUTH0_DOMAIN>/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "<YOUR_CLIENT_ID>",
    "client_secret": "<YOUR_CLIENT_SECRET>",
    "audience": "https://api.meti.millpont.com",
    "grant_type": "client_credentials"
  }'

Example Token Response


Account Isolation

  • Every token contains an account_id.

  • All queries automatically filter to your account.

  • Clients cannot access other accounts.

  • Admin tokens may access all accounts.


Endpoints Overview

Endpoint
Method
Description

/sources

GET

List sources for your account

/sources

POST

Create one or more sources

/sources/{source_id}

GET

Retrieve a single source

/sources/{source_id}

DELETE

Delete a single source

/sources (query)

DELETE

Delete by alt_id


GET /sources

List All Sources (Account-Filtered)

URL

Headers

Query Parameters (optional)

Parameter
Type
Description

methodology

string

Filter by methodology

limit

integer

Pagination size

offset

integer

Pagination offset

steward_id

string

ID of producer / grower

project_id

string

Group sources by project

outcome_reporting_year

integer

The calendar year a source's environmental outcomes are tied to.

Example Request

Example Response


GET /sources/{source_id}

Retrieve a single source by its unique ID.

URL

Optional Parameters Example GET https://api.millpont.com/sources?steward_id=GM-Producer-1 Headers

Path Parameter

Name
Type
Description

source_id

string

Source ID (e.g., src_6ETupIGAbhjb7)

Example Request


POST /sources

Create One or More Sources

Your request must include:

  • A valid GeoJSON FeatureCollection

  • Each Feature includes:

    • id

    • properties.start_at

    • properties.end_at

    • geometry (Polygon or MultiPolygon)

  • Optional parameters:

    • methodology

    • tags

    • steward_id

    • project_id

    • outcome_reporting_year

Note: Methodology (i.e. "Nature Restoration | Production to Conservation") can provide useful context when overlaps arise in the Source ledger. Tags are used to support additional context. A common use case is to denote the function(s) of the area of interest, for example: "production", "processing", "storage", "transportation". Steward ID allows you to group sources by producer. Project ID is another way to subgroup your sources. Outcome reporting year is the calendar year environmental outcomes are associated with.

The API automatically attaches:

  • account_id (from JWT)

  • created_by and updated_by (from JWT metadata)

URL

Headers


Example Request

Example Response


DELETE /sources/{source_id}

Delete a source by its ID.

URL

Headers

Example Request

Example Response


DELETE /sources (Delete by alt_id)

You may also delete by alt_id:

URL

Example

Last updated