| POST | /Enquiries/Create |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Bridge.Private.Api.DTO
Imports Bridge.Core.ViewModels
Imports Bridge.Core.Results
Namespace Global
Namespace Bridge.Core.Results
Public Partial Class SavingResult
Public Sub New()
Errors = New List(Of SavingResultErrors)
End Sub
Public Overridable Property Id As Nullable(Of Integer)
Public Overridable Property GuidId As Nullable(Of Guid)
Public Overridable Property Status As SavingResultStatus
Public Overridable Property Errors As List(Of SavingResultErrors)
End Class
Public Partial Class SavingResultErrors
Public Overridable Property [Error] As String
End Class
Public Enum SavingResultStatus
Success
[Error]
End Enum
End Namespace
Namespace Bridge.Core.ViewModels
Public Partial Class CreateEnquiryGradesViewModel
Public Overridable Property Id As Nullable(Of Integer)
Public Overridable Property Deleted As Boolean
Public Overridable Property ProductId As Nullable(Of Integer)
Public Overridable Property VersionId As Nullable(Of Integer)
Public Overridable Property GradeId As Nullable(Of Integer)
Public Overridable Property SpecificationComments As String
Public Overridable Property VolumeFrom As Nullable(Of Integer)
Public Overridable Property VolumeTo As Nullable(Of Integer)
Public Overridable Property UnitId As Nullable(Of Integer)
End Class
End Namespace
Namespace Bridge.Private.Api.DTO
Public Partial Class EnquiryCreate
Public Sub New()
SelectedEntityContactIds = New List(Of String)
EnquiryGrades = New List(Of CreateEnquiryGradesViewModel)
End Sub
Public Overridable Property AccountId As Nullable(Of Integer)
Public Overridable Property Agent As String
Public Overridable Property BuyerEmailAddress As String
Public Overridable Property BuyerCompany As String
Public Overridable Property CreditTermDays As Nullable(Of Integer)
Public Overridable Property DateFrom As Nullable(Of Date)
Public Overridable Property DateTo As Nullable(Of Date)
Public Overridable Property DeliveryMethodId As Nullable(Of Integer)
Public Overridable Property GeneralComments As String
Public Overridable Property PortId As Nullable(Of Integer)
Public Overridable Property RequestedTermsType As String
Public Overridable Property VesselId As Nullable(Of Integer)
Public Overridable Property SupplyDeskEntityContactId As Nullable(Of Integer)
Public Overridable Property SelectedEntityContactIds As List(Of String)
Public Overridable Property EnquiryGrades As List(Of CreateEnquiryGradesViewModel)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Enquiries/Create HTTP/1.1
Host: internal.thebunkerbridge.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"AccountId":0,"Agent":"String","BuyerEmailAddress":"String","BuyerCompany":"String","CreditTermDays":0,"DateFrom":"0001-01-01T00:00:00.0000000","DateTo":"0001-01-01T00:00:00.0000000","DeliveryMethodId":0,"GeneralComments":"String","PortId":0,"RequestedTermsType":"String","VesselId":0,"SupplyDeskEntityContactId":0,"SelectedEntityContactIds":["String"],"EnquiryGrades":[{"Id":0,"Deleted":false,"ProductId":0,"VersionId":0,"GradeId":0,"SpecificationComments":"String","VolumeFrom":0,"VolumeTo":0,"UnitId":0}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Id":0,"GuidId":"00000000000000000000000000000000","Status":"Success","Errors":[{"Error":"String"}]}