Trendsic Platform Service

<back to all web services

DispatchPickupPageRequest

The following routes are available for this service:
GET,OPTIONS/v1/dispatch/public/pickup/{SchedulerUrl}
import Foundation
import ServiceStack

public class DispatchPickupPageRequest : Codable
{
    public var schedulerUrl:String

    required public init(){}
}

public class DispatchPickupPageResponse : Codable
{
    public var companyName:String
    public var zones:[DispatchZoneView] = []
    public var needs:[DispatchNeedView] = []
    public var cardEnabled:Bool
    public var publishableKey:String
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class DispatchZoneView : Codable
{
    public var zone:String
    public var base:Double
    public var perBag:Double
    public var premiumUpliftPct:Double
    public var drivers:Int
    public var idleDrivers:Int

    required public init(){}
}

public class DispatchNeedView : Codable
{
    public var id:String
    public var label:String
    public var sub:String

    required public init(){}
}


Swift DispatchPickupPageRequest DTOs

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

HTTP + OTHER

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

GET /v1/dispatch/public/pickup/{SchedulerUrl} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"CompanyName":"String","Zones":[{"Zone":"String","Base":0,"PerBag":0,"PremiumUpliftPct":0,"Drivers":0,"IdleDrivers":0}],"Needs":[{"Id":"String","Label":"String","Sub":"String"}],"CardEnabled":false,"PublishableKey":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}