| POST | /v1/schedule/job/workers |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class ScheduleJobWorkersRequest
{
open var JobID:Int? = null
open var ProjectID:Int? = null
}
open class WorkerScheduleResponse
{
open var Items:ArrayList<WorkerScheduleItem> = ArrayList<WorkerScheduleItem>()
open var SchedulableJobs:ArrayList<SchedulableJob> = ArrayList<SchedulableJob>()
open var Workers:ArrayList<ScheduleWorker> = ArrayList<ScheduleWorker>()
open var Crews:ArrayList<Crew> = ArrayList<Crew>()
open var BudgetedCrew:ArrayList<ScheduleWorker> = ArrayList<ScheduleWorker>()
open var LastAssignment:ScheduleLastAssignment? = null
open var AutoFill:ScheduleAutoFillResult? = null
open var DatesScheduled:Int? = null
open var WorkersScheduled:Int? = null
open var ItemsRemoved:Int? = null
open var ResponseStatus:ResponseStatus? = null
}
open class WorkerScheduleItem
{
open var WorkerScheduleItemID:Int? = null
open var JobID:Int? = null
open var ProjectID:Int? = null
open var ContactID:Int? = null
open var ScheduledDate:Date? = null
open var SortOrder:Int? = null
open var SourceCrewID:Int? = null
open var Status:String? = null
open var StartedAt:Date? = null
open var CompletedAt:Date? = null
open var WorkerNotes:String? = null
open var JobName:String? = null
open var ProjectName:String? = null
open var FirstName:String? = null
open var LastName:String? = null
open var WorkerName:String? = null
open var SourceCrewName:String? = null
open var ProjectLocationID:Int? = null
open var ProjectLocationName:String? = null
open var LocationZip:String? = null
open var LocationCity:String? = null
open var LocationLatitude:BigDecimal? = null
open var LocationLongitude:BigDecimal? = null
open var JobStatusName:String? = null
open var BranchId:UUID? = null
open var BranchName:String? = null
open var WorkerHomeBranchId:UUID? = null
open var WorkerHomeBranchName:String? = null
}
open class SchedulableJob
{
open var JobID:Int? = null
open var JobName:String? = null
open var ProjectID:Int? = null
open var ProjectName:String? = null
open var StatusID:Int? = null
open var StatusName:String? = null
open var ProjectLocationID:Int? = null
open var ProjectLocationName:String? = null
open var LocationZip:String? = null
open var LocationCity:String? = null
open var LocationLatitude:BigDecimal? = null
open var LocationLongitude:BigDecimal? = null
open var ExpectedStartDate:Date? = null
open var ExpectedCompletionDate:Date? = null
open var IsRecurring:Boolean? = null
open var OccurrenceDates:ArrayList<String> = ArrayList<String>()
}
open class ScheduleWorker
{
open var ContactId:Int? = null
open var FirstName:String? = null
open var LastName:String? = null
open var Name:String? = null
open var Initials:String? = null
open var Rate:BigDecimal? = null
open var ImageUrl:String? = null
open var BranchId:UUID? = null
open var BranchName:String? = null
}
open class Crew
{
open var CrewID:Int? = null
open var CrewName:String? = null
open var CrewNumber:String? = null
open var CrewManagerContactID:Int? = null
open var CrewManagerContactName:String? = null
open var CrewColor:String? = null
open var RecordCreatedDate:Date? = null
open var Active:Boolean? = null
open var CreatedByUID:UUID? = null
open var ProjectID:Int? = null
open var CrewMemberCount:Int? = null
open var ProjectCrewID:Int? = null
open var ProjectName:String? = null
open var BranchId:UUID? = null
open var BranchName:String? = null
}
open class ScheduleLastAssignment
{
open var JobID:Int? = null
open var ContactIds:ArrayList<Int> = ArrayList<Int>()
open var SourceCrewID:Int? = null
}
open class ScheduleAutoFillResult
{
open var JobsFilled:Int? = null
open var JobsSkipped:Int? = null
open var VisitsScheduled:Int? = null
}
Kotlin ScheduleJobWorkersRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/schedule/job/workers HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ScheduleJobWorkersRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<JobID>0</JobID>
<ProjectID>0</ProjectID>
</ScheduleJobWorkersRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<WorkerScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AutoFill>
<JobsFilled>0</JobsFilled>
<JobsSkipped>0</JobsSkipped>
<VisitsScheduled>0</VisitsScheduled>
</AutoFill>
<BudgetedCrew>
<ScheduleWorker>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<ContactId>0</ContactId>
<FirstName>String</FirstName>
<ImageUrl>String</ImageUrl>
<Initials>String</Initials>
<LastName>String</LastName>
<Name>String</Name>
<Rate>0</Rate>
</ScheduleWorker>
</BudgetedCrew>
<Crews>
<Crew>
<Active>false</Active>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
<CrewColor>String</CrewColor>
<CrewID>0</CrewID>
<CrewManagerContactID>0</CrewManagerContactID>
<CrewManagerContactName>String</CrewManagerContactName>
<CrewMemberCount>0</CrewMemberCount>
<CrewName>String</CrewName>
<CrewNumber>String</CrewNumber>
<ProjectCrewID>0</ProjectCrewID>
<ProjectID>0</ProjectID>
<ProjectName>String</ProjectName>
<RecordCreatedDate>0001-01-01T00:00:00</RecordCreatedDate>
</Crew>
</Crews>
<DatesScheduled>0</DatesScheduled>
<Items>
<WorkerScheduleItem>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<CompletedAt>0001-01-01T00:00:00</CompletedAt>
<ContactID>0</ContactID>
<FirstName>String</FirstName>
<JobID>0</JobID>
<JobName>String</JobName>
<JobStatusName>String</JobStatusName>
<LastName>String</LastName>
<LocationCity>String</LocationCity>
<LocationLatitude>0</LocationLatitude>
<LocationLongitude>0</LocationLongitude>
<LocationZip>String</LocationZip>
<ProjectID>0</ProjectID>
<ProjectLocationID>0</ProjectLocationID>
<ProjectLocationName>String</ProjectLocationName>
<ProjectName>String</ProjectName>
<ScheduledDate>0001-01-01T00:00:00</ScheduledDate>
<SortOrder>0</SortOrder>
<SourceCrewID>0</SourceCrewID>
<SourceCrewName>String</SourceCrewName>
<StartedAt>0001-01-01T00:00:00</StartedAt>
<Status>String</Status>
<WorkerHomeBranchId>00000000-0000-0000-0000-000000000000</WorkerHomeBranchId>
<WorkerHomeBranchName>String</WorkerHomeBranchName>
<WorkerName>String</WorkerName>
<WorkerNotes>String</WorkerNotes>
<WorkerScheduleItemID>0</WorkerScheduleItemID>
</WorkerScheduleItem>
</Items>
<ItemsRemoved>0</ItemsRemoved>
<LastAssignment>
<ContactIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</ContactIds>
<JobID>0</JobID>
<SourceCrewID>0</SourceCrewID>
</LastAssignment>
<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>
<SchedulableJobs>
<SchedulableJob>
<ExpectedCompletionDate>0001-01-01T00:00:00</ExpectedCompletionDate>
<ExpectedStartDate>0001-01-01T00:00:00</ExpectedStartDate>
<IsRecurring>false</IsRecurring>
<JobID>0</JobID>
<JobName>String</JobName>
<LocationCity>String</LocationCity>
<LocationLatitude>0</LocationLatitude>
<LocationLongitude>0</LocationLongitude>
<LocationZip>String</LocationZip>
<OccurrenceDates xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</OccurrenceDates>
<ProjectID>0</ProjectID>
<ProjectLocationID>0</ProjectLocationID>
<ProjectLocationName>String</ProjectLocationName>
<ProjectName>String</ProjectName>
<StatusID>0</StatusID>
<StatusName>String</StatusName>
</SchedulableJob>
</SchedulableJobs>
<Workers>
<ScheduleWorker>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<ContactId>0</ContactId>
<FirstName>String</FirstName>
<ImageUrl>String</ImageUrl>
<Initials>String</Initials>
<LastName>String</LastName>
<Name>String</Name>
<Rate>0</Rate>
</ScheduleWorker>
</Workers>
<WorkersScheduled>0</WorkersScheduled>
</WorkerScheduleResponse>