v.1.3.0 update travel reimbursement added
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
# 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. |
|
||||
| office_travelreimburse_howework_company_uuid | uuid | yes, if customers module enabled | *Only when the Customers modules is enabled* The company uuid that the travel is linked to. Set the home/work travel company in system settings |
|
||||
| office_travelreimburse_howework_company_name | string | yes, if customers module disabled | *Only when the Customers module is disabled* The that the travel is linked to. Set the home/work travel company in system settings |
|
||||
|
||||
### 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,
|
||||
office_travelreimburse_howework_company_uuid: "0f6a9c83-809b-4d54-8b16-a8197ac64ab4"
|
||||
}
|
||||
```
|
||||
|
||||
### 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.
|
||||
Reference in New Issue
Block a user