Trendsic Platform Service

<back to all web services

JobMaterialRequest

The following routes are available for this service:
PUT,OPTIONS/v1/Job/material
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class JobMaterialRequest
{
    open var ProjectID:Int? = null
    open var JobID:Int? = null
    open var MaterialID:Int? = null
    open var AddRemove:Int? = null
    open var StatusId:Int? = null
    open var Quantity:Int? = null
}

open class JobResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var Job:ArrayList<Job> = ArrayList<Job>()
    open var RequiresConfirm:Boolean? = null
}

open class Job
{
    open var JobID:Int? = null
    open var JobName:String? = null
    open var Description:String? = null
    open var JobTypeID:Int? = null
    open var ExpectedStartDate:Date? = null
    open var ActualStartDate:Date? = null
    open var ExpectedCompletionDate:Date? = null
    open var ActualEndDate:Date? = null
    open var Active:Boolean? = null
    open var CreatedByUID:UUID? = null
    open var ProjectID:Int? = null
    open var StatusId:Int? = null
    open var AdvancedScheduling:Boolean? = null
    open var ShowTimes:Boolean? = null
    open var Schedule:ArrayList<CalendarEvent> = ArrayList<CalendarEvent>()
    open var HasScheduledWorkers:Boolean? = null
    open var HasScheduledPlaceholders:Boolean? = null
    open var ClientApprovalStatus:String? = null
    open var InternalCost:BigDecimal? = null
    open var CostToClient:BigDecimal? = null
    open var Location:Location? = null
    open var ProjectLocationID:Int? = null
    open var ProjectLocationAreaID:Int? = null
    open var ProjectLocationName:String? = null
    open var ProjectLocationAddress1:String? = null
    open var ProjectLocationAddress2:String? = null
    open var ProjectLocationCity:String? = null
    open var ProjectLocationState:String? = null
    open var ProjectLocationZip:String? = null
    open var ProjectLocationAreaName:String? = null
}

open class CalendarEvent
{
    open var CalendarEventId:Int? = null
    open var CalendarId:UUID? = null
    open var EventStart:Date? = null
    open var EventEnd:Date? = null
    open var Location:String? = null
    open var Summary:String? = null
    open var Description:String? = null
    open var EventTypeId:Int? = null
    open var Recurrence:Boolean? = null
    open var RecurrenceFrequency:String? = null
    open var RecurrenceBy:String? = null
    open var RecurrenceByValue:String? = null
    open var RecurrenceUntil:Date? = null
    open var CreatedBy:String? = null
    open var CreatedByName:String? = null
    open var DateCreated:Date? = null
    open var ModifiedBy:String? = null
    open var DateModified:Date? = null
    open var Deleted:Boolean? = null
    open var TimeZone:String? = null
    open var Offset:Int? = null
    open var TextReminderSentDate:Date? = null
    open var Confirmed:Boolean? = null
    open var ConfirmationTextId:String? = null
    open var FirstTextReminderId:String? = null
    open var SecondTextReminderId:String? = null
    open var LocationUID:UUID? = null
    open var AgentReminderSentDate:Date? = null
    open var ContactId:Int? = null
    open var IsPrivate:Boolean? = null
    open var ProjectID:Int? = null
    open var JobID:Int? = null
    open var ProjectStartDate:Date? = null
    open var ProjectEndDate:Date? = null
    open var MaxCrewEndDate:Date? = null
    open var MaxEquipmentEndDate:Date? = null
    open var CheckInId:UUID? = null
    open var AllDay:Boolean? = null
    open var JobName:String? = null
    open var JobStatusName:String? = null
    open var JobStatusId:Int? = null
    open var ProjectName:String? = null
    open var ResourceId:Int? = null
    open var ResourceName:String? = null
    open var Original_EventStart:Date? = null
    open var Original_Recurrence:Boolean? = null
    open var Original_RecurrenceFrequency:String? = null
    open var Original_RecurrenceBy:String? = null
    open var Original_RecurrenceByValue:String? = null
    open var Original_RecurrenceUntil:Date? = null
    open var Checksum:String? = null
}

open class Location
{
    open var Id:UUID? = null
    open var ClientId:UUID? = null
    open var Name:String? = null
    open var Address1:String? = null
    open var Address2:String? = null
    open var City:String? = null
    open var State:String? = null
    open var Zip:String? = null
    open var Phone:String? = null
    open var Fax:String? = null
    open var URL:String? = null
    open var Email:String? = null
    open var TimeZone:String? = null
    open var Active:Boolean? = null
    open var EntDate:Date? = null
    open var ModDate:Date? = null
    open var LocationImage:String? = null
}

Kotlin JobMaterialRequest 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.

PUT /v1/Job/material HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<JobMaterialRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AddRemove>0</AddRemove>
  <JobID>0</JobID>
  <MaterialID>0</MaterialID>
  <ProjectID>0</ProjectID>
  <Quantity>0</Quantity>
  <StatusId>0</StatusId>
</JobMaterialRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<JobResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Job>
    <Job>
      <Active>false</Active>
      <ActualEndDate>0001-01-01T00:00:00</ActualEndDate>
      <ActualStartDate>0001-01-01T00:00:00</ActualStartDate>
      <AdvancedScheduling>false</AdvancedScheduling>
      <ClientApprovalStatus>String</ClientApprovalStatus>
      <CostToClient>0</CostToClient>
      <CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
      <Description>String</Description>
      <ExpectedCompletionDate>0001-01-01T00:00:00</ExpectedCompletionDate>
      <ExpectedStartDate>0001-01-01T00:00:00</ExpectedStartDate>
      <HasScheduledPlaceholders>false</HasScheduledPlaceholders>
      <HasScheduledWorkers>false</HasScheduledWorkers>
      <InternalCost>0</InternalCost>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <JobTypeID>0</JobTypeID>
      <Location>
        <Active>false</Active>
        <Address1>String</Address1>
        <Address2>String</Address2>
        <City>String</City>
        <ClientId>00000000-0000-0000-0000-000000000000</ClientId>
        <Email>String</Email>
        <EntDate>0001-01-01T00:00:00</EntDate>
        <Fax>String</Fax>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <LocationImage>String</LocationImage>
        <ModDate>0001-01-01T00:00:00</ModDate>
        <Name>String</Name>
        <Phone>String</Phone>
        <State>String</State>
        <TimeZone>String</TimeZone>
        <URL>String</URL>
        <Zip>String</Zip>
      </Location>
      <ProjectID>0</ProjectID>
      <ProjectLocationAddress1>String</ProjectLocationAddress1>
      <ProjectLocationAddress2>String</ProjectLocationAddress2>
      <ProjectLocationAreaID>0</ProjectLocationAreaID>
      <ProjectLocationAreaName>String</ProjectLocationAreaName>
      <ProjectLocationCity>String</ProjectLocationCity>
      <ProjectLocationID>0</ProjectLocationID>
      <ProjectLocationName>String</ProjectLocationName>
      <ProjectLocationState>String</ProjectLocationState>
      <ProjectLocationZip>String</ProjectLocationZip>
      <Schedule>
        <CalendarEvent>
          <AgentReminderSentDate>0001-01-01T00:00:00</AgentReminderSentDate>
          <AllDay>false</AllDay>
          <CalendarEventId>0</CalendarEventId>
          <CalendarId>00000000-0000-0000-0000-000000000000</CalendarId>
          <CheckInId>00000000-0000-0000-0000-000000000000</CheckInId>
          <Checksum>String</Checksum>
          <ConfirmationTextId>String</ConfirmationTextId>
          <Confirmed>false</Confirmed>
          <ContactId>0</ContactId>
          <CreatedBy>String</CreatedBy>
          <CreatedByName>String</CreatedByName>
          <DateCreated>0001-01-01T00:00:00</DateCreated>
          <DateModified>0001-01-01T00:00:00</DateModified>
          <Deleted>false</Deleted>
          <Description>String</Description>
          <EventEnd>0001-01-01T00:00:00</EventEnd>
          <EventStart>0001-01-01T00:00:00</EventStart>
          <EventTypeId>0</EventTypeId>
          <FirstTextReminderId>String</FirstTextReminderId>
          <IsPrivate>false</IsPrivate>
          <JobID>0</JobID>
          <JobName>String</JobName>
          <JobStatusId>0</JobStatusId>
          <JobStatusName>String</JobStatusName>
          <Location>String</Location>
          <LocationUID>00000000-0000-0000-0000-000000000000</LocationUID>
          <MaxCrewEndDate>0001-01-01T00:00:00</MaxCrewEndDate>
          <MaxEquipmentEndDate>0001-01-01T00:00:00</MaxEquipmentEndDate>
          <ModifiedBy>String</ModifiedBy>
          <Offset>0</Offset>
          <Original_EventStart>0001-01-01T00:00:00</Original_EventStart>
          <Original_Recurrence>false</Original_Recurrence>
          <Original_RecurrenceBy>String</Original_RecurrenceBy>
          <Original_RecurrenceByValue>String</Original_RecurrenceByValue>
          <Original_RecurrenceFrequency>String</Original_RecurrenceFrequency>
          <Original_RecurrenceUntil>0001-01-01T00:00:00</Original_RecurrenceUntil>
          <ProjectEndDate>0001-01-01T00:00:00</ProjectEndDate>
          <ProjectID>0</ProjectID>
          <ProjectName>String</ProjectName>
          <ProjectStartDate>0001-01-01T00:00:00</ProjectStartDate>
          <Recurrence>false</Recurrence>
          <RecurrenceBy>String</RecurrenceBy>
          <RecurrenceByValue>String</RecurrenceByValue>
          <RecurrenceFrequency>String</RecurrenceFrequency>
          <RecurrenceUntil>0001-01-01T00:00:00</RecurrenceUntil>
          <ResourceId>0</ResourceId>
          <ResourceName>String</ResourceName>
          <SecondTextReminderId>String</SecondTextReminderId>
          <Summary>String</Summary>
          <TextReminderSentDate>0001-01-01T00:00:00</TextReminderSentDate>
          <TimeZone>String</TimeZone>
        </CalendarEvent>
      </Schedule>
      <ShowTimes>false</ShowTimes>
      <StatusId>0</StatusId>
    </Job>
  </Job>
  <RequiresConfirm>false</RequiresConfirm>
  <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>
</JobResponse>