Kiefa Public API (1.1.0)

Download OpenAPI specification:

Kiefa Support: support@kiefa.io

Kiefa's Public API service allows customers to integrate Kiefa into their ecosystem.

Strains

Returns a list of strains filtered by attributes

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "name" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by name

genetics
string
Enum: "Indica" "Sativa" "Hybrid"

The genetic type of the strain

facilities

The facility of the strain

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a strain by ID

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of strain to return

Responses

Response samples

Content type
application/json
{
  • "id": 48,
  • "name": "Blue Dream",
  • "description": "A sativa-dominant hybrid",
  • "expGramsSqft": 1,
  • "expGramsPerPlant": 100,
  • "expDieOff": 0.1,
  • "expThc": 0.2,
  • "genetics": "Hybrid",
  • "plantDensity": 1.7,
  • "facilityId": 82,
  • "flowerYield": 70,
  • "popcornYield": 20,
  • "trimYield": 10,
  • "estRevenuePerGram": 10,
  • "categoryId": 48
}

Facilities

Returns a list of facilities filtered by attributes

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "name" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by name

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a facility by ID

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of facility to return

Responses

Response samples

Content type
application/json
{
  • "id": 82,
  • "name": "Main Facility",
  • "description": "HQ",
  • "address": "123 Main St",
  • "address2": "Suite 100",
  • "city": "Denver",
  • "zip": "80202",
  • "size": 10000,
  • "canopySize": 5000,
  • "state": {
    },
  • "timezone": "America/Denver"
}

Rooms

Returns a list of rooms filtered by attributes

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "name" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by name

facilities

The facility of the room

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a room by ID

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of room to return

Responses

Response samples

Content type
application/json
{
  • "id": 48,
  • "name": "Flowering Room 1",
  • "description": "Room for flowering plants",
  • "facilityId": 82,
  • "size": 1000,
  • "canopySize": 500,
  • "numLights": 10,
  • "lightWatts": 1000,
  • "lightType": "HPS",
  • "germination": true,
  • "propagation": true,
  • "vegetative": true,
  • "flowering": true,
  • "drying": true,
  • "curing": true
}

Returns all tables in a room

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of room to return tables from

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Grows

Returns a list of grows filtered by attributes

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "name" "startDate" "endDate" "harvestDate" "phase" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by name, description, and/or plant batch strain name

facilities
Array of integers

The facility of the grow

startDate
string <date>

The start date of the Grow

endDate
string <date>

The end date of the Grow

harvestStartDate
string <date>

Filter Grows with harvest dates after this date

harvestEndDate
string <date>

Filter Grows with harvest dates before this date

completionStartDate
string <date>

Filter Grows with end dates after this date

completionEndDate
string <date>

Filter Grows with end dates before this date

strain
Array of integers

Filter Grows containing the specified strain

phase
Array of strings
Items Enum: "Germination" "Propagation" "Vegetative" "Flowering" "Drying" "Curing"

Filter by current phase

status
Array of strings
Items Enum: "Draft" "Planned" "Active" "Inactive" "Canceled"

Filter by current Grow status

room
Array of integers

Filter by Grows in the specified room(s)

tables
Array of integers

Filter by Grows using the specified table(s)

category
Array of integers

Filter by Grows with the specified category(s)

isMother
boolean

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a Grow by ID

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of Grow to return

Responses

Response samples

Content type
application/json
{
  • "id": 931,
  • "name": "Grow 1",
  • "description": "First grow",
  • "startDate": "2024-07-22",
  • "endDate": "2024-11-30",
  • "harvestDate": "2024-10-04",
  • "currentPhase": "Flowering",
  • "germTime": 0,
  • "propTime": 14,
  • "vegTime": 28,
  • "flowerTime": 56,
  • "dryTime": 14,
  • "cureTime": 14,
  • "facilityId": 82,
  • "status": "Active",
  • "isMother": false
}

Categories

Returns a list of categories filtered by attributes

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "name" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by name

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a Category by ID

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of Category to return

Responses

Response samples

Content type
application/json
{
  • "id": 48,
  • "name": "Tier 1"
}

COAs

