Farmbrite API Developers Documentation (1.0.0)

Download OpenAPI specification:Download

Overview

Welcome to the Farmbrite API.
You can find out more about Farmbrite at
www.farmbrite.com

If you need help, check out our help center at help.farmbrite.com or email us at dev@farmbrite.com.

The Farmbrite API is currently in BETA. To request early access please email us at dev@farmbrite.com.

API Reference

The Farmbrite API allows authorized users programatic access to their account data in order to facilitate the integration of this data with other systems and service. The API is organized around REST standards. The API uses resource-oriented URLs and returns JSON-encoded responses. It uses standard HTTP response codes, authentication, and verbs.

Base URL

https://api.farmbrite.com/v1

Authentication

Farmbrite offers 2 authentication options for accessing the API both utilizing Personal Access Tokens (PATs) for enabling access to the API.

Access Tokens (API Keys) are associated with an individual user in your account and inherit that user's role and permissions. You can find the Access Token on the user profile page under API Key. When building an integration we recommend setting up a separate API user for the integration and changing the API KEY on a regular basis.

Remember to keep your Access Tokens secret; treat them just like passwords! They act on your behalf when interacting with the API, with the same permissions and access as the user has. Don't hardcode them into your programs. Instead, choose to store them as environment variables.

Bearer Token

To make a request to the API include the Authorization Bearer header with your request and include your Access Token (API KEY) as the value. Access Token and API KEY are used interchangeably through out the documentation.

Example cURL request authenticating with Bearer Token authentication

curl https://api.farmbrite.com/v1/tasks \
  -H "Authorization: Bearer ACCESS_TOKEN"

API Key

Alternatively to using the Bearer Token authorization method, you can provide an API KEY as a header with your request. Use the header api_key with a value of your Access Token (API KEY).

Example cURL request authenticating with API Key header authentication

curl https://api.farmbrite.com/v1/tasks \
  -H "api_key: ACCESS_TOKEN"

Errors

Sadly, sometimes requests to the API fail. Failures can occur for a wide range of reasons. In all cases, the API should return an HTTP Status Code indicating the nature of the failure.

Code Meaning Description
200 Success The request was successful. If applicable the data it will be available in the data field at the top level of the response body.
400 Bad Request Typically caused by a missing or malformed parameter. Check the documentation and your request and try again.
401 Unauthorized No access token or an invalid access token was provided with the request. The error can also occur if the user or account is invalid or does not have access to this resource.
403 Forbidden The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you access resources that the user or account does not have access to.
404 Not Found Either the method and path supplied do not specify a known action or the object related to the request does not exist.
429 Too Many Requests You have exceeded one of the rate limits in the API. See the Rate Limits section for more information.
500 Internal Server Error There was a problem on Farmbrite's side which was logged and reported to our technical team. You can retry, but if the problem continues please contact support.

Details about errors can sometimes also be found in the 'message' property at the root level of the JSON response body.

Pagination

In order to optimize performance, all list methods in the API will limit the total response data to a certain number of records and return the data in chunks (pages). API responses will include information about the total records available, the current page and total pages. You can request additional pages of data by including the 'page' parameter (below)

For example:

{
  "success": true,
  "cached": false,
  "message": "",
  "total_records": 100,
  "current_page": 1,
  "limit": 25,
  "total_pages": 1,
  "data": [{...}]
}

In order to request additional pages of data you can include the parameters 'page' and 'limit' as part of the list GET request query string parameters. The 'page' parameter indicates which page of data to return and the 'limit' parameter specifies how many record per page. Note: the maximum number of records per page is limited to 100. Defaults to 25 records.

Example cURL request limiting to 100 record and fetching page 2 of the data.

curl https://api.farmbrite.com/v1/tasks?page=2&limit=100 \
  -H "Authorization: Bearer ACCESS_TOKEN"

Sorting

List methods will return data in a default sorted order based on our best assumptions about how to organize the data. To request the data in a different order you can include the parameters 'sort_by' and 'sort_dir' as part of the list GET request query string parameters.

Example cURL request limiting to livestock data sorted by type ASC

curl https://api.farmbrite.com/v1/animals?sort_by=type&sort_dir=asc \
  -H "Authorization: Bearer ACCESS_TOKEN"

Filtering

You can filter most list methods to limit the data that is returned. To filter the data, you can include filter url parameters as part of the list GET request query string parameters. The parameter name should be a property of the resource from the collection with a value of the filter rules to apply (see below) and will be ignored if an invalid value is passed.

If you are looking for an exact match you can simply set the value of the parameter equal to what you're matching on, for example:

Format: ?{field}={value}

However, for queries that need comparisons other than simple equals, operators are supported for membership, non-membership, equality, inequality, greater-than, greater-than-or-equal, less-than, and less-than-or-equal-to and like. In order, the operators are "in", "nin", "eq", "ne", "gt", "gte", "lt", "lte", and "like". Simple equality is the default operation, and is performed as ?field=value. Operators other than simple equality must be followed by a colon (:), i.e., ?{field}={operator}:{value}

Filters can be used in queries compounded with the values they work on and should be URL encoded in the query string. Complex filters can be joined by using additional querystring parameters joined with an ampersand (&)

Example cURL request filtering animals who are female with a color like black would look like

curl https://api.farmbrite.com/v1/animals?gender=Female&coloring=like:black
  -H "Authorization: Bearer ACCESS_TOKEN"

You can also use ranges in filters for data types that support ranges, such as dates and numbers. To do so simply include [and] between the range filters, for example: gte:1[and]lt:200

Example cURL request filtering animals that have a tag number between 1 and 200 and certain birth date range

curl https://api.farmbrite.com/v1/animals?tag_number=gt:1[and]lt:200&birth_date=gte:2018-03-01[and]lt:2022-01-01 \
  -H "Authorization: Bearer ACCESS_TOKEN"

The complete filtering syntax looks like the following:

Exact match: ?{field}={value}
Filter with operator: ?{field}={operator}:{value}
Range filter: ?{field}={operator_1}:{value_1}[and]{operator_2}:{value_2}
Multiple Filters: ?{field}={value}&{field}={operator}:{value}

Rate Limits

To protect the stability of the API and keep it available to all users, Farmbrite enforces API rate limiting. Requests that hit any of our rate limits will receive a 429 Too Many Requests response, which contains the standard Retry-After header indicating how many seconds the client should wait before retrying the request.

Limits are allocated per Access Token / API KEY. As such, different tokens have independent limits. Accounts with access to the Farmbrite API are limited to 120 request per minute per Access Token.

Farmbrite reserves the right to temporarily disable or block any account or Access Token's access to the API should our technology or security teams identify potential risks to the availability or security of the platform as a result of requests made by an account or Access Token.

Animals & Livestock

Livestock (animals) are the basic object that is used to store animal records. A livestock record can represent either a single animal (most common and default) or a set of animals (like a flock of chickens). Note: A set of animals is different than a livestock group, which is used to manage groups of individual animals. Sets are used to keep track of groups of animals where you don't want or need to track each animal individually.

Livestock, like other resources have various embedded or related resources

For example:

  • Notes
  • Photos
  • Files
  • Tasks
  • Measurements
  • Feedings
  • Treatments
  • Grazings
  • Tasks
  • Schedule

Create an Animal

Create a new animal record

Parameters

type REQUIRED

Animal type/species. You can specify a custom value for this or use one of the default types:

"Alpaca", "Bees", "Bison", "Buffalo", "Butterflies", "Camel", "Cat", "Catfish", "Cattle", "Chicken", "Crickets", "Deer", "Dog", "Donkey", "Duck", "Elk", "Emu", "Fish", "Gayal", "Goat", "Goose", "Guineafowl", "Horse", "Llama", "Mealworms", "Mollusk", "Mule", "Muskox", "Ostrich", "Partridge", "Peafowl", "Pheasant", "Pig", "Pigeon", "Pony", "Quail", "Rabbit", "Reindeer", "Rhea", "Salmon", "Sheep", "Shellfish", "Silkworms", "Swine", "Tilapia", "Trout", "Turkey", "Water buffalo", "Waxworms", "Yak", "Zebu"


status REQUIRED

The status of the animal or livestock set. Supported values are any of the following:

"Active", "Butchered", "Culled", "Deceased", "Dry", "Lactating", "Lost", "Off Farm", "Quarantined", "Reference", "Sick", "Sold", "Weaning", "Archived"

When setting the status to "Butchered", "Culled", "Deceased", you must also provide a death_date. And when setting the status to "Sold" a sold_date is required.


name OPTIONAL

The name or primary identifier for the animal (eg; tag number)


tag_number OPTIONAL

Animal's primary tag number


is_group OPTIONAL

Specifies if this record is a livestock set used to track multiple animals, without recording data for each animal. Defaulted to false.If setting to true, you should also set a group_qty which stores the initial count of the animals in your set.


electronic_id OPTIONAL

Electronic ID - useful to set if using an RFID or barcode scanner to search for for sync data with Farmbrite.


gender OPTIONAL

Sex/gender of the animal. Possible values are Male or Female


bred_status OPTIONAL

The current breeding status for a female animal. Supported values are any of the following:

"Open", "Exposed", "Pregnant"

When setting bred_status to a value other than Open, it's recommend to set the bred_date value to the date exposed.


mother_id OPTIONAL

The Farmbrite unique ID for the animal's mother


father_id OPTIONAL

The Farmbrite unique ID for the animal's father


weight OPTIONAL

The numeric value of animals current weight in either pounds or kilograms (depending on your account settings). When creating a new record this will create a measurement record for the animal.


harvest_unit OPTIONAL

The unit used to record harvests for this animal. Supported values are:

"Bales", "Barrels", "Bunches", "Bushels", "Dozen", "Fluid Ounces", "Gallons", "Grams", "Head", "Kilograms", "Kiloliter", "Liter", "Milliliter", "Ounces", "Pounds", "Quantity", "Quarts", "Tonnes", "Tons"

The default is to store harvests as Quantity


Additional Parameters

birth_date OPTIONAL

Birth date - formatted as YYYY-MM-DD


birth_weight OPTIONAL

Numeric value of weight at birth


bred_date OPTIONAL

Date of last breeding or exposure, formatted as YYYY-MM-DD


breed OPTIONAL

Breed of the animal


breeding_stock OPTIONAL

Boolean value to allow filter to identify animals that are prime breeding stock


coloring OPTIONAL

Description of animal color, markings, etc.


condition_score OPTIONAL

Numeric value used to track body condition score or breed specific scores. Often used for identifying key breeding candidates or for culling. When set, this will create a measurement record for the animal.


death_date OPTIONAL

Date deceased or culled. Required when setting the status to "Butchered", "Culled", "Deceased" - formatted as YYYY-MM-DD


deceased_reason OPTIONAL

Text description for the cause of death.


description OPTIONAL

Text description of animal


harvest_label OPTIONAL

Custom label to be used when displaying harvests. For example if harvesting Eggs as Quantity, you may want to set a harvest_label to "eggs" to show that in harvest reports.


is_neutered OPTIONAL

Boolean value to indicate if the animal is neutered / intact or not.


keywords OPTIONAL

A comma delimited string of labels used to easily search for or identify animals.


market_price OPTIONAL

The default numeric value used when creating new yield record used to calculate the potential harvest revenue based on harvest amounts.


on_feed OPTIONAL

Boolean value used to identify and filter animals that are on feed for medical or finishing reasons.


other_tag_number OPTIONAL

Additional tag number to be stored. Can be any string.


purchase_date OPTIONAL

Date of animal purchase (if applicable) - formatted as YYYY-MM-DD


purchase_price OPTIONAL

Numeric value of amount paid for animal, if purchased.


purchased OPTIONAL

Boolean value indicating that the animal was purchased.


purchased_from_id OPTIONAL

The Farmbrite contact unique id that the animal was purchased from (if applicable)


registry_number OPTIONAL

String value to store additional tag or registry identification number(s)


retention_score OPTIONAL

