Client libraries
<!-- order: 11 | Ready-made clients for TypeScript, Python and C#, generated from the API's own description, so they always match it. -->Each library has one method per endpoint, sends your token, takes path and query parameters and a JSON body, supports Idempotency-Key and If-Match, raises an error carrying the problem details (code, detail, field), and pages through lists for you. None has dependencies beyond its language's standard library. They're generated from the OpenAPI document whenever it changes, so they always match the reference.
| Language | Download |
|---|---|
| TypeScript and JavaScript (Node 18+, browsers, Deno) | index.ts |
| Python 3.8+ | fipos_api/init.py |
| C# (.NET 8+) | FoodIntegrityProjectApi.cs |
| The OpenAPI document, for other generators | openapi.json |
TypeScript
import { FoodIntegrityProjectApi, ApiError } from "./index"
const api = new FoodIntegrityProjectApi({ token: process.env.FIP_TOKEN })
const page = await api.listProducts({ q: "granola", limit: 20 })
// Every product, page by page
for await (const product of api.all((q) => api.listProducts(q), { program: "non_gmo" })) console.log(product.name)
// A key: sign in with its client id and secret
await api.signIn(process.env.FIP_CLIENT_ID!, process.env.FIP_CLIENT_SECRET!)
try {
await api.holdVerification("V-0123456", { on: "2026-11-11" }, { idempotencyKey: crypto.randomUUID() })
} catch (e) {
if (e instanceof ApiError) console.error(e.status, e.code, e.message)
}
Python
from fipos_api import FoodIntegrityProjectApi, ApiError
api = FoodIntegrityProjectApi(token=os.environ["FIP_TOKEN"])
page = api.list_products(q="granola", limit=20)
for product in api.all(api.list_products, program="non_gmo"):
print(product["name"])
api.sign_in(os.environ["FIP_CLIENT_ID"], os.environ["FIP_CLIENT_SECRET"])
try:
api.hold_verification("V-0123456", {"on": "2026-11-11"}, idempotency_key=str(uuid.uuid4()))
except ApiError as e:
print(e.status, e.code, e)
C#
using FoodIntegrityProject.Api;
var api = new FoodIntegrityProjectApi(Environment.GetEnvironmentVariable("FIP_TOKEN"));
var page = await api.ListProductsAsync(q: "granola", limit: "20");
await api.SignInAsync(clientId, clientSecret);
try
{
await api.HoldVerificationAsync("V-0123456", new { on = "2026-11-11" }, new CallOptions { IdempotencyKey = Guid.NewGuid().ToString() });
}
catch (ApiException e)
{
Console.WriteLine($"{e.Status} {e.Code} {e.Message}");
}
Answers come back as JSON (any in TypeScript, dict in Python, JsonElement in C#), in the shapes the reference shows.
The sandbox
Pass the sandbox's address: baseUrl: "https://api.foodintegrityproject.org/sandbox/v2" (TypeScript), base_url= (Python), or the baseUrl argument (C#).