POST CropZonesForFields/GetCropZonesForFields

Returns CropZone Name, Crop Year, GIS Acres, and optional Field Information as filtered by the list of fields supplied

Request Information

URI Parameters

Body Parameters

A JSON string that includes the list of fields by Field Record Number, Field GUID, or Grower ID / Field ID combination in that order in addition to an optional property to include the field detail in the response

ClsCropZonesForFieldsRequest
NameDescriptionTypeAdditional Information
IncludeFieldInfoInResponse

Property to set to seperate the response into field totals. The default value is False which will group the results by CropYear and Name and leave the CropZoneGuid and Field properties null.

boolean

Must be 0, 1, True, or False

FieldList

A list of Agvance identifiers for fields.

Collection of ClsFieldListRequest

Request Formats

application/json, text/json

Sample:
{
  "IncludeFieldInfoInResponse": true,
  "FieldList": [
    {
      "GrowerId": "sample string 1",
      "FieldId": "sample string 2",
      "FieldRecordNumber": 3,
      "FieldGuid": "sample string 4"
    },
    {
      "GrowerId": "sample string 1",
      "FieldId": "sample string 2",
      "FieldRecordNumber": 3,
      "FieldGuid": "sample string 4"
    }
  ]
}

application/xml, text/xml

Sample:
<ClsCropZonesForFieldsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSI.MappingResource">
  <FieldList>
    <ClsFieldListRequest>
      <FieldGuid>sample string 4</FieldGuid>
      <FieldId>sample string 2</FieldId>
      <FieldRecordNumber>3</FieldRecordNumber>
      <GrowerId>sample string 1</GrowerId>
    </ClsFieldListRequest>
    <ClsFieldListRequest>
      <FieldGuid>sample string 4</FieldGuid>
      <FieldId>sample string 2</FieldId>
      <FieldRecordNumber>3</FieldRecordNumber>
      <GrowerId>sample string 1</GrowerId>
    </ClsFieldListRequest>
  </FieldList>
  <IncludeFieldInfoInResponse>true</IncludeFieldInfoInResponse>
</ClsCropZonesForFieldsRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ClsCropZonesForFieldsRequest'.

Response Information

Resource Description

Returns CropZone Name, Crop Year, GIS Acres, and optional Field Information as filtered by the list of fields supplied

AgvCropZonesForFields
NameDescriptionTypeAdditional Information
Status

Status of the API call.

string
Message

Message of the API call.

string
Count

Count of how many CropZonesForFields JSON dictionaries.

string
CropZonesForFields

JSON dictionary of CropZone summary information.

Collection of ClsCropZoneData

Response Formats

application/json, text/json

Sample:
{
  "Status": "sample string 1",
  "Message": "sample string 2",
  "Count": "2",
  "CropZonesForFields": [
    {
      "Name": "sample string 1",
      "CropYear": 2,
      "GISAcres": 3.1,
      "CropZoneGuid": "075ed9fe-96fa-4942-af39-5316c49c0b00",
      "FieldGuid": "69b76687-2961-4d6c-a420-7a15fb429281",
      "FieldGrowerId": "sample string 4",
      "FieldId": "sample string 5",
      "FieldDescription": "sample string 6"
    },
    {
      "Name": "sample string 1",
      "CropYear": 2,
      "GISAcres": 3.1,
      "CropZoneGuid": "075ed9fe-96fa-4942-af39-5316c49c0b00",
      "FieldGuid": "69b76687-2961-4d6c-a420-7a15fb429281",
      "FieldGrowerId": "sample string 4",
      "FieldId": "sample string 5",
      "FieldDescription": "sample string 6"
    }
  ]
}

application/xml, text/xml

Sample:
<AgvCropZonesForFields xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Map.CropZones">
  <CropZonesForFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/SSI.MappingResource">
    <d2p1:ClsCropZoneData>
      <d2p1:CropYear>2</d2p1:CropYear>
      <d2p1:CropZoneGuid>075ed9fe-96fa-4942-af39-5316c49c0b00</d2p1:CropZoneGuid>
      <d2p1:FieldDescription>sample string 6</d2p1:FieldDescription>
      <d2p1:FieldGrowerId>sample string 4</d2p1:FieldGrowerId>
      <d2p1:FieldGuid>69b76687-2961-4d6c-a420-7a15fb429281</d2p1:FieldGuid>
      <d2p1:FieldId>sample string 5</d2p1:FieldId>
      <d2p1:GISAcres>3.1</d2p1:GISAcres>
      <d2p1:Name>sample string 1</d2p1:Name>
    </d2p1:ClsCropZoneData>
    <d2p1:ClsCropZoneData>
      <d2p1:CropYear>2</d2p1:CropYear>
      <d2p1:CropZoneGuid>075ed9fe-96fa-4942-af39-5316c49c0b00</d2p1:CropZoneGuid>
      <d2p1:FieldDescription>sample string 6</d2p1:FieldDescription>
      <d2p1:FieldGrowerId>sample string 4</d2p1:FieldGrowerId>
      <d2p1:FieldGuid>69b76687-2961-4d6c-a420-7a15fb429281</d2p1:FieldGuid>
      <d2p1:FieldId>sample string 5</d2p1:FieldId>
      <d2p1:GISAcres>3.1</d2p1:GISAcres>
      <d2p1:Name>sample string 1</d2p1:Name>
    </d2p1:ClsCropZoneData>
  </CropZonesForFields>
  <Message>sample string 2</Message>
  <Status>sample string 1</Status>
</AgvCropZonesForFields>