farmbrite_list_animals
List animals
List livestock records (name, type, tag number, gender, breed, status, weight, group, purchase/sale data). Farmbrite returns only active-status animals unless you filter by status (Sold, Deceased, Culled, Butchered, Archived...). GET /animals.
输入参数namepagetypelimitstatusfilterssort_bysort_dirtag_number
farmbrite_get_animal
Get animal
One animal by id, with its current location and custom fields. GET /animals/{animal_id}.
输入参数animal_id必填
farmbrite_list_livestock_groups
List livestock groups
List livestock groups (id, name, type). GET /livestock_groups.
输入参数pagelimitfilterssort_bysort_dir
farmbrite_get_livestock_group
Get livestock group
One livestock group by id with its member count, filters and member animals. GET /livestock_groups/{group_id}.
输入参数group_id必填
farmbrite_list_animal_measurements
List animal measurements
Weight, height, temperature, condition score and fecal-count records of one animal, newest data included. GET /animals/{animal_id}/measurements.
输入参数pagelimitsort_bysort_diranimal_id必填
farmbrite_list_feedings
List feedings
Feeding records (amount, cost, date, feed type, inventory used) of one animal or livestock group. GET /{animals|livestock_groups}/{id}/feedings.
输入参数pagelimitparent必填parent_id必填
farmbrite_list_grazing_summary
List grazing summary
Grazing status per field/pasture: animals present, days rested, rest days required, last grazed. GET /grazings.
输入参数pagelimitfilterssort_bysort_dir
farmbrite_list_plants
List plant types
List plant types/varieties (days to maturity, spacing, market price, harvest unit). GET /plants.
输入参数pagelimitfilterssort_bysort_dir
farmbrite_list_crops
List crop plantings
List crop plantings (plant, field/plot, bed, quantity, planting and expected harvest dates, growth stage). GET /crops.
输入参数pagelimitfiltersplot_idsort_byplant_idsort_dir
farmbrite_get_crop
Get crop planting
One crop planting by id. GET /crops/{crop_id}.
输入参数crop_id必填
farmbrite_list_plots
List fields (plots)
List fields/grow locations (title, type, size, status, grazing rest days). GET /plots.
输入参数pagelimitfilterssort_bysort_dir
farmbrite_get_plot
Get field (plot)
One field/grow location by id. GET /plots/{plot_id}.
输入参数plot_id必填
farmbrite_list_harvests
List harvests
Harvest records (quantity, unit, grade, price, date, inventory added) of one animal or crop planting. GET /{animals|crops}/{id}/harvests.
输入参数pagelimitparent必填parent_id必填
farmbrite_list_treatments
List treatments
Treatment records (type, product, amount, cost, date, withdrawal date, technician) of one animal, field or crop planting. GET /{animals|plots|crops}/{id}/treatments.
输入参数pagelimitparent必填parent_id必填
farmbrite_list_notes
List notes
Notes (description, category, date, keywords) attached to an animal, field, plant type, crop planting or inventory type. GET /{animals|plots|plants|crops|inventory_types}/{id}/notes.
输入参数pagelimitparent必填parent_id必填
farmbrite_list_contacts
List contacts
List contacts (customers, suppliers, vendors): name, company, email, phone, type, label. GET /contacts.
输入参数namepageemaillimitfilterssort_bysort_dir
farmbrite_get_contact
Get contact
One contact by id, with address. GET /contacts/{contact_id}.
输入参数contact_id必填
farmbrite_list_tasks
List tasks
List tasks (title, description, status, priority, assignee, due/end time, checklist, linked animal/field/crop). GET /tasks.
输入参数pagelimitfilterssort_bycompletesort_dirassigned_to_id
farmbrite_get_task
Get task
One task by id with its checklist. GET /tasks/{task_id}.
输入参数task_id必填
farmbrite_list_activities
List schedule activities
List calendar/schedule activities (title, start and end time, all-day flag, linked animal or field). GET /activities.
输入参数pagelimitfilterssort_bysort_dir
farmbrite_list_inventory_types
List inventory items
List inventory item types (feed, supplies, harvested products) with the quantity remaining, unit, value and low-stock alert level. GET /inventory_types.
输入参数pagelimitfilterssort_bysort_dir
farmbrite_get_inventory_type
Get inventory item
One inventory item type by id with quantity remaining and projected empty date. GET /inventory_types/{inventory_type_id}.
输入参数inventory_type_id必填
farmbrite_get_inventory_locations
Get inventory by location
Where one inventory item is stored: warehouse and bin ids and names, capacity and quantity remaining in each. Use the ids with farmbrite_add_inventory / farmbrite_remove_inventory. GET /inventory_types/{inventory_type_id}/inventory.
输入参数pagelimitinventory_type_id必填
farmbrite_list_warehouses
List storage locations
List storage locations (warehouses) for inventory: name, description, internal id. Use the ids when adding or removing inventory. GET /warehouses.
输入参数pagelimitfilterssort_bysort_dir
farmbrite_list_orders
List orders
List sales orders (status, payment status, total, dates, contact, delivery type, invoice number). GET /orders.
输入参数pagelimitstatusfilterssort_bysort_dircontact_idpayment_status
farmbrite_get_order
Get order
One order by id with its line items, customer contact, delivery address and totals. GET /orders/{order_id}.
输入参数order_id必填
farmbrite_list_transactions
List transactions
List income and expense transactions (type, amount, date, vendor, category, linked animal/field/plant, description). GET /transactions.
输入参数pagetypelimitfilterssort_bysort_dir
farmbrite_get_transaction
Get transaction
One transaction by id. GET /transactions/{transaction_id}.
输入参数transaction_id必填
farmbrite_create_contact
Create contact
WRITE: create a contact (customer, supplier, vendor). Nothing is emailed or sent to the contact. Creating twice makes two contacts. POST /contacts.
输入参数celltypeemaillabelphoneaddresscompanylast_namefirst_namedescription
farmbrite_update_contact
Update contact
WRITE: change fields of an existing contact (only the fields you pass are sent). Overwrites the previous values. PUT /contacts/{contact_id}.
输入参数cellemailphonecompanylast_namecontact_id必填first_namedescription
farmbrite_create_task
Create task
WRITE: create a task, optionally linked to an animal, equipment, plant, location or planting. May notify the assigned Farmbrite user according to your account settings. Creating twice makes two tasks. POST /tasks.
输入参数title必填statusend_timeprioritydescriptionhours_spentreference_idassigned_to_idreference_type
farmbrite_update_task
Update task
WRITE: change a task (only the fields you pass are sent); set complete=true to mark it done. Overwrites previous values. PUT /tasks/{task_id}.
输入参数titlestatustask_id必填completeend_timeprioritydescriptionhours_spentassigned_to_id
farmbrite_create_transaction
Create transaction
WRITE: record an income or expense transaction in the farm's books. Creating twice records it twice. POST /transactions.
输入参数date必填type必填amount必填ref_idvendorcategorykeywordsref_typedescriptioncheck_number
farmbrite_create_note
Add note
WRITE: add a note to an animal, livestock group, field, plant type, crop planting or inventory item. Notes cannot be removed with this server. POST /{parent}/{id}/notes.
输入参数dateparent必填categorykeywordsparent_id必填description必填
farmbrite_add_inventory
Add inventory
WRITE: add stock to an inventory item in a storage location (warehouse, optionally a bin). Raises the quantity remaining; not idempotent: repeating adds again. Find ids with farmbrite_list_inventory_types, farmbrite_get_inventory_locations and farmbrite_list_warehouses. PUT /inventory_types/{id}/inventory/add.
输入参数datebin_idsourceadjustment必填lot_numberdescriptionwarehouse_id必填inventory_type_id必填
farmbrite_remove_inventory
Remove inventory
WRITE: take stock out of an inventory item in a storage location (use, loss, sale). Lowers the quantity remaining; not idempotent: repeating removes again. It cannot be undone with this server except by adding stock back. PUT /inventory_types/{id}/inventory/remove.
输入参数datebin_idorder_idadjustment必填lot_numberdescriptionwarehouse_id必填inventory_type_id必填
farmbrite_create_order
Create order
WRITE: create a sales order with line items (status defaults to Draft and payment_status to Due unless you set them; memo is internal, note is customer-facing). Farmbrite may email the customer or generate an invoice depending on the account's settings and the status chosen; the API reference does not say, so use Draft unless the user asks otherwise and only pass email when told to. Orders are entered as back-office orders (is_admin). Creating twice makes two orders. POST /orders.
输入参数memonoteemailphonestatusdue_datetax_ratelast_namecontact_idfirst_nameorder_dateorder_items必填另有 4 个
farmbrite_update_order
Update order status
WRITE: change an order's status and/or payment status (for example mark it Paid or Delivered). Farmbrite may send customer notifications on some status changes, depending on the account settings. PUT /orders/{order_id}.
输入参数statusorder_id必填payment_status
farmbrite_create_animal
Create animal
WRITE: add an animal (or a group when is_group=true with group_qty) to the herd. type (e.g. Cattle, Sheep) and status are required. Creating twice makes two animals. POST /animals.
输入参数nametype必填breedgenderstatusweightis_groupkeywordsfather_idgroup_qtymother_idpurchased另有 11 个
farmbrite_update_animal
Update animal
WRITE: change an animal's fields (only the fields you pass are sent), including its status (Sold, Deceased, Culled...). Statuses Butchered, Culled and Deceased need death_date. Overwrites previous values. PUT /animals/{animal_id}.
输入参数nametypebreedgenderstatusweightkeywordsanimal_id必填father_idmother_idsale_datebirth_date另有 7 个
farmbrite_add_animal_measurement
Add animal measurement
WRITE: record a measurement for one animal (weight, height, temperature, condition score, fecal egg count). Adds a record each time. POST /animals/{animal_id}/measurements.
输入参数fecdatetempheightweightanimal_id必填condition_score
farmbrite_create_feeding
Record feeding
WRITE: record a feeding for an animal or livestock group. Either name the feed type, or give inventory_id + inventory_location_id to draw it from inventory (which lowers that inventory's quantity). Adds a record each time. POST /{animals|livestock_groups}/{id}/feedings.
输入参数costdatetypeunitamount必填parent必填per_headparent_id必填descriptioninventory_idinventory_location_id
farmbrite_create_harvest
Record harvest
WRITE: record a harvest (quantity and unit) for an animal or crop planting. Adds a record each time. POST /{animals|crops}/{id}/harvests.
输入参数qty必填dateunit必填gradepriceparent必填parent_id必填descriptionbatch_number
farmbrite_create_treatment
Record treatment
WRITE: record a treatment (vaccine, dewormer, spray, fertilizer...) for an animal, livestock group, field or crop planting. Adds a record each time. POST /{animals|livestock_groups|plots|crops}/{id}/treatments.
输入参数costdatetype必填amountparent必填productparent_id必填techniciandescriptionretreat_datewithdrawal_date