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

export class ScheduleResponse
{
    public ReferenceId: string;
    public CommunicationId: string;
    public Success: boolean;
    public Message: string;
    public Payload: string;

    public constructor(init?: Partial<ScheduleResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ObjectReference
{
    // @DataMember(Name="RmsTableContextId")
    public RmsTableContextId: string;

    // @DataMember(Name="AlternateKey")
    public AlternateKey: string;

    // @DataMember(Name="DataSourceInstanceId")
    public DataSourceInstanceId: string;

    public constructor(init?: Partial<ObjectReference>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ContactInfo
{
    // @DataMember(Name="Id")
    public Id: string;

    // @DataMember(Name="Name")
    public Name: string;

    // @DataMember(Name="Email")
    public Email: string;

    // @DataMember(Name="Phone")
    public Phone: string;

    // @DataMember(Name="ContactReference")
    public ContactReference: ObjectReference;

    public constructor(init?: Partial<ContactInfo>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ProjectInfo
{
    // @DataMember(Name="Id")
    public Id: string;

    // @DataMember(Name="Name")
    public Name: string;

    // @DataMember(Name="Reference")
    public Reference: string;

    // @DataMember(Name="Description")
    public Description: string;

    // @DataMember(Name="Address")
    public Address: string;

    // @DataMember(Name="HouseType")
    public HouseType: string;

    // @DataMember(Name="Elevation")
    public Elevation: string;

    // @DataMember(Name="CustomerName")
    public CustomerName: string;

    // @DataMember(Name="Supervisor")
    public Supervisor: ContactInfo;

    // @DataMember(Name="ProjectReference")
    public ProjectReference: ObjectReference;

    public constructor(init?: Partial<ProjectInfo>) { (Object as any).assign(this, init); }
}

// @DataContract
export class PurchaseOrderInfo
{
    // @DataMember(Name="Id")
    public Id: string;

    // @DataMember(Name="Reference")
    public Reference: string;

    // @DataMember(Name="Description")
    public Description: string;

    // @DataMember(Name="PurchaseOrderReference")
    public PurchaseOrderReference: ObjectReference;

    public constructor(init?: Partial<PurchaseOrderInfo>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ActivityReference
{
    /** @description Name/details of the activity */
    // @DataMember(Name="name")
    // @ApiMember(Description="Name/details of the activity", IsRequired=true, Name="Name")
    public name: string;

    // @DataMember(Name="notes")
    public notes: string;

    public constructor(init?: Partial<ActivityReference>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ScheduleParams
{
    // @DataMember(Name="Name")
    public Name: string;

    // @DataMember(Name="Value")
    public Value: string;

    public constructor(init?: Partial<ScheduleParams>) { (Object as any).assign(this, init); }
}

export enum AttachmentType
{
    Url = 'Url',
    FileStream = 'FileStream',
}

export class EmailAttachment
{
    public FileName: string;
    public ContentType: string;
    public Path: string;
    public Url: string;
    public Length: number;
    public FileStream: string;
    public StreamContent: string;
    public AttachmentType: AttachmentType;
    public ProcessedAndUploadedAsBlob: boolean;

    public constructor(init?: Partial<EmailAttachment>) { (Object as any).assign(this, init); }
}

/** @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. */
// @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
export class CancelScheduleRequest
{
    /** @description Id of the schedule request to be recreated */
    // @DataMember(Name="RequestId")
    // @ApiMember(Description="Id of the schedule request to be recreated", IsRequired=true, Name="RequestId")
    public RequestId: string;

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

    // @DataMember(Name="Requester")
    public Requester: ContactInfo;

    // @DataMember(Name="Supplier")
    public Supplier: ContactInfo;

    // @DataMember(Name="Project")
    public Project: ProjectInfo;

    // @DataMember(Name="PurchaseOrder")
    public PurchaseOrder: PurchaseOrderInfo;

    // @DataMember(Name="Activity")
    public Activity: ActivityReference;

    // @DataMember(Name="Params")
    public Params: ScheduleParams[];

    // @DataMember(Name="Attachments")
    public Attachments: EmailAttachment[];

    public constructor(init?: Partial<CancelScheduleRequest>) { (Object as any).assign(this, init); }
}

TypeScript 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
}