API overview
The BARFLAB API lets you manage pets and diets, record measurements, search products, and generate diet proposals. Use the API base address shown in the technical reference below.
Get access
Create an access token in your account settings. Keep it in a server-side environment variable or a local script, and never expose it in browser code.
Make your first request
Use the request shown below to list the pets owned by the connected account. An account without pets returns an empty list.
Work with diets
Generating a proposal does not save it. Save the returned diet explicitly, then read the saved diet to retrieve it together with its analysis.
A diet can belong to one pet or to one shared batch for an ordered group of compatible pets. The shared response includes each pet’s analysis and portion and remains directly saveable. Clients that support shared batches must request them explicitly when listing or reading diets.