Numeric value often used to help flag specific animals for potential culling. Useful to filter animals that might be culled.


sale_date OPTIONAL

Date sold. Required when status is set to "Sold" - formatted as YYYY-MM-DD


tag_color OPTIONAL

The color (name or hex string) of the tag number


internal_id OPTIONAL

An internal ID that can be used to identify the animal in addition to the Farmbrite ID and/or other tag numbers.


height OPTIONAL

A numeric value in inches or centimeter (based on account settings) to store the animal's height. When set will also create a measure record.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "birth_date": "2022-01-01",
  • "birth_weight": 50,
  • "bred_date": "",
  • "breed": "Test",
  • "breeding_status": "Open",
  • "breeding_stock": false,
  • "coloring": "Black and White",
  • "condition_score": 0,
  • "death_date": null,
  • "deceased_reason": "",
  • "description": "API testing cow",
  • "father_id": null,
  • "gender": "Female",
  • "harvest_label": "lbs",
  • "harvest_unit": "pounds",
  • "is_group": false,
  • "is_neutered": false,
  • "keywords": "cow, breeding stock",
  • "market_price": null,
  • "mother_id": null,
  • "name": "Api Tester",
  • "on_feed": false,
  • "other_tag_number": null,
  • "purchase_date": null,
  • "purchase_price": 0,
  • "purchased": true,
  • "purchased_from_id": null,
  • "registry_number": "12345",
  • "retention_score": 0,
  • "sale_date": null,
  • "status": "Active",
  • "tag_color": "red",
  • "tag_number": "123",
  • "type": "Cow",
  • "internal_id": "",
  • "weight": 500,
  • "height": 50,
  • "electronic_id": "ADE184901-JKLA"
}

List Animals

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve an Animal

Authorizations:
bearerAuth
path Parameters
animal_id
required
string
Example: {{animal_id}}

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "birth_date": "2018-03-01",
  • "birth_weight": 22.7,
  • "bred_date": "2021-09-28",
  • "breed": "Lucky",
  • "breeder_id": null,
  • "breeding_status": "Exposed",
  • "breeding_stock": false,
  • "coloring": "Black and White",
  • "condition_score": 7,
  • "contact_id": "Contact ID",
  • "created_at": "2015-12-20 20:19:11",
  • "death_date": null,
  • "deceased_reason": "",
  • "description": "",
  • "electronic_id": "",
  • "estimated_value": 1975.55,
  • "father_id": "Father ID",
  • "feed": "",
  • "gender": "Female",
  • "group_id": "Basic Group ID",
  • "group_qty": null,
  • "harvest_label": "Pounds",
  • "harvest_unit": "pounds",
  • "height": 50,
  • "internal_id": "",
  • "is_group": false,
  • "is_neutered": false,
  • "keywords": "",
  • "market_price": 3.5,
  • "measurement_date": null,
  • "mother_id": null,
  • "name": "API Cow",
  • "on_feed": false,
  • "other_tag_number": "USDA tag",
  • "purchase_date": "2018-08-01",
  • "purchase_price": 27,
  • "purchased": true,
  • "purchased_from_id": "Contact ID",
  • "registry_number": "",
  • "retention_score": 7,
  • "sale_date": null,
  • "sale_price": null,
  • "sold_to": null,
  • "status": "Active",
  • "tag_color": "cyan",
  • "tag_number": "157",
  • "type": "Cow",
  • "updated_at": "2022-01-18 21:10:57",
  • "weight": 1600
}

Update an Animal

Authorizations:
bearerAuth
path Parameters
animal_id
required
string
Example: {{animal_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "type": "Bull"
}

Delete an Animal

Authorizations:
bearerAuth
path Parameters
animal_id
required
string

Responses

Animals & Livestock > Feedings

Feedings are embedded resources that are used by a variety of core resources. You can access feedings for resources:

  • Livestock /animals
  • Livestock Groups /livestock_groups

To create or access feedings for a record, simply append '/feedings' to the end of the resource path. For example: [GET] /animals/:animal_id/feedings will fetch the records for the animal (based on the id provided).

Create a Feeding

Create a feeding record

Parameters

amount REQUIRED

Numeric value representing the amount fed in the unit provided or a compatible unit of the inventory type (if supplying an inventory_id)


cost OPTIONAL

Cost of feeding, this will be automatically calculated if supplying an inventory_id


date OPTIONAL

The date of the feeding. Defaults to today - formatted as YYYY-MM-DD


description OPTIONAL

Description of the feeding


inventory_id OPTIONAL

The Farmbrite ID for the inventory record to associate with this feeding. If supplied Farmbrite will try to deduct the amount of the feeding from the inventory.


inventory_location_id OPTIONAL

The location of the inventory to use. Required when supplying an inventory_id


unit OPTIONAL

The unit of the feeding. If supplying an inventory_id this must be compatible with the inventory units. Support values are:

"Quantity", "Ounces", "Pounds", "Tons", "Grams", "Kilograms", "Tonnes"


per_head OPTIONAL

Boolean value used when creating a feeding for a livestock group. If true will create a duplicate feeding for each animal in the group using the values you provide. If set to false will split the amount evenly across each animal in the group.

Defaults to false

Authorizations:
bearerAuth
path Parameters
resource_name
required
string

animals or livestock_groups

resource_id
required
string

animal id or livestock group id

header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "amount": 100,
  • "cost": 200,
  • "date": "2022-03-20",
  • "description": "API Feeding",
  • "inventory_id": "Inventory ID",
  • "inventory_location_id": "Inventory Location ID",
  • "unit": "pounds",
  • "per_head": false
}

List Feedings

Authorizations:
bearerAuth
path Parameters
resource_name
required
string

animals or livestock_groups

resource_id
required
string

animal id or livestock group id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Feeding

Authorizations:
bearerAuth
path Parameters
resource_name
required
string

animals or livestock_groups

resource_id
required
string

animal id or livestock group id

feeding_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "amount": 100,
  • "animal_count": null,
  • "cost": 200,
  • "created_at": "2022-03-20 19:15:25",
  • "created_by": "User",
  • "date": "2022-03-20",
  • "description": "API Feeding",
  • "group_id": null,
  • "inventory_amount": 2,
  • "inventory_id": "Inventory ID",
  • "inventory_location_id": "Inventory Location ID",
  • "inventory_lot_id": "Inventory Lot ID",
  • "parent_id": null,
  • "per_head": false,
  • "type": "50lb Bag Of Feed",
  • "unit": "pounds",
  • "updated_at": "2022-03-20 19:15:25",
  • "weight": 100
}

Update a Feeding

Authorizations:
bearerAuth
path Parameters
resource_name
required
string

animals or livestock_groups

resource_id
required
string
feeding_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "amount": 150
}

Delete a Feeding

Authorizations:
bearerAuth
path Parameters
resource_name
required
string

animals or livestock_groups

resource_id
required
string
feeding_id
required
string

Responses

Animals & Livestock > Grazings

Grazing records track the grazing history of animals or livestock groups. You can access grazings for resources:

  • Livestock /animals
  • Livestock Groups /livestock_groups

To move an animal or livestock group to a different grazing location simply append '/grazings' to the end of the resource path. For example: [POST] /animals/:animal_id/grazings to move the animal and create a new grazing record.

When an animal is moved to a new location the prior grazing record will be also automatically updated to indicated the animal left that location.

Create Grazing (Move Animal/Group)

Move an animal or livestock group grazing location

Parameters

location_id REQUIRED

The ID of the grow_location to move the animal or livestock group to


date OPTIONAL

The date of the change in location. Defaults to today.

Authorizations:
bearerAuth
path Parameters
resource_name
required
string

animals or livestock_groups

resource_id
required
string

animal id or livestock_group id

header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "location_id": "Grow Location ID",
  • "date": "2022-01-20"
}

List Grazings

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Animals & Livestock > Livestock Groups

Livestock groups are a collection of animals, either based on dynamic filters (smart groups), manually added animals (basic groups) or a set of animals (like a flock of chickens). Livestock groups are useful when wanting to easily apply treatments, feedings, notes, grazing movements or other actions across animals in a group.

Retrieve an Group

Authorizations:
bearerAuth
path Parameters
livestock_group_id
required
string
Example: {{livestock_group_id}}

Responses

Response samples

Content type
application/json
{
  • "name": "Female Cows",
  • "type": "Smart",
  • "member_count": 5,
  • "id": "GUID",
  • "filters": "{..}",
  • "records": [
    ]
}

List Groups

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Animals & Livestock > Measurements

Create a Measurement

Create a livestock measurement.

Parameters

condition_score OPTIONAL

Numeric value used to track body condition score or breed specific scores. Often used for identifying key breeding candidates or for culling.


date OPTIONAL

Date of measurement. Defaults to the current date if not provided. - formatted as YYYY-MM-DD


famacha OPTIONAL

A numeric value, FAMACHA score typically a value between 1-5 used to track anemia in small ruminants like goats and sheep


fec OPTIONAL

A numeric value, fecal egg count (FEC) indicates the number of worm eggs in feces and is used to monitor the worm burden in livestock.


height OPTIONAL

The numeric value of the current height in either inches or centimeters (depending on your account settings).


temp OPTIONAL

The numeric value (in either Fahrenheit or centigrade, based on your account settings) of animals temperature at the time of measurement.


weight OPTIONAL

The numeric value of animals current weight in either pounds or kilograms (depending on your account settings).


flagged OPTIONAL

A boolean (true or false) value indicating if the measurement requires follow-up.


air_quality_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal environmental Air Quality


appetite_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Appetite Level


area_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal environmental rating for Area Cleanliness


area_moisture_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal environmental rating for Moisture Level


area_temp_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal environmental rating for Temperature


body_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Body Condition


cleanliness_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Cleanliness


ears_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Ear


energy_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Energy Level


eyes_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Eyes


feet_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Feet/Hooves


gi_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Gastrointestinal


handling_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Ease of Handling


heart_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Heart Health


hydration_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Water Consumption


insect_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal environmental rating for Insect Activity


lung_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Lungs Health


mobility_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Mobility


mouth_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Mouth


nose_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Nose


social_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Sociability


strength_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Strength


stress_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Stress Level


teeth_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Teeth


urogenital_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal Urogenital


water_grade OPTIONAL
A numeric value between 1-5 for assessment rating of animal environmental rating for Water Cleanliness

Authorizations:
bearerAuth
path Parameters
animal_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "height": 0,
  • "date": "2022-01-01",
  • "weight": 500,
  • "condition_score": null,
  • "fec": null
}

List Measurements

Authorizations:
bearerAuth
path Parameters
animal_id
required
string
Example: {{animal_id}}

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Measurement

Authorizations:
bearerAuth
path Parameters
animal_id
required
string
Example: {{animal_id}}
measurement_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "condition_score": null,
  • "created_at": "2022-01-14 21:48:19",
  • "created_by": "User",
  • "date": "2022-01-14",
  • "fec": null,
  • "height": null,
  • "temp": null,
  • "updated_at": "2022-01-14 21:48:19",
  • "weight": 1600
}

Update a Measurement

Authorizations:
bearerAuth
path Parameters
animal_id
required
string
measurement_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "weight": 500,
  • "condition_score": 4
}

Delete a Measurement

Authorizations:
bearerAuth
path Parameters
animal_id
required
string
measurement_id
required
string

Responses

Climate

Climate > Gauges

Climate Gauges are used to track the location of climate and enviromental data recorded (Climate Logs). Each gauage can represent a physical or logcial area of your propery where you want to track climate data.

Create a Gauge

Create a climate gauge

Parameters

description OPTIONAL

A note or summary for the gauge


electronic_id OPTIONAL

Electronic ID - useful to set if using an RFID or barcode scanner to search for for sync data with Farmbrite.


latitude OPTIONAL

The latitude of gauge location


longitude OPTIONAL

The latitude of gauge location


name OPTIONAL

The name or title for the gauge


place_id OPTIONAL

The map location ID (animal enclosure, building, etc) that the gauge is located


