Mercedes.Agency.Orchestration.API

<back to all web services

GetPricingDetailsRequest

Pricing
The following routes are available for this service:
POST/v1/pricingdetailsCreates a detailed pricing of a vehicle
import Foundation
import ServiceStack

public class GetPricingDetailsRequest : CreateOrderBase, IPost
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class CreateOrderBase : Codable
{
    public var source:Source
    public var gssnId:String
    public var additionalInformation:String
    public var cash:Bool
    public var finance:Bool
    public var customer:Customer
    public var vehicle:Vehicle
    public var financeCriteria:FinanceCriteria
    public var backOrderGuid:String?
    public var tagUrl:String
    public var outrightPurchase:OutrightPurchase
    public var motability:Bool
    public var motabilityPricingId:Int?
    public var financeApplicationReference:String
    public var specialist:Bool
    public var gasId:String
    public var personalisedItemOfferIds:[Int]
    public var suggestedVin:String
    public var nonOptimumReason:String
    public var motabilityType:MotabilityType
    public var estimatedHandoverDate:String

    required public init(){}
}

public enum Source : Int, Codable
{
    case OnlineShowroom = 1
    case OneAdmin = 2
}

public class Customer : SalesforceCustomer
{
    public var profileId:String?
    public var preferences:Preferences

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case profileId
        case preferences
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        profileId = try container.decodeIfPresent(String.self, forKey: .profileId)
        preferences = try container.decodeIfPresent(Preferences.self, forKey: .preferences)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if profileId != nil { try container.encode(profileId, forKey: .profileId) }
        if preferences != nil { try container.encode(preferences, forKey: .preferences) }
    }
}

public class SalesforceCustomer : ICustomer, Codable
{
    public var customerId:String
    public var isCiam:Bool
    public var companyName:String
    public var title:String
    public var firstname:String
    public var surname:String
    public var emailAddress:String
    public var telephone:String
    public var address:Address
    public var mode:CustomerMode

    required public init(){}
}

public class Address : Codable
{
    public var property:String
    public var street:String
    public var town:String
    public var county:String
    public var locality:String
    public var postcode:String

    required public init(){}
}

public enum CustomerMode : Int, Codable
{
    case Private = 1
    case Business = 2
    case Motability = 3
}

public class Preferences : Codable
{
    public var optinEmail:Bool
    public var optinPost:Bool
    public var optinSMS:Bool
    public var optinTelephone:Bool

    required public init(){}
}

public class Vehicle : Codable
{
    public var vin:String

    required public init(){}
}

public class FinanceCriteria : Codable
{
    public var key:String
    public var name:String
    public var type:String
    public var isDefault:Bool
    public var term:Term
    public var deposit:Deposit
    public var mileage:Mileage
    public var advanceRentals:AdvanceRentals
    public var isPersonalised:Bool
    public var regularPayment:String
    public var partExchange:String
    public var settlement:String
    public var customerType:String
    public var vehicleType:VehicleType

    required public init(){}
}

public class Term : Codable
{
    public var options:[Option] = []

    required public init(){}
}

public class Option : Codable
{
    public var isDefault:Bool
    public var value:Int

    required public init(){}
}

public class Deposit : Codable
{
    public var `default`:String

    required public init(){}
}

public class Mileage : Codable
{
    public var options:[Option] = []

    required public init(){}
}

public class AdvanceRentals : Codable
{
    public var options:[Option] = []

    required public init(){}
}

public enum VehicleType : String, Codable
{
    case UNASSIGNED
    case NEW
    case USED
}

public class OutrightPurchase : Codable
{
    public var isOutrightPurchase:Bool
    public var reference:String
    public var discountRate:Double
    public var bm7NST:String
    public var isBackOrder:Bool
    public var isCOPConverter:Bool

    required public init(){}
}

public enum MotabilityType : Int, Codable
{
    case PIP = 1
    case WPMS = 2
    case UNASSIGNED = 3
}

public class GetPricingDetailsResponse : Codable
{
    public var price:Price

    required public init(){}
}

public class Price : Codable
{
    public var id:String
    public var Description:String
    public var net:Double
    public var vat:Double
    public var gross:Double
    public var product:OfferPriceProductType

    required public init(){}
}

public enum OfferPriceProductType : String, Codable
{
    case LIST_PRICE
    case NUMBER_PLATE_FEE
    case DELIVERY_CHARGE
    case FUEL_CHARGE
    case MANUFACTURER_OFFER
    case PERSONALISED_MONEYOFFER
    case PERSONALISED_NONMONEYOFFER
    case PERSONALISED_NONMONEYOFFER_NEG
    case SERVICE
    case SERVICE_NEG
    case GOVERNMENT_GRANT
    case OUTRIGHT_PURCHASE_DISCOUNT
    case VIP_OFFER
    case WALLBOX_OFFER
    case WALLBOX_OFFER_NEG
    case ROAD_FUND_LICENCE
    case FIRST_REGISTRATION_FEE
    case NOT_FOUND
    case ACCESSORY_OFFER
    case ACCESSORY_OFFER_NEG
    case MOTABILITY_DISCOUNT
}


