Introduction
Welcome to Haswent Composer developer documentation, where you can find all the information needed to utilise the resources in our API platform
We use a REST based API
- You must use
Content-Type: application/json - You must add a header
X-API-VERSION: 1to all requests - You must add a header
Authorization: Bearer <accessToken>to all requests
All of the search endpoints accept the following parameters:
- pageSize
- Min = 1
- Max = 100
- Default = 50
- page
- Min = 1
- Default = 1
- sortOrder
- Can be ASC or DESC
- sortBy
- Pass in a name of a field to sort on
Authentication
All endpoints require users to identify themselves using a Bearer token
Login
To authorize, use this code:
curl -request POST
--url https://api.composer.haswent.com/auth/login
--header "X-API-VERSION: 1"
The response will contain an
accessTokenand arefreshToken, use this access token for future requests as the bearer token
{
"accessToken": "<token>",
"refreshToken": "<token>"
}
HTTP Request
POST https://api.composer.haswent.com/auth/login
We use JWT for authentication, you will need to make a request with a body containing your username and password
The response will contain an accessToken and a refreshToken, use this access token for future requests as the bearer token
Refresh Token
To generate a new token, use this code:
curl -request GET
--url https://api.composer.haswent.com/auth/refresh
--header "X-API-VERSION: 1"
--header "Bearer: <refreshToken>"
The response will contain an
accessTokenand arefreshToken, use this access token for future requests as the bearer token
{
"accessToken": "<token>",
"refreshToken": "<token>"
}
When the accessToken expires you are able to use the provided refreshToken to request a new accessToken and refreshToken
HTTP Request
GET https://api.composer.haswent.com/auth/refresh
Make a GET request to https://api.composer.haswent.com/auth/refresh with the Authorization header set to Bearer <refreshToken>
This will retun a new accessToken and refreshToken
Stock
Search stock
curl -request GET
--url https://api.composer.haswent.com/stock/inventory
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 71,
"page": 1,
"pageSize": 50
},
"vehicles": [
{
"id": 30,
"make": "Ford",
"model": "Transit Connect",
"registration": "YH62XTA",
"modelYear": null,
"variant": "T230 HR P/V VDPF",
"series": null,
"type": "Car",
"price": 7899,
"tradePrice": null,
"offerDisplay": false,
"offerPrice": 0,
"displayPrice": 7899,
"displayFinanceMonthly": 158.84,
"displayFinanceDeposit": 789.9,
"plusTax": false,
"saleOrReturn": false,
"vatQualifying": false,
"taxRule": "INC_TAX",
"status": "ACTIVE",
"mileage": 50000,
"paint": null,
"engineSize": 1753,
"doors": 4,
"seats": 0,
"berths": 0,
"transmission": "Manual",
"fuel": "Diesel",
"gears": 5,
"bodyStyle": "Bus",
"condition": "USED",
"owners": 1,
"registrationDate": "01/11/2012",
"registrationYear": 2012,
"emissions": 162,
"mpg": 46.3,
"videoCode": null,
"salesPitch": null,
"vin": null,
"attentionGrabber": null,
"colourBase": "Multicolour",
"colourManufacturer": "WHITE",
"image": null,
"imageCount": 0,
"stockNumber": null,
"drivePosition": null,
"category": null,
"lists": [
{
"name": "FREE DELIVERY",
"id": 6,
"slug": "free-delivery"
}
],
"finances": [
{
"monthly": 158.84,
"name": "Finance",
"deposit": 789.9
},
{
"monthly": 158.84,
"name": "HP",
"deposit": 789.9
}
],
"dealership": [
{
"address1": "Preston Park",
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"name": "Sunset Motors L1",
"postcode": "TS18 3BP",
"location": "54.542,-1.32583",
"telephone": "555-555-555",
"id": 2,
"email": "hello@haswent.com"
}
],
"uk": {
"motDueDate": "20/12/2023",
"roadTaxDueDate": null
},
"soldDate": null,
"lastUpdatedDate": "26/03/2024",
"createDate": "16/07/2019",
"stockDate": "16/07/2019",
"keyTag": null,
"metadata": [{}],
"feeds": [
{
"name": "Yes2Finance",
"id": 424
}
],
"dealerpro": null
},
{
"id": 8880,
"make": "Volkswagen",
"model": "Beetle",
"registration": "FH06BUG",
"modelYear": null,
"variant": "8V",
"series": null,
"type": "Car",
"price": 2500,
"tradePrice": null,
"offerDisplay": false,
"offerPrice": 0,
"displayPrice": 2500,
"displayFinanceMonthly": null,
"displayFinanceDeposit": null,
"plusTax": false,
"saleOrReturn": false,
"vatQualifying": false,
"taxRule": "INC_TAX",
"status": "ACTIVE",
"mileage": 100185,
"paint": "Metallic",
"engineSize": 1984,
"doors": 3,
"seats": 4,
"berths": 0,
"transmission": "Manual",
"fuel": "Petrol",
"gears": 5,
"bodyStyle": null,
"condition": "USED",
"owners": 4,
"registrationDate": "01/04/2006",
"registrationYear": 2006,
"emissions": 209,
"mpg": 32.5,
"videoCode": null,
"salesPitch": "The car to buy",
"vin": "WVWZZZ9CZ5M508532",
"attentionGrabber": "Beetle Bug",
"colourBase": "Blue",
"colourManufacturer": "BLUE",
"image": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/volkswagen-beetle-8v-8880-48e2fc8170fe490.jpg",
"imageCount": 6,
"stockNumber": null,
"drivePosition": "Right",
"category": null,
"lists": [
{
"name": "FREE DELIVERY",
"id": 6,
"slug": "free-delivery"
}
],
"dealership": [
{
"address1": "Preston Park",
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"name": "Sunset Motors L1",
"postcode": "TS18 3BP",
"location": "54.542,-1.32583",
"telephone": "555-555-555",
"id": 2,
"email": "hello@haswent.com"
}
],
"uk": {
"motDueDate": "27/02/2024",
"roadTaxDueDate": null
},
"soldDate": null,
"lastUpdatedDate": "14/09/2021",
"createDate": "14/09/2021",
"stockDate": "14/09/2021",
"keyTag": null,
"dealerpro": null
},
{
"id": 26592,
"make": "Renault",
"model": "KADJAR",
"registration": "AX1",
"modelYear": null,
"variant": "1.5 Blue dCi Iconic 5dr",
"series": null,
"type": "Car",
"price": 12313,
"tradePrice": null,
"offerDisplay": false,
"offerPrice": 0,
"displayPrice": 12313,
"displayFinanceMonthly": null,
"displayFinanceDeposit": null,
"plusTax": false,
"saleOrReturn": false,
"vatQualifying": false,
"taxRule": "INC_TAX",
"status": "ACTIVE",
"mileage": 14121,
"paint": null,
"engineSize": 1500,
"doors": 5,
"seats": 0,
"berths": 0,
"transmission": "Manual",
"fuel": "Diesel",
"gears": 6,
"bodyStyle": "Hatchback",
"condition": "USED",
"owners": 2,
"registrationDate": "26/07/2019",
"registrationYear": 2019,
"emissions": 117,
"mpg": 65.7,
"videoCode": null,
"salesPitch": null,
"vin": null,
"attentionGrabber": null,
"colourBase": "Black",
"colourManufacturer": "BLACK",
"image": null,
"imageCount": 0,
"stockNumber": null,
"drivePosition": null,
"category": null,
"dealership": [
{
"address1": "Preston Park",
"townCity": "Lockheed Close",
"county": "Stockton-On-Tees",
"name": "Sunset Motors L2",
"postcode": "TS18 3BP",
"location": "54.542,-1.32583",
"telephone": "555-555-555",
"id": 3,
"email": "hello@haswent.com"
}
],
"uk": {
"motDueDate": "25/12/2020",
"roadTaxDueDate": null
},
"soldDate": null,
"lastUpdatedDate": "30/01/2023",
"createDate": "30/01/2023",
"stockDate": "30/01/2023",
"keyTag": null,
"metadata": [
{
"capDatabase": "CAR",
"capCode": "R1KJ15ICO5HDTM 1",
"capId": 87900
}
],
"feeds": [
{
"name": "Yes2Finance",
"id": 424
}
],
"dealerpro": null
}
],
"aggregations": {
"doors": [
{
"key": 0,
"count": 2
},
{
"key": 2,
"count": 3
},
{
"key": 3,
"count": 4
},
{
"key": 4,
"count": 3
},
{
"key": 5,
"count": 59
}
],
"colour": [
{
"key": "Black",
"count": 10
},
{
"key": "Blue",
"count": 13
},
{
"key": "Green",
"count": 3
},
{
"key": "Grey",
"count": 8
},
{
"key": "Multicolour",
"count": 19
},
{
"key": "Orange",
"count": 1
},
{
"key": "Red",
"count": 6
},
{
"key": "Silver",
"count": 1
},
{
"key": "White",
"count": 9
},
{
"key": "Yellow",
"count": 1
}
],
"transmission": [
{
"key": "Automatic",
"count": 21
},
{
"key": "Manual",
"count": 47
}
],
"fuel": [
{
"key": "Diesel",
"count": 29
},
{
"key": "Electric",
"count": 2
},
{
"key": "Hybrid",
"count": 4
},
{
"key": "Petrol",
"count": 34
}
],
"bodyStyle": [
{
"key": "Bus",
"count": 1
},
{
"key": "Combi Van",
"count": 1
},
{
"key": "Coupe",
"count": 1
},
{
"key": "Derived Van",
"count": 1
},
{
"key": "Estate",
"count": 8
},
{
"key": "Hatchback",
"count": 46
},
{
"key": "MPV",
"count": 1
},
{
"key": "SUV",
"count": 2
},
{
"key": "Saloon",
"count": 2
},
{
"key": "Station Wagon",
"count": 2
}
],
"category": [
{
"key": "Touring Caravan",
"count": 1
},
{
"key": "Trailers",
"count": 1
}
],
"type": [
{
"key": "Car",
"count": 68
},
{
"key": "Van",
"count": 3
}
],
"make": [
{
"key": "Audi",
"count": 1
},
{
"key": "BMW",
"count": 4
},
{
"key": "Citroen",
"count": 2
},
{
"key": "DS",
"count": 1
},
{
"key": "Ford",
"count": 9
},
{
"key": "Honda",
"count": 3
},
{
"key": "Kia",
"count": 12
},
{
"key": "Land Rover",
"count": 3
},
{
"key": "Mazda",
"count": 1
},
{
"key": "Mercedes-Benz",
"count": 1
},
{
"key": "Nissan",
"count": 1
},
{
"key": "Peugeot",
"count": 2
},
{
"key": "Renault",
"count": 8
},
{
"key": "Seat",
"count": 3
},
{
"key": "Skoda",
"count": 7
},
{
"key": "Suzuki",
"count": 2
},
{
"key": "Tesla",
"count": 1
},
{
"key": "Toyota",
"count": 1
},
{
"key": "Volkswagen",
"count": 7
},
{
"key": "Volvo",
"count": 2
}
],
"registrationYear": [
{
"key": 946684800000,
"key_as_string": "2000",
"count": 1
},
{
"key": 1136073600000,
"key_as_string": "2006",
"count": 1
},
{
"key": 1167609600000,
"key_as_string": "2007",
"count": 3
},
{
"key": 1199145600000,
"key_as_string": "2008",
"count": 1
},
{
"key": 1230768000000,
"key_as_string": "2009",
"count": 1
},
{
"key": 1262304000000,
"key_as_string": "2010",
"count": 2
},
{
"key": 1293840000000,
"key_as_string": "2011",
"count": 3
},
{
"key": 1325376000000,
"key_as_string": "2012",
"count": 6
},
{
"key": 1356998400000,
"key_as_string": "2013",
"count": 2
},
{
"key": 1388534400000,
"key_as_string": "2014",
"count": 6
},
{
"key": 1420070400000,
"key_as_string": "2015",
"count": 2
},
{
"key": 1451606400000,
"key_as_string": "2016",
"count": 5
},
{
"key": 1483228800000,
"key_as_string": "2017",
"count": 4
},
{
"key": 1514764800000,
"key_as_string": "2018",
"count": 3
},
{
"key": 1546300800000,
"key_as_string": "2019",
"count": 14
},
{
"key": 1577836800000,
"key_as_string": "2020",
"count": 6
},
{
"key": 1609459200000,
"key_as_string": "2021",
"count": 4
},
{
"key": 1640995200000,
"key_as_string": "2022",
"count": 6
},
{
"key": 1672531200000,
"key_as_string": "2023",
"count": 1
}
]
}
}
This returns a array of vehicle objects that match all of the parameters as a response
This endpoint allows you to search and retrive all stock records
HTTP Request
GET https://api.composer.haswent.com/stock/inventory
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| status | N | string | Possible values are: ACTIVE, NOT_ACTIVE, SOLD, SOLD_STC, DELETED You can pass in a comma separated string of all statuses if you want all stock |
| aggregate | N | boolean | If true, will return aggregations node in the response |
| make | N | string | Case insensitive, will only return if exact match found |
| model | N | string | Case insensitive, will only return if exact match found |
| registration | N | string | Case insensitive, will only return if exact match found |
| vin | N | string | Case insensitive, will only return if exact match found |
| type | N | string | Case insensitive, will only return if exact match found |
| series | N | string | Case insensitive, will only return if exact match found |
| colour | N | string | Case insensitive, will only return if exact match found |
| fuel | N | string | Case insensitive, will only return if exact match found |
| transmission | N | string | Case insensitive, will only return if exact match found |
| priceFrom | N | number | Will return any vehicles where vehicle price greater than or equal to priceFrom |
| priceTo | N | number | Will return any vehicles where vehicle price less than or equal to priceTo |
| offerDisplay | N | boolean | |
| bodyStyle | N | string | Case insensitive, will only return if exact match found |
| transmission | N | string | Case insensitive, will only return if exact match found |
| registrationDate | N | string | Format: YYYY-MM-DD |
| registrationYear | N | number | |
| registrationYearFrom | N | number | Will return any vehicles where vehicle registrationDategreater than or equal toregistrationYearFrom |
| registrationYearTo | N | number | Will return any vehicles where vehicle registrationDate less than or equal to registrationYearTo |
| mileage | N | number | will only return if exact match found |
| doors | N | number | will only return if exact match found |
| engineSize | N | number | will only return if exact match found |
| engineSizeFrom | N | number | Will return any vehicles where vehicle engineSize greater than or equal toengineSizeFrom |
| engineSizeTo | N | number | Will return any vehicles where vehicle engineSize less than or equal to engineSizeTo |
| financeMonthlyFrom | N | number | Will return any vehicles where the lowest finance pricegreater than or equal to financeMonthlyFrom |
| financeMonthlyTo | N | number | Will return any vehicles where the lowest finance price less than or equal to financeMonthlyTo |
| condition | N | string | Case insensitive, will only return if exact match found |
| minImageCount | N | number | Will return vheicles which have count of images greater than or equal to minImageCount |
| imageCount | N | number | Will return vheicles which have count of images = imageCount |
| category | N | string | Case insensitive, will only return if exact match found |
| dealershipId | N | number | Return vehicles for a specific dealership |
| query | N | string | Free text query |
| related | N | string | To return additional information, possible values are: metadata, finances, dealership, lists, feeds |
Get a specific vehicle
curl -request GET
--url https://api.composer.haswent.com/stock/inventory/{id}
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"id": 11031,
"clientId": 9,
"make": "BMW",
"model": "3 Series",
"series": null,
"status": "SOLD_STC",
"type": "CAR",
"registration": "SW14YRA",
"modelYear": null,
"variant": "330D XDRIVE M SPORT",
"price": 12313,
"tradePrice": null,
"plusTax": false,
"saleOrReturn": false,
"manufacturerApproved": false,
"vatQualifying": false,
"taxRule": "NO_TAX",
"offerDisplay": false,
"offerPrice": 0,
"offerDescription": null,
"mileage": 3000,
"interior": null,
"paint": null,
"engineSize": 2993,
"doors": 4,
"seats": 5,
"berths": 0,
"transmission": "Automatic",
"fuel": "Diesel",
"gears": 8,
"bodyStyle": "Saloon",
"condition": "USED",
"owners": 2,
"registrationDate": "2014-04-01T00:00:00.000Z",
"emissions": 137,
"mpg": 54.3,
"videoCode": null,
"salesPitch": null,
"vin": "WBA3E32060K282837",
"attentionGrabber": null,
"colourBase": "Multicolour",
"colourManufacturer": "BLUE",
"stockNumber": null,
"videoCodeInternal": null,
"warranty": null,
"lists": [
{
"id": 6,
"name": "FREE DELIVERY",
"slug": "free-delivery",
"description": "Free Delivery Offer ",
"status": 1
}
],
"finances": [
{
"id": 46073,
"name": "Finance",
"deposit": 1231.3,
"monthly": 247.6,
"terms": [
{
"Name": "Finance Amount",
"Value1": "11081.70"
},
{
"Name": "Total Interest Amount",
"Value1": "3774.20"
},
{
"Name": "Finance Repayment Amount",
"Value1": "14855.90"
},
{
"Name": "Total Payment Amount",
"Value1": "16087.20"
},
{
"Name": "Term (Months)",
"Value1": 60
},
{
"Name": "APR (%)",
"Value1": 12.9
}
],
"source": "EXTERNAL"
}
],
"dealership": {
"id": 2,
"status": "ACTIVE",
"name": "Sunset Motors L1",
"address1": "Preston Park",
"address2": null,
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-1",
"longitude": -1.325833,
"latitude": 54.541967
},
"specifications": [
{
"group": "Driver Convenience",
"name": "Adjustable Steering Column/Wheel",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Air Bag Driver",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Air Bag Passenger",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Air Bag Side",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Air-Conditioning",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Alarm",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Exterior Features",
"name": "Alloy Wheels",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Anti-Lock Brakes",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Armrest",
"fitment": "STAN",
"price": 75,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Armrest",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Automatic Transmission",
"fitment": "STAN",
"price": 140,
"highlight": false,
"display": true
},
{
"group": "Exterior Features",
"name": "Body Coloured Bumpers",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Central Door Locking",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Centre Console",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Centre Rear Seat Belt",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Child Locks",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Clock",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Interior Features",
"name": "Cloth Headlining",
"fitment": "STAN",
"price": 215,
"highlight": false,
"display": true
},
{
"group": "Interior Features",
"name": "Computer",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Cruise Control",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Cup Holder",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "DAB Radio",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Electric Windows",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Electronic Stability Programme",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Exterior Features",
"name": "Exterior Design",
"fitment": "STAN",
"price": 230,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Exterior Lighting",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Interior Features",
"name": "External Temperature Display",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Floor Mats",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Front Fog Lights",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Gear Knob Leather",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Head Light Sensor",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Head Restraints",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Heated Rear Screen",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Exterior Features",
"name": "Heated Washer Jets",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Hill Holder",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Immobiliser",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "In Car Entertainment",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Interior Features",
"name": "Interior Finishes",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Interior Features",
"name": "Interior Lights",
"fitment": "STAN",
"price": 200,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Keyless Start",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Limited Slip Differential",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Exterior Features",
"name": "Mirrors External",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Interior Features",
"name": "Mirrors Internal",
"fitment": "STAN",
"price": 145,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "On-Board Monitor",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Parking Aid",
"fitment": "STAN",
"price": 395,
"highlight": false,
"display": true
},
{
"group": "Interior Features",
"name": "Power Socket",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Power-Assisted Steering",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Rain Sensor",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Seat - ISOFIX Anchorage Point",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Seat Belt Pre-Tensioners",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Seat Height Adjustment",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Seating Capacity",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Seats Sports",
"fitment": "STAN",
"price": 410,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Servotronic",
"fitment": "STAN",
"price": 180,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Speakers",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Exterior Features",
"name": "Start/Stop System",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Steering Wheel Mounted Controls",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Sun Visor",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Telephone Equipment",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Third Brake Light",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Tinted Glass",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Traction Control System",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Trip Computer",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Safety",
"name": "Tyre Pressure Control",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
},
{
"group": "Driver Convenience",
"name": "Upholstery Leather",
"fitment": "STAN",
"price": 0,
"highlight": false,
"display": true
}
],
"technicals": [
{
"group": "General",
"description": "Driver Position",
"value": "R"
},
{
"group": "General",
"description": "Driving Axle",
"value": "4X4"
},
{
"group": "General",
"description": "Engine Aspiration",
"value": "TURBO"
},
{
"group": "General",
"description": "Engine Bore",
"value": "84"
},
{
"group": "General",
"description": "Engine Cylinder Arrangement",
"value": "I"
},
{
"group": "General",
"description": "Engine Make",
"value": "BMW"
},
{
"group": "General",
"description": "Engine Number of Cylinders",
"value": "6"
},
{
"group": "General",
"description": "Engine Primary Fuel Flag",
"value": "Y"
},
{
"group": "General",
"description": "Engine Stroke",
"value": "90"
},
{
"group": "General",
"description": "Engine Valve Gear",
"value": "DOHC"
},
{
"group": "General",
"description": "Engine Valves Per Cylinder",
"value": "4"
},
{
"group": "General",
"description": "Engine Aspiration",
"value": "TURBO"
},
{
"group": "General",
"description": "Euro Status",
"value": "5"
},
{
"group": "General",
"description": "Is Limited Edition",
"value": "False"
},
{
"group": "General",
"description": "Power Delivery",
"value": "NORMAL"
},
{
"group": "General",
"description": "Series Description",
"value": "F30"
},
{
"group": "General",
"description": "Type Approval Category",
"value": "M1"
},
{
"group": "Dimensions",
"description": "Bodyshape",
"value": "NA"
},
{
"group": "Dimensions",
"description": "Car Length",
"value": "4624"
},
{
"group": "Dimensions",
"description": "Fuel Tank Capacity",
"value": "57"
},
{
"group": "Dimensions",
"description": "Gross Vehicle Weight",
"value": "2160"
},
{
"group": "Dimensions",
"description": "Height",
"value": "1441"
},
{
"group": "Dimensions",
"description": "Kerb Weight",
"value": "1610"
},
{
"group": "Dimensions",
"description": "Number Of Axles",
"value": "2"
},
{
"group": "Dimensions",
"description": "Number Of Doors",
"value": "4"
},
{
"group": "Dimensions",
"description": "Number Of Seats",
"value": "5"
},
{
"group": "Dimensions",
"description": "Rigid Artic",
"value": "RIGID"
},
{
"group": "Dimensions",
"description": "Unladen Weight",
"value": "1610"
},
{
"group": "Dimensions",
"description": "Wheel Base",
"value": "2810"
},
{
"group": "Dimensions",
"description": "Width",
"value": "1811"
},
{
"group": "Fuel Consumption",
"description": "Urban",
"value": "44.1"
},
{
"group": "Fuel Consumption",
"description": "Extra Urban",
"value": "61.4"
},
{
"group": "Fuel Consumption",
"description": "Combined",
"value": "54.3"
},
{
"group": "Performance",
"description": "Acceleration - 0-60 mph",
"value": "5.3"
},
{
"group": "Performance",
"description": "Acceleration - Mph",
"value": "5.3"
},
{
"group": "Performance",
"description": "CO2",
"value": "137"
},
{
"group": "Performance",
"description": "Max Speed (Mph)",
"value": "155"
},
{
"group": "Performance",
"description": "Max Speed (Kph)",
"value": "250"
},
{
"group": "Performance",
"description": "Power - BHP",
"value": "254.8"
},
{
"group": "Performance",
"description": "Power - Kw",
"value": "190"
},
{
"group": "Performance",
"description": "Power - Rpm",
"value": "4000"
},
{
"group": "Performance",
"description": "Torque - FtLb",
"value": "413.3"
},
{
"group": "Performance",
"description": "Torque - Nm",
"value": "560"
},
{
"group": "Performance",
"description": "Torque - Rpm",
"value": "1500"
}
],
"images": [
{
"id": 2357307,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/bmw-3-series-330d-xdrive-m-sport-11031-oofn7fsv.jpg",
"priority": 1
},
{
"id": 2357308,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/bmw-3-series-330d-xdrive-m-sport-11031-xsbgknou.jpg",
"priority": 2
},
{
"id": 2357309,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/bmw-3-series-330d-xdrive-m-sport-11031-xjjzmqqo.jpg",
"priority": 3
},
{
"id": 2357310,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/bmw-3-series-330d-xdrive-m-sport-11031-1xgmyfnr.jpg",
"priority": 4
},
{
"id": 2357311,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/bmw-3-series-330d-xdrive-m-sport-11031-wxijuno.jpg",
"priority": 5
},
{
"id": 2357312,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/bmw-3-series-330d-xdrive-m-sport-11031-v0q3oloq.jpg",
"priority": 6
},
{
"id": 2357313,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/used/bmw-3-series-330d-xdrive-m-sport-11031-tpblfau3.jpg",
"priority": 7
}
],
"electric": null,
"uk": {
"motDueDate": "2023-12-29",
"roadTax6Mth": 85.25,
"roadTax12Mth": 155,
"roadTaxDueDate": null,
"emissionsClass": null,
"thatchamInsuranceGroup": null,
"miaftrInsuranceWriteoffCategory": null,
"v5Certificate": null
},
"metadata": null,
"feeds": [],
"purchasePrice": null,
"purchaseStandIn": null,
"soldPrice": null,
"priceHistory": [
{
"price": 12313,
"changeDate": "2021-11-26T18:00:05.250Z"
}
],
"purchaseSource": null,
"soldSource": null,
"drivePosition": null,
"wheelBase": null,
"colourInterior": null,
"category": null,
"createDate": "2021-11-26T00:00:00.000Z",
"stockDate": "2021-11-26T00:00:00.000Z",
"notes": null,
"keyTag": null,
"keys": null,
"serviceHistory": null,
"conditionOverall": null,
"conditionBody": null,
"conditionInterior": null,
"conditionMechanical": null,
"conditionTyres": null,
"capCode": null
}
This returns a vehicle object as a response
This endpoint returns detailed information about a single vehicle record
HTTP Request
GET https://api.composer.haswent.com/stock/inventory/{id}
URL Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| related | N | string | To return additional information, possible values are: specifications, finances, images, dealerships |
Sync stock
curl -request POST
--url https://api.composer.haswent.com/stock/inventory/sync
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The response will contain an array of vehicles for each one in the request. The stock number provided for each vehicle in the request will be suppled in the response.
{
"vehicles": [
{
"id": 9415,
"stockNumber": "TEST-1",
"error": null
},
{
"id": 9416,
"stockNumber": "TEST-2",
"error": null
}
]
}
This endpoint is useful to sync stock records with an external system
To sync vehicles, you will need to make a request to the above endpoint with an array of vehicles (definition of the vehicle object can be seen in the appendix)
Any vehicles not included within the request will be automatically updated to SOLD.
HTTP Request
POST https://api.composer.haswent.com/stock/inventory/sync
URL Parameters
This endpoint expects an array of vehicles object which contain the below parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| id | N | number | Not required for creating new records, however if you with to update existing stock records then an id must be supplied |
| dealershipId | Y | number | The dealership location of this vehicle |
| status | Y | string | Possible values are ACTIVE, NOT_ACTIVE, SOLD and SOLD_STC |
| make | Y | string | e.g. Ford |
| model | Y | string | e.g. Focus |
| variant | Y | string | e.g. ST LINE X |
| condition | Y | string | Possible values are USED, NEW |
| price | Y | number | |
| engineSize | Y | number | Engine size in cc |
| doors | Y | number | Number of doors |
| seats | Y | number | Number of seats |
| type | Y | string | Possible values are CAR, VAN, BIKE, CARA, MOTR, TRUK, FARM, PLAN |
| colourManufacturer | Y | string | e.g. Midnight Blue |
| colour | Y | string | e.g. Blue |
| stockNunber | Y | string | This is the stock number on your system |
| registrationDate | Y/N | string | Only required where condition = USED |
| registration | N | string | e.g. LF03WWR |
| vin | N | string | |
| taxRule | Y | string | Possible values are NO_TAX, INC_TAX, EX_TAX |
| vatQualifying | N | boolean | Defaults to false |
| offerDisplay | N | boolean | Defaults to false |
| offerPrice | N | number | |
| offerDescription | N | string | |
| mileage | N | number | |
| interior | N | string | e.g. Full Leater |
| paint | N | string | e.g. Metallic |
| berths | N | number | |
| transmission | N | string | Possible values Automatic/Manual/Semi Automatic/Powershift Automatic |
| fuel | N | string | Possible Values Petrol/Diesel/Gas/Electric/Hybrid |
| gears | N | number | |
| bodyStyle | N | string | |
| owners | N | number | |
| stockDate | N | string | If not supplied will default to today's date on creation |
| emissions | N | number | |
| mpg | N | number | |
| videoCode | N | string | Youtube URL |
| salesPitch | N | string | |
| attentionGrabber | N | string | |
| purchasePrice | N | number | |
| purchaseStandIn | N | number | |
| soldPrice | N | number | |
| series | N | string | |
| serviceHistory | N | string | Possible values are FULL, DEAL, HIST, PART |
| colourInterior | N | string | e.g. Blue |
| drivePosition | N | string | Possible values are Left, Right |
| conditionOverall | N | string | Possible values are NEW, EXCL, CLEN, GOOD, AVG, POOR |
| conditionBody | N | string | Possible values are NEW, EXCL, CLEN, GOOD, AVG, POOR |
| conditionInterior | N | string | Possible values are NEW, EXCL, CLEN, GOOD, AVG, POOR |
| conditionMechanical | N | string | Possible values are NEW, EXCL, CLEN, GOOD, AVG, POOR |
| conditionTyres | N | string | Possible values are NEW, EXCL, CLEN, GOOD, AVG, POOR |
| category | N | string | e.g. Rigid Trucks - Only recommended if adding farm/plant vehicles |
| wheelBase | N | string | Possible values are SWB, MWB, LWB, XLWB |
Response
The response will contain an array of vehicles for each one in the request. The stock number provided for each vehicle in the request will be suppled in the response.
If there are any errors which meant we were unable to process that particular vehicle an error message will be provided, if no error message is provided it’s safe to assume the transaction was successful for that vehicle
It is recommended that you store the id for each vehicle from our response in your system so you have a reference to it for future updates
Dealership
Search Dealerships
curl -request GET
--url https://api.composer.haswent.com/stock/dealerships
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 2,
"page": 1,
"pageSize": 50
},
"dealerships": [
{
"id": 2,
"status": "ACTIVE",
"name": "Sunset Motors L1",
"address1": "Preston Park",
"address2": null,
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-1",
"longitude": -1.325833,
"latitude": 54.541967
},
{
"id": 3,
"status": "ACTIVE",
"name": "Sunset Motors L2",
"address1": "Preston Park",
"address2": null,
"townCity": "Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-2",
"longitude": -1.325833,
"latitude": 54.541967
}
]
}
This returns a array of dealerships objects that match all of the parameters as a response
This endpoint returns a list of all dealership locations
HTTP Request
GET https://api.composer.haswent.com/stock/dealerships
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| status | N | string | Possible values are: ACTIVE, NOT_ACTIVE |
Get a specific dealership
curl -request GET
--url https://api.composer.haswent.com/stock/dealerships/{id}
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"dealership": {
"id": 2,
"status": "ACTIVE",
"name": "Sunset Motors L1",
"address1": "Preston Park",
"address2": null,
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-1",
"longitude": -1.325833,
"latitude": 54.541967
},
"departments": [
{
"id": 17,
"name": "Sales",
"hours": {
"HeaderUse": false,
"Header": null,
"Items": [
{
"Name": "Monday",
"Value1": "09:00",
"Value2": "19:00"
},
{
"Name": "Tuesday",
"Value1": "09:00",
"Value2": "17:00"
},
{
"Name": "Wednesday",
"Value1": "09:00",
"Value2": "17:00"
},
{
"Name": "Thursday",
"Value1": "09:00",
"Value2": "17:00"
},
{
"Name": "Friday",
"Value1": "09:00",
"Value2": "17:00"
},
{
"Name": "Saturday",
"Value1": "09:00",
"Value2": "17:00"
},
{
"Name": "",
"Value1": "",
"Value2": ""
}
]
},
"telephone": "020 3920 7611",
"email": "hello@haswent.com",
"staff": {
"HeaderUse": false,
"Header": null,
"Items": []
}
},
{
"id": 189,
"name": "Service",
"hours": {
"HeaderUse": false,
"Header": null,
"Items": [
{
"Name": "Monday",
"Value1": "",
"Value2": ""
},
{
"Name": "Tuesday",
"Value1": "",
"Value2": ""
},
{
"Name": "Wednesday",
"Value1": "",
"Value2": ""
},
{
"Name": "Thursday",
"Value1": "",
"Value2": ""
},
{
"Name": "Friday",
"Value1": "",
"Value2": ""
},
{
"Name": "Saturday",
"Value1": "",
"Value2": ""
},
{
"Name": "Sunday",
"Value1": "",
"Value2": ""
}
]
},
"telephone": "123",
"email": "hello@haswent.com",
"staff": null
}
],
"markup": {
"id": 7,
"metaH1": "",
"metaTitle": "Sunset Motors",
"metaDescription": null,
"metaKeywords": null,
"ogType": "article",
"ogTitle": "",
"ogDescription": null,
"ogImage": null,
"twitterCard": "summary",
"twitterSite": "@",
"twitterTitle": "",
"twitterDescription": null,
"twitterImage": null,
"schema": null,
"clientId": 9
},
"content": {
"id": 1,
"clientId": 9,
"relatedType": 7,
"relatedId": 2,
"text": ""
},
"assets": []
}
This returns a dealership object as a response
This endpoint returns detailed information about a single dealership record
HTTP Request
GET https://api.composer.haswent.com/stock/dealerships/{id}
URL Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| related | N | string | To return additional information, possible values are: departments |
Website
Pages - Search
curl -request GET
--url https://api.composer.haswent.com/web/pages
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 22,
"page": 1,
"pageSize": 50
},
"pages": [
{
"id": 1833,
"parentId": null,
"status": "ACTIVE",
"name": "Home",
"slug": "/",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 0
},
{
"id": 1863,
"parentId": 1836,
"status": "ACTIVE",
"name": "555",
"slug": "555",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 0
},
{
"id": 280,
"parentId": 1836,
"status": "ACTIVE",
"name": "test111",
"slug": "1111",
"menuDisplay": true,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Custom",
"priority": 1
},
{
"id": 1836,
"parentId": null,
"status": "ACTIVE",
"name": "Reviews",
"slug": "reviews",
"menuDisplay": true,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 2
},
{
"id": 1835,
"parentId": null,
"status": "ACTIVE",
"name": "Warranty",
"slug": "warranty",
"menuDisplay": true,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 3
},
{
"id": 1806,
"parentId": null,
"status": "ACTIVE",
"name": "Financing",
"slug": "finance",
"menuDisplay": true,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 4
},
{
"id": 1861,
"parentId": null,
"status": "ACTIVE",
"name": "aaaaaa12",
"slug": "aaaaaa12",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Custom",
"priority": 5
},
{
"id": 9,
"parentId": null,
"status": "ACTIVE",
"name": "Used Cars",
"slug": "stock",
"menuDisplay": true,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "CustomPlus",
"priority": 6
},
{
"id": 1862,
"parentId": null,
"status": "ACTIVE",
"name": "AAA",
"slug": "adsarfa",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 7
},
{
"id": 16,
"parentId": null,
"status": "ACTIVE",
"name": "Contact Us",
"slug": "contact-us",
"menuDisplay": true,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "CustomPlus",
"priority": 10
},
{
"id": 1855,
"parentId": null,
"status": "ACTIVE",
"name": "aaa",
"slug": "aaa",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 11
},
{
"id": 1860,
"parentId": null,
"status": "ACTIVE",
"name": "asdasd",
"slug": "asdsad",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 12
},
{
"id": 1854,
"parentId": null,
"status": "ACTIVE",
"name": "TEST123",
"slug": "123",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 13
},
{
"id": 1853,
"parentId": null,
"status": "ACTIVE",
"name": "ABC123",
"slug": "ABC123",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Custom",
"priority": 14
},
{
"id": 1852,
"parentId": null,
"status": "ACTIVE",
"name": "123",
"slug": "123",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 15
},
{
"id": 566,
"parentId": 202,
"status": "ACTIVE",
"name": "C",
"slug": "V",
"menuDisplay": true,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Link",
"priority": 16
},
{
"id": 1838,
"parentId": 1837,
"status": "ACTIVE",
"name": "Used Cars",
"slug": "used-cars",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Custom",
"priority": 17
},
{
"id": 1839,
"parentId": 1837,
"status": "ACTIVE",
"name": "Contact Us",
"slug": "contact-us",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Custom",
"priority": 18
},
{
"id": 2294,
"parentId": null,
"status": "ACTIVE",
"name": "asda",
"slug": "asda",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "CustomPlus",
"priority": 19
},
{
"id": 2295,
"parentId": null,
"status": "ACTIVE",
"name": "adsffffff",
"slug": "adsffffff",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Placeholder",
"priority": 20
},
{
"id": 2296,
"parentId": null,
"status": "ACTIVE",
"name": "asdadasda",
"slug": "asdadasda",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Custom",
"priority": 21
},
{
"id": 2298,
"parentId": null,
"status": "ACTIVE",
"name": "asdad",
"slug": "asdad",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Custom",
"priority": 22
}
]
}
This returns a array of page objects that match all of the parameters as a response, Use
parentIdto determine if page is a child page
This endpoint returns a list of all pages
HTTP Request
GET https://api.composer.haswent.com/web/pages
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| status | N | string | Possible values are: ACTIVE, NOT_ACTIVE |
| name | N | string | Name of a page |
Pages - Get a specific page
curl -request GET
--url https://api.composer.haswent.com/web/pages/{id}
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"navigation": {
"id": 1833,
"parentId": null,
"status": "ACTIVE",
"name": "Home",
"slug": "/",
"menuDisplay": false,
"menuSubDisplay": false,
"mobileDisplay": false,
"pageType": "Standard",
"priority": 0
},
"markup": {
"metaH1": "Home (copy) - Sunset Motors",
"metaTitle": "Haswent Demo - Homepage",
"metaDescription": "This is a homepage for a demo website",
"metaKeywords": "haswent, demo, keywords",
"ogType": "article",
"ogTitle": "Haswent Demo - Homepage",
"ogDescription": null,
"ogImage": null,
"twitterCard": "summary",
"twitterSite": "@",
"twitterTitle": "Haswent Demo - Homepage",
"twitterDescription": null,
"twitterImage": null,
"schema": null
},
"content": {
"text": "<div class=\"row\">\n <div class=\"col-md-12\" data-noedit=\"\">\n <div class=\"spacer height-80\"></div>\n </div>\n\n</div>\n<div class=\"row\">\n <div class=\"col-md-12\" data-noedit=\"\">\n <div class=\"spacer height-80\"></div>\n </div>\n\n</div>"
},
"assets": [
{
"id": 693,
"type": "IMAGE",
"name": "GGGGGG",
"images": [
{
"id": 891,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/asset/_128706666-0ytggupt.jpg",
"caption": null,
"link": null,
"priority": 0
}
],
"priority": 0
},
{
"id": 681,
"type": "IMAGE",
"name": "adadsada",
"images": [
{
"id": 882,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/asset/wms-safe-s-8m2h6mps.jpg",
"caption": null,
"link": null,
"priority": 1
},
{
"id": 885,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/asset/jordan-irv-fbe57v51.jpg",
"caption": null,
"link": null,
"priority": 2
},
{
"id": 887,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/asset/motorcheck-iyyt7sx.png",
"caption": null,
"link": null,
"priority": 3
},
{
"id": 888,
"url": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/asset/logo-remov-jtjcllgy.png",
"caption": null,
"link": null,
"priority": 4
}
],
"priority": 0
}
]
}
This returns a page object as a response
This endpoint returns detailed information about a single page record
HTTP Request
GET https://api.composer.haswent.com/web/pages/{id}
Posts - Search
curl -request GET
--url https://api.composer.haswent.com/web/posts
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 6,
"page": 1,
"pageSize": 25
},
"posts": [
{
"id": 115,
"name": "g31fg1",
"summary": null,
"dateStart": "2023-03-17T00:00:00.000Z",
"dateEnd": "2023-03-17T00:00:00.000Z",
"status": "ACTIVE",
"image": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/content/7691fdbb817e-F3C0C6FF_AA98_46E1_8027_3EAF2260C8D6 (1).jpeg-lrii6yxm.jpeg",
"slug": "g31fg1",
"type": "news"
},
{
"id": 109,
"name": "adasd",
"summary": null,
"dateStart": "2023-03-16T22:56:04.000Z",
"dateEnd": null,
"status": "ACTIVE",
"image": null,
"slug": "dasda",
"type": "news"
},
{
"id": 108,
"name": "adasd",
"summary": null,
"dateStart": "2023-03-16T22:55:49.000Z",
"dateEnd": null,
"status": "ACTIVE",
"image": null,
"slug": "dasda",
"type": "news"
},
{
"id": 107,
"name": "adsa",
"summary": null,
"dateStart": "2023-03-16T22:55:36.000Z",
"dateEnd": null,
"status": "ACTIVE",
"image": null,
"slug": "asda",
"type": "news"
},
{
"id": 86,
"name": "asdasd",
"summary": null,
"dateStart": "2023-01-31T00:00:00.000Z",
"dateEnd": "2023-03-17T00:00:00.000Z",
"status": "ACTIVE",
"image": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/content/motorcheck.png-7a3fy0ig.png",
"slug": "asdasd",
"type": "news"
},
{
"id": 84,
"name": "Test",
"summary": null,
"dateStart": "2023-03-17T00:00:00.000Z",
"dateEnd": "2023-03-21T00:00:00.000Z",
"status": "ACTIVE",
"image": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/content/wms-safe-sound.1666081600.jpg-ltbiomij.jpg",
"slug": "test",
"type": "news"
}
]
}
This returns a array of post objects that match all of the parameters as a response
This endpoint returns a list of all pages
HTTP Request
GET https://api.composer.haswent.com/web/posts
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| type | N | string | select type of post |
| status | N | string | possible values are: ACTIVE, NOT_ACTIVE |
| slug | N | string | search post by slug |
| name | N | string | search post by name |
Posts - Get a specific post
curl -request GET
--url https://api.composer.haswent.com/web/posts/{id}
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"post": {
"id": 115,
"name": "g31fg1",
"summary": null,
"dateStart": "2023-03-17T00:00:00.000Z",
"dateEnd": "2023-03-17T00:00:00.000Z",
"status": "ACTIVE",
"image": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/content/7691fdbb817e-F3C0C6FF_AA98_46E1_8027_3EAF2260C8D6 (1).jpeg-lrii6yxm.jpeg",
"slug": "g31fg1",
"type": "news"
},
"content": {
"text": ""
},
"assets": [],
"markup": {
"metaH1": null,
"metaTitle": "g31fg1 | Haswent Motors",
"metaDescription": "",
"metaKeywords": "",
"ogType": null,
"ogTitle": "g31fg1 | Haswent Motors",
"ogDescription": "",
"ogImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/asset/Autosmart--x43ppns2.png",
"twitterCard": null,
"twitterSite": null,
"twitterTitle": "g31fg1 | Haswent Motors",
"twitterDescription": "",
"twitterImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com/9/asset/Autosmart--x43ppns2.png",
"schema": ""
}
}
This returns a post object as a response
This endpoint returns detailed information about a single post record
HTTP Request
GET https://api.composer.haswent.com/web/posts/{id}
Enquiry
Search Enquiries
curl -request GET
--url https://api.composer.haswent.com/stock/dealerships
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 74,
"page": 1,
"pageSize": 50
},
"enquiries": [
{
"id": 24088,
"source": "Website",
"subject": "Vehicle Reservation",
"createdDate": "2023-11-11T11:37:29.753Z",
"dealership": {
"id": 2,
"name": "Sunset Motors L1",
"status": "ACTIVE"
},
"vehicle": {
"id": 11031,
"make": "BMW",
"model": "3 Series",
"registration": "SW14YRA",
"variant": "330D XDRIVE M SPORT"
},
"contact": {
"id": 302,
"firstName": "James",
"lastName": "SMITH",
"phone": null,
"email": "test@test.com",
"type": "Customer"
}
},
{
"id": 24087,
"source": "Website",
"subject": "Vehicle Reservation",
"createdDate": "2023-11-11T11:35:53.007Z",
"dealership": {
"id": 2,
"name": "Sunset Motors L1",
"status": "ACTIVE"
},
"vehicle": {
"id": 11031,
"make": "BMW",
"model": "3 Series",
"registration": "SW14YRA",
"variant": "330D XDRIVE M SPORT"
},
"contact": {
"id": 302,
"firstName": "James",
"lastName": "SMITH",
"phone": null,
"email": "test@test.com",
"type": "Customer"
}
},
{
"id": 24086,
"source": "Website",
"subject": "Vehicle Reservation",
"createdDate": "2023-11-11T11:33:36.150Z",
"dealership": {
"id": 2,
"name": "Sunset Motors L1",
"status": "ACTIVE"
},
"vehicle": {
"id": 11031,
"make": "BMW",
"model": "3 Series",
"registration": "SW14YRA",
"variant": "330D XDRIVE M SPORT"
},
"contact": {
"id": 302,
"firstName": "James",
"lastName": "SMITH",
"phone": null,
"email": "test@test.com",
"type": "Customer"
}
},
{
"id": 24085,
"source": "Website",
"subject": "Vehicle Reservation",
"createdDate": "2023-11-11T11:32:07.587Z",
"dealership": {
"id": 2,
"name": "Sunset Motors L1",
"status": "ACTIVE"
},
"vehicle": {
"id": 11031,
"make": "BMW",
"model": "3 Series",
"registration": "SW14YRA",
"variant": "330D XDRIVE M SPORT"
},
"contact": {
"id": 302,
"firstName": "James",
"lastName": "SMITH",
"phone": null,
"email": "test@test.com",
"type": "Customer"
}
},
{
"id": 8486,
"source": "AutoTrader",
"subject": "AutoTrader Enquiry",
"createdDate": "2023-02-28T15:39:47.500Z",
"dealership": {
"id": 3,
"name": "Sunset Motors L2",
"status": "ACTIVE"
},
"contact": {
"id": 7530,
"firstName": "Daniel",
"lastName": "Jones",
"phone": "07777777777",
"email": "amanda.berry@autotrader.co.uk",
"type": "Customer"
}
},
{
"id": 8475,
"source": "AutoTrader",
"subject": "AutoTrader Enquiry",
"createdDate": "2023-02-28T13:07:02.957Z",
"dealership": {
"id": 3,
"name": "Sunset Motors L2",
"status": "ACTIVE"
},
"contact": {
"id": 7519,
"firstName": "Tam",
"lastName": "Test",
"phone": "07987654321",
"email": "tamtest@autotrader.co.uk",
"type": "Customer"
}
}
]
}
This returns a array of eqnuiry objects that match all of the parameters as a response
This endpoint returns a list of all dealership locations
HTTP Request
GET https://api.composer.haswent.com/enquiries
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| contactId | N | number | id of a contact |
| vehicleId | N | number | id of a vehicle |
| fromDate | N | string | |
| toDate | N | string | |
| source | N | string | Possible values are: Website, Autotrader, Cargurus, Visitor Chat, eBay Motors Group |
Get a specific enquiry
curl -request GET
--url https://api.composer.haswent.com/enquiries/{id}
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"enquiry": {
"id": 24088,
"source": "Website",
"subject": "Vehicle Reservation",
"createdDate": "2023-11-11T11:37:29.753Z",
"additional": {
"paymentRef": "ATOA1699702527264"
},
"externalRef": null
},
"dealership": {
"id": 2,
"name": "Sunset Motors L1",
"status": "ACTIVE"
},
"vehicle": {
"id": 11031,
"make": "BMW",
"model": "3 Series",
"registration": "SW14YRA",
"variant": "330D XDRIVE M SPORT"
},
"contact": {
"id": 302,
"firstName": "James",
"lastName": "SMITH",
"phone": null,
"email": "test@test.com",
"type": "Customer"
}
}
This returns a enquiry object as a response
This endpoint returns detailed information about a single enquiry record
HTTP Request
GET https://api.composer.haswent.com/enquiries/{id}
Create an enquiry
curl --location 'https://api.composer.haswent.com/enquiries' \
--header "Authorization: Bearer <accessToken>" \
--header "X-API-VERSION: 1" \
--header 'Content-Type: application/json' \
--data-raw '{
"contact": {
"title": "Mr",
"firstName": "James",
"lastName": "Books",
"phone": "07777777777",
"email": "james@books.com"
},
"additional": {
"message": "This is a test enquiry",
"extra_detail": "extra detail passed in",
"payment_id": "payment id for reservation payment"
},
"vehicleId": 11031,
"source": "Website"
}'
The above command returns JSON structured like this:
{
"enquiry": {
"id": 37298,
"source": "Website",
"subject": "You Have a New Enquiry",
"createdDate": "2024-01-24T11:07:27.060Z",
"additional": {
"message": "This is a test enquiry",
"extra_detail": "extra detail passed in",
"payment_id": "payment id for reservation payment"
},
"externalRef": null
},
"dealership": {
"id": 2,
"name": "Sunset Motors L1",
"status": "ACTIVE"
},
"vehicle": {
"id": 11031,
"make": "BMW",
"model": "3 Series",
"registration": "SW14YRA",
"variant": "330D XDRIVE M SPORT"
},
"contact": {
"id": 36787,
"firstName": "James",
"lastName": "Books",
"phone": "07777777777",
"email": "james@books.com",
"type": "Customer"
}
}
This returns a enquiry object as a response
This endpoint returns detailed information about the created enquiry, this response format is the same as the get enquiry endpoint
HTTP Request
POST https://api.composer.haswent.com/enquiries
Body Parameters
By passing in the contact information we will automatically link it to an existing contact or create a new one
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| contact.title | N | string | Possible values are: Mr, Mrs, Miss, Dr, Ms, prof, Rev, Lady, Sir, Capt, Major, Lord, Dame, Judge |
| contact.firstName | N | string | First name of the contact |
| contact.lastName | N | string | Last name of the contact |
| contact.email | N | string | Email address |
| contact.phone | N | string | Phone number |
| contact.businessName | N | string | If a business contact then provie the business name |
| vehicleId | N | number | Provide a vehicleId where this enquiry is related to a vehicle |
| dealershipId | N | number | Provide a dealershipId where this enqury is for a particular dealership (not required when you provide a vehicleId as we look this up automatically) |
| departmentId | N | number | Provide a departmentId if this enquiry is for a particular department |
| additional | N | object | JSON object of key/value pairs for any additional information (pass keys in as snake_case or camelCase) |
| additional.message | N | string | Pass in the enquiry message |
| subject | N | string | If you want to provide a subject for the enquiry (e.g. Vehicle Reservation) |
| source | N | string | Possible values are: Website, Autotrader, Cargurus, Visitor Chat, eBay Motors Group |
| notification | N | boolean | Defaults to true, when true the dealer will get notified when a new enquiry is created |
Appraisal
Search appraisals
curl -request GET
--url https://api.composer.haswent.com/appraisals
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 24,
"page": 1,
"pageSize": 50
},
"appraisals": [
{
"id": 58,
"template": {
"id": 15,
"name": "Car Template",
"vehicleTypeId": 1,
"clientId": 9,
"status": 1
},
"user": {
"forename": "Test",
"surname": "User",
"username": "user@test.co.uk"
},
"dealership": {
"id": 2,
"status": "ACTIVE",
"name": "Haswent Motors Location 1",
"address1": "Preston Park",
"address2": null,
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-1",
"longitude": -1.325833,
"latitude": 54.541967
},
"contact": {
"id": 54676,
"firstName": "Test",
"lastName": "User",
"businessName": "test"
},
"status": "PENDING",
"vehicleIdentifier": "ML68PUA",
"vehicleDescription": "BMW 1 Series M140i Shadow Edition 5dr Step Auto",
"vehicleMileage": 0,
"createdDate": "2024-08-28T06:18:50.980Z",
"valuation": null,
"valuationUserId": null,
"valuationProvidedDate": null,
"valuationExpiryDate": null
},
{
"id": 59,
"template": {
"id": 15,
"name": "Car Template",
"vehicleTypeId": 1,
"clientId": 9,
"status": 1
},
"user": {
"id": 89,
"forename": "Test",
"surname": "User",
"username": "test@gmail.com"
},
"dealership": {
"id": 2,
"status": "ACTIVE",
"name": "Haswent Motors Location 1",
"address1": "Preston Park",
"address2": null,
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-1",
"longitude": -1.325833,
"latitude": 54.541967
},
"contact": {
"id": 22299,
"firstName": "Test",
"lastName": "Customer",
"businessName": null
},
"status": "VALUATION_ACCEPTED",
"vehicleIdentifier": "YD07TPF",
"vehicleDescription": "HONDA Civic 1.4 i-Dsi SE 5dr",
"vehicleMileage": 25000,
"createdDate": "2024-08-28T22:21:20.283Z",
"valuation": 5600,
"valuationUserId": 89,
"valuationProvidedDate": "2024-08-28T23:00:00.000Z",
"valuationExpiryDate": "2024-09-04T23:00:00.000Z"
}
]
}
This returns a array of appraisal objects that match all of the parameters as a response
This endpoint allows you to search and retrive all stock records
HTTP Request
GET https://api.composer.haswent.com/appraisals
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| status | N | string | Possible values are: PENDING, CUSTOMER_IN_PROGRESS, CUSTOMER_COMPLETE, DEALER_COMPLETE, VALUATION_ACCEPTED, CLOSED |
Get a specific appraisal
curl -request GET
--url https://api.composer.haswent.com/appraisals/{id}
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"id": 32,
"clientId": 9,
"contactId": 42417,
"dealershipId": 2,
"templateId": 6,
"userId": 9,
"vehicleIdentifier": "AF72WGK",
"vehicleDescription": "TESLA Model Y Long Range AWD 5dr Auto",
"vehicleMileage": 5000,
"valuation": 27250,
"status": "VALUATION_ACCEPTED",
"valuationUserId": 9,
"createdDate": "2024-05-16T14:46:12.587Z",
"valuationProvidedDate": "2024-06-18T23:00:00.000Z",
"valuationExpiryDate": "2025-06-05T23:00:00.000Z",
"values": [
{
"id": 12,
"value": "",
"templateField": {
"id": 111,
"name": "Video Walkaround",
"description": "Video",
"type": {
"id": 23,
"key": "VIDEO",
"name": "Video Walkaround",
"description": "Video",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/video.svg",
"vehicleType": null
},
"priority": 0,
"options": ""
}
},
{
"id": 13,
"value": "",
"templateField": {
"id": 112,
"name": "Boot",
"description": "Car Boot",
"type": {
"id": 1,
"key": "CAR_BOOT",
"name": "Boot",
"description": "Car Boot",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_boot.svg",
"vehicleType": null
},
"priority": 1,
"options": ""
}
},
{
"id": 14,
"value": "",
"templateField": {
"id": 113,
"name": "Driver Rear Corner",
"description": "Driver Rear Corner",
"type": {
"id": 2,
"key": "CAR_DRIVER_REAR_CORNER",
"name": "Driver Rear Corner",
"description": "Driver Rear Corner",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_driver_rear_corner.svg",
"vehicleType": null
},
"priority": 2,
"options": ""
}
},
{
"id": 15,
"value": "",
"templateField": {
"id": 114,
"name": "Driver Front Corner",
"description": "Driver Front Corner",
"type": {
"id": 13,
"key": "CAR_DRIVER_FRONT_CORNER",
"name": "Driver Front Corner",
"description": "Driver Front Corner",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_driver_front_corner.svg",
"vehicleType": null
},
"priority": 3,
"options": ""
}
},
{
"id": 16,
"value": "",
"templateField": {
"id": 115,
"name": "Passenger Side View",
"description": "Passenger Side View",
"type": {
"id": 8,
"key": "CAR_PASSENGER_SIDE",
"name": "Passenger Side View",
"description": "Passenger Side View",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_passenger_side.svg",
"vehicleType": null
},
"priority": 4,
"options": ""
}
},
{
"id": 17,
"value": "",
"templateField": {
"id": 116,
"name": "Engine Bay",
"description": "Engine Bay",
"type": {
"id": 15,
"key": "CAR_ENGINE_BAY",
"name": "Engine Bay",
"description": "Engine Bay",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_engine_bay.svg",
"vehicleType": null
},
"priority": 5,
"options": ""
}
},
{
"id": 18,
"value": "",
"templateField": {
"id": 117,
"name": "Front Driver Side Wheel",
"description": "Front Driver Side Wheel",
"type": {
"id": 21,
"key": "CAR_FRONT_DRIVER_WHEEL",
"name": "Front Driver Side Wheel",
"description": "Front Driver Side Wheel",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/wheel.svg",
"vehicleType": null
},
"priority": 6,
"options": ""
}
},
{
"id": 19,
"value": "",
"templateField": {
"id": 118,
"name": "Front Passenger Corner",
"description": "Front Passenger Corner",
"type": {
"id": 5,
"key": "CAR_PASSENGER_FRONT_CORNER",
"name": "Front Passenger Corner",
"description": "Front Passenger Corner",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_front_passenger_coner.svg",
"vehicleType": null
},
"priority": 7,
"options": ""
}
},
{
"id": 20,
"value": "",
"templateField": {
"id": 119,
"name": "Driver Side View",
"description": "Driver Side View",
"type": {
"id": 14,
"key": "CAR_DRIVER_SIDE",
"name": "Driver Side View",
"description": "Driver Side View",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_driver_side.svg",
"vehicleType": null
},
"priority": 8,
"options": ""
}
},
{
"id": 21,
"value": "",
"templateField": {
"id": 120,
"name": "V5 Present",
"description": "V5 Present",
"type": {
"id": 9,
"key": "QUESTION_SELECT",
"name": "Select Question",
"description": "Select Question",
"overlayImage": null,
"vehicleType": null
},
"priority": 0,
"options": "Yes,No"
}
},
{
"id": 22,
"value": "",
"templateField": {
"id": 121,
"name": "Number of Keys",
"description": "Number of Keys",
"type": {
"id": 11,
"key": "QUESTION_NUMBER",
"name": "Number Input",
"description": "Number Input",
"overlayImage": null,
"vehicleType": null
},
"priority": 1,
"options": ""
}
}
],
"contact": {
"id": 42417,
"firstName": "Test",
"lastName": "Customer",
"businessName": "Test"
},
"template": {
"id": 6,
"name": "Car Main",
"status": "NOT_ACTIVE"
},
"dealership": {
"id": 2,
"status": "ACTIVE",
"name": "Haswent Motors Location 1",
"address1": "Preston Park",
"address2": null,
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-1",
"longitude": -1.325833,
"latitude": 54.541967
},
"user": {
"id": 9,
"forename": "Test",
"surname": "User",
"username": "test@sunsetmotors.co.uk"
}
}
This returns an appraisal object as a response
This endpoint returns detailed information about a single appraisal record
HTTP Request
GET https://api.composer.haswent.com/appraisals/{id}
Create an appraisal
curl --location 'https://api.composer.haswent.com/appraisals' \
--header "Authorization: Bearer <accessToken>" \
--header "X-API-VERSION: 1" \
--header 'Content-Type: application/json' \
--data-raw '{
"templateId": 6,
"dealershipId": 2,
"userId": 2,
"contactId": 41246,
"vehicleIdentifier": "ML22VLM",
"vehicleDescription": "BMW X3 xDrive20d MHT M Sport 5dr Step Auto",
"status": "PENDING",
}'
The above command returns JSON structured like this:
{
"id": 32,
"contactId": 42417,
"dealershipId": 2,
"templateId": 6,
"userId": 9,
"vehicleIdentifier": "AF72WGK",
"vehicleDescription": "TESLA Model Y Long Range AWD 5dr Auto",
"vehicleMileage": 5000,
"valuation": 27250,
"status": "VALUATION_ACCEPTED",
"valuationUserId": 9,
"createdDate": "2024-05-16T14:46:12.587Z",
"valuationProvidedDate": "2024-06-18T23:00:00.000Z",
"valuationExpiryDate": "2025-06-05T23:00:00.000Z",
"values": [
{
"id": 12,
"value": "",
"templateField": {
"id": 111,
"name": "Video Walkaround",
"description": "Video",
"type": {
"id": 23,
"key": "VIDEO",
"name": "Video Walkaround",
"description": "Video",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/video.svg",
"vehicleType": null
},
"priority": 0,
"options": ""
}
},
{
"id": 13,
"value": "",
"templateField": {
"id": 112,
"name": "Boot",
"description": "Car Boot",
"type": {
"id": 1,
"key": "CAR_BOOT",
"name": "Boot",
"description": "Car Boot",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_boot.svg",
"vehicleType": null
},
"priority": 1,
"options": ""
}
},
{
"id": 14,
"value": "",
"templateField": {
"id": 113,
"name": "Driver Rear Corner",
"description": "Driver Rear Corner",
"type": {
"id": 2,
"key": "CAR_DRIVER_REAR_CORNER",
"name": "Driver Rear Corner",
"description": "Driver Rear Corner",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_driver_rear_corner.svg",
"vehicleType": null
},
"priority": 2,
"options": ""
}
},
{
"id": 15,
"value": "",
"templateField": {
"id": 114,
"name": "Driver Front Corner",
"description": "Driver Front Corner",
"type": {
"id": 13,
"key": "CAR_DRIVER_FRONT_CORNER",
"name": "Driver Front Corner",
"description": "Driver Front Corner",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_driver_front_corner.svg",
"vehicleType": null
},
"priority": 3,
"options": ""
}
},
{
"id": 16,
"value": "",
"templateField": {
"id": 115,
"name": "Passenger Side View",
"description": "Passenger Side View",
"type": {
"id": 8,
"key": "CAR_PASSENGER_SIDE",
"name": "Passenger Side View",
"description": "Passenger Side View",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_passenger_side.svg",
"vehicleType": null
},
"priority": 4,
"options": ""
}
},
{
"id": 17,
"value": "",
"templateField": {
"id": 116,
"name": "Engine Bay",
"description": "Engine Bay",
"type": {
"id": 15,
"key": "CAR_ENGINE_BAY",
"name": "Engine Bay",
"description": "Engine Bay",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_engine_bay.svg",
"vehicleType": null
},
"priority": 5,
"options": ""
}
},
{
"id": 18,
"value": "",
"templateField": {
"id": 117,
"name": "Front Driver Side Wheel",
"description": "Front Driver Side Wheel",
"type": {
"id": 21,
"key": "CAR_FRONT_DRIVER_WHEEL",
"name": "Front Driver Side Wheel",
"description": "Front Driver Side Wheel",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/wheel.svg",
"vehicleType": null
},
"priority": 6,
"options": ""
}
},
{
"id": 19,
"value": "",
"templateField": {
"id": 118,
"name": "Front Passenger Corner",
"description": "Front Passenger Corner",
"type": {
"id": 5,
"key": "CAR_PASSENGER_FRONT_CORNER",
"name": "Front Passenger Corner",
"description": "Front Passenger Corner",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_front_passenger_coner.svg",
"vehicleType": null
},
"priority": 7,
"options": ""
}
},
{
"id": 20,
"value": "",
"templateField": {
"id": 119,
"name": "Driver Side View",
"description": "Driver Side View",
"type": {
"id": 14,
"key": "CAR_DRIVER_SIDE",
"name": "Driver Side View",
"description": "Driver Side View",
"overlayImage": "https://impx.hwntcdn.com/i/raw:1/plain/https://composer.hwntcdn.com//composer/vehicle-profile/car/car_driver_side.svg",
"vehicleType": null
},
"priority": 8,
"options": ""
}
},
{
"id": 21,
"value": "",
"templateField": {
"id": 120,
"name": "V5 Present",
"description": "V5 Present",
"type": {
"id": 9,
"key": "QUESTION_SELECT",
"name": "Select Question",
"description": "Select Question",
"overlayImage": null,
"vehicleType": null
},
"priority": 0,
"options": "Yes,No"
}
},
{
"id": 22,
"value": "",
"templateField": {
"id": 121,
"name": "Number of Keys",
"description": "Number of Keys",
"type": {
"id": 11,
"key": "QUESTION_NUMBER",
"name": "Number Input",
"description": "Number Input",
"overlayImage": null,
"vehicleType": null
},
"priority": 1,
"options": ""
}
}
],
"contact": {
"id": 42417,
"firstName": "Test",
"lastName": "Customer",
"businessName": "Test"
},
"template": {
"id": 6,
"name": "Car Main",
"status": "NOT_ACTIVE"
},
"dealership": {
"id": 2,
"status": "ACTIVE",
"name": "Haswent Motors Location 1",
"address1": "Preston Park",
"address2": null,
"townCity": " Lockheed Close",
"county": "Stockton-On-Tees",
"postcode": "TS18 3BP",
"telephone": "555-555-555",
"email": "hello@haswent.com",
"slug": "location-1",
"longitude": -1.325833,
"latitude": 54.541967
},
"user": {
"id": 9,
"forename": "Test",
"surname": "User",
"username": "test@sunsetmotors.co.uk"
}
}
This returns a appraisal object as a response
This endpoint returns detailed information about the created appraisal, this response format is the same as the get appraisal endpoint
HTTP Request
POST https://api.composer.haswent.com/appraisals
Body Parameters
By passing in the contact information we will automatically link it to an existing contact or create a new one
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| templateId | Y | number | ID of appraisal template to use, typically you can hard-code this to the single template you have |
| dealershipId | Y | number | Provide a dealershipId where this apprisal should be linked to |
| userId | Y | number | User who is looking after this appraisal |
| contactId | Y | number | ID of contact that this appraisal is for |
| vehicleIdentifier | Y | string | Typically the vehicle registration |
| vehicleDescription | Y | number | Typically a string of make + model + derivative |
| vehicleMileage | N | number | Vehicle mileage |
| status | Y | string | Possible values are: PENDING, CUSTOMER_IN_PROGRESS, CUSTOMER_COMPLETE, DEALER_COMPLETE, VALUATION_ACCEPTED, CLOSED |
Webhook
Webhook messages are sent as POST requests to the endpoint supplied
The messages include a header x-webhook-signature: <signature>, you can use this to verify that the webhook has come from us - each webhook subscription creates a unique signature
The webhook messages include a meta object, this includes data about the event type that triggered the webhook, the clientId, timestamp and an id field which unique for the notification and is useful when diagnosing issues etc.
The data object contains the actual payload, ths hape of this payload will match exiting object detail endpoints, for example any enquiry.new or enquiry.update messages will match the response shape from /enquiries/{id}
Search subscriptions
curl -request GET
--url https://api.composer.haswent.com/hooks
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 1,
"page": 1,
"pageSize": 50
},
"webhooks": [
{
"id": 29,
"url": "<url>",
"status": "ACTIVE",
"description": "Enquiry -> CRM "
}
]
}
This returns a array of webhooks objects that match all of the parameters as a response
This endpoint returns a list of all webhooks that are active
HTTP Request
GET https://api.composer.haswent.com/hooks
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| status | N | string | Possible values are: ACTIVE, NOT_ACTIVE |
Get a specific subscription
curl -request GET
--url https://api.composer.haswent.com/hooks/{id}
--header "X-API-VERSION: 1"
--header "Authorization: Bearer <accessToken>"
The above command returns JSON structured like this:
{
"webhook": {
"id": 29,
"url": "<url>",
"status": "ACTIVE",
"signature": "ac5c8032-b0de-44e3-a539-8269e76120be",
"description": "Enquiry -> CRM"
},
"events": [
{
"key": "enquiry.new"
},
{
"key": "enquiry.update"
}
]
}
This returns a webhook object as a response
This endpoint returns detailed information about a single webhook record
HTTP Request
GET https://api.composer.haswent.com/hooks/{id}
Subscription history
curl --location 'https://api.composer.haswent.com/hooks/{id}/history' \
--header "Authorization: Bearer <accessToken>" \
--header "X-API-VERSION: 1" \
--header 'Content-Type: application/json' \
The above command returns JSON structured like this:
{
"meta": {
"totalCount": 2242,
"page": 1,
"pageSize": 50
},
"history": [
{
"id": 2046,
"status": "SUCCESS",
"createdDate": "2024-01-31T10:47:46.407Z",
"event": "enquiry.new"
},
{
"id": 1945,
"status": "SUCCESS",
"createdDate": "2024-01-31T10:09:33.263Z",
"event": "enquiry.new"
},
{
"id": 1861,
"status": "SUCCESS",
"createdDate": "2024-01-30T23:07:13.993Z",
"event": "enquiry.new"
},
{
"id": 1860,
"status": "SUCCESS",
"createdDate": "2024-01-30T23:05:40.660Z",
"event": "enquiry.new"
}
]
}
This returns an array of webhook eventsa response
This endpoint returns information about events that have fired, along with thier status codes
HTTP Request
POST https://api.composer.haswent.com/hooks/{id}/history
Query Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| status | N | string | Possible values are: SUCCESS, FAIL |
View historic request
curl --location 'https://api.composer.haswent.com/hooks/{id}/history/{requestId}' \
--header "Authorization: Bearer <accessToken>" \
--header "X-API-VERSION: 1" \
--header 'Content-Type: application/json' \
The above command returns JSON structured like this:
{
"id": 2276,
"createdDate": "2023-01-16T05:40:16.330Z",
"request": {
"metadata": {
"id": 2276,
"event": "enquiry.new",
"clientId": 2512,
"timestamp": "2023-01-16T05:40:16.330Z"
},
"data": {
"enquiry": {
"id": 37272,
"source": "Cargurus",
"subject": "CarGurus Enquiry",
"createdDate": "2023-01-16T05:40:15.913Z",
"additional": {
"message": "I am interested in your 2022 Kia Niro 1.6 GDi 4 (139bhp) 1.56kWh. You can reach me by email at *******@hotmail.com any time. Thank you! (CarGurus IMV: £20,414 / Deal rating: Fair deal / Is from deliverable listing: No)"
},
"externalRef": "Haswent-1711604405837"
},
"dealership": {
"id": 27,
"name": "Haswent",
"status": "ACTIVE"
},
"vehicle": {
"id": 39370,
"make": "Kia",
"model": "Niro",
"registration": "YC22WTJ",
"variant": "1.6 GDi 4 SUV 5dr Petrol Hybrid DCT Euro 6 (s/s) (139 bhp)"
},
"contact": {
"id": 36760,
"firstName": "Mahfuzur",
"lastName": "Rahman",
"phone": "",
"email": "*******@hotmail.com",
"type": "Customer"
}
}
},
"response": {
"attempt": "018e8392-bede-62bb-3f2a-94caae58148d",
"id": "018e8392-bede-62bb-3f2a-94caae58148d",
"request_id": "018e8392-bede-62bb-3f2a-94caae58148d",
"status": "success"
},
"jobId": "e7b7bb9e-c52d-40b3-b7c2-f74546572c85",
"status": "SUCCESS"
}
This returns a webhook history request as a response
This endpoint returns detailed information about the webhook request that was sent
HTTP Request
GET https://api.composer.haswent.com/hooks/{id}/history/{requestId}
Create subsription
curl --location 'https://api.composer.haswent.com/hooks' \
--header "Authorization: Bearer <accessToken>" \
--header "X-API-VERSION: 1" \
--header 'Content-Type: application/json' \
--data '{
"webhook": {
"url": "https://test.com",
"status": "ACTIVE",
"description": "my webook"
},
"events": [
{
"key": "enquiry.new"
},
{
"key": "enquiry.update"
},
{
"key": "inventory.new"
},
{
"key": "inventory.update"
}
]
}'
The above command returns JSON structured like this:
{
"webhook": {
"id": 187,
"url": "https://test.com",
"status": "ACTIVE",
"signature": "d21b7e96-6451-43e4-b9db-1c61f38825d7",
"description": "my webhook"
},
"events": [
{
"key": "enquiry.new"
},
{
"key": "enquiry.update"
},
{
"key": "inventory.new"
},
{
"key": "inventory.update"
}
]
}
This returns a new webhook subscription a s a response
This endpoint creates a new webhook subscription
HTTP Request
POST https://api.composer.haswent.com/hooks
Body Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| webhook.url | Y | string | Public endpoint where POST messages will be sent |
| webhook.status | Y | string | Possible values are: ACTIVE, NOT_ACTIVE |
| webhook.description | Y | string | Give your webhook a descriptive name |
| webhook.signature | N | string | You can set your own signature, otherwise one will be system generated |
| events[].key | Y | array | Possible values are: enquiry.new, enquiry.update, inventory.new, inventory.update, deal.new, deal.update |
Update subsription
curl --location 'https://api.composer.haswent.com/hooks/{id}' \
--header "Authorization: Bearer <accessToken>" \
--header "X-API-VERSION: 1" \
--header 'Content-Type: application/json' \
--data '{
"webhook": {
"url": "https://test.com",
"status": "NOT_ACTIVE",
"description": "my webook"
},
"events": [
{
"key": "enquiry.new"
},
{
"key": "enquiry.update"
},
{
"key": "inventory.new"
},
{
"key": "inventory.update"
}
]
}'
The above command returns JSON structured like this:
{
"webhook": {
"id": 187,
"url": "https://test.com",
"status": "NOT_ACTIVE",
"signature": "d21b7e96-6451-43e4-b9db-1c61f38825d7",
"description": "my webhook"
},
"events": [
{
"key": "enquiry.new"
},
{
"key": "enquiry.update"
},
{
"key": "inventory.new"
},
{
"key": "inventory.update"
}
]
}
This returns the webhook subscription as a response
This endpoint updates a webhook subscription
HTTP Request
PATCH https://api.composer.haswent.com/hooks/{id}
Body Parameters
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| webhook.url | N | string | Public endpoint where POST messages will be sent |
| webhook.status | N | string | Possible values are: ACTIVE, NOT_ACTIVE |
| webhook.description | N | string | Give your webhook a descriptive name |
| webhook.signature | N | string | You can set your own signature, otherwise one will be system generated |
| events[].key | N | array | Possible values are: enquiry.new, enquiry.update, inventory.new, inventory.update, deal.new, deal.update NOTE: When updating the events you must pass in the full array of events you want to subscribe to |
Delete subsription
Use this endpoint to delete a webhook subscription
curl -request DELETE
--url https://api.composer.haswent.com/hooks/{id}
--header "X-API-VERSION: 1"
--header "Bearer: <refreshToken>"
HTTP Request
DELETE https://api.composer.haswent.com/hooks/{id}
This will return a HTTP 200 to indicate the subscription has been deleted