Trendsic Platform Service

<back to all web services

CoverageSelfAvailGetRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/coverage/self/availability
import Foundation
import ServiceStack

public class CoverageSelfAvailGetRequest : Codable
{
    required public init(){}
}

public class CoverageSelfAvailResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var days:[CoverageSelfAvailDay] = []
    public var prefs:WorkerSchedulingPrefs
    public var rulesSummary:String
    public var timeOffNoticeDays:Int

    required public init(){}
}

public class CoverageSelfAvailDay : Codable
{
    public var day:String
    public var open:Bool
    public var windows:[CoverageSelfAvailWindow] = []

    required public init(){}
}

public class CoverageSelfAvailWindow : Codable
{
    public var start:String
    public var end:String
    public var preferred:Bool

    required public init(){}
}

public class WorkerSchedulingPrefs : Codable
{
    public var contactID:Int
    public var preferredWeeklyHours:Int?
    public var preferredMonthlyHours:Int?
    public var minShiftMinutes:Int?
    public var maxConsecutiveDays:Int?

    required public init(){}
}


Swift CoverageSelfAvailGetRequest DTOs

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

HTTP + CSV

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

GET /v1/coverage/self/availability HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Days":[{"Day":"String","Open":false,"Windows":[{"Start":"String","End":"String","Preferred":false}]}],"Prefs":{"ContactID":0,"PreferredWeeklyHours":0,"PreferredMonthlyHours":0,"MinShiftMinutes":0,"MaxConsecutiveDays":0},"RulesSummary":"String","TimeOffNoticeDays":0}