64 lines
2.8 KiB
Markdown
64 lines
2.8 KiB
Markdown
# PUT Global travel reimbursements settings
|
|
This PUT call configures the global Sentri settings for the Travel reimbursement in the office module.
|
|
|
|
#### Location
|
|
```
|
|
/api/v1/office/travel-reimburse/configure/
|
|
```
|
|
|
|
#### Permissions required
|
|
`admin-portalsettings` RW
|
|
|
|
#### Body parameters
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------- | ------ | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| office_travelreimburse_cents_homework_incl | int | yes | The cents per km for home/work travel with taxes included. |
|
|
| office_travelreimburse_cents_homework_excl | int | yes | The cents per km for home/work travel with taxes excluded. |
|
|
| office_travelreimburse_cents_business_incl | int | yes | The cents per km for business travel with taxes included. |
|
|
| office_travelreimburse_cents_business_excl | int | yes | The cents per km for business travel with taxes excluded. |
|
|
|
|
### Example Body (json)
|
|
```json
|
|
{
|
|
"portal_uuid": "effda0c0-0830-11f0-9300-7e99ed98b725",
|
|
"office_travelreimburse_cents_homework_incl": 23,
|
|
"office_travelreimburse_cents_homework_excl": 23,
|
|
"office_travelreimburse_cents_business_incl": 23,
|
|
"office_travelreimburse_cents_business_excl": 23
|
|
}
|
|
```
|
|
|
|
### Example Request
|
|
```php
|
|
$curl = curl_init();
|
|
|
|
curl_setopt_array($curl, [
|
|
CURLOPT_URL => $baseUrl . '/api/v1/office/travel-reimburse/configure/',
|
|
CURLOPT_RETURNTRANSFER => true,
|
|
CURLOPT_POST => true,
|
|
CURLOPT_POSTFIELDS => $json_payload,
|
|
CURLOPT_HTTPHEADER => [
|
|
'Authorization: Bearer ' . $token,
|
|
'Content-Type: application/json',
|
|
'X-HTTP-Method-Override: PUT'
|
|
],
|
|
]);
|
|
|
|
$response = curl_exec($curl);
|
|
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
|
|
|
if ($response === false) {
|
|
echo curl_error($curl);
|
|
}
|
|
|
|
curl_close($curl);
|
|
```
|
|
|
|
### Example Response
|
|
```json
|
|
"portal settings updated successfully."
|
|
```
|
|
|
|
#### Known errors or issues.
|
|
None are known at the time
|
|
If you do encounter issues and get an http code in return, check the response codes on this page. |