Trendsic Platform Service

<back to all web services

CoveragePtoCreateRequest

Requires Authentication
The following routes are available for this service:
POST/v1/coverage/pto
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class CoveragePlannedItem
            Public Overridable Property WorkerTimeOffID As Integer
            Public Overridable Property ContactId As Integer
            Public Overridable Property WorkerName As String
            Public Overridable Property Initials As String
            Public Overridable Property Dates As String
            Public Overridable Property Reason As String
            Public Overridable Property Stage As String
            Public Overridable Property StageLabel As String
            Public Overridable Property NeedBook As Boolean
            Public Overridable Property CoverageGapId As Integer?
            Public Overridable Property Checks As List(Of CoveragePtoCheck) = New List(Of CoveragePtoCheck)
            Public Overridable Property DenyReason As String
        End Class

        Public Partial Class CoveragePlannedResponse
            Public Overridable Property Items As List(Of CoveragePlannedItem) = New List(Of CoveragePlannedItem)
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class CoveragePtoCheck
            Public Overridable Property Ok As Boolean
            Public Overridable Property Text As String
        End Class

        Public Partial Class CoveragePtoCreateRequest
            Public Overridable Property ContactID As Integer
            Public Overridable Property StartDate As Date
            Public Overridable Property EndDate As Date
            Public Overridable Property Reason As String
        End Class
    End Namespace
End Namespace

VB.NET CoveragePtoCreateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /v1/coverage/pto HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ContactID":0,"StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","Reason":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Items":[{"WorkerTimeOffID":0,"ContactId":0,"WorkerName":"String","Initials":"String","Dates":"String","Reason":"String","Stage":"String","StageLabel":"String","NeedBook":false,"CoverageGapId":0,"Checks":[{"Ok":false,"Text":"String"}],"DenyReason":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}