Field Squared API Services

<back to all web services

ReverseGeocode

Reprsents a DTO for a reverse geocode request/resonse. Usage is /ReverseGeocode?latitude=1.0&longitude=1.0

The following routes are available for this service:
GET/{Workspace}/ReverseGeocode
import Foundation
import ServiceStack

/**
* Reprsents a DTO for a reverse geocode request/resonse.  Usage is /ReverseGeocode?latitude=1.0&longitude=1.0
*/
public class ReverseGeocode : Codable
{
    public var workspace:String
    public var address:Address

    required public init(){}
}

public class Address : Codable
{
    public var street:String
    public var unit:String
    public var city:String
    public var state:String
    public var zip:String
    public var contactTitle:String
    public var contactName:String
    public var contactPhone:String
    public var contactEmail:String
    public var location:Location
    public var siteName:String
    public var geocodeFailed:Bool
    public var country:String

    required public init(){}
}

public class Location : Codable
{
    public var y:Double
    public var x:Double

    required public init(){}
}


Swift ReverseGeocode DTOs

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

HTTP + JSV

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

GET /{Workspace}/ReverseGeocode HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv