SupplierConnect Gateway API

<back to all web services

GetSchedules

Retrieve SupplierConnect schedule(s) by given ids. This will return SupplierConnect schedule request(s), and the associated other details such as statuses

Requires Authentication
The following routes are available for this service:
GET/api/schedules
GET/api/schedules/{Ids}
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.Causal.Common.Entity
Imports Eros.Saguna.Common.Library

Namespace Global

    Namespace Eros.Causal.Common.Entity

        Public Partial Class SupplierConnectActivityReference
            Public Overridable Property Name As String
            Public Overridable Property Notes As String
        End Class

        Public Partial Class SupplierConnectContactInfo
            Public Overridable Property Id As Guid
            Public Overridable Property Name As String
            Public Overridable Property Email As String
            Public Overridable Property Phone As String
            Public Overridable Property ContactReference As SupplierConnectObjectReference
        End Class

        Public Partial Class SupplierConnectObjectReference
            Public Overridable Property RmsTableContextId As Guid
            Public Overridable Property AlternateKey As String
            Public Overridable Property DataSourceInstanceId As Guid
        End Class

        Public Partial Class SupplierConnectProjectInfo
            Public Overridable Property Id As Guid
            Public Overridable Property Name As String
            Public Overridable Property Reference As String
            Public Overridable Property Description As String
            Public Overridable Property Address As String
            Public Overridable Property HouseType As String
            Public Overridable Property Elevation As String
            Public Overridable Property Supervisor As SupplierConnectContactInfo
            Public Overridable Property CustomerName As String
            Public Overridable Property ProjectReference As SupplierConnectObjectReference
        End Class

        Public Partial Class SupplierConnectPurchaseOrderInfo
            Public Overridable Property Id As Guid
            Public Overridable Property Reference As String
            Public Overridable Property Description As String
            Public Overridable Property ProjectId As Guid
            Public Overridable Property PurchaseOrderReference As SupplierConnectObjectReference
        End Class

        Public Partial Class SupplierConnectSchedule
            Public Overridable Property RequestId As Guid
            Public Overridable Property PreviousRequestId As Guid
            Public Overridable Property LicenseeId As Guid
            Public Overridable Property LicenseeName As String
            Public Overridable Property ScheduleDateTime As Date
            Public Overridable Property Requester As SupplierConnectContactInfo
            Public Overridable Property Supplier As SupplierConnectContactInfo
            Public Overridable Property Project As SupplierConnectProjectInfo
            Public Overridable Property PurchaseOrder As SupplierConnectPurchaseOrderInfo
            Public Overridable Property Activity As SupplierConnectActivityReference
            Public Overridable Property Params As List(Of SupplierConnectScheduleParams)
            Public Overridable Property Attachments As List(Of EmailAttachment)
        End Class

        Public Partial Class SupplierConnectScheduleParams
            Public Overridable Property Name As String
            Public Overridable Property Value As String
        End Class
    End Namespace

    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

        '''<Summary>
        '''Retrieve SupplierConnect schedule(s) by given ids. This will return SupplierConnect schedule request(s), and the associated other details such as statuses
        '''</Summary>
        <Api(Description:="Retrieve SupplierConnect schedule(s) by given ids. This will return SupplierConnect schedule request(s), and the associated other details such as statuses")>
        Public Partial Class GetSchedules
            '''<Summary>
            '''Id or list of Ids of the schedule request(s) to be retrieved
            '''</Summary>
            <DataMember(Name:="id")>
            <ApiMember(Description:="Id or list of Ids of the schedule request(s) to be retrieved", IsRequired:=true, Name:="id")>
            Public Overridable Property Ids As List(Of Guid) = New List(Of Guid)
        End Class

        <ApiResponse(Description:="Returns the list of the schedule requests for the given list of Ids")>
        Public Partial Class GetSchedulesResponse
            Public Overridable Property Success As Boolean
            Public Overridable Property Message As String
            Public Overridable Property ScheduleRequests As List(Of ScheduleDetails)
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property LastRowVersion As String
        End Class

        Public Partial Class ScheduleDetails
            Inherits SupplierConnectSchedule
            Public Overridable Property ReferenceId As Guid
            Public Overridable Property Index As Integer
            Public Overridable Property StatusId As Guid
            Public Overridable Property Status As String
            Public Overridable Property StatusMessage As String
            Public Overridable Property RequestedBy As String
            Public Overridable Property RequestedDate As Date?
            Public Overridable Property CommunicationId As Guid
        End Class
    End Namespace
End Namespace

VB.NET GetSchedules DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/schedules HTTP/1.1 
Host: production-eros-gateway-api-supplierconnect.azurewebsites.net 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Success":false,"Message":"String","ScheduleRequests":[{"Index":0,"Status":"String","StatusMessage":"String","RequestedBy":"String","RequestedDate":"0001-01-01T00:00:00.0000000","LicenseeName":"String","ScheduleDateTime":"0001-01-01T00:00:00.0000000","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","Supervisor":{"Name":"String","Email":"String","Phone":"String","ContactReference":{"AlternateKey":"String"}},"CustomerName":"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}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"LastRowVersion":"String"}