AgriWebb API
API Reference

Create Report

POST /v2/report

This endpoint initiates the creation of a report. Once the report is created you can download it using the Get Report endpoint. The Cache-Control header can be used to control how long the same report is used given the same request, the default is 1 hour. This can be disabled with Cache-Control: no-cache or customised with Cache-Control: max-age=3600.

POST
/v2/report

Header Parameters

authorization?string

The only supported authorisation method is Bearer ...

x-api-key?string

A pre-shared key provided by AgriWebb

cache-control?string

Control if or how long the report should be cached before generating a new one

Body

https://help.agriwebb.com/en/articles/3780312-ae-lsu-dse-load-by-paddock-report

typestring
Value in"animal-load-by-paddock.v1"
tenantTypestring
Value in"farm"
tenantIdstring
Length1 <= length
reportingPeriodStartinteger
Range0 <= value <= 9007199254740991
reportingPeriodEndinteger
Range0 <= value <= 9007199254740991
typestring
Value in"livestock-feed.v1"
tenantTypestring
Value in"farm"
tenantIdstring
Length1 <= length
reportingPeriodStartinteger
Range0 <= value <= 9007199254740991
reportingPeriodEndinteger
Range0 <= value <= 9007199254740991

Deprecated please use livestock-reconciliation.v2

typestring
Value in"livestock-reconciliation.v1"
tenantTypestring
Value in"farm"
tenantIdstring
Length1 <= length
reportingPeriodStartinteger
Range0 <= value <= 9007199254740991
reportingPeriodEndinteger
Range0 <= value <= 9007199254740991

https://help.agriwebb.com/en/articles/3288446-livestock-reconciliation-report

typestring
Value in"livestock-reconciliation.v2"
tenantTypestring
Value in"farm"
tenantIdstring
Length1 <= length
reportingPeriodStartinteger
Range0 <= value <= 9007199254740991
reportingPeriodEndinteger
Range0 <= value <= 9007199254740991

https://help.agriwebb.com/en/articles/4318283-feed-sales-report

typestring
Value in"feed-sale.v1"
tenantTypestring
Value in"farm"
tenantIdstring
Length1 <= length
reportingPeriodStartinteger
Range0 <= value <= 9007199254740991
reportingPeriodEndinteger
Range0 <= value <= 9007199254740991

Response Body

curl -X POST "https://api.agriwebb.com/v2/report" \
  -H "authorization: string" \
  -H "x-api-key: string" \
  -H "cache-control: string" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "animal-load-by-paddock.v1",
    "tenantType": "farm",
    "tenantId": "string",
    "reportingPeriodStart": 9007199254740991,
    "reportingPeriodEnd": 9007199254740991
  }'
{
  "data": {
    "type": "animal-load-by-paddock.v1",
    "tenantType": "farm",
    "tenantId": "string",
    "reportingPeriodStart": 9007199254740991,
    "reportingPeriodEnd": 9007199254740991,
    "id": "string",
    "status": "pending",
    "creationDate": 0,
    "lastModifiedDate": 0
  },
  "links": {
    "download": "http://example.com"
  }
}