Create P46 Car Batch
curl --request POST \
--url https://api.example.com/gb/organizations/{organization_id}/exb/p46cars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"submission_reason": {
"replaced_car": {
"multiple_cars": {
"make_and_model": "<string>",
"engine_size": {
"value": 4999
}
}
},
"car_withdrawn": {
"is_withdrawn": "yes",
"date_withdrawn": "2023-12-25",
"make_and_model": "<string>",
"engine_size": {
"value": 4999
}
}
},
"employee_id": "<string>",
"car_details": {
"make_and_model": "<string>",
"engine_size": {
"value": 4999
},
"date_first_registered": "2023-12-25"
},
"co2_emissions": {
"emissions": 499,
"zero_emission_mileage": 4999,
"before_1998": "yes",
"no_approved": "yes"
},
"monetary_details": {
"car_price": 5000000,
"date_first_available": "2023-12-25",
"capital_contributions": 2500,
"accessories_price": 123,
"cash_forgone": 123,
"private_use_payment": {
"amount": 5000000
}
},
"fuel": {}
}
]
'import requests
url = "https://api.example.com/gb/organizations/{organization_id}/exb/p46cars"
payload = [
{
"submission_reason": {
"replaced_car": { "multiple_cars": {
"make_and_model": "<string>",
"engine_size": { "value": 4999 }
} },
"car_withdrawn": {
"is_withdrawn": "yes",
"date_withdrawn": "2023-12-25",
"make_and_model": "<string>",
"engine_size": { "value": 4999 }
}
},
"employee_id": "<string>",
"car_details": {
"make_and_model": "<string>",
"engine_size": { "value": 4999 },
"date_first_registered": "2023-12-25"
},
"co2_emissions": {
"emissions": 499,
"zero_emission_mileage": 4999,
"before_1998": "yes",
"no_approved": "yes"
},
"monetary_details": {
"car_price": 5000000,
"date_first_available": "2023-12-25",
"capital_contributions": 2500,
"accessories_price": 123,
"cash_forgone": 123,
"private_use_payment": { "amount": 5000000 }
},
"fuel": {}
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
submission_reason: {
replaced_car: {multiple_cars: {make_and_model: '<string>', engine_size: {value: 4999}}},
car_withdrawn: {
is_withdrawn: 'yes',
date_withdrawn: '2023-12-25',
make_and_model: '<string>',
engine_size: {value: 4999}
}
},
employee_id: '<string>',
car_details: {
make_and_model: '<string>',
engine_size: {value: 4999},
date_first_registered: '2023-12-25'
},
co2_emissions: {
emissions: 499,
zero_emission_mileage: 4999,
before_1998: 'yes',
no_approved: 'yes'
},
monetary_details: {
car_price: 5000000,
date_first_available: '2023-12-25',
capital_contributions: 2500,
accessories_price: 123,
cash_forgone: 123,
private_use_payment: {amount: 5000000}
},
fuel: {}
}
])
};
fetch('https://api.example.com/gb/organizations/{organization_id}/exb/p46cars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/gb/organizations/{organization_id}/exb/p46cars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'submission_reason' => [
'replaced_car' => [
'multiple_cars' => [
'make_and_model' => '<string>',
'engine_size' => [
'value' => 4999
]
]
],
'car_withdrawn' => [
'is_withdrawn' => 'yes',
'date_withdrawn' => '2023-12-25',
'make_and_model' => '<string>',
'engine_size' => [
'value' => 4999
]
]
],
'employee_id' => '<string>',
'car_details' => [
'make_and_model' => '<string>',
'engine_size' => [
'value' => 4999
],
'date_first_registered' => '2023-12-25'
],
'co2_emissions' => [
'emissions' => 499,
'zero_emission_mileage' => 4999,
'before_1998' => 'yes',
'no_approved' => 'yes'
],
'monetary_details' => [
'car_price' => 5000000,
'date_first_available' => '2023-12-25',
'capital_contributions' => 2500,
'accessories_price' => 123,
'cash_forgone' => 123,
'private_use_payment' => [
'amount' => 5000000
]
],
'fuel' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/gb/organizations/{organization_id}/exb/p46cars"
payload := strings.NewReader("[\n {\n \"submission_reason\": {\n \"replaced_car\": {\n \"multiple_cars\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"car_withdrawn\": {\n \"is_withdrawn\": \"yes\",\n \"date_withdrawn\": \"2023-12-25\",\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"employee_id\": \"<string>\",\n \"car_details\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n },\n \"date_first_registered\": \"2023-12-25\"\n },\n \"co2_emissions\": {\n \"emissions\": 499,\n \"zero_emission_mileage\": 4999,\n \"before_1998\": \"yes\",\n \"no_approved\": \"yes\"\n },\n \"monetary_details\": {\n \"car_price\": 5000000,\n \"date_first_available\": \"2023-12-25\",\n \"capital_contributions\": 2500,\n \"accessories_price\": 123,\n \"cash_forgone\": 123,\n \"private_use_payment\": {\n \"amount\": 5000000\n }\n },\n \"fuel\": {}\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/gb/organizations/{organization_id}/exb/p46cars")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"submission_reason\": {\n \"replaced_car\": {\n \"multiple_cars\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"car_withdrawn\": {\n \"is_withdrawn\": \"yes\",\n \"date_withdrawn\": \"2023-12-25\",\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"employee_id\": \"<string>\",\n \"car_details\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n },\n \"date_first_registered\": \"2023-12-25\"\n },\n \"co2_emissions\": {\n \"emissions\": 499,\n \"zero_emission_mileage\": 4999,\n \"before_1998\": \"yes\",\n \"no_approved\": \"yes\"\n },\n \"monetary_details\": {\n \"car_price\": 5000000,\n \"date_first_available\": \"2023-12-25\",\n \"capital_contributions\": 2500,\n \"accessories_price\": 123,\n \"cash_forgone\": 123,\n \"private_use_payment\": {\n \"amount\": 5000000\n }\n },\n \"fuel\": {}\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/gb/organizations/{organization_id}/exb/p46cars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"submission_reason\": {\n \"replaced_car\": {\n \"multiple_cars\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"car_withdrawn\": {\n \"is_withdrawn\": \"yes\",\n \"date_withdrawn\": \"2023-12-25\",\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"employee_id\": \"<string>\",\n \"car_details\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n },\n \"date_first_registered\": \"2023-12-25\"\n },\n \"co2_emissions\": {\n \"emissions\": 499,\n \"zero_emission_mileage\": 4999,\n \"before_1998\": \"yes\",\n \"no_approved\": \"yes\"\n },\n \"monetary_details\": {\n \"car_price\": 5000000,\n \"date_first_available\": \"2023-12-25\",\n \"capital_contributions\": 2500,\n \"accessories_price\": 123,\n \"cash_forgone\": 123,\n \"private_use_payment\": {\n \"amount\": 5000000\n }\n },\n \"fuel\": {}\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"employee_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}P46 (Car)
Create P46 Car Batch
Create a batch of P46 Car records for an organization.
POST
/
gb
/
organizations
/
{organization_id}
/
exb
/
p46cars
Create P46 Car Batch
curl --request POST \
--url https://api.example.com/gb/organizations/{organization_id}/exb/p46cars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"submission_reason": {
"replaced_car": {
"multiple_cars": {
"make_and_model": "<string>",
"engine_size": {
"value": 4999
}
}
},
"car_withdrawn": {
"is_withdrawn": "yes",
"date_withdrawn": "2023-12-25",
"make_and_model": "<string>",
"engine_size": {
"value": 4999
}
}
},
"employee_id": "<string>",
"car_details": {
"make_and_model": "<string>",
"engine_size": {
"value": 4999
},
"date_first_registered": "2023-12-25"
},
"co2_emissions": {
"emissions": 499,
"zero_emission_mileage": 4999,
"before_1998": "yes",
"no_approved": "yes"
},
"monetary_details": {
"car_price": 5000000,
"date_first_available": "2023-12-25",
"capital_contributions": 2500,
"accessories_price": 123,
"cash_forgone": 123,
"private_use_payment": {
"amount": 5000000
}
},
"fuel": {}
}
]
'import requests
url = "https://api.example.com/gb/organizations/{organization_id}/exb/p46cars"
payload = [
{
"submission_reason": {
"replaced_car": { "multiple_cars": {
"make_and_model": "<string>",
"engine_size": { "value": 4999 }
} },
"car_withdrawn": {
"is_withdrawn": "yes",
"date_withdrawn": "2023-12-25",
"make_and_model": "<string>",
"engine_size": { "value": 4999 }
}
},
"employee_id": "<string>",
"car_details": {
"make_and_model": "<string>",
"engine_size": { "value": 4999 },
"date_first_registered": "2023-12-25"
},
"co2_emissions": {
"emissions": 499,
"zero_emission_mileage": 4999,
"before_1998": "yes",
"no_approved": "yes"
},
"monetary_details": {
"car_price": 5000000,
"date_first_available": "2023-12-25",
"capital_contributions": 2500,
"accessories_price": 123,
"cash_forgone": 123,
"private_use_payment": { "amount": 5000000 }
},
"fuel": {}
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
submission_reason: {
replaced_car: {multiple_cars: {make_and_model: '<string>', engine_size: {value: 4999}}},
car_withdrawn: {
is_withdrawn: 'yes',
date_withdrawn: '2023-12-25',
make_and_model: '<string>',
engine_size: {value: 4999}
}
},
employee_id: '<string>',
car_details: {
make_and_model: '<string>',
engine_size: {value: 4999},
date_first_registered: '2023-12-25'
},
co2_emissions: {
emissions: 499,
zero_emission_mileage: 4999,
before_1998: 'yes',
no_approved: 'yes'
},
monetary_details: {
car_price: 5000000,
date_first_available: '2023-12-25',
capital_contributions: 2500,
accessories_price: 123,
cash_forgone: 123,
private_use_payment: {amount: 5000000}
},
fuel: {}
}
])
};
fetch('https://api.example.com/gb/organizations/{organization_id}/exb/p46cars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/gb/organizations/{organization_id}/exb/p46cars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'submission_reason' => [
'replaced_car' => [
'multiple_cars' => [
'make_and_model' => '<string>',
'engine_size' => [
'value' => 4999
]
]
],
'car_withdrawn' => [
'is_withdrawn' => 'yes',
'date_withdrawn' => '2023-12-25',
'make_and_model' => '<string>',
'engine_size' => [
'value' => 4999
]
]
],
'employee_id' => '<string>',
'car_details' => [
'make_and_model' => '<string>',
'engine_size' => [
'value' => 4999
],
'date_first_registered' => '2023-12-25'
],
'co2_emissions' => [
'emissions' => 499,
'zero_emission_mileage' => 4999,
'before_1998' => 'yes',
'no_approved' => 'yes'
],
'monetary_details' => [
'car_price' => 5000000,
'date_first_available' => '2023-12-25',
'capital_contributions' => 2500,
'accessories_price' => 123,
'cash_forgone' => 123,
'private_use_payment' => [
'amount' => 5000000
]
],
'fuel' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/gb/organizations/{organization_id}/exb/p46cars"
payload := strings.NewReader("[\n {\n \"submission_reason\": {\n \"replaced_car\": {\n \"multiple_cars\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"car_withdrawn\": {\n \"is_withdrawn\": \"yes\",\n \"date_withdrawn\": \"2023-12-25\",\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"employee_id\": \"<string>\",\n \"car_details\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n },\n \"date_first_registered\": \"2023-12-25\"\n },\n \"co2_emissions\": {\n \"emissions\": 499,\n \"zero_emission_mileage\": 4999,\n \"before_1998\": \"yes\",\n \"no_approved\": \"yes\"\n },\n \"monetary_details\": {\n \"car_price\": 5000000,\n \"date_first_available\": \"2023-12-25\",\n \"capital_contributions\": 2500,\n \"accessories_price\": 123,\n \"cash_forgone\": 123,\n \"private_use_payment\": {\n \"amount\": 5000000\n }\n },\n \"fuel\": {}\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/gb/organizations/{organization_id}/exb/p46cars")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"submission_reason\": {\n \"replaced_car\": {\n \"multiple_cars\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"car_withdrawn\": {\n \"is_withdrawn\": \"yes\",\n \"date_withdrawn\": \"2023-12-25\",\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"employee_id\": \"<string>\",\n \"car_details\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n },\n \"date_first_registered\": \"2023-12-25\"\n },\n \"co2_emissions\": {\n \"emissions\": 499,\n \"zero_emission_mileage\": 4999,\n \"before_1998\": \"yes\",\n \"no_approved\": \"yes\"\n },\n \"monetary_details\": {\n \"car_price\": 5000000,\n \"date_first_available\": \"2023-12-25\",\n \"capital_contributions\": 2500,\n \"accessories_price\": 123,\n \"cash_forgone\": 123,\n \"private_use_payment\": {\n \"amount\": 5000000\n }\n },\n \"fuel\": {}\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/gb/organizations/{organization_id}/exb/p46cars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"submission_reason\": {\n \"replaced_car\": {\n \"multiple_cars\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"car_withdrawn\": {\n \"is_withdrawn\": \"yes\",\n \"date_withdrawn\": \"2023-12-25\",\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n }\n }\n },\n \"employee_id\": \"<string>\",\n \"car_details\": {\n \"make_and_model\": \"<string>\",\n \"engine_size\": {\n \"value\": 4999\n },\n \"date_first_registered\": \"2023-12-25\"\n },\n \"co2_emissions\": {\n \"emissions\": 499,\n \"zero_emission_mileage\": 4999,\n \"before_1998\": \"yes\",\n \"no_approved\": \"yes\"\n },\n \"monetary_details\": {\n \"car_price\": 5000000,\n \"date_first_available\": \"2023-12-25\",\n \"capital_contributions\": 2500,\n \"accessories_price\": 123,\n \"cash_forgone\": 123,\n \"private_use_payment\": {\n \"amount\": 5000000\n }\n },\n \"fuel\": {}\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"employee_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
application/json
Reason for P46Car submission.
Show child attributes
Show child attributes
Car details for P46Car form.
Show child attributes
Show child attributes
CO2 emissions — choice of (Emissions + ZeroEmissionMileage), Before1998, or NoApproved.
Show child attributes
Show child attributes
Monetary details for P46Car form.
Show child attributes
Show child attributes
Fuel benefit details for P46Car.
Show child attributes
Show child attributes
Was this page helpful?
⌘I