plot_id OPTIONAL

The plot or grow location ID that the gauge is located


Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "description": "",
  • "latitude": null,
  • "longitude": null,
  • "name": "Sensor 1A",
  • "place_id": null,
  • "plot_id": "Plot ID"
}

List Climate Gauges

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "cached": false,
  • "message": "",
  • "total_records": 1,
  • "current_page": 1,
  • "limit": 25,
  • "total_pages": 1,
  • "data": [
    ]
}

Retrieve a Gauage

Authorizations:
bearerAuth
path Parameters
gauge_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "Gauge ID",
  • "created_at": "2023-03-17 21:39:58",
  • "description": "",
  • "latitude": null,
  • "longitude": null,
  • "name": "Sensor 1A",
  • "place_id": null,
  • "plot_id": "Plot ID",
  • "updated_at": "2023-03-17 21:39:58"
}

Update a Gauge

Authorizations:
bearerAuth
path Parameters
gauge_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "name": "Gauge 001A"
}

Delete a Gauge

Authorizations:
bearerAuth
path Parameters
gauge_id
required
string

Responses

Climate > Logs

Climate Logs allow you to capture climate and enviromental data about areas of your farm. Each Climate Log can be associated with a Gauge ID the record the specific location of the measurement.

Create a Log

Create a climate log record

Parameters

co2 OPTIONAL

Numeric value for CO2 level measured


date OPTIONAL

The date the note was captured. Defaults to today.


description OPTIONAL

A note or summary for the measurement, if applicable


gauge_id OPTIONAL

The Farmbrite Climate Gauge ID that this measurement is associated with. If not provided the Climate Log is assume to be a general measurement for your location.


humidity OPTIONAL

Numeric value for humidity level measured


light_level OPTIONAL

Numeric value for light_level (lux/lumens) level measured


moisture OPTIONAL

Numeric value for moisture level measured


prcp OPTIONAL

Numeric value for precipitation level measured


soil_temp OPTIONAL

Numeric value for soil temperature level measured


temp OPTIONAL

Numeric value for air temperature level measured


min_temp OPTIONAL

Numeric value for minimum temperature measured


max_temp OPTIONAL

Numeric value for maximum temperature measured


wind OPTIONAL

Numeric value for wind speed level measured typically in mph or mps


Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "co2": null,
  • "date": "2023-03-17",
  • "description": "logged",
  • "gauge_id": "Guage ID",
  • "humidity": null,
  • "light_level": null,
  • "moisture": null,
  • "prcp": 5,
  • "soil_temp": null,
  • "temp": 30,
  • "wind": null
}

List Climate Logs

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "cached": false,
  • "message": "",
  • "total_records": 7,
  • "current_page": 1,
  • "limit": 25,
  • "total_pages": 1,
  • "data": [
    ]
}

Retrieve a Log

Authorizations:
bearerAuth
path Parameters
log_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "co2": null,
  • "created_at": "2023-03-17 21:56:36",
  • "created_by": null,
  • "created_by_id": null,
  • "date": "2023-03-17",
  • "description": "logged",
  • "gauge_id": "Guage ID",
  • "humidity": null,
  • "light_level": null,
  • "moisture": null,
  • "prcp": 5,
  • "soil_temp": null,
  • "temp": 30,
  • "updated_at": "2023-03-17 21:56:36",
  • "wind": null
}

Update a Log

Authorizations:
bearerAuth
path Parameters
log_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "temp": 451
}

Delete a Log

Authorizations:
bearerAuth
path Parameters
log_id
required
string

Responses

Contacts

A contact is any person or company that you want to track in the system. They can be linked to various other resources like livestock and orders.

Create a Contact

Create a contact

Parameters

first_name OPTIONAL

The first name of the contact


"last_name** OPTIONAL

The last name of the contact


"type** OPTIONAL

An enum value representing the contact type. Supported options are:

'Auditor', 'Breeder', 'Buyer', 'Certifier', 'Contact', 'Consultant', 'Contractor', 'Customer', 'Employee', 'Purchaser', 'Supplier', 'Vendor', 'Veterinarian', 'Wholesale Customer'


"email** OPTIONAL

A properly formatted email address for the contact


"label** OPTIONAL

A string label or tag used to easily search for similar contact


"phone** OPTIONAL

Primary phone number


"cell** OPTIONAL

Mobile phone number


"fax** OPTIONAL

Fax phone number


"company** OPTIONAL

Name of the company that the contact works for


"description** OPTIONAL

A text description or summary of the contact


"address** OPTIONAL

Address information. Should be provided as follows, using the 2 character ISO country code:

"address": {
"country": "us",
"street": "PO Box 123",
"city": "Boulder",
"state": "CO",
"postal": "80301"
}

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "type": "Contact",
  • "first_name": "Bob",
  • "last_name": "Surname",
  • "email": "email@email.com",
  • "label": "",
  • "phone": "5558675309",
  • "cell": null,
  • "fax": null,
  • "company": "",
  • "description": "",
  • "address": {
    }
}

List Contacts

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "cached": false,
  • "message": "",
  • "total_records": 117,
  • "current_page": 1,
  • "limit": 25,
  • "total_pages": 5,
  • "data": [
    ]
}

Retrieve a Contact

Authorizations:
bearerAuth
path Parameters
contact_id
required
string
Example: {{contact_id}}

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "cell": null,
  • "company": "Farmbrite",
  • "created_at": "2018-05-17 00:05:08",
  • "description": "",
  • "do_not_mail": false,
  • "email": "hello@farmbrite.com",
  • "fax": null,
  • "first_name": "Bob",
  • "label": "",
  • "last_name": "Jones",
  • "phone": "8675309",
  • "type": "Contact",
  • "updated_at": "2021-08-06 17:46:10",
  • "address": {
    }
}

Update a Contact

Authorizations:
bearerAuth
path Parameters
contact_id
required
string
Example: {{contact_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "first_name": "Robert",
  • "company": "Acme Co."
}

Delete a Contact

Authorizations:
bearerAuth
path Parameters
contact_id
required
string

Responses

Crops & Plantings

Plant types represent the basic details of your crops, including the type of plant, variety and default configuration details for plantings that you create from this type of plant through the Farmbrite app / UI.

Create a Plant Type

Create a plant type

Parameters

type REQUIRED

Type of plant/crop. For example; Carrot, Tomato, Hops, Corn, etc


days_to_maturity OPTIONAL

Numeric value for days to maturity (DTM). For direct sow plantings this is the days from planting to harvest, for transplants it's the days from planting in the ground to harvest.


spacing OPTIONAL

Inches/Centimeter (based on account setting) spacing between plants


row_spacing OPTIONAL

Inches/Centimeter (based on account setting) spacing between rows


description OPTIONAL

Text description of the plant type


harvest_unit OPTIONAL

The unit used to record harvests for this plant type. Supported values are any of the following:

"Bales", "Barrels", "Bunches", "Bushels", "Dozen", "Fluid Ounces", "Gallons", "Grams", "Head", "Kilograms", "Kiloliter", "Liter", "Milliliter", "Ounces", "Pounds", "Quantity", "Quarts", "Tonnes", "Tons"

The default is to store harvests as Quantity


is_perennial OPTIONAL

Boolean value for if plant type if perennial or not. Defaults to false.


market_price OPTIONAL

Estimated / average market value for each harvest unit. Used to estimate harvest revenues.


planting_method OPTIONAL

Default planting method. Supported options are:

"Direct Sow", "Start in Trays, Transplant in Ground", "Transplant", "Container", "Root Stock", "Bulbs", "Grafting","Other"


seed_company OPTIONAL

Default seed company to be set for each new planting created from this plant type.


variety OPTIONAL

Plant variety, for example: Beef master, Russet, etc.


weeks_before_frost OPTIONAL

The number of weeks before the last frost that seeds should be started in trays or direct sown (depending on planting method)


days_to_emerge OPTIONAL

How many days (numeric value) for the plant to germinate on average


days_to_flowerOPTIONAL

How many days (numeric value) for the plant to flower on average


loss_rate OPTIONAL

A numeric value between 0-100 that represents the estimated percent of plants lost from seed to harvest. This is used when calculating estimated yields.


internal_id OPTIONAL

Custom text for internal ID used to identify the plant type


light_profile OPTIONAL

Ideal light profile for plant type. Supported options are:

"Full Sun", "Full to Part Sun", "Partial Sun", "Sun to Part Shade", "Partial Shade", "Full Shade"


soil_conditions OPTIONAL

Ideal soil conditions for plant type. Supported options are:

"Chalky", "Clay", "Loamy", "Peaty", "Sandy", "Silty"


planting_depth OPTIONAL

Text describing planting depth for seeds. For example 3/4" or 1-2 inches.


direct_sow OPTIONAL

Boolean value indicating if plant type is direct sow or not.


start_indoors OPTIONAL

Boolean value indicating if plant type should be started indoors or not.


yield_per_100_ft OPTIONAL

The average or expected yield (in harvest units) per 100 foot of plantings. This is used to estimate the expected yield for a planting when planting in beds.


yield_per_area OPTIONAL

The average or expected yield (in harvest units) per Acre/Hectare (based on account setting). This is used to estimate the expected yield for a planting when planting by area, not in a bed.


botanical_name OPTIONAL

Scientific / botanical name of the plant type.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "days_to_maturity": 20,
  • "description": "",
  • "harvest_unit": "pounds",
  • "is_perennial": false,
  • "market_price": 4,
  • "planting_method": "Direct Sow",
  • "seed_company": "",
  • "spacing": 2,
  • "type": "Plant Type",
  • "variety": "Variety",
  • "weeks_before_frost": 4,
  • "days_to_emerge": 30,
  • "internal_id": "Custom ID",
  • "light_profile": "Full Sun",
  • "planting_depth": "1/2 an inch",
  • "row_spacing": 6,
  • "direct_sow": true,
  • "start_indoors": false,
  • "yield_per_100_ft": 100,
  • "yield_per_area": 30000,
  • "botanical_name": "Botanical Name"
}

List Plant Types

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Plant Type

Authorizations:
bearerAuth
path Parameters
plant_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "botanical_name": "",
  • "created_at": "2017-01-15 16:28:15",
  • "days_to_emerge": 30,
  • "days_to_maturity": 60,
  • "description": "",
  • "harvest_unit": "pounds",
  • "harvest_window": 90,
  • "internal_id": "CARORG",
  • "is_perennial": false,
  • "light_profile": "",
  • "loss_rate": 25,
  • "market_price": 3.5,
  • "planting_depth": "1",
  • "planting_method": "Direct Sow",
  • "row_spacing": 1.5,
  • "spacing": 1,
  • "type": "Carrot",
  • "type_key": null,
  • "updated_at": "2022-04-27 16:16:03",
  • "variety": "Orange",
  • "weeks_before_frost": 10,
  • "yield_per_100_ft": 100,
  • "yield_per_area": 30000
}

Update a Plant Type

Authorizations:
bearerAuth
path Parameters
plant_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "days_to_maturity": 25,
  • "spacing": 4
}

Delete a Plant Type

Authorizations:
bearerAuth
path Parameters
plant_id
required
string

Responses

Crops & Plantings > Crop Plantings

Plantings store all the details about your plantings, including the plant type, the grow location, spacing, harvest details and more. You can access plantings directly by using the planting ID or you can access just the plantings for a grow location by treating the plantings as a nested resource for the grow location.

For example, the following request fetches current plantings for a grow location

Example cURL request authenticating with a PAT

curl https://api.farmbrite.com/v1/grow_locations/:location_id/crops \
  -H "Authorization: Bearer ACCESS_TOKEN"

Access

Create a Crop Planting

Create a planting

Parameters

plant_id REQUIRED

The Farmbrite unique ID of the plant type


plot_id REQUIRED

The Farmbrite unique ID of the grow location


bed_id OPTIONAL

The Farmbrite unique ID of the bed. Required if planting in beds


planting_method OPTIONAL

Planting method. Supported options are:

"Direct Sow", "Start in Trays, Transplant in Ground", "Transplant", "Container", "Root Stock", "Bulbs", "Grafting","Other"


qty OPTIONAL

The number of plants in this planting


spacing OPTIONAL

Inches/Centimeter (based on account setting) spacing between plants


row_count OPTIONAL

How many rows are planted


row_spacing OPTIONAL

Inches/Centimeter (based on account setting) spacing between rows


planting_length OPTIONAL

The length of the planting in feet or meters (depending on account setting)


date_planted OPTIONAL

Date planted


cost OPTIONAL

Estimated or actual cost of planting (depending on how you want to estimate ROI)


date_planned_harvest OPTIONAL

The date planned to harvest


date_seed_started OPTIONAL

The date seeds where / should be started


expected_harvest OPTIONAL

Numeric amount expected to be harvested in the harvest unit of the plant type.


growth_stage OPTIONAL

The current growth stage of the planting. Supported options are:

"Seed Started", "Germination", "Seedling", "Vegetative", "Flowering" , "Ripening"


instructions OPTIONAL

Planting directions or instructions.


lot_number OPTIONAL

Lot number of seed packet


number_of_trays OPTIONAL

The number of trays used for the planting (if planting in trays)


origin OPTIONAL

Seed origin, typically found on the seed packet.


seed_company OPTIONAL

Seed company


seed_type OPTIONAL

Seed type. Available options are:

"Conventional", "GMO", "Heirloom", "Hybrid", "Organic"


starts_per_tray OPTIONAL

How many starts per each tray.


tray_ids OPTIONAL

Comma delimited list of tray numbers or ID numbers for the trays containing this planting


rootstock_source OPTIONAL

For rootstock plantings, the source/origin of the roostock


rootstock_source OPTIONAL

For rootstock plantings, the source/origin of the roostock


rootstock_variety OPTIONAL

For rootstock plantings, the variety of the roostock. Available options are:

"Very-dwarf", "Dwarf", "Semi-drawf", "Half-standard", "Semi-standard", "Standard", "Semi-vigorous", "Vigorous"


rootstock_age OPTIONAL

For rootstock plantings, a string value for the age of the rootstock.


electronic_id OPTIONAL

Electronic ID - useful to set if using an RFID or barcode scanner to search for for sync data with Farmbrite.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "bed_id": "Bed ID",
  • "date_planned_harvest": "2022-02-16",
  • "date_planted": "2021-03-10",
  • "date_seed_started": "2021-03-10",
  • "expected_harvest": 45.42,
  • "growth_stage": "Germination",
  • "instructions": null,
  • "lot_number": "",
  • "number_of_trays": 3,
  • "origin": "",
  • "plant_id": "Plant Type ID",
  • "planting_length": 100,
  • "planting_method": "Start in Trays, Transplant in Ground",
  • "plot_id": "Grow Location ID",
  • "qty": 400,
  • "row_count": 1,
  • "row_spacing": 6,
  • "seed_company": "",
  • "seed_type": "",
  • "spacing": 2,
  • "starts_per_tray": 64,
  • "tray_ids": "123,456,789"
}

List Crop Plantings

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Crop Planting

Authorizations:
bearerAuth
path Parameters
crop_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "bed_id": "Bed ID",
  • "count_flowering": null,
  • "count_germination": 500,
  • "count_ripening": null,
  • "count_seed_started": 600,
  • "count_seedling": null,
  • "count_vegetative": null,
  • "created_at": "2021-05-10 14:49:59",
  • "date_flowering": null,
  • "date_germination": "2022-01-11",
  • "date_planned_harvest": "2022-02-16",
  • "date_planted": "2021-03-10",
  • "date_ripening": null,
  • "date_seed_started": "2021-03-10",
  • "date_seedling": null,
  • "date_vegetative": null,
  • "expected_harvest": 45.42,
  • "growth_stage": "Germination",
  • "instructions": null,
  • "lot_number": "",
  • "number_of_trays": 3,
  • "origin": "",
  • "parent_id": null,
  • "plant_id": "Plant Type ID",
  • "planting_length": 100,
  • "planting_method": "Start in Trays, Transplant in Ground",
  • "plot_id": "Grow Location ID",
  • "qty": 400,
  • "row_count": 1,
  • "row_spacing": 6,
  • "row_spacing_unit": "Inches",
  • "seed_company": "",
  • "seed_type": "",
  • "spacing": 2,
  • "spacing_unit": "Inches",
  • "starts_per_tray": 64,
  • "tray_ids": "123,456,789",
  • "updated_at": "2022-01-12 23:15:12"
}

Update a Crop Planting

Authorizations:
bearerAuth
path Parameters
crop_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "date_planned_harvest": "2022-02-16",
  • "date_planted": "2021-03-10",
  • "qty": 400,
  • "spacing": 3,
  • "spacing_unit": "Inches"
}

Delete a Crop Planting

Authorizations:
bearerAuth
path Parameters
crop_id
required
string

Responses

Files

List Files

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Harvests

Harvests/yields are embedded resources that are used by a variety of different core resources. Specifically you can access treatments for resources:

  • Livestock /animals
  • Plantings /crops

To create or access harvests for a record, simply append '/treatments' to the end of the resource path. For example: [GET] /animals/:animal_id/harvests will fetch the harvests for this animal.

Create a Harvest

Create a harvest record

Parameters

qty REQUIRED

A positive numeric value for the amount harvested (in the harvest unit supplied)


unit REQUIRED

The unit of the harvest. This should match the parent resource harvest_unit.


date OPTIONAL

Date of the harvest, defaults to today


batch_number OPTIONAL

An optional string value representing the batch number for the harvest. Useful if grouping multiple harvests into a single batch for future identification.


description OPTIONAL

Details or summary about the harvest


grade OPTIONAL

An optional string grade for the harvest. For example: Prime, AA, Jumbo, etc.


price OPTIONAL

An optional positive numeric value representing the current market value of the harvest. This is used to calculate estimated revenue for the harvest.


trace_number OPTIONAL

An optional string to identify the unique harvest information for traceability. If left blank, the system will automatically generate a trace number when creating a new harvest record.

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "batch_number": null,
  • "date": "2022-01-02",
  • "description": null,
  • "grade": "AA",
  • "price": null,
  • "qty": 99,
  • "unit": "Pounds",
  • "trace_number": "867-53-0986753098675309"
}

List Harvests

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Harvest

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}
harvest_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "batch_number": null,
  • "created_at": "2022-09-17 19:39:36",
  • "created_by": "USER",
  • "date": "2022-09-17",
  • "description": null,
  • "grade": "AA",
  • "inventory_added": null,
  • "inventory_date": null,
  • "inventory_id": null,
  • "inventory_lot_id": null,
  • "loss_reason": null,
  • "price": null,
  • "qty": 99,
  • "record_type": "crop",
  • "record_id": "65a720572ba8ef1844234a99",
  • "record_name": "Beets, Funky (100 Acre Woods)",
  • "trace_number": "867-53-0986753098675309",
  • "unit": "quantity",
  • "updated_at": "2022-09-17 19:39:36",
  • "yield_rate": null
}

Update a Harvest

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
harvest_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "qty": 10,
  • "grade": "A"
}

Delete a Harvest

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
harvest_id
required
string

Responses

Inventory

Inventory types are the base objects for tracking inventory. They store the primary record that all inventory history, location details and tracking are associated with.

Create an Inventory Type

Create an inventory type

Parameters

name REQUIRED

The name or primary label for this type of inventory


unit REQUIRED

The unit that inventory is stored in.

"Bales", "Barrels", "Bunches", "Bushels", "Dozen", "Fluid Ounces", "Gallons", "Grams", "Head", "Kilograms", "Kiloliter", "Liter", "Milliliter", "Ounces", "Pounds", "Quantity", "Quarts", "Tonnes", "Tons"

Defaults to Quantity


alert_amount OPTIONAL

Numeric value that when inventory level goes below will trigger an inventory alert notices in app and to the alert_email specified.


alert_email OPTIONAL

The email address to send inventory alerts to.


days_expires OPTIONAL

Optional numeric value for the number of days that new inventory is valid for storage before triggering an expired inventory alert.


description OPTIONAL

Text description or summary of the inventory type


internal_id OPTIONAL

Custom identification number or SKU used to identify this inventory item


electronic_id OPTIONAL

Electronic ID - useful to set if using an RFID or barcode scanner to search for for sync data with Farmbrite.


product_id OPTIONAL

Optional Farmbrite product ID to allow you to link this inventory type to a product in your shop


track_lots OPTIONAL

Boolean value to indicate if new inventory added should create a new lot number. Defaults to false.


type OPTIONAL

Inventory type, variety or other attribute to specify details about this inventory type.


unit_value OPTIONAL

Numeric value used to indicate the approximate value (in your account currency) for each unit of inventory.


unit_weight OPTIONAL

Numeric value for the weight of each inventory item in pounds or kilograms (based on your account settings).

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "alert_amount": 10,
  • "alert_email": "user@email.com",
  • "days_expires": 90,
  • "description": "",
  • "internal_id": "",
  • "name": "Cattle Feed",
  • "product_id": "",
  • "track_lots": false,
  • "type": "Custom Blend",
  • "unit": "tons",
  • "unit_value": 1000,
  • "unit_weight": 100
}

Add Inventory

Add inventory to a warehouse / inventory location. Response returns the details of the inventory adjustment, including lot ID and lot number (if applicable).

The response provide a history record including details about the lot (if applicable) as well as total quantity remaining and the amount remaining for the inventory location (warehouse/bin).

Parameters

warehouse_id REQUIRED

The Farmbrite warehouse_id for the warehouse where you are adjusting inventory amounts.


adjustment REQUIRED

A positive numeric value for the amount of inventory to add.


bin_id OPTIONAL

The Farmbrite warehouse_bin_id where you are adjusting inventory amounts (if applicable)


lot_number OPTIONAL

The lot number to add/remove inventory from. If this value is left blank and you are tracking lots for an inventory type a new lot number will be generated when inventory is added if this value is left blank.


description OPTIONAL

A summary of the reason for the inventory change.


date OPTIONAL

The date that the inventory adjustment occurred. Defaults to today.


source OPTIONAL

A string that includes the details about where new inventory was sourced from.


harvest_source_type OPTIONAL

If adding a harvest to inventory, use this property and harvest_source_id and harvest_id to link the harvest record to the inventory log. Available options are:

"animal", "crop"


harvest_source_id OPTIONAL

The Farmbrite record ID (livestock or planting) that the harvest is sourced from. If adding a harvest to inventory, use this property along with harvest_source_type and harvest_idto link the harvest record to the inventory log.


harvest_id OPTIONAL

The Farmbrite harvest_id to associate this change with. If adding a harvest to inventory, use this property and harvest_source_id and harvest_source_type to link the harvest record to the inventory log.

Authorizations:
bearerAuth
path Parameters
inventory_type_id
required
string
Example: {{inventory_type_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "warehouse_id": "{{warehouse_id}}",
  • "bin_id": null,
  • "lot_number": null,
  • "description": "Api Adjustment",
  • "adjustment": 100,
  • "date": "2023-11-01",
  • "source": "API",
  • "harvest_source_type": null,
  • "harvest_source_id": null,
  • "harvest_id": null
}

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "created_at": "2023-10-18 04:21:42",
  • "date_added": "2022-04-01",
  • "harvest_id": null,
  • "harvest_source_id": null,
  • "harvest_source_type": null,
  • "lot_number": "Lot1",
  • "original_qty": 100,
  • "qty_remaining": 200,
  • "source": "API",
  • "updated_at": "2023-10-18 04:21:50",
  • "total_qty_remaining": 200,
  • "location_qty_remaining": 200
}

Remove Inventory

Remove inventory from a warehouse / inventory location. Response returns the details of the inventory adjustment, including lot ID and lot number (if applicable).

The response will include quantity details about the lot (if applicable) as well as total quantity remaining and the amount remaining for the inventory location (warehouse/bin).

