Create a Field Location

Creating a field registers the location with the aWhere system, making it easier to reference and track your locations as well as run agronomics and models automatically. You only need to create a field once, after which point you can reference it by the ID you create (you'll use this ID in virtually every URI endpoint in our system).

On This Page...

API Request

API Endpoints

HTTP Verbs and URIs

POST /v2/fields
  • Create a field location.

Query String Parameters

None.

Request Body

{
    "id": "{fieldId}",
    "name":"{fieldName}",
    "farmId":"{farmId}",
    "acres":{acres},
    "centerPoint":{
        "latitude":{latitude},
        "longitude":{longitude},
        }
}

Property Descriptions

Name Description Valid Values Required?
{fieldId} An arbitrary identifier for the field location, determined by you. It can be any string you choose, and you'll use this ID when referencing the location in all other aWhere APIs. A unique string up to 50 characters; alphanumeric, underscores, and dashes only Required
{name} A name for the field location that would be meaningful to your customers, for example if used in a drop down. For example "Northwest-40" Any string up to 255 characters; alphanumeric, underscores, and dashes only Optional
{farmId} An arbitrary identifier for the farm that owns the field location. Farm IDs are determined by you, but please use a consistent identifier for your customer. It need not and should not contain personally identifiable information. A string up to 50 characters; alphanumeric, underscores, and dashes only Required
{acres} The size of the field in acres. A decimal number Optional
{latitude} and {longitude} The geolocation of the field, typically the centerpoint of the field but could be anywhere in the field. A decimal number Required

HTTP Headers

Header Name Required Value
Authorization Bearer {token} (see Authentication)
Content-Type application/json

API Response

Response HTTP Status Codes and Headers

This API returns standard HTTP status codes and headers for aWhere APIs. Additionally, this endpoint will return Location header provides the URL of the newly created data record. It looks like this:

Location: https://api.awhere.com/v2/fields/{fieldId}

Response Body

After a field location is created, the API will return the same body as the Get Single Field endpoint.

{
    "id": "{fieldId}",
    "name":"{fieldName}",
    "farmId":"{farmId}",
    "acres":{acres},
    "centerPoint":{
        "latitude":{latitude},
        "longitude":{longitude},
        },
    "_links":{ 
        "self":{"href":"{field_self}"}
    }
}

Property Descriptions

Name Description
{fieldId} The ID you specified for the field, you'll use this in most aWhere APIs when selecting a location.
{fieldName} The name you specified for the field, which could be shown in a dropdown box or list.
{farmId} The ID for the farm that owns this field. You'll specify this when you create the field.
{acres} The size of the field in acres.
{latitude}
and
{longitude}
The geolocation associated with the field, typically the centerpoint.
{self} The URI of the each field location object.
{field_self} The URI of the each field location object.