Post data

How to import data to OpenDataBio using the API

Importing data

Structured custom data in the notes field

The notes field of any model is for plain text or a text formatted as a JSON object containing structured data. Json allows you to store custom structured data in any model that has the notes field. For example, you may want to store secondary fields from source datasets during import, or any additional data not provided by the OpenDataBio database structure. This data is not validated by OpenDataBio and the standardization of tags and values is up to you. Json notes will be imported and exported as JSON text and will be presented in the interface as a formatted table; URLs in your Json will be presented as links in this table.

POST endpoints

bibreferences (POST)

Bibliographic references (GET lists, POST creates).

ParameterRequiredDescriptionExample
bibtexNoBibTeX formatted reference string. (Provide doi or bibtex.)@article{mykey,...}
doiNoDOI number or URL. (Provide doi or bibtex.)10.1234/abcd.2020.1

biocollections (POST)

Biocollections (GET lists, POST creates).

ParameterRequiredDescriptionExample
acronymYesBiocollection acronym.INPA
nameYesTranslatable trait name. Accepts a plain string or a JSON map of language codes to names.{"en":"Height","pt-br":"Altura"}

individuals (POST)

Individuals (GET lists, POST creates, PUT updates).

ParameterRequiredDescriptionExample
altitudeNoElevation in meters.75
angleNoAzimuth from reference point, in degrees.45
biocollectionNoBiocollection id, name or acronym.INPA
biocollection_numberNoCatalogue number/code inside the biocollection.12345
biocollection_typeNoNomenclatural type code or name.Holotype or 2
collectorYesCollector(s) id, abbreviation, name or email. Use | or ; to separate multiple people; first is main collector.J.Silva|M.Costa
datasetYesDataset id or acronym.3 or FOREST1
dateYesDate (YYYY-MM-DD) or incomplete date (e.g. 1888-05-NA) or array with year/month/day. (At least the year must be provided.)2024-05-20 or {\"year\":1888,\"month\":5}
distanceNoDistance from reference point in meters.12.5
identification_based_on_biocollectionNoBiocollection name/id used as reference for identification.INPA
identification_based_on_biocollection_numberNoCatalogNumber in the reference biocollection8765
identification_dateNoIdentification date (full or incomplete).2023-06-NA
identification_individualNoID/organismID of another individual that provides the taxonomic identification for the individual’s record3245 or REC-123
identification_notesNoNotes for the identification.Checked with microscope
identifierNoPerson(s) responsible for identification; accept id, abbreviation, name or email; separate multiple with | or ;.Costa, A.|Lima, B. or 1|2|3 or Adolpho Ducke|José Ramos|Paulo Apóstolo Costa Lima Assunção
latitudeNoLatitude in decimal degrees (negative for south). (Required when location is not provided.)-3.101
locationNoLocation id or name. (Required when latitude/longitude are not provided.)Parcela 25ha or 55
location_date_timeNoDate or date+time for the occurrence/location event. (Required when adding multiple locations or when different from individual date.)2023-08-14 12:30:00
location_notesNoNotes for the occurrence/location entry.Near trail marker 10
longitudeNoLongitude in decimal degrees (negative for west). (Required when location is not provided.)-60.12
modifierNoIdentification modifier code/name (s.s.=1, s.l.=2, cf.=3, aff.=4, vel aff.=5).3
notesNoFree text or JSON notes field.{\"expedition\":\"2024-01\",\"tag\":\"P1\"}
tagYesIndividual tag/number/code.A-1234
taxonNoTaxon id or canonical full name list.Licaria cannela or 456,789
xNoX coordinate for plots or individual position.12.3
yNoY coordinate for plots or individual position.8.7

individual-locations (POST)

Occurrences for individuals with multiple locations (GET lists, POST/PUT upserts).

ParameterRequiredDescriptionExample
altitudeNoElevation in meters.75
angleNoAzimuth from reference point, in degrees.45
distanceNoDistance from reference point in meters.12.5
individualYesIndividual id, uuid or organismID (fullname).4521 or 2ff0e884-3d33
latitudeNoLatitude in decimal degrees (negative for south). (Required when location is not provided.)-3.101
locationNoLocation id or name. (Required when latitude/longitude are not provided.)Parcela 25ha or 55
location_date_timeYesDate or date+time for the occurrence/location event.2023-08-14 12:30:00
location_notesNoNotes for the occurrence/location entry.Near trail marker 10
longitudeNoLongitude in decimal degrees (negative for west). (Required when location is not provided.)-60.12
xNoX coordinate for plots or individual position.12.3
yNoY coordinate for plots or individual position.8.7

locations (POST)

Locations (GET lists, POST creates, PUT updates).

ParameterRequiredDescriptionExample
adm_levelYesLocation administrative level code (e.g. 100=plot, 10=country).100
altitudeNoElevation in meters.75
azimuthNoAzimuth (degrees) used to build plot/transect geometry when location is a POINT.90
datumNoSpatial datum/projection string.EPSG:4326-WGS 84
geojsonNoSingle GeoJSON Feature with geometry and at least name + adm_level properties.{\"type\":\"Feature\",\"properties\":{\"name\":\"Plot A\",\"adm_level\":100},\"geometry\":{...}}
geomNoWKT geometry (POINT, LINESTRING, POLYGON, MULTIPOLYGON). (Provide geom or lat+long.)POLYGON((-60 -3,-60.1 -3,-60.1 -3.1,-60 -3.1,-60 -3))
ismarineNoFlag to allow marine/offshore locations outside country polygons.1
latNoLatitude in decimal degrees (negative for south). (Provide geom or lat+long.)-3.101
longNoLongitude in decimal degrees (negative for west). (Provide geom or lat+long.)-60.12
nameYesTranslatable trait name. Accepts a plain string or a JSON map of language codes to names.{"en":"Height","pt-br":"Altura"}
notesNoFree text or JSON notes field.{\"expedition\":\"2024-01\",\"tag\":\"P1\"}
parentNoParent id/name; for traits this is another trait export_name/id to define hierarchy.woodDensity
startxNoStart X coordinate for subplot relative to parent plot.5.5
startyNoStart Y coordinate for subplot relative to parent plot.10.0
xNoX coordinate for plots or individual position.12.3
yNoY coordinate for plots or individual position.8.7

locations-validation (POST)

Validates coordinates against registered locations (POST).

ParameterRequiredDescriptionExample
latitudeYesLatitude in decimal degrees (negative for south).-3.101
longitudeYesLongitude in decimal degrees (negative for west).-60.12

measurements (POST)

Trait measurements (GET lists, POST creates/imports via ImportMeasurements job, PUT bulk updates).

ParameterRequiredDescriptionExample
bibreferenceNoBibreference id or bibkey.34 or ducke1953
datasetYesDataset id/name where the measurement will be stored; falls back to authenticated user default dataset if omitted.3 or FOREST1
dateYesMeasurement date; accepts YYYY-MM-DD, YYYY-MM, YYYY, or array/year-month-day fields (date_year/date_month/date_day).2024-05-10 or {\"year\":2024,\"month\":5}
duplicatedNoInteger allowing repeated measurements on the same date/object; must be higher than existing duplicates.2
link_idNoRequired for LINK trait types: id of the linked object (e.g., Taxon id). (Required when trait type is Link.)55
locationNoLocation id or name.Parcela 25ha or 55
notesNoOptional free text or JSON notes stored with the measurement.{\"method\":\"caliper\"}
object_idYesRequired. Id of the measured object (Individual, Location, Taxon, Voucher, Media). Alias: measured_id.4521
object_typeYesRequired when not provided in header. Class basename or FQCN of the measured object (Individual, Location, Taxon, Voucher, Media). Alias: measured_type.Individual
parent_measurementNoWhen trait depends on another measurement, provide the parent measurement id for the same object and date.3001
personYesPerson id, abbreviation, full name or email (supports lists with | or ;).J.Silva|M.Costa
trait_idYesRequired. Trait id or export_name to be measured (also accepts trait key “trait”).DBH or 12
valueNoInput varies by trait type: QUANT_INTEGER (0) = integer number; QUANT_REAL (1) = decimal number with dot separator; CATEGORICAL or ORDINAL (2/4) = single category id or translated name; CATEGORICAL_MULTIPLE (3) = list of category ids/names separated by | ; or , (or an array); TEXT (5) = free text string; COLOR (6) = hex color like #A1B2C3 or #ABC; LINK (7) = send link_id pointing to the linked object (value may be blank or a numeric qualifier); SPECTRAL (8) = semicolon-separated numeric series whose length equals trait value_length; GENEBANK (9) = GenBank accession string (validated against NCBI). (Required unless trait type is Link.)QUANT_REAL: 23.4 | CATEGORICAL: 15 or Dead | CATEGORICAL_MULTIPLE: 12;14 or Alternate;Opposite | SPECTRAL: 0.12;0.11;0.10

media (POST)

Media metadata (GET lists, POST creates, PUT updates).

ParameterRequiredDescriptionExample
collectorNoCollector(s) id, abbreviation, name or email. Use | or ; to separate multiple people; first is main collector.J.Silva|M.Costa
datasetNoDataset id or acronym.3 or FOREST1
dateNoDate (YYYY-MM-DD) or incomplete date (e.g. 1888-05-NA) or array with year/month/day.2024-05-20 or {\"year\":1888,\"month\":5}
filenameYesExact media file name inside the ZIP when importing media.IMG_0001.jpg
latitudeNoLatitude in decimal degrees (negative for south).-3.101
licenseNoPublic license code for media (CC0, CC-BY, CC-BY-SA, etc.).CC-BY-SA
locationNoLocation id or name.Parcela 25ha or 55
longitudeNoLongitude in decimal degrees (negative for west).-60.12
notesNoFree text or JSON notes field.{\"expedition\":\"2024-01\",\"tag\":\"P1\"}
object_idYesId of object the media belongs to (Individual, Location, Taxon, Voucher).4521
object_typeYesThe object type the media belongs to, one of Individual, Location, Taxon, Voucher, or Media.Individual
projectNoProject id or acronym.PDBFF or 2
tagsNoTag ids or names list for media or filters (use | or ;).flower|leaf
title_enNoMedia title in English.Leaf detail
title_ptNoMedia title in Portuguese.Detalhe da folha

persons (POST)

People (GET lists, POST creates, PUT updates).

ParameterRequiredDescriptionExample
abbreviationNoStandard abbreviation for a person or biocollection.Silva, J.B, Pilco, M.V.
biocollectionNoBiocollection id, name or acronym.INPA
emailNoEmail address.user@example.org
full_nameYesPerson full name.Joao Silva
institutionNoInstitution associated with a person.INPA

taxons (POST)

Taxonomic names (GET lists, POST creates).

ParameterRequiredDescriptionExample
authorNoTaxon author string for unpublished names.Smith & Jones
author_idNoPerson id/name/email for the author of an unpublished taxon. (Required for unpublished names (or use person).)25 or Pilco, M.V.
bibreferenceNoBibreference id or bibkey.34 or ducke1953
gbifNoGBIF nubKey for a taxon.28792
ipniNoIPNI id for a taxon.123456-1
levelNoTaxon rank code or string.210 or species
mobotNoTropicos id for a taxon.12345678
mycobankNoMycoBank id for a taxon.MB123456
nameYesTranslatable trait name. Accepts a plain string or a JSON map of language codes to names.{"en":"Height","pt-br":"Altura"}
parentNoParent id/name; for traits this is another trait export_name/id to define hierarchy. (Required for unpublished names.)woodDensity
personNoPerson id, abbreviation, full name or email (supports lists with | or ;). (Required for unpublished names (or use author_id).)J.Silva|M.Costa
validNoWhen 1, return only valid taxon names.1
zoobankNoZooBank id for a taxon.urn:lsid:zoobank.org:act:12345678

traits (POST)

Trait definitions (GET lists, POST creates).

ParameterRequiredDescriptionExample
bibreferenceNoBibreference id or bibkey.34 or ducke1953
categoriesNoTrait categories JSON list with lang/rank/name/description. (Required for categorical and ordinal traits.)[{\"lang\":\"en\",\"rank\":1,\"name\":\"small\"}]
descriptionYesTranslatable description text. Accepts a plain string or a JSON map of language codes to descriptions.{"en":"Tree height at breast height","pt-br":"Altura da árvore à altura do peito"}
export_nameYesUnique export name for trait.treeDbh,plantHeight
link_typeNoClass name for Link trait target (e.g. Taxon). (Required for Link traits.)Taxon
nameYesTranslatable trait name. Accepts a plain string or a JSON map of language codes to names.{"en":"Height","pt-br":"Altura"}
objectsYesTrait target objects (comma separated).Individual,Voucher
parentNoParent trait id or export_name; when set, measurements of this trait must also include a measurement for the parent trait.woodDensity
range_maxNoMaximum allowed numeric value for quantitative traits.999.9
range_minNoMinimum allowed numeric value for quantitative traits.0.01
tagsNoTag ids or names list for media or filters (use | or ;).flower|leaf
typeYesGeneric type parameter (trait type code or vernacular type such as use/generic/etimology).use or 10
unitNo(Required for quantitative traits.)
value_lengthNoNumber of values for spectral trait types. (Required for spectral traits.)1024
wavenumber_maxNoMaximum wavenumber for spectral traits. (Required for spectral traits.)25000
wavenumber_minNoMinimum wavenumber for spectral traits. (Required for spectral traits.)4000

vernaculars (POST)

Vernacular names (GET lists, POST creates).

ParameterRequiredDescriptionExample
citationsNoList of citations (text + bibreference) for vernaculars.[{\"citation\":\"Silva 2020\",\"bibreference\":12}]
individualsNoList of individual ids/fullnames for vernacular links.12|23|45
languageYesLanguage id/code/nameen or 1 or english or portuguese
nameYesTranslatable trait name. Accepts a plain string or a JSON map of language codes to names.{"en":"Height","pt-br":"Altura"}
notesNoFree text or JSON notes field.{\"expedition\":\"2024-01\",\"tag\":\"P1\"}
parentNoParent id/name; for traits this is another trait export_name/id to define hierarchy.woodDensity
taxonsNoList of taxon ids/names (vernacular links).Euterpe edulis|Euterpe precatoria
typeNoGeneric type parameter (trait type code or vernacular type such as use/generic/etimology).use or 10

vouchers (POST)

Voucher specimens (GET lists, POST creates, PUT updates).

ParameterRequiredDescriptionExample
biocollectionYesBiocollection id, name or acronym.INPA
biocollection_numberNoCatalogue number/code inside the biocollection.12345
biocollection_typeNoNomenclatural type code or name.Holotype or 2
collectorNoCollector(s) id, abbreviation, name or email. Use | or ; to separate multiple people; first is main collector.J.Silva|M.Costa
datasetNoDataset id or acronym.3 or FOREST1
dateNoDate (YYYY-MM-DD) or incomplete date (e.g. 1888-05-NA) or array with year/month/day.2024-05-20 or {\"year\":1888,\"month\":5}
individualYesIndividual id, uuid or organismID (fullname).4521 or 2ff0e884-3d33
notesNoFree text or JSON notes field.{\"expedition\":\"2024-01\",\"tag\":\"P1\"}
numberNoCollector number/code (voucher/individual tag when different from individual).1234A

datasets (POST)

Datasets and published dataset files (GET lists, POST creates via import job).

ParameterRequiredDescriptionExample
descriptionNoTranslatable description text. Accepts a plain string or a JSON map of language codes to descriptions. (Required when privacy is 2 or 3.){"en":"Tree height at breast height","pt-br":"Altura da árvore à altura do peito"}
licenseNoPublic license code for media (CC0, CC-BY, CC-BY-SA, etc.). (Required when privacy is 2 or 3.)CC-BY-SA
nameYesShort name or nickname for the dataset - make informative, shorter than title.Morphometrics-Aniba
privacyYes(Accepted values: 0 (auth), 1 (project), 2 (registered), 3 (public).)
project_idNo(Required when privacy is 1 (project).)
titleNo(Required when privacy is 2 or 3.)