Trendsic Platform Service

<back to all web services

BranchCalendarRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/queue/calendar/{LocationId}
import Foundation
import ServiceStack

public class BranchCalendarRequest : Codable
{
    public var locationId:String
    public var from:Date?
    public var to:Date?
    public var includeCancelled:Bool

    required public init(){}
}

public class BranchCalendarResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var branch:BranchCalendarBranch
    public var lines:[BranchCalendarLine] = []
    public var events:[BranchCalendarEvent] = []
    public var staffing:[BranchCalendarStaffHour] = []
    public var history:BranchCalendarHistory
    public var colorByService:Bool
    public var serverNowLocal:Date

    required public init(){}
}

public class BranchCalendarBranch : Codable
{
    public var id:String
    public var name:String
    public var street:String
    public var timeZone:String
    public var windows:Int
    public var hours:[BranchCalendarHours] = []

    required public init(){}
}

public class BranchCalendarHours : Codable
{
    public var date:String
    public var opens:String
    public var closes:String
    public var closed:Bool

    required public init(){}
}

public class BranchCalendarLine : Codable
{
    public var id:String
    public var name:String
    public var minutes:Int
    public var color:String

    required public init(){}
}

public class BranchCalendarEvent : Codable
{
    public var calendarEventId:Int
    public var kind:String
    public var title:String
    public var startLocal:Date
    public var endLocal:Date?
    public var allDay:Bool
    public var Description:String
    public var customer:BranchCalendarCustomer
    public var services:[BranchCalendarServiceItem] = []
    public var status:BranchCalendarStatus
    public var checkInId:String?
    public var paperwork:BranchCalendarPaperwork

    required public init(){}
}

public class BranchCalendarCustomer : Codable
{
    public var contactId:Int
    public var contactGuid:String?
    public var name:String
    public var phone:String
    public var email:String

    required public init(){}
}

public class BranchCalendarServiceItem : Codable
{
    public var lineId:String?
    public var name:String
    public var minutes:Int

    required public init(){}
}

public class BranchCalendarStatus : Codable
{
    public var state:String
    public var ticketLabel:String
    public var window:String
    public var arrivedAt:Date?
    public var calledAt:Date?
    public var servedAt:Date?
    public var noShowAt:Date?
    public var cancelledAt:Date?
    public var cancelledBy:String
    public var source:String
    public var canCheckIn:Bool
    public var canNoShow:Bool
    public var canReopen:Bool
    public var canChange:Bool
    public var canCancel:Bool

    required public init(){}
}

public class BranchCalendarPaperwork : Codable
{
    public var asksQuestionnaire:Bool
    public var asksUpload:Bool
    public var submitted:Bool

    required public init(){}
}

public class BranchCalendarStaffHour : Codable
{
    public var date:String
    public var hour:Int
    public var windows:Double
    public var source:String

    required public init(){}
}

public class BranchCalendarHistory : Codable
{
    public var byWeekdayHour:[BranchCalendarWeekdayHour] = []
    public var byHour:[BranchCalendarHourMean] = []

    required public init(){}
}

public class BranchCalendarWeekdayHour : Codable
{
    public var weekday:Int
    public var hour:Int
    public var windows:Double
    public var days:Int

    required public init(){}
}

public class BranchCalendarHourMean : Codable
{
    public var hour:Int
    public var windows:Double
    public var days:Int

    required public init(){}
}


Swift BranchCalendarRequest DTOs

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

HTTP + XML

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

GET /v1/queue/calendar/{LocationId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BranchCalendarResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Branch>
    <Hours>
      <BranchCalendarHours>
        <Closed>false</Closed>
        <Closes>String</Closes>
        <Date>String</Date>
        <Opens>String</Opens>
      </BranchCalendarHours>
    </Hours>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <Name>String</Name>
    <Street>String</Street>
    <TimeZone>String</TimeZone>
    <Windows>0</Windows>
  </Branch>
  <ColorByService>false</ColorByService>
  <Events>
    <BranchCalendarEvent>
      <AllDay>false</AllDay>
      <CalendarEventId>0</CalendarEventId>
      <CheckInId>00000000-0000-0000-0000-000000000000</CheckInId>
      <Customer>
        <ContactGuid>00000000-0000-0000-0000-000000000000</ContactGuid>
        <ContactId>0</ContactId>
        <Email>String</Email>
        <Name>String</Name>
        <Phone>String</Phone>
      </Customer>
      <Description>String</Description>
      <EndLocal>0001-01-01T00:00:00</EndLocal>
      <Kind>String</Kind>
      <Paperwork>
        <AsksQuestionnaire>false</AsksQuestionnaire>
        <AsksUpload>false</AsksUpload>
        <Submitted>false</Submitted>
      </Paperwork>
      <Services>
        <BranchCalendarServiceItem>
          <LineId>00000000-0000-0000-0000-000000000000</LineId>
          <Minutes>0</Minutes>
          <Name>String</Name>
        </BranchCalendarServiceItem>
      </Services>
      <StartLocal>0001-01-01T00:00:00</StartLocal>
      <Status>
        <ArrivedAt>0001-01-01T00:00:00</ArrivedAt>
        <CalledAt>0001-01-01T00:00:00</CalledAt>
        <CanCancel>false</CanCancel>
        <CanChange>false</CanChange>
        <CanCheckIn>false</CanCheckIn>
        <CanNoShow>false</CanNoShow>
        <CanReopen>false</CanReopen>
        <CancelledAt>0001-01-01T00:00:00</CancelledAt>
        <CancelledBy>String</CancelledBy>
        <NoShowAt>0001-01-01T00:00:00</NoShowAt>
        <ServedAt>0001-01-01T00:00:00</ServedAt>
        <Source>String</Source>
        <State>String</State>
        <TicketLabel>String</TicketLabel>
        <Window>String</Window>
      </Status>
      <Title>String</Title>
    </BranchCalendarEvent>
  </Events>
  <History>
    <ByHour>
      <BranchCalendarHourMean>
        <Days>0</Days>
        <Hour>0</Hour>
        <Windows>0</Windows>
      </BranchCalendarHourMean>
    </ByHour>
    <ByWeekdayHour>
      <BranchCalendarWeekdayHour>
        <Days>0</Days>
        <Hour>0</Hour>
        <Weekday>0</Weekday>
        <Windows>0</Windows>
      </BranchCalendarWeekdayHour>
    </ByWeekdayHour>
  </History>
  <Lines>
    <BranchCalendarLine>
      <Color>String</Color>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <Minutes>0</Minutes>
      <Name>String</Name>
    </BranchCalendarLine>
  </Lines>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <ServerNowLocal>0001-01-01T00:00:00</ServerNowLocal>
  <Staffing>
    <BranchCalendarStaffHour>
      <Date>String</Date>
      <Hour>0</Hour>
      <Source>String</Source>
      <Windows>0</Windows>
    </BranchCalendarStaffHour>
  </Staffing>
</BranchCalendarResponse>