Parameters

warehouse_id REQUIRED

The Farmbrite warehouse_id for the warehouse where you are adjusting inventory amounts.


adjustment REQUIRED

A positive numeric value for the amount of inventory to remove.


bin_id OPTIONAL

The Farmbrite warehouse_bin_id where you are adjusting inventory amounts (if applicable)


lot_number OPTIONAL

The lot number to remove inventory from. If this value is left blank and you are tracking lots for an inventory type a new lot number will be generated when inventory is added if this value is left blank.


description OPTIONAL

A summary of the reason for the inventory change.


date OPTIONAL

The date that the inventory adjustment occurred. Defaults to today.


order_id OPTIONAL

The Farmbrite order_id to associate the change in inventory to. Most often used when picking inventory for a specific order.

Authorizations:
bearerAuth
path Parameters
inventory_type_id
required
string
Example: {{inventory_type_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "warehouse_id": "{{warehouse_id}}",
  • "bin_id": null,
  • "lot_number": null,
  • "description": "Api Adjustment",
  • "adjustment": 50,
  • "date": "2022-04-01",
  • "order_id": null
}

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "created_at": "2023-10-18 04:21:42",
  • "date_added": "2022-04-01",
  • "lot_number": "Lot1",
  • "original_qty": 100,
  • "qty_remaining": 150,
  • "updated_at": "2023-10-18 04:27:47",
  • "total_qty_remaining": 150,
  • "location_qty_remaining": 150
}

Retrieve an Inventory Type

Authorizations:
bearerAuth
path Parameters
inventory_type_id
required
string
Example: {{inventory_type_id}}

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "alert_amount": 10,
  • "alert_email": "user@email.com",
  • "created_at": "2022-01-02 00:32:57",
  • "days_expires": 90,
  • "description": "",
  • "internal_id": "",
  • "name": "Cattle Feed",
  • "product_id": "",
  • "projected_empty_date": "2025-06-06 00:00:00",
  • "track_lots": true,
  • "type": "Custom Blend",
  • "unit": "tons",
  • "unit_value": 1000,
  • "unit_weight": "",
  • "updated_at": "2022-02-17 15:55:59",
  • "qty_remaining": 50
}

Update an Inventory Type

Authorizations:
bearerAuth
path Parameters
inventory_type_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "internal_id": "Inv99"
}

Delete an Inventory Type

Authorizations:
bearerAuth
path Parameters
inventory_type_id
required
string

Responses

List Inventory Types

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

List Inventory Type Inventory

Authorizations:
bearerAuth
path Parameters
inventory_type_id
required
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Mapped Places

Places represent polygon shapes that are included on your farm map. They can be used to document grow locations, buildings, irrigation, animal enclosures, property boundaries or any other area you want to map. Places can be linked to grow locations, beds and warehouses.

Create a Place

Create a place

Parameters

type REQUIRED

The type of place. Standard options are:

  • Property Boundary
  • Animal Enclosure
  • Bed
  • Buffer Zone
  • Building
  • Field
  • Growing Enclosure
  • Irrigation
  • Other

Custom options are also allowed


title OPTIONAL

The name or title for this mapped place. Required if not linking to a grow location, bed or warehouse.


map_coords OPTIONAL

A JSON stringified array of polygon / coordinate objects, each including a lat and lng value.

For example:

"[{"lat":40.200893095255765,"lng":-105.17513049468994},{"lat":40.2006964261442,"lng":-105.17536652908325},{"lat":40.20045468624636,"lng":-105.17511976585388},{"lat":40.200606285944076,"lng":-105.17487300262451}]"


sqft OPTIONAL

A numeric value for the square feet of the area being mapped. This is used for calculating planting area if linked to a grow location or bed.


z_index OPTIONAL

A numeric value indicating the z-index or layer position of the mapped polygon.


color OPTIONAL

A hex value for the color of the polygon, including the #.

For example: '#000000' would be a black polygon.

If blank and specificity a standard place type a default color will be set.


plot_id OPTIONAL

The grow location id this place belongs to if, if applicable. Required if providing a bed id.


bed_id OPTIONAL

The bed id this place belongs to if, if applicable.


warehouse_id OPTIONAL

The warehouse id this place belongs to if, if applicable.


Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "color": "#000000",
  • "map_coords": "[{\"lat\":40.200893095255765,\"lng\":-105.17513049468994},{\"lat\":40.2006964261442,\"lng\":-105.17536652908325},{\"lat\":40.20045468624636,\"lng\":-105.17511976585388},{\"lat\":40.200606285944076,\"lng\":-105.17487300262451}]",
  • "sqft": 10968,
  • "title": "From API",
  • "type": "Animal Enclosure",
  • "z_index": 1
}

List Places

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Place

Authorizations:
bearerAuth
path Parameters
place_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "PLACE ID",
  • "bed_id": null,
  • "color": "#000000",
  • "created_at": "2022-05-11 22:28:49",
  • "map_coords": "[{\"lat\":40.200893095255765,\"lng\":-105.17513049468994},{\"lat\":40.2006964261442,\"lng\":-105.17536652908325},{\"lat\":40.20045468624636,\"lng\":-105.17511976585388},{\"lat\":40.200606285944076,\"lng\":-105.17487300262451}]",
  • "plot_id": null,
  • "sqft": 10968,
  • "title": "From API",
  • "type": "Animal Enclosure",
  • "updated_at": "2022-05-11 22:29:19",
  • "warehouse_id": null,
  • "z_index": 1
}

Update a Place

Authorizations:
bearerAuth
path Parameters
place_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "title": "Updated from API"
}

Delete a Place

Authorizations:
bearerAuth
path Parameters
place_id
required
string

Responses

Notes

Notes are embedded resources that are used by a variety of core resources. Specifically you can access notes for resources:

  • Livestock /animals

  • Livestock Groups (Create Only) /livestock_groups

  • Grow Locations /plots

  • Plant Types /plants

  • Plantings /crops

  • Equipment /tools

  • Inventory Types /inventory_types

To create or access notes for a record, simply append '/notes' to the end of the resource path.

For example: [GET] /animals/:animal_id/notes will fetch the notes for this animal (based on animal id). and [POST] /animals/:animal_id/notes will add a note to this animal.

Create a Note

Create a note

Parameters

description REQUIRED

The contents of the note that you want to record for the parent resource


date OPTIONAL

The date the note was captured. Defaults to today.


category OPTIONAL

The category for the note. For example, for livestock you might use one of the following categories:

"Breeding", "Deworming", "General", "Grazing"," Grooming", "Injury", "Medication"," Supplement", Vaccination", "Veterinarian", "Other"


keywords OPTIONAL

A comma delimited list of keywords, tags or labels to easily search for similar notes


longitude OPTIONAL

Longitude of the note location


latitude OPTIONAL

Latitude of the note location

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "date": "2023-08-01",
  • "description": "Note details",
  • "category": "Other",
  • "keywords": "test"
}

Update a Note

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "description": "Note Update"
}

List Notes

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Note

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}
note_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "category": "CATEGORY",
  • "created_at": "2022-03-10 00:22:51",
  • "created_by": "USER",
  • "date": "2022-03-10",
  • "description": "description",
  • "keywords": "",
  • "latitude": null,
  • "longitude": null,
  • "updated_at": "2022-03-10 00:22:51"
}

Delete a Note

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}
note_id
required
string

Responses

Nutrients

Nutrients are embedded resources that are used by a variety of different core resources. Specifically, you can access treatments for resources:

  • Grow Locations /plots
  • Plantings /crops

Nutrient records represent both soil amendments (nutrients added) and soil samples - see details in the Create a Nutrient Record section.

To create or access a nutrient record, simply append '/nutrients' to the end of the resource path. For example: [GET] /crops/:id/nutrients will fetch the nutrient records for this planting.

Create a Nutrient Record

Create a soil sample or amendment record

Parameters

amount OPTIONAL

A string value of the amount applied, for example "1,000 lbs" or "200 gallons"


application_method OPTIONAL

Details about how the amendment was applied, typically one of the following options, but could be a custom value:

"Broadcast", "Compost - Solids", "Compost - Tea", "Granules", "Liquid", "Manure", "Pellets", "Spray", "Other"


boron OPTIONAL

A positive numeric value indicating the amount of boron applied or measured (depending on if this is additive or a sample)


calcium OPTIONAL

A positive numeric value indicating the amount of calcium applied or measured (depending on if this is additive or a sample)


copper OPTIONAL

A positive numeric value indicating the amount of copper applied or measured (depending on if this is additive or a sample)


date OPTIONAL

The date of the amendment or sample. Defaults to today.


iron OPTIONAL

A positive numeric value indicating the amount of iron applied or measured (depending on if this is additive or a sample)


is_additive OPTIONAL

Boolean value indicating is this is an amendment or a soil sample. true indicates that this is an amendment, false a soil sample. Defaults to false.


latitude OPTIONAL

An optional latitude value for the location of the amendment or sample


longitude OPTIONAL

An optional longitude value for the location of the amendment or sample


magnesium OPTIONAL

A positive numeric value indicating the amount of magnesium applied or measured (depending on if this is additive or a sample)


manganese OPTIONAL

A positive numeric value indicating the amount of magnesium applied or measured (depending on if this is additive or a sample)


nitrogen OPTIONAL

A positive numeric value indicating the amount of nitrogen applied or measured (depending on if this is additive or a sample)


ph OPTIONAL

A numeric (float) value for the Ph measured. Typically used with a soil sample.


phosphorus OPTIONAL

A positive numeric value indicating the amount of phosphorus applied or measured (depending on if this is additive or a sample)


potassium OPTIONAL

A positive numeric value indicating the amount of potassium applied or measured (depending on if this is additive or a sample)


product OPTIONAL

Details or name of the product applied, typically used with an amendment.


sulfur OPTIONAL

A positive numeric value indicating the amount of sulfur applied or measured (depending on if this is additive or a sample)


zinc OPTIONAL

A positive numeric value indicating the amount of zinc applied or measured (depending on if this is additive or a sample)

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "amount": null,
  • "application_method": null,
  • "boron": 7,
  • "calcium": 6,
  • "copper": 8,
  • "date": "2022-03-26",
  • "is_additive": false,
  • "iron": 9,
  • "latitude": null,
  • "longitude": null,
  • "magnesium": 4,
  • "manganese": 11,
  • "nitrogen": 1,
  • "ph": 9,
  • "phosphorus": 2,
  • "potassium": 3,
  • "product": null,
  • "sulfur": 5,
  • "zinc": 10
}

List Nutrients

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Nutrient Record

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
nutrient_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "amount": "99",
  • "application_method": "",
  • "boron": 5,
  • "calcium": 6,
  • "copper": 4,
  • "created_at": "2022-09-02 03:38:34",
  • "created_by": "User",
  • "date": "2022-09-02",
  • "iron": 3,
  • "is_additive": true,
  • "latitude": null,
  • "longitude": null,
  • "magnesium": 8,
  • "manganese": 1,
  • "nitrogen": 11,
  • "ph": null,
  • "phosphorus": 10,
  • "potassium": 9,
  • "product": "more sutff",
  • "sulfur": 7,
  • "updated_at": "2022-09-02 03:38:34",
  • "zinc": 2
}

Update a Nutrient Record

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
nutrient_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "description": "Updated Record"
}

Delete a Nutrient Record

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
nutrient_id
required
string

Responses

Photos

Photos are embedded resources that are used by a variety of different core resources. Specifically you can access photos for resources:

  • Livestock /animals
  • Grow Locations /plots
  • Plant Types /plants
  • Plantings /crops
  • Equipment /tools

To create or access photos for a record, simply append '/photos' to the end of the resource path. For example: [GET] /animals/:animal_id/photos will fetch the photos for this animal (based on animal id provided).

Create Photo

Add a photo to a resource.

Parameters

photo_file REQUIRED

A Base64 encoded string representing a photo file. The following file types are supported:

  • gif
  • jpeg
  • png
  • mov
  • mp4
  • m4v
  • avi

