Trendsic Platform Service

<back to all web services

ScheduleJobWorkersRequest

Requires Authentication
The following routes are available for this service:
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 .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/schedule/job/workers HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"JobID":0,"ProjectID":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Items":[{"WorkerScheduleItemID":0,"JobID":0,"ProjectID":0,"ContactID":0,"ScheduledDate":"0001-01-01T00:00:00.0000000","SortOrder":0,"SourceCrewID":0,"Status":"String","StartedAt":"0001-01-01T00:00:00.0000000","CompletedAt":"0001-01-01T00:00:00.0000000","WorkerNotes":"String","JobName":"String","ProjectName":"String","FirstName":"String","LastName":"String","WorkerName":"String","SourceCrewName":"String","ProjectLocationID":0,"ProjectLocationName":"String","LocationZip":"String","LocationCity":"String","LocationLatitude":0,"LocationLongitude":0,"JobStatusName":"String","BranchId":"00000000000000000000000000000000","BranchName":"String","WorkerHomeBranchId":"00000000000000000000000000000000","WorkerHomeBranchName":"String"}],"SchedulableJobs":[{"JobID":0,"JobName":"String","ProjectID":0,"ProjectName":"String","StatusID":0,"StatusName":"String","ProjectLocationID":0,"ProjectLocationName":"String","LocationZip":"String","LocationCity":"String","LocationLatitude":0,"LocationLongitude":0,"ExpectedStartDate":"0001-01-01T00:00:00.0000000","ExpectedCompletionDate":"0001-01-01T00:00:00.0000000","IsRecurring":false,"OccurrenceDates":["String"]}],"Workers":[{"ContactId":0,"FirstName":"String","LastName":"String","Name":"String","Initials":"String","Rate":0,"ImageUrl":"String","BranchId":"00000000000000000000000000000000","BranchName":"String"}],"Crews":[{"CrewID":0,"CrewName":"String","CrewNumber":"String","CrewManagerContactID":0,"CrewManagerContactName":"String","CrewColor":"String","RecordCreatedDate":"0001-01-01T00:00:00.0000000","Active":false,"CreatedByUID":"00000000000000000000000000000000","ProjectID":0,"CrewMemberCount":0,"ProjectCrewID":0,"ProjectName":"String","BranchId":"00000000000000000000000000000000","BranchName":"String"}],"BudgetedCrew":[{"ContactId":0,"FirstName":"String","LastName":"String","Name":"String","Initials":"String","Rate":0,"ImageUrl":"String","BranchId":"00000000000000000000000000000000","BranchName":"String"}],"LastAssignment":{"JobID":0,"ContactIds":[0],"SourceCrewID":0},"AutoFill":{"JobsFilled":0,"JobsSkipped":0,"VisitsScheduled":0},"DatesScheduled":0,"WorkersScheduled":0,"ItemsRemoved":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}