SupplierConnect Gateway API

<back to all web services

CancelScheduleRequest

Creates or Reschedules a SupplierConnect schedule. This will return the id of the schedule request created and the communication id of the notification sent.

Requires Authentication
The following routes are available for this service:
POST/api/schedules/{RequestId}/cancel
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 ScheduleResponse:
    reference_id: Optional[str] = None
    communication_id: Optional[str] = None
    success: bool = False
    message: Optional[str] = None
    payload: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ObjectReference:
    rms_table_context_id: Optional[str] = None
    alternate_key: Optional[str] = None
    data_source_instance_id: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ContactInfo:
    id: Optional[str] = None
    name: Optional[str] = None
    email: Optional[str] = None
    phone: Optional[str] = None
    contact_reference: Optional[ObjectReference] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ProjectInfo:
    id: Optional[str] = None
    name: Optional[str] = None
    reference: Optional[str] = None
    description: Optional[str] = None
    address: Optional[str] = None
    house_type: Optional[str] = None
    elevation: Optional[str] = None
    customer_name: Optional[str] = None
    supervisor: Optional[ContactInfo] = None
    project_reference: Optional[ObjectReference] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PurchaseOrderInfo:
    id: Optional[str] = None
    reference: Optional[str] = None
    description: Optional[str] = None
    purchase_order_reference: Optional[ObjectReference] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ActivityReference:
    # @ApiMember(Description="Name/details of the activity", IsRequired=true, Name="Name")
    name: Optional[str] = None
    """
    Name/details of the activity
    """


    notes: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduleParams:
    name: Optional[str] = None
    value: Optional[str] = None


class AttachmentType(str, Enum):
    URL = 'Url'
    FILE_STREAM = 'FileStream'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EmailAttachment:
    file_name: Optional[str] = None
    content_type: Optional[str] = None
    path: Optional[str] = None
    url: Optional[str] = None
    length: int = 0
    file_stream: Optional[bytes] = None
    stream_content: Optional[str] = None
    attachment_type: Optional[AttachmentType] = None
    processed_and_uploaded_as_blob: bool = False


# @Api(Description="Creates or Reschedules a SupplierConnect schedule. This will return the id of the schedule request created and the communication id of the notification sent.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CancelScheduleRequest:
    """
    Creates or Reschedules a SupplierConnect schedule. This will return the id of the schedule request created and the communication id of the notification sent.
    """

    # @ApiMember(Description="Id of the schedule request to be recreated", IsRequired=true, Name="RequestId")
    request_id: Optional[str] = None
    """
    Id of the schedule request to be recreated
    """


    # @ApiMember(Description="Date/Time of the activity", IsRequired=true, Name="ScheduleDateTime")
    # @Required()
    schedule_date_time: datetime.datetime = datetime.datetime(1, 1, 1)
    """
    Date/Time of the activity
    """


    requester: Optional[ContactInfo] = None
    supplier: Optional[ContactInfo] = None
    project: Optional[ProjectInfo] = None
    purchase_order: Optional[PurchaseOrderInfo] = None
    activity: Optional[ActivityReference] = None
    params: Optional[List[ScheduleParams]] = None
    attachments: Optional[List[EmailAttachment]] = None

Python CancelScheduleRequest 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 /api/schedules/{RequestId}/cancel HTTP/1.1 
Host: production-eros-gateway-api-supplierconnect.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CancelScheduleRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.SupplierConnect.Model.APIModels">
  <Activity>
    <name>String</name>
    <notes>String</notes>
  </Activity>
  <Attachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.Library">
    <d2p1:EmailAttachment>
      <d2p1:AttachmentType>Url</d2p1:AttachmentType>
      <d2p1:ContentType>String</d2p1:ContentType>
      <d2p1:FileName>String</d2p1:FileName>
      <d2p1:FileStream xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.IO" i:nil="true" />
      <d2p1:Length>0</d2p1:Length>
      <d2p1:Path>String</d2p1:Path>
      <d2p1:ProcessedAndUploadedAsBlob>false</d2p1:ProcessedAndUploadedAsBlob>
      <d2p1:StreamContent>String</d2p1:StreamContent>
      <d2p1:Url>String</d2p1:Url>
    </d2p1:EmailAttachment>
  </Attachments>
  <Params>
    <ScheduleParams>
      <Name>String</Name>
      <Value>String</Value>
    </ScheduleParams>
  </Params>
  <Project>
    <Address>String</Address>
    <CustomerName>String</CustomerName>
    <Description>String</Description>
    <Elevation>String</Elevation>
    <HouseType>String</HouseType>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <Name>String</Name>
    <ProjectReference>
      <AlternateKey>String</AlternateKey>
      <DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
      <RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
    </ProjectReference>
    <Reference>String</Reference>
    <Supervisor>
      <ContactReference>
        <AlternateKey>String</AlternateKey>
        <DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
        <RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
      </ContactReference>
      <Email>String</Email>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <Name>String</Name>
      <Phone>String</Phone>
    </Supervisor>
  </Project>
  <PurchaseOrder>
    <Description>String</Description>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <PurchaseOrderReference>
      <AlternateKey>String</AlternateKey>
      <DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
      <RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
    </PurchaseOrderReference>
    <Reference>String</Reference>
  </PurchaseOrder>
  <RequestId>00000000-0000-0000-0000-000000000000</RequestId>
  <Requester>
    <ContactReference>
      <AlternateKey>String</AlternateKey>
      <DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
      <RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
    </ContactReference>
    <Email>String</Email>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <Name>String</Name>
    <Phone>String</Phone>
  </Requester>
  <ScheduleDateTime>0001-01-01T00:00:00</ScheduleDateTime>
  <Supplier>
    <ContactReference>
      <AlternateKey>String</AlternateKey>
      <DataSourceInstanceId>00000000-0000-0000-0000-000000000000</DataSourceInstanceId>
      <RmsTableContextId>00000000-0000-0000-0000-000000000000</RmsTableContextId>
    </ContactReference>
    <Email>String</Email>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <Name>String</Name>
    <Phone>String</Phone>
  </Supplier>
</CancelScheduleRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.SupplierConnect.Model.APIModels">
  <CommunicationId>00000000-0000-0000-0000-000000000000</CommunicationId>
  <Message>String</Message>
  <Payload>String</Payload>
  <ReferenceId>00000000-0000-0000-0000-000000000000</ReferenceId>
  <Success>false</Success>
</ScheduleResponse>