Mercedes.Agency.Orchestration.API

<back to all web services

GetOrderCustomerRequest

Order
Requires Authentication
The following routes are available for this service:
GET/v1/order/customer/{CustomerId}Get Order by Customer
import Foundation
import ServiceStack

public class GetOrderCustomerRequest : IGet, Codable
{
    public var customerId:String

    required public init(){}
}

public class GetOrderCustomerResponse : Codable
{
    public var orders:[Order] = []
    public var completed:[OnlineShowroomOrder] = []
    public var cancelled:[OnlineShowroomOrder] = []
    public var inProgress:[OnlineShowroomOrder] = []
    public var archived:[OnlineShowroomOrder] = []

    required public init(){}
}

public class Order : Codable
{
    public var guid:String
    public var reference:String
    public var status:Int
    public var customerId:String
    public var mulesoftReference:String
    public var gasId:String
    public var orderDate:String
    public var offerSnapShot:String

    required public init(){}
}

public class OnlineShowroomOrder : Codable
{
    public var guid:String
    public var reference:String
    public var status:[OnlineShowroomStatus] = []
    public var vehicle:OnlineShowroomVehicle
    public var closedDate:String
    public var customerId:String
    public var handoverDate:String
    public var closedReason:String
    public var orderDate:String
    public var paymentLinks:[PaymentDetail] = []

    required public init(){}
}

public class OnlineShowroomStatus : Codable
{
    public var id:Int
    public var Description:String
    public var slug:String
    public var current:Bool
    public var completed:Bool
    public var orderStatuses:[OrderStatus] = []

    required public init(){}
}

public class OrderStatus : Codable
{
    public var id:Int
    public var Description:String

    required public init(){}
}

public class OnlineShowroomVehicle : Codable
{
    public var vin:String
    public var vehicleClass:String
    public var transmissionType:String
    public var fuelType:String
    public var imageUrl:String
    public var colour:String
    public var Description:String
    public var bodyStyle:String
    public var upholsteryType:String
    public var retailer:Retailer
    public var otr:Double
    public var actualPrice:Double
    public var totalOfferValue:Double
    public var netPrice:Double
    public var vehicleType:String
    public var offerExpiryDate:String

    required public init(){}
}

public class Retailer : Codable
{
    public var id:Int
    public var gssnId:String
    public var Description:String
    public var street:String
    public var city:String
    public var postcode:String
    public var googleMapPostcode:String
    public var phone:String
    public var fax:String
    public var email:String
    public var website:String
    public var retailerGroupId:String
    public var retailerGroupName:String
    public var isOnline:Bool
    public var isNewCarRetailer:Bool
    public var isUsedCarRetailer:Bool
    public var isCentralRetailer:Bool
    public var chatEnabled:Bool
    public var tradeInEnabled:Bool
    public var smart:Bool
    public var displayPhoneNumberNew:String
    public var displayPhoneNumberUsed:String
    public var latitude:Double
    public var longitude:Double
    public var smartDescription:String
    public var smartWebsite:String
    public var smartPhone:String
    public var legacyId:String
    public var agent:Bool
    public var marketAreaId:Int
    public var digitalLoungeParentGssnId:String
    public var sendLeadsToDigitalLoungeParent:Bool
    public var openingTimes:RetailerOpeningTimes

    required public init(){}
}

public class RetailerOpeningTimes : Codable
{
    public var `new`:[RetailerOpeningTime] = []
    public var used:[RetailerOpeningTime] = []

    required public init(){}
}

public class RetailerOpeningTime : Codable
{
    public var day:String
    public var openFrom:String
    public var openTo:String
    public var special:String

    required public init(){}
}

public class PaymentDetail : Codable
{
    public var paymentType:String
    public var paymentLink:String

    required public init(){}
}


Swift GetOrderCustomerRequest DTOs

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

HTTP + JSV

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

