| POST | /Confirmations/Create |
|---|
namespace Bridge.Core.Results
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ConfirmationGradesViewModel() =
member val Id:Nullable<Int32> = new Nullable<Int32>() with get,set
member val Deleted:Boolean = new Boolean() with get,set
member val ProductId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val VersionId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val GradeId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val SpecificationComments:String = null with get,set
member val VolumeFrom:Nullable<Int32> = new Nullable<Int32>() with get,set
member val VolumeTo:Nullable<Int32> = new Nullable<Int32>() with get,set
member val UnitId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val VolumeUnitId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val UnitPrice:Nullable<Double> = new Nullable<Double>() with get,set
member val CurrencyId:Nullable<Int32> = new Nullable<Int32>() with get,set
[<AllowNullLiteral>]
type ConfirmationCreate() =
member val IMONumberOrMMSI:String = null with get,set
member val VesselId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val DateFrom:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val DateTo:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val PortId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val DeliveryMethodId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val Agent:String = null with get,set
member val SellingAccountId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val BuyingAccountId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val RequestedTermsType:String = null with get,set
member val CreditTermDays:Nullable<Int32> = new Nullable<Int32>() with get,set
member val VesselType:String = null with get,set
member val RecapComments:String = null with get,set
member val AgentDetails:String = null with get,set
member val AdditionalCosts:String = null with get,set
member val BuyerCompany:String = null with get,set
member val BuyerEmailAddress:String = null with get,set
member val ConfirmationGrades:ResizeArray<ConfirmationGradesViewModel> = new ResizeArray<ConfirmationGradesViewModel>() with get,set
type SavingResultStatus =
| Success = 0
| Error = 1
[<AllowNullLiteral>]
type SavingResultErrors() =
member val Error:String = null with get,set
[<AllowNullLiteral>]
type SavingResult() =
member val Id:Nullable<Int32> = new Nullable<Int32>() with get,set
member val GuidId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val Status:SavingResultStatus = new SavingResultStatus() with get,set
member val Errors:ResizeArray<SavingResultErrors> = new ResizeArray<SavingResultErrors>() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<ConfirmationCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Private.Api.DTO">
<AdditionalCosts>String</AdditionalCosts>
<Agent>String</Agent>
<AgentDetails>String</AgentDetails>
<BuyerCompany>String</BuyerCompany>
<BuyerEmailAddress>String</BuyerEmailAddress>
<BuyingAccountId>0</BuyingAccountId>
<ConfirmationGrades xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
<d2p1:ConfirmationGradesViewModel>
<d2p1:CurrencyId>0</d2p1:CurrencyId>
<d2p1:Deleted>false</d2p1:Deleted>
<d2p1:GradeId>0</d2p1:GradeId>
<d2p1:Id>0</d2p1:Id>
<d2p1:ProductId>0</d2p1:ProductId>
<d2p1:SpecificationComments>String</d2p1:SpecificationComments>
<d2p1:UnitId>0</d2p1:UnitId>
<d2p1:UnitPrice>0</d2p1:UnitPrice>
<d2p1:VersionId>0</d2p1:VersionId>
<d2p1:VolumeFrom>0</d2p1:VolumeFrom>
<d2p1:VolumeTo>0</d2p1:VolumeTo>
<d2p1:VolumeUnitId>0</d2p1:VolumeUnitId>
</d2p1:ConfirmationGradesViewModel>
</ConfirmationGrades>
<CreditTermDays>0</CreditTermDays>
<DateFrom>0001-01-01T00:00:00</DateFrom>
<DateTo>0001-01-01T00:00:00</DateTo>
<DeliveryMethodId>0</DeliveryMethodId>
<IMONumberOrMMSI>String</IMONumberOrMMSI>
<PortId>0</PortId>
<RecapComments>String</RecapComments>
<RequestedTermsType>String</RequestedTermsType>
<SellingAccountId>0</SellingAccountId>
<VesselId>0</VesselId>
<VesselType>String</VesselType>
</ConfirmationCreate>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SavingResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Core.Results">
<Errors>
<SavingResultErrors>
<Error>String</Error>
</SavingResultErrors>
</Errors>
<GuidId>00000000-0000-0000-0000-000000000000</GuidId>
<Id>0</Id>
<Status>Success</Status>
</SavingResult>