Trendsic Platform Service

<back to all web services

ServiceAgreementRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/project/{ProjectID}/agreements
GET,POST,PUT,DELETE,OPTIONS/v1/serviceagreement
GET,DELETE,OPTIONS/v1/serviceagreement/{AgreementID}
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 ServiceAgreement
            Public Overridable Property AgreementID As Integer
            Public Overridable Property AgreementUID As Guid
            Public Overridable Property TenantId As Guid
            Public Overridable Property BranchId As Guid
            Public Overridable Property BranchName As String
            Public Overridable Property ProjectID As Integer
            Public Overridable Property ProjectName As String
            Public Overridable Property Name As String
            Public Overridable Property Status As String
            Public Overridable Property PricingShape As String
            Public Overridable Property MonthlyAmount As Decimal?
            Public Overridable Property PerVisitAmount As Decimal?
            Public Overridable Property SkipPolicy As String
            Public Overridable Property SeasonStartMonth As Integer?
            Public Overridable Property SeasonStartDay As Integer?
            Public Overridable Property SeasonEndMonth As Integer?
            Public Overridable Property SeasonEndDay As Integer?
            Public Overridable Property RecurrenceFrequency As String
            Public Overridable Property RecurrenceBy As String
            Public Overridable Property RecurrenceByValue As String
            Public Overridable Property EffectiveStartDate As Date?
            Public Overridable Property EndDate As Date?
            Public Overridable Property PreferredCrewID As Integer?
            Public Overridable Property PreferredCrewName As String
            Public Overridable Property ExternalRef As String
            Public Overridable Property CreatedBy As String
            Public Overridable Property CreatedAt As Date?
            Public Overridable Property UpdatedBy As String
            Public Overridable Property UpdatedAt As Date?
            Public Overridable Property NextVisitDate As Date?
            Public Overridable Property VisitsThisPeriod As Integer
        End Class

        Public Partial Class ServiceAgreementRequest
            Public Overridable Property AgreementID As Integer
            Public Overridable Property ProjectID As Integer
            Public Overridable Property ServiceAgreement As List(Of ServiceAgreement) = New List(Of ServiceAgreement)
        End Class

        Public Partial Class ServiceAgreementResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property ServiceAgreement As List(Of ServiceAgreement) = New List(Of ServiceAgreement)
        End Class
    End Namespace
End Namespace

VB.NET ServiceAgreementRequest 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.

POST /v1/serviceagreement HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"AgreementID":0,"ProjectID":0,"ServiceAgreement":[{"AgreementID":0,"AgreementUID":"00000000000000000000000000000000","TenantId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","BranchName":"String","ProjectID":0,"ProjectName":"String","Name":"String","Status":"String","PricingShape":"String","MonthlyAmount":0,"PerVisitAmount":0,"SkipPolicy":"String","SeasonStartMonth":0,"SeasonStartDay":0,"SeasonEndMonth":0,"SeasonEndDay":0,"RecurrenceFrequency":"String","RecurrenceBy":"String","RecurrenceByValue":"String","EffectiveStartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","PreferredCrewID":0,"PreferredCrewName":"String","ExternalRef":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedBy":"String","UpdatedAt":"0001-01-01T00:00:00.0000000","NextVisitDate":"0001-01-01T00:00:00.0000000","VisitsThisPeriod":0}]}
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"}},"ServiceAgreement":[{"AgreementID":0,"AgreementUID":"00000000000000000000000000000000","TenantId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","BranchName":"String","ProjectID":0,"ProjectName":"String","Name":"String","Status":"String","PricingShape":"String","MonthlyAmount":0,"PerVisitAmount":0,"SkipPolicy":"String","SeasonStartMonth":0,"SeasonStartDay":0,"SeasonEndMonth":0,"SeasonEndDay":0,"RecurrenceFrequency":"String","RecurrenceBy":"String","RecurrenceByValue":"String","EffectiveStartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","PreferredCrewID":0,"PreferredCrewName":"String","ExternalRef":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedBy":"String","UpdatedAt":"0001-01-01T00:00:00.0000000","NextVisitDate":"0001-01-01T00:00:00.0000000","VisitsThisPeriod":0}]}