Trendsic Platform Service

<back to all web services

JobScheduleRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Job/Schedule/{JobID}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CalendarEvent:
    calendar_event_id: int = 0
    calendar_id: Optional[str] = None
    event_start: datetime.datetime = datetime.datetime(1, 1, 1)
    event_end: datetime.datetime = datetime.datetime(1, 1, 1)
    location: Optional[str] = None
    summary: Optional[str] = None
    description: Optional[str] = None
    event_type_id: int = 0
    recurrence: bool = False
    recurrence_frequency: Optional[str] = None
    recurrence_by: Optional[str] = None
    recurrence_by_value: Optional[str] = None
    recurrence_until: datetime.datetime = datetime.datetime(1, 1, 1)
    created_by: Optional[str] = None
    created_by_name: Optional[str] = None
    date_created: datetime.datetime = datetime.datetime(1, 1, 1)
    modified_by: Optional[str] = None
    date_modified: datetime.datetime = datetime.datetime(1, 1, 1)
    deleted: bool = False
    time_zone: Optional[str] = None
    offset: int = 0
    text_reminder_sent_date: datetime.datetime = datetime.datetime(1, 1, 1)
    confirmed: bool = False
    confirmation_text_id: Optional[str] = None
    first_text_reminder_id: Optional[str] = None
    second_text_reminder_id: Optional[str] = None
    location_u_i_d: Optional[str] = None
    agent_reminder_sent_date: datetime.datetime = datetime.datetime(1, 1, 1)
    contact_id: int = 0
    is_private: bool = False
    project_i_d: int = 0
    job_i_d: int = 0
    project_start_date: datetime.datetime = datetime.datetime(1, 1, 1)
    project_end_date: datetime.datetime = datetime.datetime(1, 1, 1)
    max_crew_end_date: datetime.datetime = datetime.datetime(1, 1, 1)
    max_equipment_end_date: datetime.datetime = datetime.datetime(1, 1, 1)
    check_in_id: Optional[str] = None
    all_day: bool = False
    job_name: Optional[str] = None
    job_status_name: Optional[str] = None
    job_status_id: int = 0
    project_name: Optional[str] = None
    resource_id: int = 0
    resource_name: Optional[str] = None
    original__event_start: datetime.datetime = datetime.datetime(1, 1, 1)
    original__recurrence: bool = False
    original__recurrence_frequency: Optional[str] = None
    original__recurrence_by: Optional[str] = None
    original__recurrence_by_value: Optional[str] = None
    original__recurrence_until: datetime.datetime = datetime.datetime(1, 1, 1)
    checksum: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class JobScheduleResponse:
    response_status: Optional[ResponseStatus] = None
    job_schedule: List[CalendarEvent] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class JobScheduleRequest:
    job_i_d: int = 0

Python JobScheduleRequest 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.

POST /v1/Job/Schedule/{JobID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

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

<JobScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <JobSchedule>
    <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>
  </JobSchedule>
  <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>
</JobScheduleResponse>