Export
[ POST ] warehouse/toggleCarExport
Toggle wether a car can be exported or not
Fields
car
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
vin |
string | Yes | VIN to update. Comma-separated for several cars with the same export flag. | "WAUZZZ8K9DA123456" or "VIN1,VIN2" |
export |
bool | Yes | true to allow export, false to disallow it. |
true |
name |
string | No | Transporter name sent to Autologik. | "Nordic Transport" |
Example request
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'YOUR-BASEURL/warehouse/toggleCarExport',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"car": {
"vin": "WAUZZZ8K9DA123456",
"export": true,
"name": "Nordic Transport"
}
}',
CURLOPT_HTTPHEADER => [
'X-Api-Key: YOUR-API-KEY',
'Content-Type: application/json'
],
]);
$response = curl_exec($ch);
curl_close($ch);
const axios = require('axios');
const postData = {
car: {
vin: 'WAUZZZ8K9DA123456',
export: true,
name: 'Nordic Transport'
}
};
axios.post('YOUR-BASEURL/warehouse/toggleCarExport', postData, {
headers: {
'X-Api-Key': 'YOUR-API-KEY'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});