Swift GetPricingDetailsRequest DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/pricingdetails HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetPricingDetailsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.ServiceModel.Pricing">
  <AdditionalInformation xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</AdditionalInformation>
  <BackOrderGuid xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">00000000-0000-0000-0000-000000000000</BackOrderGuid>
  <Cash xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">false</Cash>
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">
    <d2p1:Address>
      <d2p1:County>String</d2p1:County>
      <d2p1:Locality>String</d2p1:Locality>
      <d2p1:Postcode>String</d2p1:Postcode>
      <d2p1:Property>String</d2p1:Property>
      <d2p1:Street>String</d2p1:Street>
      <d2p1:Town>String</d2p1:Town>
    </d2p1:Address>
    <d2p1:CompanyName>String</d2p1:CompanyName>
    <d2p1:CustomerId>String</d2p1:CustomerId>
    <d2p1:EmailAddress>String</d2p1:EmailAddress>
    <d2p1:Firstname>String</d2p1:Firstname>
    <d2p1:IsCiam>false</d2p1:IsCiam>
    <d2p1:Mode>Private</d2p1:Mode>
    <d2p1:Surname>String</d2p1:Surname>
    <d2p1:Telephone>String</d2p1:Telephone>
    <d2p1:Title>String</d2p1:Title>
    <d2p1:Preferences>
      <d2p1:OptinEmail>false</d2p1:OptinEmail>
      <d2p1:OptinPost>false</d2p1:OptinPost>
      <d2p1:OptinSMS>false</d2p1:OptinSMS>
      <d2p1:OptinTelephone>false</d2p1:OptinTelephone>
    </d2p1:Preferences>
    <d2p1:ProfileId>00000000-0000-0000-0000-000000000000</d2p1:ProfileId>
  </Customer>
  <EstimatedHandoverDate xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</EstimatedHandoverDate>
  <Finance xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">false</Finance>
  <FinanceApplicationReference xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</FinanceApplicationReference>
  <FinanceCriteria xmlns:d2p1="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">
    <d2p1:AdvanceRentals>
      <d2p1:Options>
        <d2p1:Option>
          <d2p1:IsDefault>false</d2p1:IsDefault>
          <d2p1:Value>0</d2p1:Value>
        </d2p1:Option>
      </d2p1:Options>
    </d2p1:AdvanceRentals>
    <d2p1:CustomerType>String</d2p1:CustomerType>
    <d2p1:Deposit>
      <d2p1:Default>String</d2p1:Default>
    </d2p1:Deposit>
    <d2p1:IsDefault>false</d2p1:IsDefault>
    <d2p1:IsPersonalised>false</d2p1:IsPersonalised>
    <d2p1:Key>String</d2p1:Key>
    <d2p1:Mileage>
      <d2p1:Options>
        <d2p1:Option>
          <d2p1:IsDefault>false</d2p1:IsDefault>
          <d2p1:Value>0</d2p1:Value>
        </d2p1:Option>
      </d2p1:Options>
    </d2p1:Mileage>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:PartExchange>String</d2p1:PartExchange>
    <d2p1:RegularPayment>String</d2p1:RegularPayment>
    <d2p1:Settlement>String</d2p1:Settlement>
    <d2p1:Term>
      <d2p1:Options>
        <d2p1:Option>
          <d2p1:IsDefault>false</d2p1:IsDefault>
          <d2p1:Value>0</d2p1:Value>
        </d2p1:Option>
      </d2p1:Options>
    </d2p1:Term>
    <d2p1:Type>String</d2p1:Type>
    <d2p1:VehicleType>UNASSIGNED</d2p1:VehicleType>
  </FinanceCriteria>
  <GasId xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</GasId>
  <GssnId xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</GssnId>
  <Motability xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">false</Motability>
  <MotabilityPricingId xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">0</MotabilityPricingId>
  <MotabilityType xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">PIP</MotabilityType>
  <NonOptimumReason xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</NonOptimumReason>
  <OutrightPurchase xmlns:d2p1="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">
    <d2p1:Bm7NST>String</d2p1:Bm7NST>
    <d2p1:DiscountRate>0</d2p1:DiscountRate>
    <d2p1:IsBackOrder>false</d2p1:IsBackOrder>
    <d2p1:IsCOPConverter>false</d2p1:IsCOPConverter>
    <d2p1:IsOutrightPurchase>false</d2p1:IsOutrightPurchase>
    <d2p1:Reference>String</d2p1:Reference>
  </OutrightPurchase>
  <PersonalisedItemOfferIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">
    <d2p1:int>0</d2p1:int>
  </PersonalisedItemOfferIds>
  <Source xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">OnlineShowroom</Source>
  <Specialist xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">false</Specialist>
  <SuggestedVin xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</SuggestedVin>
  <TagUrl xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">String</TagUrl>
  <Vehicle xmlns:d2p1="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Business.Poco">
    <d2p1:Vin>String</d2p1:Vin>
  </Vehicle>
</GetPricingDetailsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetPricingDetailsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.Clients.AgencyApi.Responses">
  <Price xmlns:d2p1="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">
    <d2p1:Description>String</d2p1:Description>
    <d2p1:Gross>0</d2p1:Gross>
    <d2p1:Id>String</d2p1:Id>
    <d2p1:Net>0</d2p1:Net>
    <d2p1:Product>LIST_PRICE</d2p1:Product>
    <d2p1:VAT>0</d2p1:VAT>
  </Price>
</GetPricingDetailsResponse>