Bridge

<back to all web services

ConfirmationCreate

Confirmations
The following routes are available for this service:
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(){}
}


Swift ConfirmationCreate DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
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: application/json
Content-Length: length

{"Id":0,"GuidId":"00000000000000000000000000000000","Status":"Success","Errors":[{"Error":"String"}]}