Returns a list of coas filtered by attributes with calculated cannabinoids

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "lab" "strain" "date" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by lab name

growId
string

Filter by associated grow

strainId
string

Filter by associated strain

startDate
string <date>

Filter COAs with dates after this date

endDate
string <date>

Filter COAs with dates before this date

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a list of substances filtered by attributes

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

searchFilter
string

Filter by name

type
string
Enum: "CANNABINOID" "TERPENE"

Filter by type

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Measures

Returns a list of measures for the given measure type

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "time" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by room or measure type name

required
string or integer

The type of measure. This can be either one of the standard Kiefa measure types or a custom measure type via the id.

growId
Array of integers
strainId
Array of integers
plantBatchId
Array of integers
roomId
Array of integers
facilityId
Array of integers
harvestId
Array of integers
startDate
string <date>
endDate
string <date>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new measure

Authorizations:
(apiKeyorganizationId)
Request Body schema: application/json
required
value
number
string or integer
unit
string
Enum: "METER" "CENTIMETER" "MILLIMETER" "YARD" "FOOT" "INCH" "GRAM" "KILOGRAM" "MILLIGRAM" "MICROGRAM" "OUNCE" "POUND" "CELSIUS" "FAHRENHEIT" "PPFD" "YPFD" "SQUARE_METER" "SQUARE_FOOT" "SQUARE_INCH" "CUBIC_INCH" "CUBIC_FOOT" "CUBIC_METER" "LITER" "MILLILITER" "FLUID_OUNCE" "GALLON" "CUP" "PERCENT" "EACH" "BOX" "CASE" "PACK" "ROLL" "PIECE" "PAIR" "PARTS_PER_MILLION" "MILLIGRAMS_PER_LITER" "LUMEN" "LUX" "WATT" "KILOWATT" "KILOWATT_HOUR" "GRAMS_PER_SQUARE_FOOT" "GRAMS_PER_WATT" "GRAMS_PER_KILOWATT_HOUR" "PH" "MS_PER_CM" "MICRO_S_PER_CM"
growId
integer or null
plantBatchId
integer or null
strainId
integer or null
roomId
integer or null
facilityId
integer or null
harvestId
integer or null

Responses

Request samples

Content type
application/json
{
  • "id": 24,
  • "time": "2021-01-01T00:00:00Z",
  • "value": 6135,
  • "unit": "GRAM",
  • "type": "Flower Weight",
  • "growId": 10,
  • "plantBatchId": 33,
  • "strainId": 9,
  • "roomId": null,
  • "facilityId": 1,
  • "harvestId": 33
}

Response samples

Content type
application/json
{
  • "id": 24,
  • "time": "2021-01-01T00:00:00Z",
  • "value": 6135,
  • "unit": "GRAM",
  • "type": "Flower Weight",
  • "growId": 10,
  • "plantBatchId": 33,
  • "strainId": 9,
  • "roomId": null,
  • "facilityId": 1,
  • "harvestId": 33
}

Returns a list of measure types

Authorizations:
(apiKeyorganizationId)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a measure by ID

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of measure to return

Responses

Response samples

Content type
application/json
{
  • "id": 24,
  • "time": "2021-01-01T00:00:00Z",
  • "value": 6135,
  • "unit": "GRAM",
  • "type": "Flower Weight",
  • "growId": 10,
  • "plantBatchId": 33,
  • "strainId": 9,
  • "roomId": null,
  • "facilityId": 1,
  • "harvestId": 33
}

Update a measure