And the max file size and number of photos attached to a related resource is limited by your plan type.


longitude OPTIONAL

Longitude of the photo location


latitude OPTIONAL

Latitude of the photo location

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "photo_file": "data:image/png;base64,...",
  • "longitude": null,
  • "latitude": null
}

List Photos

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}

Responses

Response samples

Content type
application/json
{}

Plots & Grow Locations

A grow location represents where you plan to grow crops (field, greenhouse, etc) or graze animals (pasture or paddock).

Create a Plot

Create a grow location or plot

Parameters

title REQUIRED
The name of your grow location


type OPTIONAL

The type of grow location. Supported options are:

"Field", "Greenhouse", "Grow Room", "Pasture", "Paddock", "Other"

Defaults to Field


layout_type OPTIONAL

How should plantings be managed and calculated. Supported options are:

"Planted in Beds", "Cover Crop", "Row Crops", "Other"

Defaults to Planted in Beds


description OPTIONAL

Text describing the grow location


grazing_rest_days OPTIONAL

If using for grazing, the number of days that the location should be rested between grazings.


internal_id OPTIONAL

Custom internal ID to identify the grow location.


electronic_id OPTIONAL

Electronic ID - useful to set if using an RFID or barcode scanner to search for for sync data with Farmbrite.


light_profile OPTIONAL

Light profile of planting area. Supported options are:

"Full Sun", "Full to Part Sun", "Partial Sun", "Sun to Part Shade", "Partial Shade", "Full Shade"


size OPTIONAL

Size in Acres/Hectares (based on account settings)


status OPTIONAL

Growing status of the grow location. Supported options are:

"Active", "Fallow", "Leased", "Other"

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "description": "",
  • "grazing_rest_days": null,
  • "internal_id": "B40",
  • "layout_type": "Planted in Beds",
  • "light_profile": "",
  • "size": 100,
  • "status": "Active",
  • "title": "Back 40",
  • "type": "Field"
}

List Plots

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Plot

Authorizations:
bearerAuth
path Parameters
plot_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "copied_from": null,
  • "created_at": "2019-01-23 02:56:46",
  • "description": "",
  • "grazing_rest_days": null,
  • "internal_id": "B40",
  • "layout_type": "Planted in Beds",
  • "light_profile": "",
  • "size": 40,
  • "status": "Active",
  • "title": "Back 40",
  • "type": "Field",
  • "updated_at": "2021-07-15 20:21:52"
}

Update a Plot

Authorizations:
bearerAuth
path Parameters
plot_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "description": "Updated"
}

Delete a Plot

Authorizations:
bearerAuth
path Parameters
plot_id
required
string

Responses

Products

Products represent anything that you want to sell either directly to consumers through Farmbrite's online shop or manually through Farmbrite's order management system. Products keep track of their own available inventory and can be linked to inventory records if you want to have all in-stock inventory available for purchase.

Create a Product

Create a product

Parameters

title REQUIRED

Name or title for your product. If listing the product in your online shop, this is the name that your customer will see.


status REQUIRED

The current status of the product. Supported values are:

'Available', 'Back Ordered', 'Draft', 'Hidden', 'Sold Out', 'Deleted'


available_online OPTIONAL

Boolean value indicating if the product is available to purchase online. If set to true and you have a Farmbrite shop enabled the product will show in your online shop.


category OPTIONAL

A text value for the category your product is listed. These are configured from your account settings page and primarily used for your online shop (if applicable)


delivery_options OPTIONAL

An array of supported deliver options for this product. Available options are:

"Delivery", "Pick up", "Shipped"


description OPTIONAL

Text overview/description of the product. If listing the product in your online shop this is the primary text that your customer will see.


min_order OPTIONAL

An optional numeric value of the minimum amount a customer can can order for this product


pinned OPTIONAL

A Boolean value to indicate if the product should be displayed ("pinned") at the top of the products for the category type the product belongs to. If multiple products are pinned they are additionally sorted the product title.


price OPTIONAL

A positive numeric value (in you account currency) for the base retail price for this product


qty_remaining OPTIONAL

A positive numeric value indicating the current number of units of this product available for purchase.


sku OPTIONAL

A custom ID or SKU to track this product


electronic_id OPTIONAL

Electronic ID - useful to set if using an RFID or barcode scanner to search for for sync data with Farmbrite.


type OPTIONAL

An optional enum value indicating the possible types for this product. Supported values are:

'Custom', 'Product', 'Membership', 'Other'


unit_label OPTIONAL

A string value to provide a friendly label for the units this product is available in. For example "Dozen", "Bushels", etc


wholesale_only OPTIONAL

Boolean flag to indicate that this product is only available to purchase at the whole sale price. If set to true the product will be excluded from your online shop (if applicable) and can only be added to orders via the Farmbrite admin orders page.


wholesale_price OPTIONAL

An optional positive numeric value (in you account currency) for the wholesale price for this product

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "available_online": true,
  • "category": "Spices and Herbs",
  • "delivery_options": [
    ],
  • "description": "These sachets make wonderful gifts.",
  • "min_order": null,
  • "pinned": false,
  • "price": 4,
  • "qty_remaining": 17,
  • "sku": "LAV",
  • "status": "Available",
  • "title": "Lavender sachets",
  • "type": "Custom",
  • "unit_label": "quantity",
  • "wholesale_only": false,
  • "wholesale_price": null
}

List Products

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Product

Authorizations:
bearerAuth
path Parameters
product_id
required
string
Example: {{product_id}}

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "available_online": true,
  • "category": "Spices and Herbs",
  • "created_at": "2022-01-02 16:10:17",
  • "delivery_options": [
    ],
  • "description": "These sachets make wonderful gifts.",
  • "min_order": null,
  • "pinned": false,
  • "price": 4,
  • "qty_remaining": 17,
  • "sku": "LAV",
  • "status": "Available",
  • "title": "Lavender sachets",
  • "type": "Custom",
  • "unit_label": "quantity",
  • "updated_at": "2022-03-04 21:34:57",
  • "wholesale_only": false,
  • "wholesale_price": null
}

Update a Product

Authorizations:
bearerAuth
path Parameters
product_id
required
string
Example: {{product_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "qty_remaining": 9
}

Delete a Product

Authorizations:
bearerAuth
path Parameters
product_id
required
string

Responses

Products > Orders

Orders are a purchase, or a request for purchase of any products. They can be used to track future orders that need to be fulfilled or report on orders from your online shop. Additionally you can use orders to track the fulfillment progress and status to keep an eye on your delivery obligations.

Create an Order

Create an Order

Parameters

status REQUIRED

Status of the order. Supported options are:

"Approved", "Cancelled", "Complete", "Delivered", "Draft", "In Progress", "Ordered", "Packing", "Pending Approval", "Picking", "Shipped"

Defaults to Draft


payment_status REQUIRED

Payment status of the order, supported options are:

"Due", "Paid", "Cancelled"

Defaults to Due


order_items OPTIONAL

An array of order items that contain the details for the order, for example:

[{ "description": "Order Item 1", "price": 1.0, "product_id": "Farmbrite Product ID", "qty": 12.0 },{...}]

If passed in the order total will be calculated from the order items.


contact_id OPTIONAL

The Farmbrite ID for the contact to link the order to


email OPTIONAL

Email address of the customer


first_name OPTIONAL

First name of the customer


last_name OPTIONAL

Last name of the customer


phone OPTIONAL

Phone number of the customer


payment_method OPTIONAL

Order payment method. Supported options are:

"Credit Card", "Cash", "Check", "Other"


tax_rate OPTIONAL

Numeric value for the total tax rate (percentage) to apply to the order, if applicable


taxes_amount OPTIONAL

Numeric currency amount for the total tax amount to apply to this order, if applicable


delivery_amount OPTIONAL

Numeric value for the deliver fee if applicable


discount_amount OPTIONAL

Numeric (float) amount of discount if offering discount on total order if applicable


discount_reason OPTIONAL

String describing the reason for the discount


message OPTIONAL

Optional string message from the customer


due_date OPTIONAL

Date that the order is due


order_date OPTIONAL

Date the order was placed or created, defaults to today


invoice_number OPTIONAL

Optional invoice number, leave blank to have the system generate it for you. Must be a unique value.


note OPTIONAL

Optional customer message for this order


memo OPTIONAL

Optional internal memo for this order


delivery_type OPTIONAL

Deliver option for this order, supported values are:

'Delivery', 'Pick up', 'Shipped'


pickup_location_id OPTIONAL

The Farmbrite ID for a pickup location for the order


is_admin OPTIONAL

Boolean value indicating if this order was a back office order, as opposed to created through your online store front.


po_number OPTIONAL

Optional purchase order (PO) number to include with the order.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "contact_id": "Contact ID",
  • "delivery_amount": 5,
  • "delivery_type": "Pick Up",
  • "due_date": null,
  • "email": "name@email.com",
  • "first_name": "Jane",
  • "last_name": "Smith",
  • "memo": "Internal memo",
  • "message": "API order",
  • "note": "Customer message",
  • "order_date": "2023-05-11",
  • "order_items": [
    ],
  • "payment_method": "Cash",
  • "payment_status": "Paid",
  • "phone": "(555)867-5309",
  • "pickup_location_id": null,
  • "po_number": "PO123",
  • "status": "Ordered"
}

List Orders

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "cached": false,
  • "message": "",
  • "total_records": 151,
  • "current_page": 1,
  • "limit": 25,
  • "total_pages": 7,
  • "data": [
    ]
}

Retrieve an Order

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: {{order_id}}

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "cart_id": null,
  • "charge_subtotal": 0,
  • "charge_total": 0,
  • "contact_id": "Contact GUID",
  • "created_at": "2024-01-08 19:35:05",
  • "created_by": "User",
  • "delivery_amount": 0,
  • "delivery_type": "Delivery",
  • "discount_amount": 0,
  • "discount_reason": null,
  • "due_date": null,
  • "email": "example@email.com",
  • "first_name": "Jane",
  • "invoice_number": "1377",
  • "is_admin": true,
  • "is_quickpay": false,
  • "last_name": "Doe",
  • "message": null,
  • "note": "",
  • "order_date": "2024-01-08",
  • "order_total": 6,
  • "payment_method": "",
  • "payment_status": "Due",
  • "phone": "5558675309",
  • "pick_list": null,
  • "pickup_location_id": null,
  • "po_number": "",
  • "status": "Ordered",
  • "stripe_id": null,
  • "tax_rate": null,
  • "taxes_amount": 0,
  • "updated_at": "2024-01-08 19:53:33",
  • "order_items": [
    ],
  • "delivery_address": {
    },
  • "contact": {
    }
}

Update an Order

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: {{order_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "status": "In Progress",
  • "payment_status": "Paid"
}

Delete an Order

Authorizations:
bearerAuth
path Parameters
order_id
required
string

Responses

Products > Orders > Order Items

Order Items keep track of the details of the order, eg; what products are included. Every order should have order items attached to it. Order items represent the products, amounts and prices for items on the order.

Add an Item to an Order

Add an Item to an Order

Parameters

product_id REQUIRED

Product ID for the order item


qty REQUIRED

Positive numeric value representing the quantity of the product for this order.


price OPTIONAL

Optional numeric (float) value for a custom price. If left blank, the price will default to the product's current retail price. If is_wholesale is set to true the price will default to the products wholesale price, if applicable.


is_wholesale OPTIONAL

Optional Boolean value indicating if the system should use the product's wholesale or retail price. Defaults to false.

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: {{order_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "product_id": "{{Product ID}}",
  • "qty": 3
}

List Order Items

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: {{order_id}}

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "cached": false,
  • "message": "",
  • "total_records": 1,
  • "current_page": 1,
  • "limit": 25,
  • "total_pages": 1,
  • "data": [
    ]
}

Retrieve an Order Item

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: {{order_id}}
order_item_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "Order Item ID",
  • "created_at": "2022-03-29 15:24:50",
  • "description": "",
  • "is_wholesale": false,
  • "price": 10,
  • "product_id": "Product ID",
  • "qty": 1,
  • "updated_at": "2022-03-29 15:24:50"
}

