GET v2/ranches/{ranchGuid}/commodity-types/{commodityTypeId}/crop-types.{ext}?shouldFilterUnassociated={shouldFilterUnassociated}

Returns a list of crop types associated with a ranch. Normally, a ranch is only associated with a handful of commodity types and a select number of crop types.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
ranchGuid

globally unique identifier

Required

commodityTypeId

integer

Required

shouldFilterUnassociated

If true, filter out crop types that a ranch isn't associated with. Otherwise, Get all available crop types associated with a commodity type. The crop types associated with the target ranch are tagged.

boolean

Default value is True

Body Parameters

None.

Response Information

Resource Description

Collection of CropType
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

None.

UptakeFactor

decimal number

None.

UptakeConstant

decimal number

None.

IsNDependent

boolean

None.

IsSelected

boolean

None.

PlantingsCount

integer

None.

Response Formats

application/json, text/json, text/html

Sample:
[
  {
    "Id": 1,
    "Name": "sample string 2",
    "UptakeFactor": 3.0,
    "UptakeConstant": 4.0,
    "IsNDependent": true,
    "IsSelected": true,
    "PlantingsCount": 7
  },
  {
    "Id": 1,
    "Name": "sample string 2",
    "UptakeFactor": 3.0,
    "UptakeConstant": 4.0,
    "IsNDependent": true,
    "IsSelected": true,
    "PlantingsCount": 7
  }
]

application/xml, text/xml

Sample:
<ArrayOfCropType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CropType>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <UptakeFactor>3</UptakeFactor>
    <UptakeConstant>4</UptakeConstant>
    <IsNDependent>true</IsNDependent>
    <IsSelected>true</IsSelected>
    <PlantingsCount>7</PlantingsCount>
  </CropType>
  <CropType>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <UptakeFactor>3</UptakeFactor>
    <UptakeConstant>4</UptakeConstant>
    <IsNDependent>true</IsNDependent>
    <IsSelected>true</IsSelected>
    <PlantingsCount>7</PlantingsCount>
  </CropType>
</ArrayOfCropType>