GET /v1/order/customer/{CustomerId} HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Orders: 
	[
		{
			Guid: 00000000000000000000000000000000,
			Reference: String,
			Status: 0,
			CustomerId: String,
			MulesoftReference: String,
			GasId: String,
			OrderDate: String,
			OfferSnapShot: String
		}
	],
	Completed: 
	[
		{
			Guid: 00000000000000000000000000000000,
			Reference: String,
			Status: 
			[
				{
					Id: 0,
					Description: String,
					Slug: String,
					Current: False,
					Completed: False,
					OrderStatuses: 
					[
						{
							Id: 0,
							Description: String
						}
					]
				}
			],
			Vehicle: 
			{
				Vin: String,
				VehicleClass: String,
				TransmissionType: String,
				FuelType: String,
				ImageUrl: String,
				Colour: String,
				Description: String,
				BodyStyle: String,
				UpholsteryType: String,
				Retailer: 
				{
					Id: 0,
					GssnId: String,
					Description: String,
					Street: String,
					City: String,
					Postcode: String,
					GoogleMapPostcode: String,
					Phone: String,
					Fax: String,
					Email: String,
					Website: String,
					RetailerGroupId: String,
					RetailerGroupName: String,
					IsOnline: False,
					IsNewCarRetailer: False,
					IsUsedCarRetailer: False,
					IsCentralRetailer: False,
					ChatEnabled: False,
					TradeInEnabled: False,
					smart: False,
					DisplayPhoneNumberNew: String,
					DisplayPhoneNumberUsed: String,
					Latitude: 0,
					Longitude: 0,
					smartDescription: String,
					smartWebsite: String,
					smartPhone: String,
					LegacyId: String,
					Agent: False,
					MarketAreaId: 0,
					DigitalLoungeParentGssnId: String,
					SendLeadsToDigitalLoungeParent: False,
					OpeningTimes: 
					{
						New: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						],
						Used: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						]
					}
				},
				OTR: 0,
				ActualPrice: 0,
				TotalOfferValue: 0,
				NetPrice: 0,
				VehicleType: String,
				OfferExpiryDate: String
			},
			ClosedDate: String,
			CustomerId: String,
			HandoverDate: String,
			ClosedReason: String,
			OrderDate: String,
			PaymentLinks: 
			[
				{
					PaymentType: String,
					PaymentLink: String
				}
			]
		}
	],
	Cancelled: 
	[
		{
			Guid: 00000000000000000000000000000000,
			Reference: String,
			Status: 
			[
				{
					Id: 0,
					Description: String,
					Slug: String,
					Current: False,
					Completed: False,
					OrderStatuses: 
					[
						{
							Id: 0,
							Description: String
						}
					]
				}
			],
			Vehicle: 
			{
				Vin: String,
				VehicleClass: String,
				TransmissionType: String,
				FuelType: String,
				ImageUrl: String,
				Colour: String,
				Description: String,
				BodyStyle: String,
				UpholsteryType: String,
				Retailer: 
				{
					Id: 0,
					GssnId: String,
					Description: String,
					Street: String,
					City: String,
					Postcode: String,
					GoogleMapPostcode: String,
					Phone: String,
					Fax: String,
					Email: String,
					Website: String,
					RetailerGroupId: String,
					RetailerGroupName: String,
					IsOnline: False,
					IsNewCarRetailer: False,
					IsUsedCarRetailer: False,
					IsCentralRetailer: False,
					ChatEnabled: False,
					TradeInEnabled: False,
					smart: False,
					DisplayPhoneNumberNew: String,
					DisplayPhoneNumberUsed: String,
					Latitude: 0,
					Longitude: 0,
					smartDescription: String,
					smartWebsite: String,
					smartPhone: String,
					LegacyId: String,
					Agent: False,
					MarketAreaId: 0,
					DigitalLoungeParentGssnId: String,
					SendLeadsToDigitalLoungeParent: False,
					OpeningTimes: 
					{
						New: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						],
						Used: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						]
					}
				},
				OTR: 0,
				ActualPrice: 0,
				TotalOfferValue: 0,
				NetPrice: 0,
				VehicleType: String,
				OfferExpiryDate: String
			},
			ClosedDate: String,
			CustomerId: String,
			HandoverDate: String,
			ClosedReason: String,
			OrderDate: String,
			PaymentLinks: 
			[
				{
					PaymentType: String,
					PaymentLink: String
				}
			]
		}
	],
	InProgress: 
	[
		{
			Guid: 00000000000000000000000000000000,
			Reference: String,
			Status: 
			[
				{
					Id: 0,
					Description: String,
					Slug: String,
					Current: False,
					Completed: False,
					OrderStatuses: 
					[
						{
							Id: 0,
							Description: String
						}
					]
				}
			],
			Vehicle: 
			{
				Vin: String,
				VehicleClass: String,
				TransmissionType: String,
				FuelType: String,
				ImageUrl: String,
				Colour: String,
				Description: String,
				BodyStyle: String,
				UpholsteryType: String,
				Retailer: 
				{
					Id: 0,
					GssnId: String,
					Description: String,
					Street: String,
					City: String,
					Postcode: String,
					GoogleMapPostcode: String,
					Phone: String,
					Fax: String,
					Email: String,
					Website: String,
					RetailerGroupId: String,
					RetailerGroupName: String,
					IsOnline: False,
					IsNewCarRetailer: False,
					IsUsedCarRetailer: False,
					IsCentralRetailer: False,
					ChatEnabled: False,
					TradeInEnabled: False,
					smart: False,
					DisplayPhoneNumberNew: String,
					DisplayPhoneNumberUsed: String,
					Latitude: 0,
					Longitude: 0,
					smartDescription: String,
					smartWebsite: String,
					smartPhone: String,
					LegacyId: String,
					Agent: False,
					MarketAreaId: 0,
					DigitalLoungeParentGssnId: String,
					SendLeadsToDigitalLoungeParent: False,
					OpeningTimes: 
					{
						New: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						],
						Used: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						]
					}
				},
				OTR: 0,
				ActualPrice: 0,
				TotalOfferValue: 0,
				NetPrice: 0,
				VehicleType: String,
				OfferExpiryDate: String
			},
			ClosedDate: String,
			CustomerId: String,
			HandoverDate: String,
			ClosedReason: String,
			OrderDate: String,
			PaymentLinks: 
			[
				{
					PaymentType: String,
					PaymentLink: String
				}
			]
		}
	],
	Archived: 
	[
		{
			Guid: 00000000000000000000000000000000,
			Reference: String,
			Status: 
			[
				{
					Id: 0,
					Description: String,
					Slug: String,
					Current: False,
					Completed: False,
					OrderStatuses: 
					[
						{
							Id: 0,
							Description: String
						}
					]
				}
			],
			Vehicle: 
			{
				Vin: String,
				VehicleClass: String,
				TransmissionType: String,
				FuelType: String,
				ImageUrl: String,
				Colour: String,
				Description: String,
				BodyStyle: String,
				UpholsteryType: String,
				Retailer: 
				{
					Id: 0,
					GssnId: String,
					Description: String,
					Street: String,
					City: String,
					Postcode: String,
					GoogleMapPostcode: String,
					Phone: String,
					Fax: String,
					Email: String,
					Website: String,
					RetailerGroupId: String,
					RetailerGroupName: String,
					IsOnline: False,
					IsNewCarRetailer: False,
					IsUsedCarRetailer: False,
					IsCentralRetailer: False,
					ChatEnabled: False,
					TradeInEnabled: False,
					smart: False,
					DisplayPhoneNumberNew: String,
					DisplayPhoneNumberUsed: String,
					Latitude: 0,
					Longitude: 0,
					smartDescription: String,
					smartWebsite: String,
					smartPhone: String,
					LegacyId: String,
					Agent: False,
					MarketAreaId: 0,
					DigitalLoungeParentGssnId: String,
					SendLeadsToDigitalLoungeParent: False,
					OpeningTimes: 
					{
						New: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						],
						Used: 
						[
							{
								Day: String,
								OpenFrom: String,
								OpenTo: String,
								Special: String
							}
						]
					}
				},
				OTR: 0,
				ActualPrice: 0,
				TotalOfferValue: 0,
				NetPrice: 0,
				VehicleType: String,
				OfferExpiryDate: String
			},
			ClosedDate: String,
			CustomerId: String,
			HandoverDate: String,
			ClosedReason: String,
			OrderDate: String,
			PaymentLinks: 
			[
				{
					PaymentType: String,
					PaymentLink: String
				}
			]
		}
	]
}