Mercedes.Agency.Orchestration.API

<back to all web services

CreateOneAdminOrderRequest

Order
Requires Authentication
The following routes are available for this service:
POST/v1/oneAdmin/orderCreates an order for a selected vehicle via the Agency APIThis endpoint is called from the OneAdmin portal to create a vehicle order. It builds the order request object for the Agency API before calling it to create the order. The information it retrieves and builds for the Agency API request include 1.) The customer. 2.) The vehicle. 3.) Ourright purchase. 4.) Motability. 5.) Offers applicable to the vehicle Validation is performed on the input data which includes checking for mandatory items: 1.} Customer details 2.) Vehicle Vin 3.) Agent 4.) GSSN Outlet Id 5.) Source 6.) Order Type 7.) Customer Location Id 8.) Estimated Handover Date

export enum Source
{
    OnlineShowroom = 1,
    OneAdmin = 2,
}

export class Address
{
    public Property: string;
    public Street: string;
    public Town: string;
    public County: string;
    public Locality: string;
    public Postcode: string;

    public constructor(init?: Partial<Address>) { (Object as any).assign(this, init); }
}

export enum CustomerMode
{
    Private = 1,
    Business = 2,
    Motability = 3,
}

export class SalesforceCustomer implements ICustomer
{
    public CustomerId: string;
    public IsCiam: boolean;
    public CompanyName: string;
    public Title: string;
    public Firstname: string;
    public Surname: string;
    public EmailAddress: string;
    public Telephone: string;
    public Address: Address;
    public Mode: CustomerMode;

    public constructor(init?: Partial<SalesforceCustomer>) { (Object as any).assign(this, init); }
}

export class Preferences
{
    public OptinEmail: boolean;
    public OptinPost: boolean;
    public OptinSMS: boolean;
    public OptinTelephone: boolean;

    public constructor(init?: Partial<Preferences>) { (Object as any).assign(this, init); }
}

export class Customer extends SalesforceCustomer
{
    public ProfileId?: string;
    public Preferences?: Preferences;

    public constructor(init?: Partial<Customer>) { super(init); (Object as any).assign(this, init); }
}

export class Vehicle
{
    public Vin?: string;

    public constructor(init?: Partial<Vehicle>) { (Object as any).assign(this, init); }
}

export class Option
{
    public IsDefault: boolean;
    public Value: number;

    public constructor(init?: Partial<Option>) { (Object as any).assign(this, init); }
}

export class Term
{
    public Options: Option[] = [];

    public constructor(init?: Partial<Term>) { (Object as any).assign(this, init); }
}

export class Deposit
{
    public Default: string;

    public constructor(init?: Partial<Deposit>) { (Object as any).assign(this, init); }
}

export class Mileage
{
    public Options: Option[] = [];

    public constructor(init?: Partial<Mileage>) { (Object as any).assign(this, init); }
}

export class AdvanceRentals
{
    public Options: Option[] = [];

    public constructor(init?: Partial<AdvanceRentals>) { (Object as any).assign(this, init); }
}

export enum VehicleType
{
    UNASSIGNED = 'UNASSIGNED',
    NEW = 'NEW',
    USED = 'USED',
}

export class FinanceCriteria
{
    public Key: string;
    public Name: string;
    public Type: string;
    public IsDefault: boolean;
    public Term: Term;
    public Deposit: Deposit;
    public Mileage: Mileage;
    public AdvanceRentals: AdvanceRentals;
    public IsPersonalised: boolean;
    public RegularPayment: string;
    public PartExchange: string;
    public Settlement: string;
    public CustomerType: string;
    public VehicleType: VehicleType;

    public constructor(init?: Partial<FinanceCriteria>) { (Object as any).assign(this, init); }
}

export class OutrightPurchase
{
    public IsOutrightPurchase: boolean;
    public Reference: string;
    public DiscountRate: number;
    public Bm7NST: string;
    public IsBackOrder: boolean;
    public IsCOPConverter: boolean;

    public constructor(init?: Partial<OutrightPurchase>) { (Object as any).assign(this, init); }
}

export enum MotabilityType
{
    PIP = 1,
    WPMS = 2,
    UNASSIGNED = 3,
}

export class CreateOrderBase
{
    public Source: Source;
    public GssnId: string;
    public AdditionalInformation: string;
    public Cash: boolean;
    public Finance: boolean;
    public Customer: Customer;
    public Vehicle: Vehicle;
    public FinanceCriteria: FinanceCriteria;
    public BackOrderGuid?: string;
    public TagUrl?: string;
    public OutrightPurchase?: OutrightPurchase;
    public Motability: boolean;
    public MotabilityPricingId?: number;
    public FinanceApplicationReference: string;
    public Specialist: boolean;
    public GasId: string;
    public PersonalisedItemOfferIds?: number[];
    public SuggestedVin?: string;
    public NonOptimumReason?: string;
    public MotabilityType: MotabilityType;
    public EstimatedHandoverDate: string;

    public constructor(init?: Partial<CreateOrderBase>) { (Object as any).assign(this, init); }
}

export class CreateOrderResponse
{
    public Guid: string;
    public Reference: string;
    public ResponseStatus: ResponseStatus;
    public BackOrderReference: string;

    public constructor(init?: Partial<CreateOrderResponse>) { (Object as any).assign(this, init); }
}

export class CreateOneAdminOrderRequest extends CreateOrderBase implements IGet
{
    public CustomerLocationId?: number;

    public constructor(init?: Partial<CreateOneAdminOrderRequest>) { super(init); (Object as any).assign(this, init); }
}

TypeScript CreateOneAdminOrderRequest DTOs

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

HTTP + OTHER

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

POST /v1/oneAdmin/order HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"CustomerLocationId":0,"Source":"OnlineShowroom","GssnId":"String","AdditionalInformation":"String","Cash":false,"Finance":false,"Customer":{"ProfileId":"00000000000000000000000000000000","Preferences":{"OptinEmail":false,"OptinPost":false,"OptinSMS":false,"OptinTelephone":false},"CustomerId":"String","IsCiam":false,"CompanyName":"String","Title":"String","Firstname":"String","Surname":"String","EmailAddress":"String","Telephone":"String","Address":{"Property":"String","Street":"String","Town":"String","County":"String","Locality":"String","Postcode":"String"},"Mode":"Private"},"Vehicle":{"Vin":"String"},"FinanceCriteria":{"Key":"String","Name":"String","Type":"String","IsDefault":false,"Term":{"Options":[{"IsDefault":false,"Value":0}]},"Deposit":{"Default":"String"},"Mileage":{"Options":[{"IsDefault":false,"Value":0}]},"AdvanceRentals":{"Options":[{"IsDefault":false,"Value":0}]},"IsPersonalised":false,"RegularPayment":"String","PartExchange":"String","Settlement":"String","CustomerType":"String","VehicleType":"UNASSIGNED"},"BackOrderGuid":"00000000000000000000000000000000","TagUrl":"String","OutrightPurchase":{"IsOutrightPurchase":false,"Reference":"String","DiscountRate":0,"Bm7NST":"String","IsBackOrder":false,"IsCOPConverter":false},"Motability":false,"MotabilityPricingId":0,"FinanceApplicationReference":"String","Specialist":false,"GasId":"String","PersonalisedItemOfferIds":[0],"SuggestedVin":"String","NonOptimumReason":"String","MotabilityType":"PIP","EstimatedHandoverDate":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Guid":"String","Reference":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"BackOrderReference":"String"}