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 java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    /**
    * Creates or Reschedules a SupplierConnect schedule. This will return the id of the schedule request created and the communication id of the notification sent.
    */
    @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.")
    @DataContract
    public static class CancelScheduleRequest
    {
        /**
        * Id of the schedule request to be recreated
        */
        @DataMember(Name="RequestId")
        @SerializedName("RequestId")
        @ApiMember(Description="Id of the schedule request to be recreated", IsRequired=true, Name="RequestId")
        public UUID RequestId = null;

        /**
        * Date/Time of the activity
        */
        @DataMember(Name="ScheduleDateTime")
        @SerializedName("ScheduleDateTime")
        @ApiMember(Description="Date/Time of the activity", IsRequired=true, Name="ScheduleDateTime")
        @Required()
        public Date ScheduleDateTime = null;

        @DataMember(Name="Requester")
        @SerializedName("Requester")
        public ContactInfo Requester = null;

        @DataMember(Name="Supplier")
        @SerializedName("Supplier")
        public ContactInfo Supplier = null;

        @DataMember(Name="Project")
        @SerializedName("Project")
        public ProjectInfo Project = null;

        @DataMember(Name="PurchaseOrder")
        @SerializedName("PurchaseOrder")
        public PurchaseOrderInfo PurchaseOrder = null;

        @DataMember(Name="Activity")
        @SerializedName("Activity")
        public ActivityReference Activity = null;

        @DataMember(Name="Params")
        @SerializedName("Params")
        public ArrayList<ScheduleParams> Params = null;

        @DataMember(Name="Attachments")
        @SerializedName("Attachments")
        public ArrayList<EmailAttachment> Attachments = null;
        
        public UUID getRequestId() { return RequestId; }
        public CancelScheduleRequest setRequestId(UUID value) { this.RequestId = value; return this; }
        public Date getScheduleDateTime() { return ScheduleDateTime; }
        public CancelScheduleRequest setScheduleDateTime(Date value) { this.ScheduleDateTime = value; return this; }
        public ContactInfo getRequester() { return Requester; }
        public CancelScheduleRequest setRequester(ContactInfo value) { this.Requester = value; return this; }
        public ContactInfo getSupplier() { return Supplier; }
        public CancelScheduleRequest setSupplier(ContactInfo value) { this.Supplier = value; return this; }
        public ProjectInfo getProject() { return Project; }
        public CancelScheduleRequest setProject(ProjectInfo value) { this.Project = value; return this; }
        public PurchaseOrderInfo getPurchaseOrder() { return PurchaseOrder; }
        public CancelScheduleRequest setPurchaseOrder(PurchaseOrderInfo value) { this.PurchaseOrder = value; return this; }
        public ActivityReference getActivity() { return Activity; }
        public CancelScheduleRequest setActivity(ActivityReference value) { this.Activity = value; return this; }
        public ArrayList<ScheduleParams> getParams() { return Params; }
        public CancelScheduleRequest setParams(ArrayList<ScheduleParams> value) { this.Params = value; return this; }
        public ArrayList<EmailAttachment> getAttachments() { return Attachments; }
        public CancelScheduleRequest setAttachments(ArrayList<EmailAttachment> value) { this.Attachments = value; return this; }
    }

    @DataContract
    public static class ContactInfo
    {
        @DataMember(Name="Id")
        @SerializedName("Id")
        public UUID Id = null;

        @DataMember(Name="Name")
        @SerializedName("Name")
        public String Name = null;

        @DataMember(Name="Email")
        @SerializedName("Email")
        public String Email = null;

        @DataMember(Name="Phone")
        @SerializedName("Phone")
        public String Phone = null;

        @DataMember(Name="ContactReference")
        @SerializedName("ContactReference")
        public ObjectReference ContactReference = null;
        
        public UUID getId() { return Id; }
        public ContactInfo setId(UUID value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public ContactInfo setName(String value) { this.Name = value; return this; }
        public String getEmail() { return Email; }
        public ContactInfo setEmail(String value) { this.Email = value; return this; }
        public String getPhone() { return Phone; }
        public ContactInfo setPhone(String value) { this.Phone = value; return this; }
        public ObjectReference getContactReference() { return ContactReference; }
        public ContactInfo setContactReference(ObjectReference value) { this.ContactReference = value; return this; }
    }

    @DataContract
    public static class ObjectReference
    {
        @DataMember(Name="RmsTableContextId")
        @SerializedName("RmsTableContextId")
        public UUID RmsTableContextId = null;

        @DataMember(Name="AlternateKey")
        @SerializedName("AlternateKey")
        public String AlternateKey = null;

        @DataMember(Name="DataSourceInstanceId")
        @SerializedName("DataSourceInstanceId")
        public UUID DataSourceInstanceId = null;
        
        public UUID getRmsTableContextId() { return RmsTableContextId; }
        public ObjectReference setRmsTableContextId(UUID value) { this.RmsTableContextId = value; return this; }
        public String getAlternateKey() { return AlternateKey; }
        public ObjectReference setAlternateKey(String value) { this.AlternateKey = value; return this; }
        public UUID getDataSourceInstanceId() { return DataSourceInstanceId; }
        public ObjectReference setDataSourceInstanceId(UUID value) { this.DataSourceInstanceId = value; return this; }
    }

    @DataContract
    public static class ProjectInfo
    {
        @DataMember(Name="Id")
        @SerializedName("Id")
        public UUID Id = null;

        @DataMember(Name="Name")
        @SerializedName("Name")
        public String Name = null;

        @DataMember(Name="Reference")
        @SerializedName("Reference")
        public String Reference = null;

        @DataMember(Name="Description")
        @SerializedName("Description")
        public String Description = null;

        @DataMember(Name="Address")
        @SerializedName("Address")
        public String Address = null;

        @DataMember(Name="HouseType")
        @SerializedName("HouseType")
        public String HouseType = null;

        @DataMember(Name="Elevation")
        @SerializedName("Elevation")
        public String Elevation = null;

        @DataMember(Name="CustomerName")
        @SerializedName("CustomerName")
        public String CustomerName = null;

        @DataMember(Name="Supervisor")
        @SerializedName("Supervisor")
        public ContactInfo Supervisor = null;

        @DataMember(Name="ProjectReference")
        @SerializedName("ProjectReference")
        public ObjectReference ProjectReference = null;
        
        public UUID getId() { return Id; }
        public ProjectInfo setId(UUID value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public ProjectInfo setName(String value) { this.Name = value; return this; }
        public String getReference() { return Reference; }
        public ProjectInfo setReference(String value) { this.Reference = value; return this; }
        public String getDescription() { return Description; }
        public ProjectInfo setDescription(String value) { this.Description = value; return this; }
        public String getAddress() { return Address; }
        public ProjectInfo setAddress(String value) { this.Address = value; return this; }
        public String getHouseType() { return HouseType; }
        public ProjectInfo setHouseType(String value) { this.HouseType = value; return this; }
        public String getElevation() { return Elevation; }
        public ProjectInfo setElevation(String value) { this.Elevation = value; return this; }
        public String getCustomerName() { return CustomerName; }
        public ProjectInfo setCustomerName(String value) { this.CustomerName = value; return this; }
        public ContactInfo getSupervisor() { return Supervisor; }
        public ProjectInfo setSupervisor(ContactInfo value) { this.Supervisor = value; return this; }
        public ObjectReference getProjectReference() { return ProjectReference; }
        public ProjectInfo setProjectReference(ObjectReference value) { this.ProjectReference = value; return this; }
    }

    @DataContract
    public static class PurchaseOrderInfo
    {
        @DataMember(Name="Id")
        @SerializedName("Id")
        public UUID Id = null;

        @DataMember(Name="Reference")
        @SerializedName("Reference")
        public String Reference = null;

        @DataMember(Name="Description")
        @SerializedName("Description")
        public String Description = null;

        @DataMember(Name="PurchaseOrderReference")
        @SerializedName("PurchaseOrderReference")
        public ObjectReference PurchaseOrderReference = null;
        
        public UUID getId() { return Id; }
        public PurchaseOrderInfo setId(UUID value) { this.Id = value; return this; }
        public String getReference() { return Reference; }
        public PurchaseOrderInfo setReference(String value) { this.Reference = value; return this; }
        public String getDescription() { return Description; }
        public PurchaseOrderInfo setDescription(String value) { this.Description = value; return this; }
        public ObjectReference getPurchaseOrderReference() { return PurchaseOrderReference; }
        public PurchaseOrderInfo setPurchaseOrderReference(ObjectReference value) { this.PurchaseOrderReference = value; return this; }
    }

    @DataContract
    public static class ActivityReference
    {
        /**
        * Name/details of the activity
        */
        @DataMember(Name="name")
        @SerializedName("name")
        @ApiMember(Description="Name/details of the activity", IsRequired=true, Name="Name")
        public String Name = null;

        @DataMember(Name="notes")
        @SerializedName("notes")
        public String Notes = null;
        
        public String getName() { return Name; }
        public ActivityReference setName(String value) { this.Name = value; return this; }
        public String getNotes() { return Notes; }
        public ActivityReference setNotes(String value) { this.Notes = value; return this; }
    }

    @DataContract
    public static class ScheduleParams
    {
        @DataMember(Name="Name")
        @SerializedName("Name")
        public String Name = null;

        @DataMember(Name="Value")
        @SerializedName("Value")
        public String Value = null;
        
        public String getName() { return Name; }
        public ScheduleParams setName(String value) { this.Name = value; return this; }
        public String getValue() { return Value; }
        public ScheduleParams setValue(String value) { this.Value = value; return this; }
    }

    public static class EmailAttachment
    {
        public String FileName = null;
        public String ContentType = null;
        public String Path = null;
        public String Url = null;
        public Long Length = null;
        public InputStream FileStream = null;
        public String StreamContent = null;
        public AttachmentType AttachmentType = null;
        public Boolean ProcessedAndUploadedAsBlob = null;
        
        public String getFileName() { return FileName; }
        public EmailAttachment setFileName(String value) { this.FileName = value; return this; }
        public String getContentType() { return ContentType; }
        public EmailAttachment setContentType(String value) { this.ContentType = value; return this; }
        public String getPath() { return Path; }
        public EmailAttachment setPath(String value) { this.Path = value; return this; }
        public String getUrl() { return Url; }
        public EmailAttachment setUrl(String value) { this.Url = value; return this; }
        public Long getLength() { return Length; }
        public EmailAttachment setLength(Long value) { this.Length = value; return this; }
        public InputStream getFileStream() { return FileStream; }
        public EmailAttachment setFileStream(InputStream value) { this.FileStream = value; return this; }
        public String getStreamContent() { return StreamContent; }
        public EmailAttachment setStreamContent(String value) { this.StreamContent = value; return this; }
        public AttachmentType getAttachmentType() { return AttachmentType; }
        public EmailAttachment setAttachmentType(AttachmentType value) { this.AttachmentType = value; return this; }
        public Boolean isProcessedAndUploadedAsBlob() { return ProcessedAndUploadedAsBlob; }
        public EmailAttachment setProcessedAndUploadedAsBlob(Boolean value) { this.ProcessedAndUploadedAsBlob = value; return this; }
    }

    public static enum AttachmentType
    {
        Url,
        FileStream;
    }

    public static class ScheduleResponse
    {
        public UUID ReferenceId = null;
        public UUID CommunicationId = null;
        public Boolean Success = null;
        public String Message = null;
        public String Payload = null;
        
        public UUID getReferenceId() { return ReferenceId; }
        public ScheduleResponse setReferenceId(UUID value) { this.ReferenceId = value; return this; }
        public UUID getCommunicationId() { return CommunicationId; }
        public ScheduleResponse setCommunicationId(UUID value) { this.CommunicationId = value; return this; }
        public Boolean isSuccess() { return Success; }
        public ScheduleResponse setSuccess(Boolean value) { this.Success = value; return this; }
        public String getMessage() { return Message; }
        public ScheduleResponse setMessage(String value) { this.Message = value; return this; }
        public String getPayload() { return Payload; }
        public ScheduleResponse setPayload(String value) { this.Payload = value; return this; }
    }

}

Java 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>