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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ScheduleDateTime: 0001-01-01,
	Requester: 
	{
		Name: String,
		Email: String,
		Phone: String,
		ContactReference: 
		{
			AlternateKey: String
		}
	},
	Supplier: 
	{
		Name: String,
		Email: String,
		Phone: String,
		ContactReference: 
		{
			AlternateKey: String
		}
	},
	Project: 
	{
		Name: String,
		Reference: String,
		Description: String,
		Address: String,
		HouseType: String,
		Elevation: String,
		CustomerName: String,
		Supervisor: 
		{
			Name: String,
			Email: String,
			Phone: String,
			ContactReference: 
			{
				AlternateKey: String
			}
		},
		ProjectReference: 
		{
			AlternateKey: String
		}
	},
	PurchaseOrder: 
	{
		Reference: String,
		Description: String,
		PurchaseOrderReference: 
		{
			AlternateKey: String
		}
	},
	Activity: 
	{
		name: String,
		notes: String
	},
	Params: 
	[
		{
			Name: String,
			Value: String
		}
	],
	Attachments: 
	[
		{
			FileName: String,
			ContentType: String,
			Path: String,
			Url: String,
			Length: 0,
			StreamContent: String,
			AttachmentType: Url,
			ProcessedAndUploadedAsBlob: False
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Success: False,
	Message: String,
	Payload: String
}