Overview
The AGR Public API lets you connect your own systems directly to your AGR tenant. In practice it covers two jobs: pulling data out of AGR (items, forecasts, demand history, orders, locations, settings) so you can report on it or feed it into another system, and pushing custom data in — either through custom columns you define yourself, or through raw item and vendor attributes that feed AGR's own calculations.
It's built on OpenAPI 3.0, versioned as v1.0, and the interactive reference (Swagger UI) lives at https://api.agrinventory.net/index.html, with the underlying spec at https://api.agrinventory.net/swagger/1.0/swagger.json. AGR notes that the API is in active development and endpoints may change — check the changelog (linked from the docs page) before building anything that depends on exact response shapes.
Authentication
Every request needs a bearer token: an Authorization: Bearer <token> header carrying an AGR access token (JWT). The reference doesn't document how a tenant obtains that token — worth confirming with AGR Support or engineering before this goes out, so the article can tell customers the actual first step rather than assuming they already have one.
Versioning
Requests can carry an api-version header (pattern like 1.0) on every endpoint. If you omit it, you get whatever version the current page defaults to — currently 1.0. This is how AGR plans to let the API evolve without breaking existing integrations: pin the header once you've built against a version, rather than relying on the default.
Rate limits
Limits are applied per tenant, not per user or per token:
Scope | Limit |
Overall, across all endpoints | 60 requests/minute |
"Heavy" export/stream endpoints in general | 10 requests/minute |
A handful of the heaviest endpoints specifically (see below) | 2 requests/minute |
Exceeding any of these returns HTTP 429. The endpoints called out with the stricter 2/minute limit are:
GET /api/Item/streamGET /api/Item/salehistory/all/streamGET /api/Item/estimated-stock-with-purchase-plan/streamGET /api/Item/estimated-stock-with-purchase-plan/itemNo/{itemNo}/locationNo/{locationNo}
If you're building a sync job against any of these, batch or schedule your calls accordingly rather than polling frequently.
How responses are shaped
Two patterns show up repeatedly across the API, and recognizing them makes the rest of the reference much easier to read.
Streamed exports. Endpoints with /stream in the path return the full result set — items, demand values, forecast values, and so on — as one JSON array, intended for bulk export rather than interactive querying. Several of these cap out at 2 million records per call and silently skip zero values to keep the payload smaller, which matters if you're reconstructing a complete time series and need to backfill the zeros yourself.
Paginated fetch endpoints. A second group of endpoints — mostly the PUT .../fetch ones — take a request body (typically an array of item IDs or customer group IDs) and support Limit/Offset query parameters, with Start/End for date filtering where relevant. Two of them (/api/Forecast/logs/all/monthly and /api/Item/history/fetch) wrap their results in a pagination envelope with data, limit, offset, and count fields rather than returning a bare array — useful for knowing whether you've reached the end of a result set.
Error handling
A validation failure (HTTP 400) returns an array of error objects, each with a code and a description — for example, when a custom column create or update request doesn't pass validation. A rate-limit breach returns HTTP 429 with no custom body beyond the standard status.
Endpoint reference
Endpoints are grouped by resource, matching how they're organized in the Swagger UI.
Custom Columns
Lets you define your own fields on items and populate them — useful for surfacing data that lives outside AGR (a third-party rating, an internal classification) alongside native item fields.
Method | Path | What it does |
GET |
| Lists the data types available for a custom column (boolean, currency, date, decimal, int, string). |
POST |
| Creates a new custom column (key, name, and type). |
GET |
| Lists all custom columns already created. |
PATCH |
| Renames a custom column. |
DELETE |
| Deletes a custom column. |
PUT |
| Sets the value of a custom column for a batch of items (by item number + location number). Optional |
DELETE |
| Clears all entries for a given custom column. |
Customer Groups
Method | Path | What it does |
GET |
| Lists all customer groups configured in the tenant. |
Demand
Historical demand data, as recorded by AGR — distinct from forecast data below.
Method | Path | What it does |
GET |
| Daily demand values for every item (up to 2M records; zero values omitted). |
GET |
| Monthly (summed) demand values for every item. |
GET |
| Demand values split by BOM parent item — requires the BOM Demand premium feature. |
GET |
| Demand values split by location. |
Forecast
AGR's generated forecasts, any manual overrides applied to them, and the underlying model logs.
Method | Path | What it does |
PUT |
| Monthly forecast values for a specified set of item IDs. |
GET |
| Monthly forecast values for every item. |
GET |
| Daily forecast values for every item. |
PUT |
| Monthly forecast overrides for a specified set of items. |
GET |
| Monthly forecast overrides for every item. |
PUT |
| Monthly forecast values broken down by customer group, for a specified set of groups. |
GET |
| Monthly forecast values by customer group, for all groups. |
PUT |
| Monthly forecast overrides by customer group, for a specified set of groups. |
GET |
| Monthly forecast overrides by customer group, for all groups. |
GET |
| All monthly forecast model logs for one item (model family, confidence factor, seasonality, MAPE, RMSE, etc.). |
GET |
| A single forecast log by its ID. |
GET |
| All monthly forecast logs, paginated. |
Items
The largest and most detailed resource — the full item master plus sales history, stock projections, and delivery estimates.
Method | Path | What it does |
GET |
| Every item, every column, unfiltered — the full item view. Rate-limited to 2/minute given its size. |
GET |
| Every item, but just the identifying fields (ID, name, item number, location). |
GET |
| Historical, datestamped snapshots of item data over time, streamed. |
GET |
| The same historical data, paginated instead of streamed. Retained for 2 years. |
PUT |
| Sale history for a specified set of item IDs. |
GET |
| Sale history for all items. Paginated internally (max 5,000 per page) and rate-limited to 2/minute. |
GET |
| Projected stock level over time for one item/location, factoring in the purchase plan. Rate-limited to 2/minute. |
GET |
| The same projection for all items. Rate-limited to 2/minute. |
GET |
| Expected future deliveries for one item/location. |
GET |
| Expected future deliveries for all items. |
GET |
| Orders placed but not yet delivered, with reference numbers. |
GET |
| Deprecated — kept only for backward compatibility due to the typo in the path. Won't receive new fields and will eventually be removed; use |
Locations
Method | Path | What it does |
GET |
| Lists all locations, including hierarchy (parent location) and whether a location is virtual. |
Orders
Method | Path | What it does |
GET |
| Full detail on a single order, including its lines. Optional |
PUT |
| Moves an order through its review workflow — |
GET |
| Bulk-fetches all orders (with lines) sitting in a given status: |
GET |
| Just the order IDs for a given status, without the full line detail. |
Raw Data
Write endpoints for feeding external attributes into AGR's own item and vendor records — things like lead time, weight, or cost price that may originate outside AGR.
Method | Path | What it does |
PUT |
| Inserts or updates raw item attributes (matched on item number + location number); new item/location pairs are inserted, existing ones updated. |
DELETE |
| Deletes all raw item data for the tenant. Irreversible. |
PUT |
| Inserts or updates raw vendor attributes (lead time, exclusion flag). |
DELETE |
| Deletes all raw vendor data for the tenant. Irreversible. |
Settings
Method | Path | What it does |
GET |
| Lists all tenant settings, with their current value, default value, data type, and description. |
What's changed recently
As of the August 2026 changelog:
GET /api/order/status/{status} was added — the bulk order-by-status endpoint described above, meant to replace the pattern of listing order IDs and then fetching each one individually. The two BOM- and distribution-demand streaming endpoints were also added around the same time, and GET /api/item/undelivered-orders/stream gained a referenceNo field on each line. The misspelled undelievered-orders path was formally deprecated in the same release.
Because the API is explicitly called out as still evolving, it's worth linking customers to the changelog directly rather than trying to keep this article in sync with every future change by hand.
Getting help
Questions about the API go to AGR Support ([email protected]), which is also the contact listed in the API's own documentation.
A note before this goes out: it's written from the published OpenAPI spec, so the endpoint paths, parameters, and schemas are accurate as of today. The one real gap is how a customer actually obtains their bearer token — that's not in the spec, so it needs a sentence from someone who knows the provisioning flow before this is customer-facing. Worth a second pass from someone on the API/engineering side given it's technical, external-facing content.
