POST | /v1/order | Creates an order for a selected vehicle via the Agency API | This endpoint is called from Online Showroom 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 |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Source | form | Source | No | |
GssnId | form | string | Yes | |
AdditionalInformation | form | string | Yes | |
Cash | form | bool | No | |
Finance | form | bool | No | |
Customer | form | Customer | Yes | |
Vehicle | form | Vehicle | Yes | |
FinanceCriteria | form | FinanceCriteria | Yes | |
BackOrderGuid | form | Guid? | No | |
TagUrl | form | string | No | |
OutrightPurchase | form | OutrightPurchase | No | |
Motability | form | bool | No | |
MotabilityPricingId | form | int? | No | |
FinanceApplicationReference | form | string | Yes | |
Specialist | form | bool | No | |
GasId | form | string | Yes | |
PersonalisedItemOfferIds | form | int[] | No | |
SuggestedVin | form | string | No | |
NonOptimumReason | form | string | No | |
MotabilityType | form | MotabilityType | No | |
EstimatedHandoverDate | form | string | Yes |
Name | Value | |
---|---|---|
OnlineShowroom | 1 | |
OneAdmin | 2 |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ProfileId | form | Guid? | No | |
Preferences | form | Preferences | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CustomerId | form | string | Yes | |
IsCiam | form | bool | No | |
CompanyName | form | string | Yes | |
Title | form | string | Yes | |
Firstname | form | string | Yes | |
Surname | form | string | Yes | |
EmailAddress | form | string | Yes | |
Telephone | form | string | Yes | |
Address | form | Address | Yes | |
Mode | form | CustomerMode | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Property | form | string | Yes | |
Street | form | string | Yes | |
Town | form | string | Yes | |
County | form | string | Yes | |
Locality | form | string | Yes | |
Postcode | form | string | Yes |
Name | Value | |
---|---|---|
Private | 1 | |
Business | 2 | |
Motability | 3 |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
OptinEmail | form | bool | No | |
OptinPost | form | bool | No | |
OptinSMS | form | bool | No | |
OptinTelephone | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Vin | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Key | form | string | Yes | |
Name | form | string | Yes | |
Type | form | string | Yes | |
IsDefault | form | bool | No | |
Term | form | Term | Yes | |
Deposit | form | Deposit | Yes | |
Mileage | form | Mileage | Yes | |
AdvanceRentals | form | AdvanceRentals | Yes | |
IsPersonalised | form | bool | No | |
RegularPayment | form | string | Yes | |
PartExchange | form | string | Yes | |
Settlement | form | string | Yes | |
CustomerType | form | string | Yes | |
VehicleType | form | VehicleType | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Options | form | List<Option> | Yes |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
IsDefault | form | bool | No | |
Value | form | int | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Default | form | string | Yes |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Options | form | List<Option> | Yes |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Options | form | List<Option> | Yes |
UNASSIGNED | |
NEW | |
USED |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
IsOutrightPurchase | form | bool | No | |
Reference | form | string | Yes | |
DiscountRate | form | decimal | No | |
Bm7NST | form | string | Yes | |
IsBackOrder | form | bool | No | |
IsCOPConverter | form | bool | No |
Name | Value | |
---|---|---|
PIP | 1 | |
WPMS | 2 | |
UNASSIGNED | 3 |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Guid | form | string | Yes | |
Reference | form | string | Yes | |
ResponseStatus | form | ResponseStatus | Yes | |
BackOrderReference | form | string | Yes |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/order HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
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/jsv 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 }