Remove an Item from Order

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: {{order_id}}
order_item_id
required
string

Responses

Schedule

Schedule items are calendar events. These could be reminders for future appointments or activities that need to be done. They are similar to tasks, but have slightly different properties and are not usually used to track the completion of activities.

They can be assigned to different users in your account and can be associated with different resources, specifically:

  • Livestock /animals
  • Grow Locations /plots
  • Equipment /tools

You can access and create resource specific items under that resource.

For example[GET] /animals/:animal_id/activities will fetch the schedule for this animal.

Create an Activity

Create a new schedule item

You can create a schedule item at your account level using the /schedule path or under a supported resource (livestock, grow locations or equipment by using the path /:resource_type/:resource_id/activies. For example[GET] /animals/:id/activies will fetch the schedule for this animal.

Parameters

title REQUIRED

The name of your schedule item.


start_time REQUIRED

Starting DateTime of your event in 'YYYY-MM-DD HH:MM' format. A value is required if all_day is set to false.


end_time REQUIRED

Ending DateTime of your event in 'YYYY-MM-DD HH:MM' format. A value is required if all_day is set to false.


assigned_to_id OPTIONAL

The ID or email address of the Farmbrite user to assign the item to.


all_day OPTIONAL

Boolean value to indicate the event is all day. Defaults to false.


description OPTIONAL

A summary description of the item.


reference_type OPTIONAL

Used to link the item to another resource. Supported values are:

"animal", "equipment", "plant", "location"

When providing a reference_type, you should also provide a reference_id. This can also be accomplished by creating the schedule item through its parent resource path. eg; /animals/:animal_id/activies.


reference_id OPTIONAL

A Farmbrite ID for the resource type that this record is associated with. This can also be accomplished by creating the schedule item through its parent resource path. eg; /animals/:animal_id/activies.


color OPTIONAL

A HEX color value to set the item's color on the calendar or lis view.


latitude OPTIONAL

A latitude value used, with longitude, to tag a certain location on the map.


longitude OPTIONAL

A longitude value used if wanting to tag a certain location on the map.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "color": "#bdbdbd",
  • "title": "Title",
  • "description": "",
  • "reference_id": "Related Resource ID",
  • "reference_type": "Related Resource Type",
  • "assigned_to_id": "Farmbrite User ID or Email",
  • "latitude": null,
  • "longitude": null,
  • "start_time": "2022-01-01 11:00",
  • "end_time": "2022-01-01 11:30"
}

List Activities

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve an Activity

Authorizations:
bearerAuth
path Parameters
activitity_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "period": "Does not repeat",
  • "color": "#bdbdbd",
  • "checklist": [ ],
  • "title": "Appointment",
  • "start_time": "2022-01-08 00:00:00",
  • "end_time": "2022-01-08 00:00:00",
  • "all_day": false,
  • "description": "",
  • "reference_type": "animals",
  • "reference_id": "animal id",
  • "todo": false,
  • "priority": null,
  • "created_by": "User",
  • "created_by_id": "User ID",
  • "complete": false,
  • "updated_at": "2022-01-07 01:54:32",
  • "created_at": "2022-01-07 01:54:32"
}

Update an Activity

Authorizations:
bearerAuth
path Parameters
activity_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "title": "Title",
  • "description": "Description"
}

Delete an Activity

Authorizations:
bearerAuth
path Parameters
activity_id
required
string

Responses

Tasks

Tasks are used to track things in Farmbrite that need to be done on your farm They can be assigned to different users in your account and can be associated to different resources (using the reference_type and reference_id properties**).**

They can be assigned to different users in your account and can be associated with different resources, specifically:

  • Livestock /animals
  • Crop types /plants
  • Grow Locations /plots
  • Plantings /crops
  • Equipment /tools

You can access and create resource specific items under that resource.

For example[GET] /animals/:animal_id/tasks will fetch the tasks for this animal.

Additionally, you can filter tasks by the email address of the user assigned to the task (or checklist item). Just pass in ?assigned_to_email=name@email.com to the List Tasks endpoint

Create a Task

Create a new task

You can create a task at your account level using the /tasks path or under a supported resource (livestock, grow locations or equipment by using the path /:resource_type/:resource_id/tasks. For example[GET] /animals/:id/tasks will fetch the tasks for this animal.

Paramaters

title REQUIRED

The name of your task.


end_time OPTIONAL

Due DateTime of your task in 'YYYY-MM-DD HH:MM' format.


assigned_to_id OPTIONAL

The ID or email address of the Farmbrite user to assign the item to.


description OPTIONAL

A summary description of the item.


reference_type OPTIONAL

Used to link the item to another resource. Supported values are:

"animal", "equipment", "plant", "location", "planting"

When providing a reference_type, you should also provide a reference_id. This can also be accomplished by creating the schedule item through its parent resource path. eg; /animals/:animal_id/tasks.


reference_id OPTIONAL

A Farmbrite ID for the resource type that this record is associated with. This can also be accomplished by creating the schedule item through its parent resource path. eg; /animals/:animal_id/tasks.


status OPTIONAL

The status of the item. Options are determined by your account settings. See our help and documentation center for more information.


complete OPTIONAL

Boolean value that indicates whether the task is complete or not.


color OPTIONAL

A HEX color value to set the item's color on the calendar or lis view.


checklist OPTIONAL

An array of hashes (JSON format) representing a list of items to complete in the following format:

[ {"name": "Item 1", "assignee": "(Optional) user_id assigned to", "done": true }, ... ]


priority OPTIONAL

A numeric value between 1 and 5 representing the items priority.

{5 = "Highest", 4 = "High", 3 = "Medium", 2 = "Low", 1 = "Lowest"}


hours_spent OPTIONAL

A numeric (float) value used to track the amount of time spent on the task.


latitude OPTIONAL

A latitude value, with longitude, to tag a certain location on the map.


longitude OPTIONAL

A longitude value used if wanting to tag a certain location on the map.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "color": "#bdbdbd",
  • "checklist": [
    ],
  • "title": "Hi Chris New Task for you",
  • "description": "",
  • "assigned_to_id": "Farmbrite User ID or Email",
  • "priority": 3,
  • "status": "To Do",
  • "end_time": "2022-04-01 11:30"
}

List Tasks

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Task

Authorizations:
bearerAuth
path Parameters
task_id
required
string
Example: {{task_id}}

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "period": "Does not repeat",
  • "color": "#bdbdbd",
  • "checklist": [
    ],
  • "title": "Task Title",
  • "description": "Task Details",
  • "reference_id": "",
  • "reference_type": "",
  • "assigned_to_id": "User ID",
  • "priority": 3,
  • "status": "To Do",
  • "hours_spent": null,
  • "latitude": null,
  • "longitude": null,
  • "frequency": 1,
  • "todo": true,
  • "created_by": "User",
  • "created_by_id": "User Id",
  • "complete": false,
  • "updated_at": "2021-12-21 19:56:23",
  • "created_at": "2021-12-21 19:56:23"
}

Update a Task

Authorizations:
bearerAuth
path Parameters
task_id
required
string
Example: {{task_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "title": "Updated Task Title",
  • "description": "Description"
}

Delete a Task

Authorizations:
bearerAuth
path Parameters
task_id
required
string
Example: {{task_id}}

Responses

Tools & Equipment

Equipment records can be used to keep track of any type of tool, machinery, utility location (wash station) or equipment that you want to store notes, photos, files and track maintenance and service records on. For example you could easily track cleaning and sanitization history for organic certification by creating an equipment record for a washing station.

Create Tool or Equipment

Create equipment

Parameters

name REQUIRED

The name or label for this piece of equipment


amount OPTIONAL

Numeric value representing the amount paid for the equipment, in the currency of your account.


brand OPTIONAL

Brand of equipment


date_purchased OPTIONAL

Date purchased


description OPTIONAL

Text description / summary of the equipment


engine OPTIONAL

Engine type (if applicable)


manual_url OPTIONAL

A valid web address / URL for the service manual


model_number OPTIONAL

Model number


plate_number OPTIONAL

License plate number (if applicable)


purchased OPTIONAL

Boolean value indicating if the item was purchased or not


serial_number OPTIONAL

Serial number


electronic_id OPTIONAL

Electronic ID - useful to set if using an RFID or barcode scanner to search for for sync data with Farmbrite.


transmission OPTIONAL

Transmission type (if applicable)


type OPTIONAL

Any string representing the type of equipment. For example: Tractor, harvester, cleaning station, feeder, etc.


usage_unit OPTIONAL

How do you track the usage of this equipment. Supported options are:

"Hours", "Miles", "Kilometers"

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "amount": 28900,
  • "brand": "Kubato",
  • "date_purchased": "2018-12-19",
  • "description": "Orange",
  • "engine": "Kubato",
  • "manual_url": "",
  • "model_number": "M6060",
  • "name": "Big Orange",
  • "plate_number": "NA",
  • "purchased": false,
  • "serial_number": "kjhfsdhu6546871",
  • "transmission": "Kubato",
  • "type": "Tractor",
  • "usage_unit": "Hours"
}

List Tools & Equipment

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve Equipment

Authorizations:
bearerAuth
path Parameters
tool_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "amount": 0,
  • "brand": "Kubato",
  • "contact_id": "Conact ID",
  • "created_at": "2016-11-21 23:59:12",
  • "date_purchased": "2018-12-19",
  • "description": "Orange",
  • "engine": "Kubato",
  • "manual_url": "",
  • "mileage": 999,
  • "model_number": "M6060",
  • "name": "Big Orange",
  • "plate_number": "NA",
  • "purchased": false,
  • "serial_number": "kjhfsdhu6546871",
  • "transmission": "Kubato",
  • "type": "Tractor",
  • "updated_at": "2019-04-06 18:36:19",
  • "usage_unit": "Hours"
}

Update Equipment

Authorizations:
bearerAuth
path Parameters
tool_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "serial_number": "867-5309"
}

Delete Equipment

Authorizations:
bearerAuth
path Parameters
tool_id
required
string

Responses

Tools & Equipment > Services & Maintenance

Equipment services are used to track maintenance that is performed on an equipment record. This could be anything from an oil change for a tractor to cleaning and sanitization for a washing station.

Create a Service Record

Create an equipment service record

Parameters

cost OPTIONAL

Numeric value for the cost of the service, in the currency of your account.


date OPTIONAL

Date of the service. Defaults to today


description OPTIONAL

Text description or summary of the service performed


keywords OPTIONAL

Comma delimited list of keywords, tags, or labels to allow easier searching for specific types of services.


performed_by OPTIONAL

String value for the service technician or facility that completed the work


type OPTIONAL

Type of service performed. Supported options are:

"Air filter", "Battery fluid", "Battery - replacement", "Belts", "Brake fluid", "Brakes", "Cleaning", "Coolant", "Diesel filter", "Drivetrain", "Engine - major", "Engine oil", "Equipment service", "Fan", "Fan belt", "Fuel filter", "Fluids - other", "Hydraulic fluid", "Hydraulic pump", "Inspection", "Lubricant", "Sanitizing", "Seals", "Oil Filter", "Tire pressure", "Tires", "Transmission fluid", "Transmission - major", "Warranty", "Wheels", "Other"


usage OPTIONAL

The current amount of usage (in the equipment usage_unit) as of the time of the service.

Authorizations:
bearerAuth
path Parameters
tool_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "cost": null,
  • "date": "2022-01-24",
  • "description": "Maintenance Check",
  • "keywords": null,
  • "performed_by": "Service Center",
  • "type": "Other",
  • "usage": null
}

List Services

Authorizations:
bearerAuth
path Parameters
tool_id
required
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve Service Record

