| POST | /Confirmations/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 ConfirmationGradesViewModel
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)
Public Overridable Property VolumeUnitId As Nullable(Of Integer)
Public Overridable Property UnitPrice As Nullable(Of Double)
Public Overridable Property CurrencyId As Nullable(Of Integer)
End Class
End Namespace
Namespace Bridge.Private.Api.DTO
Public Partial Class ConfirmationCreate
Public Sub New()
ConfirmationGrades = New List(Of ConfirmationGradesViewModel)
End Sub
Public Overridable Property IMONumberOrMMSI As String
Public Overridable Property VesselId As Nullable(Of Integer)
Public Overridable Property DateFrom As Nullable(Of Date)
Public Overridable Property DateTo As Nullable(Of Date)
Public Overridable Property PortId As Nullable(Of Integer)
Public Overridable Property DeliveryMethodId As Nullable(Of Integer)
Public Overridable Property Agent As String
Public Overridable Property SellingAccountId As Nullable(Of Integer)
Public Overridable Property BuyingAccountId As Nullable(Of Integer)
Public Overridable Property RequestedTermsType As String
Public Overridable Property CreditTermDays As Nullable(Of Integer)
Public Overridable Property VesselType As String
Public Overridable Property RecapComments As String
Public Overridable Property AgentDetails As String
Public Overridable Property AdditionalCosts As String
Public Overridable Property BuyerCompany As String
Public Overridable Property BuyerEmailAddress As String
Public Overridable Property ConfirmationGrades As List(Of ConfirmationGradesViewModel)
End Class
End Namespace
End Namespace
VB.NET ConfirmationCreate DTOs
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 /Confirmations/Create HTTP/1.1
Host: internal.thebunkerbridge.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"IMONumberOrMMSI":"String","VesselId":0,"DateFrom":"0001-01-01T00:00:00.0000000","DateTo":"0001-01-01T00:00:00.0000000","PortId":0,"DeliveryMethodId":0,"Agent":"String","SellingAccountId":0,"BuyingAccountId":0,"RequestedTermsType":"String","CreditTermDays":0,"VesselType":"String","RecapComments":"String","AgentDetails":"String","AdditionalCosts":"String","BuyerCompany":"String","BuyerEmailAddress":"String","ConfirmationGrades":[{"Id":0,"Deleted":false,"ProductId":0,"VersionId":0,"GradeId":0,"SpecificationComments":"String","VolumeFrom":0,"VolumeTo":0,"UnitId":0,"VolumeUnitId":0,"UnitPrice":0,"CurrencyId":0}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Id":0,"GuidId":"00000000000000000000000000000000","Status":"Success","Errors":[{"Error":"String"}]}