with UK gov Vehicle Enquiry API and Leverly?
The UK gov Vehicle Enquiry API provides access to key vehicle data, allowing users to retrieve information about a vehicle's make, model, color, fuel type, CO2 emissions, and more by inputting its registration number. Leveraging this API within Pipedream opens up a realm of possibilities for automating tasks related to vehicle management, compliance checks, and data aggregation for businesses in the automotive industry or for public sector uses.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
uk_gov_vehecle_enquiry_api: {
type: "app",
app: "uk_gov_vehecle_enquiry_api",
}
},
async run({steps, $}) {
const data = {
"registrationNumber": `{enter_registration_number_here}`,
}
return await axios($, {
method: "post",
url: `https://driver-vehicle-licensing.api.gov.uk/vehicle-enquiry/v1/vehicles`,
headers: {
"x-api-key": `${this.uk_gov_vehecle_enquiry_api.$auth.api_key}`,
"Content-Type": `application/json`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
leverly: {
type: "app",
app: "leverly",
}
},
async run({steps, $}) {
const data = {
"firstName": `Sergio`,
"Phone1": `+123456789`,
}
return await axios($, {
method: "post",
url: `https://app.leverly.com/main/ingestor/process`,
headers: {
"Content-Type": `application/x-www-form-urlencoded`,
},
params: {
AccountID: `${this.leverly.$auth.account_id}`,
},
data,
})
},
})