Authorizations:
bearerAuth
path Parameters
tool_id
required
string
service_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "cost": 0,
  • "created_at": "2022-01-24 15:30:43",
  • "created_by": "User",
  • "date": "2022-01-24",
  • "description": "Maintenance Check",
  • "keywords": "",
  • "performed_by": "Service Center",
  • "type": "",
  • "updated_at": "2022-01-24 15:30:43",
  • "usage": 867
}

Update Service Record

Authorizations:
bearerAuth
path Parameters
tool_id
required
string
service_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "serial_number": "867-5309"
}

Delete Service Record

Authorizations:
bearerAuth
path Parameters
tool_id
required
string
service_id
required
string

Responses

Transactions

Transactions are basic financial accounting records used to track and report on the profitability of your operation. They can be associated with various resources in orders to see the ROI return in investment (ROI) for certain animals or crop types. Transactions can only be accessed via the API by users assigned an Admin role in your account.

Create a Transaction

Create an accounting transaction

Parameters

type REQUIRED

A value to indicate if the transaction is an income (revenue) or expense transaction. Supported values are:

"Expense", "Income"


amount REQUIRED

A positive numeric value (in your account currency) representing the transaction amount.


date REQUIRED

The date of the transaction


vendor OPTIONAL

A string representing the vendor or payee for the transaction


category OPTIONAL

Either a custom string value to represent the category of the transaction or the IRS Schedule F code/link number. If using the schedule F items, supported values are the keys listed below:

Expense Categories:

Key Category
10 Car and truck expenses
11 Chemicals
12 Conservation expenses
13 Custom hire (machine work)
14 Depreciation
15 Employee benefit programs
16 Feed
17 Fertilizers and lime
18 Freight and trucking
19 Gasoline, fuel, and oil
20 Insurance (other than health)
21a Interest Mortgage (paid to banks, etc.)
21b Interest Other
22 Labor hired (less employment credits)
23 Pension and profit-sharing plans"
32a Purchase of livestock"
24a Rent or Lease of Vehicles, machinery, equipment
24b Rent or Lease of Other (land, animals, etc.)
25 Repairs and maintenance
26 Seeds and plants
27 Storage and warehousing
28 Supplies
29 Taxes
30 Utilities
31 Veterinary, breeding, and medicine
32 Other expenses

Income Categories:

Key Category
1a Sales of livestock and other resale items
1b Cost or other basis of livestock
2 Sales of livestock, produce, grains, and other products you raised
3a Cooperative distributions
4a Agricultural program payments
5a Commodity Credit Corporation (CCC) loans reported under election
5b CCC loans forfeited
6 Crop insurance proceeds and federal crop disaster payments
7 Custom hire (machine work) income
8 Other income

ref_id OPTIONAL

The Farmbrite record id to associate this transaction to, used with the ref_type property.


ref_type OPTIONAL

A value used with the ref_id property to associate this transaction to a record in Farmbrite. Support values are:

"animal", "equipment", "plant", "location"


check_number OPTIONAL

Optional text containing the check number or other payment identifier


keywords OPTIONAL

A comma delimited list of keywords, tags, or labels to easily search for similar transactions.


description OPTIONAL

A text description or summary of the transaction.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "type": "Expense",
  • "amount": 10,
  • "date": "2022-02-03",
  • "vendor": "API",
  • "category": "Custom",
  • "ref_id": "Related Resource ID",
  • "ref_type": "Related Resource Type",
  • "check_number": "",
  • "keywords": "",
  • "description": ""
}

List Transactions

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Transaction

Authorizations:
bearerAuth
path Parameters
transaction_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "amount": 25,
  • "category": "SCHUDULE F # OR CUSTOM",
  • "check_number": null,
  • "date": "2022-03-16",
  • "description": "",
  • "keywords": null,
  • "ref_id": "",
  • "ref_type": "",
  • "reporting_year": null,
  • "type": "Expense",
  • "updated_at": "2022-03-16 15:34:31",
  • "vendor": "John's Feed",
  • "year": 2022
}

Update a Transaction

Authorizations:
bearerAuth
path Parameters
transaction_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "type": "Expense",
  • "amount": 10,
  • "vendor": "Updated"
}

Delete a Transaction

Authorizations:
bearerAuth
path Parameters
transaction_id
required
string

Responses

Treatments

Treatments are embedded resources that are used by a variety of core resources. Specifically, you can access treatments for resources:

  • Livestock /animals
  • Livestock Groups (Create Only) /livestock_groups
  • Grow Locations /plots
  • Plantings /crops

To create or access treatments for a record, simply append '/treatments' to the end of the resource path. For example: [GET] /animals/:animal_id/treatments will fetch the records for this animal.

Create a Treatment

Create a treatment record

Parameters

type REQUIRED

The type of treatment performed. These varies by resource type, but custom values can be supplied as well.

For livestock, support options are:

"Alternative Therapy", "Artificial Insemination", "Branding", "Castration", "Dehorning", "Dental Procedure", "Deworming", "Ear Notching", "Euthanasia", "Grooming", "Hoof Trim", "Medication", "Mites", "Parasite Treatment", "Surgical Procedure", "Tagging", "Tattoo", "Vaccination", "Other Procedure"

For plantings and grow locations, supported options are:

"Blight","Fertilize","Fungus","Herbicide","Insect","Mildew","Mites","Mold","Nutrients","Pesticide","Virus","Other"


date OPTIONAL

The date of the treatment, defaults to today


amount OPTIONAL

An optional string representing the amount/quantity used. For example: 50ml


batch OPTIONAL

Batch information for the product used in the treatment (if applicable)


cost OPTIONAL

A positive numeric value (in your account currency) representing the cost of the treatment


description OPTIONAL

Details or summary of the treatment provided


keywords OPTIONAL

A comma-delimited string of keywords, tags or labels used to find similar treatments


mode OPTIONAL

The method of application of the treatment performed. These vary by resource type, but custom values can be supplied as well.

For livestock, support options are:

"Intramuscular (in the muscle)", "Intramammary (in the udder)", "Intrauterine (in the uterus)", "Intravenous (in the vein)", "Oral (in the mouth)", "Subcutaneous (under the skin)", "Topical (on the skin)", "Other"

For plantings and grow locations, supported options are:

"Granules", "Spray", "Other"


product OPTIONAL

The name of the product used (if applicable)


retreat_date OPTIONAL

An optional date for when to retreat or provide a booster if required.


site OPTIONAL

The location that the treatment was applied. These varies by resource type, but custom values can be supplied as well.

For livestock, support options are:

"Rump", "Flank", "Neck"

For plantings and grow locations, supported options are:

"Leaf", "Seed", "Soil"


technician OPTIONAL

Details or name of the technician or company that performed the treatment.


withdrawal_date OPTIONAL

An optional date for when to the crop or livestock will be safe to harvest after the treatment. Typically used for compliance and food safety requirements for meat or milk production after certain medication or treatments.

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "amount": "2-mL",
  • "batch": "123",
  • "cost": 0,
  • "date": "2022-02-02",
  • "description": "First dose",
  • "keywords": "",
  • "mode": "Intramuscular (in the muscle)",
  • "product": "BRSV Vaccine",
  • "retreat_date": "2022-03-02",
  • "site": "",
  • "technician": "",
  • "type": "Vaccination",
  • "withdrawal_date": null
}

List Treatments

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Treatment

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
Example: {{resource_name}}
resource_id
required
string
Example: {{resource_id}}
treatment_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "amount": "",
  • "batch": "123",
  • "cost": 0,
  • "created_at": "2022-02-02 15:23:18",
  • "created_by": "User",
  • "date": "2022-02-02",
  • "description": "",
  • "keywords": "",
  • "mode": "Intramuscular (in the muscle)",
  • "product": "BRSV Vaccine",
  • "retreat_date": null,
  • "record_type": "animal",
  • "record_id": "65a720572ba8ef1844234a57",
  • "record_name": "Animal Name - breed [tag_number]",
  • "site": "",
  • "technician": "",
  • "type": "Vaccination",
  • "updated_at": "2022-02-02 15:23:18",
  • "withdrawal_date": null
}

Update a Treatment

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
treatment_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "description": "Updated Record"
}

Delete a Treatment

Authorizations:
bearerAuth
path Parameters
resource_name
required
string
resource_id
required
string
treatment_id
required
string

Responses

Warehouses

A warehouse represents any storage location you want to keep track of inventory. This can be a silo, garage, barn, walk-in cooler, warehouse or other similar storage location.

Create a Warehouse

Create a warehouse / storage location

Parameters

name REQUIRED

The name or primary label for your warehouse or storage location


internal_id OPTIONAL

Custom ID you use to identify this record


track_capabity OPTIONAL

Boolean value to determine if the warehouse tracks different shelves or bins to store different items OR is treated as a single container like a tank or silo.

If enabled, retrieving a warehouse will include its current amount available.


capacity OPTIONAL

If tracking capcity in the warehouse (not bins) - a numeric value to determine the total storage amount available based on unit.


unit OPTIONAL

If tracking capcity in the warehouse, the unit used for inventory is stored.

"Bales", "Barrels", "Bunches", "Bushels", "Dozen", "Fluid Ounces", "Gallons", "Grams", "Head", "Kilograms", "Kiloliter", "Liter", "Milliliter", "Ounces", "Pounds", "Quantity", "Quarts", "Tonnes", "Tons"

Defaults to Quantity


description OPTIONAL

Text description or summary of the warehouse. Can be used to communicate location or other identification information to your team members.

Authorizations:
bearerAuth
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "description": "Alien warehouse",
  • "internal_id": "A51",
  • "name": "Area 51",
  • "track_capacity": false,
  • "capacity": 0,
  • "unit": null
}

List Warehouses

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Warehouse

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "bins": [
    ],
  • "capacity": 1000,
  • "created_at": "2020-12-27 00:12:53",
  • "description": "",
  • "internal_id": "s42",
  • "name": "Silo 42",
  • "track_capacity": true,
  • "unit": "pounds",
  • "updated_at": "2023-10-24 17:08:00",
  • "total_qty": 10171
}

Update a Warehouse

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "internal_id": "A51"
}

Delete a Warehouse

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string

Responses

Warehouses > Bins

A warehouse bin is an optional property of a warehouse. You can think of a bin as a dedicated storage location within a storage location (warehouse) where you want to explicitly track inventory details. This could be a shelf, rack, bin, box, tub, etc.

Create a Warehouse Bin

Create a warehouse bin

Parameters

name REQUIRED

The name or primary label you want to use to identify this bin


capacity OPTIONAL

Numeric value of the total amount that can be stored this the bin, in the unit of the bin


description OPTIONAL

Text description or summary of the bin. This can be useful to communicate the location or other important details to team members.


internal_id OPTIONAL

A customer or internal ID that you use to track this bin.


unit OPTIONAL

The unit used for inventory is stored in this bin.

"Bales", "Barrels", "Bunches", "Bushels", "Dozen", "Fluid Ounces", "Gallons", "Grams", "Head", "Kilograms", "Kiloliter", "Liter", "Milliliter", "Ounces", "Pounds", "Quantity", "Quarts", "Tonnes", "Tons"

Defaults to Quantity

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string
Example: {{warehouse_id}}
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "capacity": 100,
  • "description": "Bin for API tests",
  • "internal_id": "api",
  • "name": "API Bin",
  • "unit": "tons"
}

List Warehouse Bins

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string
Example: {{warehouse_id}}

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve a Warehouse Bin

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string
Example: {{warehouse_id}}
bin_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "GUID",
  • "capacity": 99,
  • "created_at": "2022-01-20 23:30:15",
  • "description": "",
  • "internal_id": "empty",
  • "name": "Empty Bin",
  • "unit": "quantity",
  • "updated_at": "2022-03-18 20:09:39"
}

Update a Warehouse Bin

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string
Example: {{warehouse_id}}
bin_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "capacity": 99
}

Delete a Warehouse Bin

Authorizations:
bearerAuth
path Parameters
warehouse_id
required
string
Example: {{warehouse_id}}
bin_id
required
string

Responses