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
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Subtle.Dvaravartman.SupplierConnect.Model.APIModels
Imports Eros.Saguna.Common.Library

Namespace Global

    Namespace Eros.Saguna.Common.Library

        Public Enum AttachmentType
            Url
            FileStream
        End Enum

        Public Partial Class EmailAttachment
            Public Overridable Property FileName As String
            Public Overridable Property ContentType As String
            Public Overridable Property Path As String
            Public Overridable Property Url As String
            Public Overridable Property Length As Long
            Public Overridable Property FileStream As Stream
            Public Overridable Property StreamContent As String
            Public Overridable Property AttachmentType As AttachmentType
            Public Overridable Property ProcessedAndUploadedAsBlob As Boolean
        End Class
    End Namespace

    Namespace Eros.Subtle.Dvaravartman.SupplierConnect.Model.APIModels

        <DataContract>
        Public Partial Class ActivityReference
            '''<Summary>
            '''Name/details of the activity
            '''</Summary>
            <DataMember(Name:="name")>
            <ApiMember(Description:="Name/details of the activity", IsRequired:=true, Name:="Name")>
            Public Overridable Property Name As String

            <DataMember(Name:="notes")>
            Public Overridable Property Notes As String
        End Class

        '''<Summary>
        '''Creates or Reschedules a SupplierConnect schedule. This will return the id of the schedule request created and the communication id of the notification sent.
        '''</Summary>
        <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 Partial Class CancelScheduleRequest
            '''<Summary>
            '''Id of the schedule request to be recreated
            '''</Summary>
            <DataMember(Name:="RequestId")>
            <ApiMember(Description:="Id of the schedule request to be recreated", IsRequired:=true, Name:="RequestId")>
            Public Overridable Property RequestId As Guid

            '''<Summary>
            '''Date/Time of the activity
            '''</Summary>
            <DataMember(Name:="ScheduleDateTime")>
            <ApiMember(Description:="Date/Time of the activity", IsRequired:=true, Name:="ScheduleDateTime")>
            <Required>
            Public Overridable Property ScheduleDateTime As Date

            <DataMember(Name:="Requester")>
            Public Overridable Property Requester As ContactInfo

            <DataMember(Name:="Supplier")>
            Public Overridable Property Supplier As ContactInfo

            <DataMember(Name:="Project")>
            Public Overridable Property Project As ProjectInfo

            <DataMember(Name:="PurchaseOrder")>
            Public Overridable Property PurchaseOrder As PurchaseOrderInfo

            <DataMember(Name:="Activity")>
            Public Overridable Property Activity As ActivityReference

            <DataMember(Name:="Params")>
            Public Overridable Property Params As List(Of ScheduleParams)

            <DataMember(Name:="Attachments")>
            Public Overridable Property Attachments As List(Of EmailAttachment)
        End Class

        <DataContract>
        Public Partial Class ContactInfo
            <DataMember(Name:="Id")>
            Public Overridable Property Id As Guid

            <DataMember(Name:="Name")>
            Public Overridable Property Name As String

            <DataMember(Name:="Email")>
            Public Overridable Property Email As String

            <DataMember(Name:="Phone")>
            Public Overridable Property Phone As String

            <DataMember(Name:="ContactReference")>
            Public Overridable Property ContactReference As ObjectReference
        End Class

        <DataContract>
        Public Partial Class ObjectReference
            <DataMember(Name:="RmsTableContextId")>
            Public Overridable Property RmsTableContextId As Guid

            <DataMember(Name:="AlternateKey")>
            Public Overridable Property AlternateKey As String

            <DataMember(Name:="DataSourceInstanceId")>
            Public Overridable Property DataSourceInstanceId As Guid
        End Class

        <DataContract>
        Public Partial Class ProjectInfo
            <DataMember(Name:="Id")>
            Public Overridable Property Id As Guid

            <DataMember(Name:="Name")>
            Public Overridable Property Name As String

            <DataMember(Name:="Reference")>
            Public Overridable Property Reference As String

            <DataMember(Name:="Description")>
            Public Overridable Property Description As String

            <DataMember(Name:="Address")>
            Public Overridable Property Address As String

            <DataMember(Name:="HouseType")>
            Public Overridable Property HouseType As String

            <DataMember(Name:="Elevation")>
            Public Overridable Property Elevation As String

            <DataMember(Name:="CustomerName")>
            Public Overridable Property CustomerName As String

            <DataMember(Name:="Supervisor")>
            Public Overridable Property Supervisor As ContactInfo

            <DataMember(Name:="ProjectReference")>
            Public Overridable Property ProjectReference As ObjectReference
        End Class

        <DataContract>
        Public Partial Class PurchaseOrderInfo
            <DataMember(Name:="Id")>
            Public Overridable Property Id As Guid

            <DataMember(Name:="Reference")>
            Public Overridable Property Reference As String

            <DataMember(Name:="Description")>
            Public Overridable Property Description As String

            <DataMember(Name:="PurchaseOrderReference")>
            Public Overridable Property PurchaseOrderReference As ObjectReference
        End Class

        <DataContract>
        Public Partial Class ScheduleParams
            <DataMember(Name:="Name")>
            Public Overridable Property Name As String

            <DataMember(Name:="Value")>
            Public Overridable Property Value As String
        End Class

        Public Partial Class ScheduleResponse
            Public Overridable Property ReferenceId As Guid
            Public Overridable Property CommunicationId As Guid
            Public Overridable Property Success As Boolean
            Public Overridable Property Message As String
            Public Overridable Property Payload As String
        End Class
    End Namespace
End Namespace

VB.NET 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
}