Authorizations:
(apiKeyorganizationId)
Request Body schema: application/json
required
value
number
string or integer
unit
string
Enum: "METER" "CENTIMETER" "MILLIMETER" "YARD" "FOOT" "INCH" "GRAM" "KILOGRAM" "MILLIGRAM" "MICROGRAM" "OUNCE" "POUND" "CELSIUS" "FAHRENHEIT" "PPFD" "YPFD" "SQUARE_METER" "SQUARE_FOOT" "SQUARE_INCH" "CUBIC_INCH" "CUBIC_FOOT" "CUBIC_METER" "LITER" "MILLILITER" "FLUID_OUNCE" "GALLON" "CUP" "PERCENT" "EACH" "BOX" "CASE" "PACK" "ROLL" "PIECE" "PAIR" "PARTS_PER_MILLION" "MILLIGRAMS_PER_LITER" "LUMEN" "LUX" "WATT" "KILOWATT" "KILOWATT_HOUR" "GRAMS_PER_SQUARE_FOOT" "GRAMS_PER_WATT" "GRAMS_PER_KILOWATT_HOUR" "PH" "MS_PER_CM" "MICRO_S_PER_CM"
growId
integer or null
plantBatchId
integer or null
strainId
integer or null
roomId
integer or null
facilityId
integer or null
harvestId
integer or null

Responses

Request samples

Content type
application/json
{
  • "id": 24,
  • "time": "2021-01-01T00:00:00Z",
  • "value": 6135,
  • "unit": "GRAM",
  • "type": "Flower Weight",
  • "growId": 10,
  • "plantBatchId": 33,
  • "strainId": 9,
  • "roomId": null,
  • "facilityId": 1,
  • "harvestId": 33
}

Response samples

Content type
application/json
{
  • "id": 24,
  • "time": "2021-01-01T00:00:00Z",
  • "value": 6135,
  • "unit": "GRAM",
  • "type": "Flower Weight",
  • "growId": 10,
  • "plantBatchId": 33,
  • "strainId": 9,
  • "roomId": null,
  • "facilityId": 1,
  • "harvestId": 33
}

Delete a measure

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of measure to delete

Responses

Response samples

Content type
application/json
{
  • "id": 24,
  • "time": "2021-01-01T00:00:00Z",
  • "value": 6135,
  • "unit": "GRAM",
  • "type": "Flower Weight",
  • "growId": 10,
  • "plantBatchId": 33,
  • "strainId": 9,
  • "roomId": null,
  • "facilityId": 1,
  • "harvestId": 33
}

Harvests

Returns a list of harvests filtered by attributes

Authorizations:
(apiKeyorganizationId)
query Parameters
offset
integer

The number of items to skip before starting to collect the result set

limit
integer

The number of items to limit the result set to

sort
string
Enum: "time" "updatedAt"

The field to sort the result set by

dir
string
Enum: "asc" "desc"

The direction to sort the result set by

searchFilter
string

Filter by name

growId
Array of integers

Filter by associated grow

plantBatchId
Array of integers

Filter by associated plant batch

strainId
Array of integers

Filter by associated strain

roomId
Array of integers

Filter by associated Flowering Room

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new harvest

Authorizations:
(apiKeyorganizationId)
Request Body schema: application/json
required
id
integer
time
string <date-time>
plantBatchId
integer
Array of objects (Measure)

Responses

Request samples

Content type
application/json
{
  • "id": 593,
  • "time": "2021-01-01T00:00:00Z",
  • "plantBatchId": 33,
  • "measures": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 593,
  • "time": "2021-01-01T00:00:00Z",
  • "plantBatchId": 33,
  • "measures": [
    ]
}

Returns a Harvest by ID

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of Harvest to return

Responses

Response samples

Content type
application/json
{
  • "id": 593,
  • "time": "2021-01-01T00:00:00Z",
  • "plantBatchId": 33,
  • "measures": [
    ]
}

Update a harvest

Authorizations:
(apiKeyorganizationId)
Request Body schema: application/json
required
id
integer
time
string <date-time>
plantBatchId
integer
Array of objects (Measure)

Responses

Request samples

Content type
application/json
{
  • "id": 593,
  • "time": "2021-01-01T00:00:00Z",
  • "plantBatchId": 33,
  • "measures": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 593,
  • "time": "2021-01-01T00:00:00Z",
  • "plantBatchId": 33,
  • "measures": [
    ]
}

Delete a harvest

Authorizations:
(apiKeyorganizationId)
path Parameters
id
required
integer <int64>

ID of harvest to delete

Responses

Response samples

Content type
application/json
{
  • "id": 593,
  • "time": "2021-01-01T00:00:00Z",
  • "plantBatchId": 33,
  • "measures": [
    ]
}