| GET | /{Workspace}/Geocode |
|---|
import Foundation
import ServiceStack
/**
* 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
*/
public class Geocode : Codable
{
public var workspace:String
public var addresses:[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(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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