| POST | /Confirmations/Create |
|---|
import Foundation
import ServiceStack
public class ConfirmationCreate : Codable
{
public var imoNumberOrMMSI:String
public var vesselId:Int?
public var dateFrom:Date?
public var dateTo:Date?
public var portId:Int?
public var deliveryMethodId:Int?
public var agent:String
public var sellingAccountId:Int?
public var buyingAccountId:Int?
public var requestedTermsType:String
public var creditTermDays:Int?
public var vesselType:String
public var recapComments:String
public var agentDetails:String
public var additionalCosts:String
public var buyerCompany:String
public var buyerEmailAddress:String
public var confirmationGrades:[ConfirmationGradesViewModel] = []
required public init(){}
}
public class ConfirmationGradesViewModel : Codable
{
public var id:Int?
public var deleted:Bool
public var productId:Int?
public var versionId:Int?
public var gradeId:Int?
public var specificationComments:String
public var volumeFrom:Int?
public var volumeTo:Int?
public var unitId:Int?
public var volumeUnitId:Int?
public var unitPrice:Double?
public var currencyId:Int?
required public init(){}
}
public class SavingResult : Codable
{
public var id:Int?
public var guidId:String?
public var status:SavingResultStatus
public var errors:[SavingResultErrors] = []
required public init(){}
}
public enum SavingResultStatus : String, Codable
{
case Success
case Error
}
public class SavingResultErrors : Codable
{
public var error:String
required public init(){}
}
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>