The land and what is done to it: agrifields, agrifield works, crops, soil samples, fertilising, herding, geometry, cadastres.
Dates and times
Send a date as Y-m-d and a date with a time as Y-m-d H:i:s, for
example 2026-08-28 and 2026-08-28 14:30:00. Values are read in the
company time zone. Other spellings PHP can parse are usually accepted, but a slash-separated
date is read month-first, so send Y-m-d and avoid the ambiguity. A duration is
HH:MM or HH:MM:SS, or a plain number of seconds.
Responses return dates and times in ISO 8601 with the offset, for example
2026-08-28T14:30:00+0300. The Return table below lists the fields of the response
and their types; it has no description column for them, so the format above is the one to
assume for every DateTime field it shows.
A capacity records how many hectares of one worktype a crop period is meant to cover.
It is the planning target that actual work is measured against. These endpoints store the
capacities for a crop period and read them back per worktype. The fulfilment route compares
the target with the hectares actually worked, planned and covered by agrifield works.
Everything here is scoped to a crop period, so the same worktype has a separate capacity
each season.
GET
/api/agrifieldworkcapacities
Planning targets per worktype for one crop period
Documentation
Sandbox
Documentation
Planning targets: how many hectares of each worktype a crop period is meant to cover.
Parameters
Parameter
Type
Required?
Format
Description
is_archived
boolean
false
Truthy returns archived records instead of active ones.
archived
boolean
false
Alias of is_archived; either being truthy has the same effect.
from_updated_at
integer
false
Records updated from Unix timestamp
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, agrifieldworkcapacities). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/agrifieldworkcapacities/fulfillment/{crop_period_id}
AgrifieldWorkCapacities fulfillment data, each with: worktype_name, hectares_total
Documentation
Sandbox
Documentation
AgrifieldWorkCapacities fulfillment data, each with: worktype_name, hectares_total,
workdone_hectars_total, workdone_hectars_percent, agrifield_work_hectares_total,
planitem_hectares_total. Returns one row per worktype as { worktype_name, hectares_total,
workdone_hectars_total, workdone_hectars_percent, agrifield_work_hectares_total,
planitem_hectares_total }
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, agrifieldworkcapacity). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/agrifieldworkcapacities/perioddata/{crop_period_id}
Planning targets of one crop period, per worktype
Documentation
Sandbox
Documentation
AgrifieldWorkCapacity period data for one crop period. Returns an array of objects with:
worktype_id, worktype_name, hectares_total, crop_period
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, agrifieldworkcapacity). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Look the record up by uuid instead of the id in the path.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, facility_all). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
This section is about planning a crop year, not about recording work that was done. An
AgrifieldWork is one job planned across several fields for one crop period: sowing a crop,
spraying, fertilising or harvesting. It gathers the worktype, the fields it covers, the
crops involved and the PRIA payees it is booked to. These endpoints create the job, set
which fields it covers, plan it over a date range and distribute it across weeks. Planning
an AgrifieldWork produces plan items, which become Workdones once the work is actually
performed. Material inputs attached to the job are planned amounts, held as a ratio per
hectare, so they can later be compared with what was really used. Work actually performed
on a field is not here - it lives under the Workdones and Reports sections. Beware two
route names that read as if they belonged here but do not: GET
/api/agrifieldworkandmaterialusage and PUT /api/add-agrifieldworkandmaterialusage both
operate on Workdones and never touch an AgrifieldWork.
GET
/api/agrifieldsforplanning/{agrifield_work_id}
Agrifields that can still be planned into one field job
Documentation
Sandbox
Documentation
Agrifields available for planning against one agrifield work. Returns an array of objects with:
agrifields, worktype, planitems_for_agrifieldwork
Requirements
Name
Requirement
Type
Description
agrifield_work_id
integer|string
AgrifieldWork id
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, planitem, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
An AgrifieldWork is one job planned across a set of Agrifields for a season - sowing,
spraying, fertilising, harvesting - and not a record of work performed.
crop_period_id defaults to the crop period of the current year.
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Filter by crop period id, usually the year (e.g. 2026).
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (agrifieldwork, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Creates or modifies a planned field job for a crop period
Documentation
Sandbox
Documentation
Create or Modify AgrifieldWork
Requirements
Name
Requirement
Type
Description
id
integer|string
AgrifieldWork id or uuid. Only when modifying an existing record; leave it out to create a new one.
Parameters
Parameter
Type
Required?
Format
Description
name
string
false
worktype
object
false
Reference to Worktype. Send { "id": <id> }, or null to clear.
crop_period
object
false
Reference to CropPeriod. Send { "id": <id> }, or null to clear.
customer
object
false
Reference to Customer. Send { "id": <id> }, or null to clear.
crops
array of objects
false
Crops of the work. Objects with an id field. Replaces the whole list - crops left out are removed.
pria_payees
array of objects
false
PRIA payees of the work. Objects with an id field. Replaces the whole list.
location_areas
array of objects
false
Location areas of the work. Objects with an id field. Replaces the whole list.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
GET
/api/agrifieldworks/agrifields/{crop_period_id}
Agrifields of one crop period with the field jobs planned on each
Documentation
Sandbox
Documentation
Agrifields with their agrifield works for one crop period. Returns an array of objects with: id,
crop_name, pria_payee_name, location_area_name, customer_name, company_name, field_size,
field_number, massive_number, name
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
agrifield_work_id
integer
false
Filter by agrifield work id.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/agrifieldworks/classificator/{crop_period_id}
Crops, PRIA payees and location areas in use on one crop period's Agrifields
Documentation
Sandbox
Documentation
Classificators available for one crop period. Returns { crop, pria_payee, location_area }, each
listing the values in use for the crop period
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/agrifieldworks/distribution/{crop_period_id}
How a crop period's planned jobs are distributed across its Agrifields
Documentation
Sandbox
Documentation
Distribution of agrifield works across one crop period. Returns an array of objects with: crop,
customer, pria_payee, location_area, materialusages, fulfillment, capacity
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, planitem, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Replaces the crops, PRIA payees and location areas of a planned field job
Documentation
Sandbox
Documentation
Replaces the crops, PRIA payees and location areas of an AgrifieldWork
Requirements
Name
Requirement
Type
Description
id
integer|string
AgrifieldWork id or uuid
Parameters
Parameter
Type
Required?
Format
Description
crops
array of objects
false
Crops of the work, as objects with an id field. Replaces the whole list.
pria_payees
array of objects
false
PRIA payees of the work, as objects with an id field. Replaces the whole list.
location_areas
array of objects
false
Location areas of the work, as objects with an id field. Replaces the whole list.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Look the record up by uuid instead of the id in the path.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (agrifieldwork, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Creates or modifies a planned field job for a crop period
Documentation
Sandbox
Documentation
Create or Modify AgrifieldWork
Requirements
Name
Requirement
Type
Description
id
integer|string
AgrifieldWork id or uuid. Only when modifying an existing record; leave it out to create a new one.
Parameters
Parameter
Type
Required?
Format
Description
name
string
false
worktype
object
false
Reference to Worktype. Send { "id": <id> }, or null to clear.
crop_period
object
false
Reference to CropPeriod. Send { "id": <id> }, or null to clear.
customer
object
false
Reference to Customer. Send { "id": <id> }, or null to clear.
crops
array of objects
false
Crops of the work. Objects with an id field. Replaces the whole list - crops left out are removed.
pria_payees
array of objects
false
PRIA payees of the work. Objects with an id field. Replaces the whole list.
location_areas
array of objects
false
Location areas of the work. Objects with an id field. Replaces the whole list.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
PUT
/api/agrifieldworks/{id}/agrifieldsoperation/{action}
Adds, removes or clears one Agrifield in a planned job's field selection
Documentation
Sandbox
Documentation
Runs the operation named in the URL against an Agrifield of the work
Requirements
Name
Requirement
Type
Description
id
integer|string
AgrifieldWork id or uuid
action
string
add puts the field in the covered list and takes it out of the excluded list, remove does the opposite, clear takes it out of both. Any other value leaves the selection unchanged.
Parameters
Parameter
Type
Required?
Format
Description
agrifield_id
integer
false
Field the operation named in the URL is applied to.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
PUT
/api/agrifieldworks/{id}/joinagrifield/{agrifieldid}
Adds the Agrifield named in the URL to the fields a planned job covers
Documentation
Sandbox
Documentation
Adds the Agrifield named in the URL to an AgrifieldWork. Ignores the request body.
Requirements
Name
Requirement
Type
Description
id
integer|string
AgrifieldWork id or uuid
agrifieldid
integer|string
Agrifield id
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Adds or updates a planned material input on a field job
Documentation
Sandbox
Documentation
Adds or updates a planned material input on a field job.
The input is held as a ratio per hectare. Setting it also pushes the ratio to the plan items
of that job that have not been executed yet, leaving executed ones alone.
Requirements
Name
Requirement
Type
Description
id
integer|string
AgrifieldWork id or uuid
Parameters
Parameter
Type
Required?
Format
Description
material
object
true
Material used, as an object with an id field.
ratio_per_hectare
float
false
Amount applied per hectare.
storage
object
false
Storage the material is taken from, as an object with an id field. Defaults to storage 1.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Removes one planned material input from a field job
Documentation
Sandbox
Documentation
Removes one planned material input from a field job, and from the plan items of that job
that have not been executed yet.
Removed permanently rather than soft-deleted, so
the row does not appear in the recycle bin or in a from_updated_at delta sync. Returns the
parent AgrifieldWork, not the removed usage
Requirements
Name
Requirement
Type
Description
material_usage_id
integer|string
MaterialUsage id
id
integer|string
AgrifieldWork id or uuid
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
GET
/api/agrifieldworks3-bycropperiod/{crop_period_id}
Agrifields of one crop period grouped by the field job planned on them
Documentation
Sandbox
Documentation
Agrifields grouped by agrifield work for one crop period. Returns an array of objects with:
agrifield_work_id, worktype, name, customer, crop_names_array, planitem_count,
planned_start_time, planned_stop_time, planned_start_week, planned_stop_week, is_selected,
agrifield_count
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, planitem, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Moves the selected planned field jobs to another week of the crop period
Documentation
Sandbox
Documentation
Moves the selected AgrifieldWorks to another week
Parameters
Parameter
Type
Required?
Format
Description
selected_agrifield_works
array of objects
true
Field works to move, as objects with an id field.
week_obj
object
true
Target week, as an object with a weeknum field.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
crop_names
array
*
crop_names_str
string
*
id
integer
*
name
string
*
worktype
object (Worktype)
*
company
object (Company)
*
agrifields[]
array of objects (Agrifield)
*
agrifields_excluded[]
array of objects (Agrifield)
*
groups[]
array of objects (AgrifieldGroup)
*
crop_period
object (CropPeriod)
*
agrifield_work_material_usages[]
array of objects (AgrifieldWorkMaterialUsage)
*
planitems[]
array of objects (Planitem)
*
crop_str
string
*
Pipe separated crop names, served as the crop_names property through getCropNameArray().
Legacy and stale: nothing in this codebase calls setCropStr() or writes the crop_str column,
so whatever a row holds was written by an earlier version. The live value is $crops, which
getCropNameString() renders as crop_names_str - the two serialized properties can therefore
disagree, and $crops is the one to trust.
Planned field jobs of one crop period laid out by week
Documentation
Sandbox
Documentation
Agrifield works of one crop period laid out by week. Returns the 52 weeks of the crop period,
each { weeknum, start, stop, monthname }
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, planitem, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
An Agrifield is a field: its name and number, its area, its geometry and the cadastral
units it sits on. Its crop data is held per crop period, so the same field carries a
different crop, yield and fertilising plan each year. These endpoints create and edit
fields, set the crop period data, merge one field into another, and read the fertilising
plan calculated from the crop, the planned yield and the soil samples taken on the field.
The fieldbook routes assemble everything recorded on a field for a season - works,
materials and yields - in the form the authorities expect. Geometry can be uploaded as a
shapefile or GPX archive rather than entered by hand. The main entry points to fieldbook
and agrifield data are GET /api/fieldbookfields/0 (a list of all agrifields with their
latest crop period data) and GET /api/fieldbook/{id}, where id is the agrifield id.
PUT
/api/add-agrifieldworkandmaterialusage
Adds material usage to a Workdone performed on an Agrifield
Documentation
Sandbox
Documentation
Adds material usage to a Workdone performed on an Agrifield.
Saves the harvest record alongside it when the work is harvesting, and recalculates the
per-hectare ratios when hectares_served changes.
Despite the route name, it takes a workdone_id and changes work that was performed. It is
unrelated to the AgrifieldWorks endpoints, which plan work rather than record it.
Parameters
Parameter
Type
Required?
Format
Description
crop_layer_type
object
false
Reference to CropLayerType. Send { "id": <id> }, or null to clear.
harvest_type
object
false
Reference to HarvestType. Send { "id": <id> }, or null to clear.
workdone_id
integer
true
Workdone the material usage is added to
hectares_served
float
false
Area served, used to recalculate the per-hectare ratios
harvest
object
false
Harvest record saved alongside the material usage
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Comma-separated subset of the serializer groups this endpoint offers (default, agrifield_all, fieldbook, workdone, workobject, geo, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
lat
float
*
lng
float
*
classificator
string
*
color
string
*
agrifield_pria_history_data_narrow
array
*
__field_number_sortable
string
*
rowclass
string
*
responsible_worker
object (Worker)
*
Person responsible for solving issues, faults and problems
division
object (Department)
*
id
integer
*
Workobject id in Terake
name
string
*
Workobject name, Utf8 string 255 chars
fullname
string
*
Workobject fullname, Utf8 string 255 chars
sorting_name
string
*
Worktype name used for sorting, Utf8 string 255 chars
Comma-separated subset of the serializer groups this endpoint offers (default, agrifield_all, workobject, geo, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
lat
float
*
lng
float
*
classificator
string
*
color
string
*
__field_number_sortable
string
*
rowclass
string
*
responsible_worker
object (Worker)
*
Person responsible for solving issues, faults and problems
division
object (Department)
*
id
integer
*
Workobject id in Terake
name
string
*
Workobject name, Utf8 string 255 chars
fullname
string
*
Workobject fullname, Utf8 string 255 chars
sorting_name
string
*
Worktype name used for sorting, Utf8 string 255 chars
Agrifield collection. Returns the Agrifields of the crop year visible to the caller, with their
crop data
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period, usually the year (e.g. 2026)
fieldbook
boolean
false
Truthy returns the fieldbook view of the agrifield data.
is_archived
boolean
false
Truthy returns archived agrifields instead of active ones.
skip_geometry
boolean
false
Truthy leaves out field geometry: lat, lng, simplified, simplified_geom_srid and polygon are returned as null. The response is considerably smaller and faster.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Agrifield collection. Returns the Agrifields of the crop year visible to the caller, with their
crop data
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period, usually the year (e.g. 2026)
fieldbook
boolean
false
Truthy returns the fieldbook view of the agrifield data.
is_archived
boolean
false
Truthy returns archived agrifields instead of active ones.
skip_geometry
boolean
false
Truthy leaves out field geometry: lat, lng, simplified, simplified_geom_srid and polygon are returned as null. The response is considerably smaller and faster.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Agrifield collection. Returns the Agrifields of the crop year visible to the caller, with their
crop data
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
random
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period, usually the year (e.g. 2026)
fieldbook
boolean
false
Truthy returns the fieldbook view of the agrifield data.
is_archived
boolean
false
Truthy returns archived agrifields instead of active ones.
skip_geometry
boolean
false
Truthy leaves out field geometry: lat, lng, simplified, simplified_geom_srid and polygon are returned as null. The response is considerably smaller and faster.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/agrifield_data_with_fertilizingplan/{agrifield_data_id}
FertilizingPlan by AgrifieldData id
Documentation
Sandbox
Documentation
FertilizingPlan by AgrifieldData id. Returns the fertilizing plan of the Agrifield data record,
each row carrying autumn_seed, planned_yield and real_yield
Requirements
Name
Requirement
Type
Description
agrifield_data_id
integer|string
AgrifieldData id
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (fieldbook, fertilizing). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Agrifield collection. Returns the Agrifields of the crop year visible to the caller, with their
crop data
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period, usually the year (e.g. 2026)
fieldbook
boolean
false
Truthy returns the fieldbook view of the agrifield data.
is_archived
boolean
false
Truthy returns archived agrifields instead of active ones.
skip_geometry
boolean
false
Truthy leaves out field geometry: lat, lng, simplified, simplified_geom_srid and polygon are returned as null. The response is considerably smaller and faster.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Uploads Agrifield geometry as a ZIP containing a shapefile (.shp) or a GPX track
Documentation
Sandbox
Documentation
Uploads Agrifield geometry as a ZIP containing a shapefile (.shp) or a GPX track. Returns {
filecount: }, or { error: message.file_format_error } when none could be read
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period the uploaded fields are attached to, usually the year (e.g. 2026).
pria_payee_id
integer
false
PRIA payee the uploaded fields are attached to.
file
file
true
GPX file, sent as a multipart upload.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Work performed on Agrifields, with the material used on each
Documentation
Sandbox
Documentation
Work performed on Agrifields, with the material used on each.
Returns one entry per agrifield, keyed by agrifield id, each with: agrifield,
agrifield_data, workdones (the work done on that field in the period),
worktypes_with_material_usage.
Despite the route name, this reports work that was performed. It is unrelated to the
AgrifieldWorks endpoints, which plan work rather than record it.
Parameters
Parameter
Type
Required?
Format
Description
only_notapproved
boolean
false
from
date
false
YYYY-MM-DD
Date as Y-m-d, for example 2026-08-28. Defaults to the first day of the current month when omitted.
to
date
false
YYYY-MM-DD
Date as Y-m-d, for example 2026-08-28. The whole of that day is included. When omitted the period runs to the end of the current month.
worker_id
integer
false
Worker id
worktype_id
integer
false
Worktype id
main_facility_id
integer
false
Facility id used as the main facility
cost_account_id
integer
false
CostAccount id
myworks
integer
false
crop_id
integer
false
Filter by crop id.
output_type
integer
false
Response format: 0 JSON, 1 xls, 2 pdf.
pria_payee_id
integer
false
Filter by PRIA payee id.
project_id
integer
false
Filter by project id.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (workdone, materialusage_all). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
PUT
/api/croprotation/set/{agrifield_id}/{crop_period_id}
Writes the crop rotation entry of an Agrifield for one or more crop periods
Documentation
Sandbox
Documentation
Writes the crop rotation entry of an Agrifield for one or more crop periods. Returns the written
rows keyed by agrifield id, each carrying the agrifield, its crop, payee and usage type
Requirements
Name
Requirement
Type
Description
agrifield_id
integer|string
Agrifield id
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
agrifield_ids
array of integers
false
Fields the rotation is written to, in addition to the one in the URL.
crop_period
object
false
Crop period to write, as an object with an id field. Takes precedence over selected_crop_periods.
selected_crop_periods
array of integers
false
Crop period ids to write the same rotation to. Used when crop_period is absent.
crop
object
false
Crop to set, as an object with an id field.
crop_name_new
string
false
Name of a crop to create and use instead of crop.
crop_variety
string
false
Crop variety.
crop_purpose_type
object
false
Crop purpose type, as an object with an id field.
agrifield_usage_type
object
false
Field usage type, as an object with an id field.
pria_payee
object
false
PRIA payee, as an object with an id field.
field_usage_description
string
false
Free-text description of how the field is used.
start_date
date
false
YYYY-MM-DD
Date the rotation entry starts from. Date as Y-m-d, for example 2026-08-28.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Deletes the crop rotation entry of an Agrifield data record
Documentation
Sandbox
Documentation
Deletes the crop rotation entry of an Agrifield data record, together with its fertilizing plan
and geometry. Removed permanently rather than soft-deleted, so the row does not appear in the
recycle bin or in a from_updated_at delta sync. Returns the remaining crop rotation rows of the
Agrifield, or { ok: false } when none could be removed
Requirements
Name
Requirement
Type
Description
agrifield_data_id
integer|string
AgrifieldData id
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/fertilizingplans/plan/{agrifield_id}/{crop_period_ids_csv}
Fertilizing Plan by Agrifield and Crop Periods
Documentation
Sandbox
Documentation
Fertilizing Plan by Agrifield and Crop Periods. Returns one entry per crop period as { sum,
workdone_materials, planitem_materials, agrifield_work_materials }
Requirements
Name
Requirement
Type
Description
agrifield_id
integer|string
Agrifield id
crop_period_ids_csv
integer|string
Comma-separated CropPeriod ids
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (fertilizingplan, fertilizingdetails). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/fertilizingplans/usage/{agrifield_id}/{crop_period_ids_csv}
Fertilizing Usage by Agrifield and Crop Periods
Documentation
Sandbox
Documentation
Fertilizing Usage by Agrifield and Crop Periods. Returns fertiliser usage for the Agrifield
across the listed crop periods, and an empty result when the Agrifield falls outside the
caller's visible set
Requirements
Name
Requirement
Type
Description
agrifield_id
integer|string
Agrifield id
crop_period_ids_csv
integer|string
Comma-separated CropPeriod ids
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (fertilizingplan, fertilizingdetails). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Agrifield collection. Returns the fieldbook Agrifield rows, each carrying n_plan, p_plan, k_plan
and p_5y_avg
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period, usually the year (e.g. 2026)
skip_geometry
boolean
false
Truthy leaves out field geometry: lat, lng, simplified, simplified_geom_srid and polygon are returned as null. The response is considerably smaller and faster.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/fieldbook/overlapping-check/{agrifield_id}/{crop_period_id}
Reports fieldbook entries whose periods overlap for one Agrifield and crop period
Documentation
Sandbox
Documentation
Reports fieldbook entries whose periods overlap for one Agrifield and crop period. Returns the
Agrifield data records whose geometry overlaps inside the crop period
Requirements
Name
Requirement
Type
Description
agrifield_id
integer|string
Agrifield id
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (agrifield_data, geo, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Excludes a Workdone from the fieldbook and drops its fertilizing cache
Documentation
Sandbox
Documentation
Excludes a Workdone from the fieldbook and drops its fertilizing cache. The Workdone itself is
not deleted. Returns { result: 1 } on success, { result: 0 } when the Workdone is not found or
belongs to another company
Requirements
Name
Requirement
Type
Description
id
integer|string
Workdone id or uuid, not an Agrifield id
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
requirements= {
{"name"="agrifield_id", "dataType"="integer|string", "required"=true, "description"="Agrifield id"},
{"name"="id", "dataType"="integer|string", "required"=true, "description"="Agrifield id or uuid"}
},
)
Requirements
Name
Requirement
Type
Description
agrifield_id
integer|string
Agrifield id
id
integer|string
Agrifield id or uuid
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, agrifield_all, fieldbook, workobject, geo, classificator). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Agrifield collection. Returns the fieldbook Agrifield rows, each carrying n_plan, p_plan, k_plan
and p_5y_avg
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period, usually the year (e.g. 2026)
skip_geometry
boolean
false
Truthy leaves out field geometry: lat, lng, simplified, simplified_geom_srid and polygon are returned as null. The response is considerably smaller and faster.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Agrifield collection. Returns the Agrifields of the crop year visible to the caller, with their
crop data
The response has a fixed structure and may not include every field these records carry elsewhere in the API.
Requirements
Name
Requirement
Type
Description
crop_period_id
integer|string
CropPeriod id, usually the year (e.g. 2026)
Parameters
Parameter
Type
Required?
Format
Description
crop_period_id
integer
false
Crop period, usually the year (e.g. 2026)
fieldbook
boolean
false
Truthy returns the fieldbook view of the agrifield data.
is_archived
boolean
false
Truthy returns archived agrifields instead of active ones.
skip_geometry
boolean
false
Truthy leaves out field geometry: lat, lng, simplified, simplified_geom_srid and polygon are returned as null. The response is considerably smaller and faster.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Comma-separated subset of the serializer groups this endpoint offers (cadastre, baseattribute). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
A Cadastre is a unit from the national land register, identified by its cadastral number.
Fields are attached to cadastral units so that ownership and area can be evidenced. These
endpoints create and edit cadastres, and attach or detach the workobjects that sit on them.
One cadastral unit can carry several fields and one field can span several units, so the
relation is many to many. Reading a cadastre returns the workobjects still attached to it.
GET
/api/cadastres
Cadastre collection
Documentation
Sandbox
Documentation
Returns Cadastre collection
Parameters
Parameter
Type
Required?
Format
Description
is_archived
boolean
false
Truthy returns archived records instead of active ones.
archived
boolean
false
Alias of is_archived; either being truthy has the same effect.
from_updated_at
integer
false
Records updated from this Unix timestamp, including deleted and archived ones
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (cadastre, baseattribute). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Comma-separated subset of the serializer groups this endpoint offers (agrifields, baseattribute). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
lat
float
*
lng
float
*
classificator
string
*
__field_number_sortable
string
*
rowclass
string
*
responsible_worker
object (Worker)
*
Person responsible for solving issues, faults and problems
id
integer
*
Workobject id in Terake
name
string
*
Workobject name, Utf8 string 255 chars
fullname
string
*
Workobject fullname, Utf8 string 255 chars
sorting_name
string
*
Worktype name used for sorting, Utf8 string 255 chars
Look the record up by uuid instead of the id in the path.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (cadastre, baseattribute, auditcolumns). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
A Crop is an entry in the crop list a company plans and reports against - a specific
plant, not a growing season. Fields reference a crop through their per-period data, so the
same field carries different crops in different years. These endpoints create, edit,
archive and delete crops, and merge duplicates into one. Merging exists because crops
arrive from PRIA imports as well as being typed by hand. Archived crops stay available to
past seasons while disappearing from new dropdowns.
GET
/api/crops
Crop collection
Documentation
Sandbox
Documentation
Returns Crop collection
Parameters
Parameter
Type
Required?
Format
Description
is_archived
boolean
false
Truthy returns archived records instead of active ones.
archived
boolean
false
Alias of is_archived; either being truthy has the same effect.
from_updated_at
integer
false
Records updated from Unix timestamp
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (crops, owner, baseattribute, archive). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
id
integer
*
base_name
string
*
name
string
*
hex_color
string
*
master_crop
object (Crop)
*
Remaining crop after crops join
outer_id
string
*
crop_type
object (CropType)
*
Crop Type
moisture_dry
integer
*
Moisture content of dry (elevator) crop (usually 13% or below)
Look the record up by uuid instead of the id in the path.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (crops, owner, baseattribute, archive). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
id
integer
*
base_name
string
*
name
string
*
hex_color
string
*
master_crop
object (Crop)
*
Remaining crop after crops join
outer_id
string
*
crop_type
object (CropType)
*
Crop Type
moisture_dry
integer
*
Moisture content of dry (elevator) crop (usually 13% or below)
These endpoints serve position and geometry: where machines are now, where they have
been, and the shape of fields. Facility locations and telemetry parameters come from the
integration server rather than from Terake itself. Field geometry is read and written per
Agrifield data record, so a field can change shape between crop periods. The cadastral
lookup proxies the national register and returns its answer unchanged. Coordinates arrive
in L-EST as well as WGS84 and are converted on the way in.
GET
/api/facilities/data/last-enginehours
Get Facility engine hours
Documentation
Sandbox
Documentation
Returns Facility engine hours. Returns an array of objects with: enginehours,
enginehours_datetime, id, name
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (owner, facility). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/facilities/data/vehiclelist/{integration_id}
API provider vehicle list
Documentation
Sandbox
Documentation
API provider vehicle list. Proxies the integration server's vehicle list and returns its JSON
response unchanged
Requirements
Name
Requirement
Type
Description
integration_id
integer|string
Integration id
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (owner, facility, archive). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Cadastral register information for one cadastre number
Documentation
Sandbox
Documentation
Cadastral register information for one cadastre number. Proxies the national cadastral service
and returns its JSON response unchanged
Requirements
Name
Requirement
Type
Description
num
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, facilities, facility). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Comma-separated subset of the serializer groups this endpoint offers (geo). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Comma-separated subset of the serializer groups this endpoint offers (geo). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Device location track recorded during one workdone
Documentation
Sandbox
Documentation
Device location track recorded during one workdone. Returns the recorded location points of a
Workdone, or { error: Not allowed } when it belongs to another company
Requirements
Name
Requirement
Type
Description
workdone_id
integer|string
Workdone id
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (telemetry, geo). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Location history of a facility over a period. Returns an array of objects with: track,
workdone_geo_track
Parameters
Parameter
Type
Required?
Format
Description
workdone_id
integer
true
Workdone ID
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (workdone, facilities, facility, telemetry, geo). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Last known location of each facility. Returns the last known location row per Facility, as
reported by the integration server
Parameters
Parameter
Type
Required?
Format
Description
from
date
false
YYYY-MM-DD
Start of the period, Y-m-d.
to
date
false
YYYY-MM-DD
End of the period, Y-m-d.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, facilities, facility). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Latest telemetry parameters of each facility. Returns the telemetry parameter rows per Facility,
as reported by the integration server
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, facilities, facility). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
GET
/api/location/facilities/params-for-workdone/{workdone_id}
Facility telemetry parameters recorded during one workdone
Documentation
Sandbox
Documentation
Facility telemetry parameters recorded during one workdone. Returns the Facility's historical
telemetry rows for the requested period
Requirements
Name
Requirement
Type
Description
workdone_id
integer|string
Workdone id
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, facilities, facility). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Last known location of each worker. Returns an array of objects with: worker_id, worker_name,
worktype_name, workdone_id, timestamp, datetime, position, lat, lng
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, facilities, facility). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
A Herding records animals grazing a field over a period: which animals, how many, and for
how long. Grazing counts as fertilisation, so a herding contributes to the field nutrient
balance. These endpoints create, edit, list and delete herdings, and rebuild the
fertilising cache when one changes. Herdings can be submitted to PRIA as reportable
activity. Animal types come from a shared classificator rather than free text.
GET
/api/herdings
Herding collection
Documentation
Sandbox
Documentation
Returns Herding collection
Parameters
Parameter
Type
Required?
Format
Description
from
date
false
YYYY-MM-DD
Date as Y-m-d, for example 2026-08-28. Defaults to the first day of the current month when omitted.
to
date
false
YYYY-MM-DD
Date as Y-m-d, for example 2026-08-28. The whole of that day is included. When omitted the period runs to the end of the current month.
from_updated_at
integer
false
Records updated from Unix timestamp
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, herdings). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
days_in_period
integer
*
rowclass
string
*
total_n
float
*
Total added element N in kg, summed over all fertilizing herding caches.
total_p
float
*
Total added element P in kg, summed over all fertilizing herding caches.
Returns the fertilisation figures derived from herding for one Agrifield.
Requirements
Name
Requirement
Type
Description
agrifield_id
integer|string
Agrifield id
id
integer|string
Herding id or uuid
Parameters
Parameter
Type
Required?
Format
Description
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, herdings). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
days_in_period
integer
*
rowclass
string
*
total_n
float
*
Total added element N in kg, summed over all fertilizing herding caches.
total_p
float
*
Total added element P in kg, summed over all fertilizing herding caches.
Look the record up by uuid instead of the id in the path.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (default, herdings). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
days_in_period
integer
*
rowclass
string
*
total_n
float
*
Total added element N in kg, summed over all fertilizing herding caches.
total_p
float
*
Total added element P in kg, summed over all fertilizing herding caches.
Modifies Herding and rebuilds its fertilizing cache
Documentation
Sandbox
Documentation
Modifies Herding
Requirements
Name
Requirement
Type
Description
id
integer|string
Herding id or uuid
Parameters
Parameter
Type
Required?
Format
Description
start_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
end_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
herd_size
integer
false
agrifield
object
false
Reference to Agrifield. Send { "id": <id> }, or null to clear.
animal_type
object
false
Reference to AnimalType. Send { "id": <id> }, or null to clear.
year0_percent
integer
false
year1_percent
integer
false
intensity_percent
integer
false
description
string
false
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Return
Parameter
Type
Versions
Description
200
days_in_period
integer
*
rowclass
string
*
total_n
float
*
Total added element N in kg, summed over all fertilizing herding caches.
total_p
float
*
Total added element P in kg, summed over all fertilizing herding caches.
A manure storage records where organic fertiliser is held, its capacity and what it
contains. Applying manure to a field draws from a storage and contributes to the field
nutrient balance. These endpoints create, edit, list and delete storages. Storage contents
matter for the fertilising plans and for statutory reporting. A storage is referenced by
material usage rather than holding it directly.
GET
/api/manurestorages
ManureStorage collection
Documentation
Sandbox
Documentation
Returns ManureStorage collection
Parameters
Parameter
Type
Required?
Format
Description
is_archived
boolean
false
Truthy returns archived records instead of active ones.
archived
boolean
false
Alias of is_archived; either being truthy has the same effect.
from_updated_at
integer
false
Records updated from Unix timestamp
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (manurestorages, baseattribute). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Updates this record instead of creating one, when given.
uuid
string
false
Updates the record with this uuid instead of creating one, when given. Clients that create records offline supply their own.
import_type
string
false
Set to "file" to match an existing record on outer_id, id or uuid before creating - used by the import endpoints.
outer_id
string
false
Identifier in the source system. Matched against first when import_type is "file".
location_address
string
false
lat
float
false
Decimal comma is accepted.
lng
float
false
Decimal comma is accepted.
storage_size
float
false
Decimal comma is accepted.
requested_start_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
requested_end_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
usage_start_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
usage_end_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
agrifields
array of objects
false
Agrifields served by the storage. Objects with an id field.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Look the record up by uuid instead of the id in the path.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (manurestorages, baseattribute). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Id of the record being updated. Must match the id in the URL.
location_address
string
false
lat
float
false
Decimal comma is accepted.
lng
float
false
Decimal comma is accepted.
storage_size
float
false
Decimal comma is accepted.
requested_start_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
requested_end_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
usage_start_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
usage_end_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
agrifields
array of objects
false
Agrifields served by the storage. Objects with an id field.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
A soil sample records what was measured on a field: nutrient levels, pH and the date it
was taken. Samples drive the fertilising plans, since need is calculated from what the soil
already holds. These endpoints create and edit samples, import them from a shapefile or
spreadsheet, and read them by field or by coordinates. A sample is tied to a position, so
several samples can describe different parts of one field. Samples are matched to Agrifield
data records so the right season uses the right measurement.
GET
/api/soilsamples
SoilSample collection
Documentation
Sandbox
Documentation
Returns SoilSample collection
Parameters
Parameter
Type
Required?
Format
Description
is_archived
boolean
false
Truthy returns archived records instead of active ones.
archived
boolean
false
Alias of is_archived; either being truthy has the same effect.
from_updated_at
integer
false
Records updated from Unix timestamp
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (soilsamples). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Updates this record instead of creating one, when given.
uuid
string
false
Updates the record with this uuid instead of creating one, when given. Clients that create records offline supply their own.
import_type
string
false
Set to "file" to match an existing record on outer_id, id or uuid before creating - used by the import endpoints.
outer_id
string
false
Identifier in the source system. Matched against first when import_type is "file".
sample_number
string
false
massive_number
string
false
soil_type
string
false
Truncated to 99 characters.
sample_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
agrifield
object
false
Reference to Agrifield. Send { "id": <id> }, or null to clear.
lat
float
false
Decimal comma is accepted.
lng
float
false
Decimal comma is accepted.
ph
float
false
Decimal comma is accepted.
n
float
false
Decimal comma is accepted.
p
float
false
Decimal comma is accepted.
k
float
false
Decimal comma is accepted.
org_c
float
false
Decimal comma is accepted.
mg
float
false
Decimal comma is accepted.
humus
float
false
Decimal comma is accepted.
cu
float
false
Decimal comma is accepted.
mn
float
false
Decimal comma is accepted.
b
float
false
Decimal comma is accepted.
ca
float
false
Decimal comma is accepted.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Comma-separated subset of the serializer groups this endpoint offers (soilsamples). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Look the record up by uuid instead of the id in the path.
groups
string
false
Comma-separated subset of the serializer groups this endpoint offers (soilsamples, soilsamples_single). Narrows the response to those groups, dropping the nested objects the others add; a group not offered here is refused with 400.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.
Id of the record being updated. Must match the id in the URL.
sample_number
string
false
massive_number
string
false
soil_type
string
false
Truncated to 99 characters.
sample_date
datetime
false
Y-m-d H:i:s
Date and time as Y-m-d H:i:s, for example 2026-08-28 14:30:00. An empty value stores the current time. Read in the company time zone. Any string PHP can parse is accepted, but a slash-separated date is read US-first, so send Y-m-d H:i:s.
agrifield
object
false
Reference to Agrifield. Send { "id": <id> }, or null to clear.
lat
float
false
Decimal comma is accepted.
lng
float
false
Decimal comma is accepted.
ph
float
false
Decimal comma is accepted.
n
float
false
Decimal comma is accepted.
p
float
false
Decimal comma is accepted.
k
float
false
Decimal comma is accepted.
org_c
float
false
Decimal comma is accepted.
mg
float
false
Decimal comma is accepted.
humus
float
false
Decimal comma is accepted.
cu
float
false
Decimal comma is accepted.
mn
float
false
Decimal comma is accepted.
b
float
false
Decimal comma is accepted.
ca
float
false
Decimal comma is accepted.
Headers
Name
Required?
Description
X-Terake-Api-Key
false
Worker or token api key. The preferred way to authenticate; send this or the apikey query parameter.