Field Squared API Services

<back to all web services

Geocode

Represents a DTO for a geocode request/response in a workspace. Usage is as follows
/Geocode?street=1514 Blake St&city=Denver&state=CO&zip=80209

The following routes are available for this service:
GET/{Workspace}/Geocode
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Field2Office.API.Model.Geocoding;
using Field2Office.API.Model;

namespace Field2Office.API.Model
{
    public partial class Address
    {
        public virtual string Street { get; set; }
        public virtual string Unit { get; set; }
        public virtual string City { get; set; }
        public virtual string State { get; set; }
        public virtual string Zip { get; set; }
        public virtual string ContactTitle { get; set; }
        public virtual string ContactName { get; set; }
        public virtual string ContactPhone { get; set; }
        public virtual string ContactEmail { get; set; }
        public virtual Location Location { get; set; }
        public virtual string SiteName { get; set; }
        public virtual bool GeocodeFailed { get; set; }
        public virtual string Country { get; set; }
    }

    public partial class Location
    {
        public virtual double y { get; set; }
        public virtual double x { get; set; }
    }

}

namespace Field2Office.API.Model.Geocoding
{
    ///<summary>
    ///Represents a DTO for a geocode request/response in a workspace.  Usage is as follows  /Geocode?street=1514 Blake St&city=Denver&state=CO&zip=80209
    ///</summary>
    public partial class Geocode
    {
        public Geocode()
        {
            Addresses = new List<Address>{};
        }

        public virtual string Workspace { get; set; }
        public virtual List<Address> Addresses { get; set; }
    }

}

C# Geocode DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /{Workspace}/Geocode HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml