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": "d233c69d-2447-46be-991d-3df8ddaca944",
      "FieldGuid": "f642c61b-eeb9-4daa-8ae7-e6cce6778d4e",
      "FieldGrowerId": "sample string 4",
      "FieldId": "sample string 5",
      "FieldDescription": "sample string 6"
    },
    {
      "Name": "sample string 1",
      "CropYear": 2,
      "GISAcres": 3.1,
      "CropZoneGuid": "d233c69d-2447-46be-991d-3df8ddaca944",
      "FieldGuid": "f642c61b-eeb9-4daa-8ae7-e6cce6778d4e",
      "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>d233c69d-2447-46be-991d-3df8ddaca944</d2p1:CropZoneGuid>
      <d2p1:FieldDescription>sample string 6</d2p1:FieldDescription>
      <d2p1:FieldGrowerId>sample string 4</d2p1:FieldGrowerId>
      <d2p1:FieldGuid>f642c61b-eeb9-4daa-8ae7-e6cce6778d4e</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>d233c69d-2447-46be-991d-3df8ddaca944</d2p1:CropZoneGuid>
      <d2p1:FieldDescription>sample string 6</d2p1:FieldDescription>
      <d2p1:FieldGrowerId>sample string 4</d2p1:FieldGrowerId>
      <d2p1:FieldGuid>f642c61b-eeb9-4daa-8ae7-e6cce6778d4e</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>