| POST,OPTIONS | /v1/book/{Slug}/quote |
|---|
import Foundation
import ServiceStack
public class CourierBookQuoteRequest : Codable
{
public var slug:String
public var profile:String
public var level:String
public var units:Int
public var zip:String
public var lat:Double?
public var lng:Double?
public var dropLat:Double?
public var dropLng:Double?
required public init(){}
}
public class CourierBookQuoteResponse : Codable
{
public var zone:String
public var miles:Double?
public var lines:[CourierBookQuoteLine] = []
public var total:Double
public var responseStatus:ResponseStatus
required public init(){}
}
public class CourierBookQuoteLine : Codable
{
public var kind:String
public var amount:Double
public var qty:Double?
public var rate:Double?
required public init(){}
}
Swift CourierBookQuoteRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/book/{Slug}/quote HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Slug: String,
Profile: String,
Level: String,
Units: 0,
Zip: String,
Lat: 0,
Lng: 0,
DropLat: 0,
DropLng: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Zone: String,
Miles: 0,
Lines:
[
{
Kind: String,
Amount: 0,
Qty: 0,
Rate: 0
}
],
Total: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}