Update a rate templates
PATCH/v1/rates/templates/:id
Update an existing rate templates by ID
Request
Path Parameters
Rate templates ID
- application/json
Body
required
- Array [
- Array [
- ]
- ]
The name of the rate template
The corporate ID
vehicleTypeRates object[]
The vehicle type rates
The vehicle type name
The vehicle type ID
rates object[]
The rates for the vehicle type
The rate ID
The operation zone ID
Possible values: [Hourly, Regular, Flat, Sharing, Intercity]
The type of rate
Default value: true
Whether the rate is active for the vehicle type
Whether the rate template is corporate custom pricing
Responses
- 200
- 400
- 404
- 409
- 500
Rate templates updated successfully
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
The ID of the rate template
The name of the rate template
The corporate ID
Whether the rate template is the default rate template
vehicleTypeRates object[]required
The vehicle type rates
The vehicle type name
The vehicle type ID
rates object[]
The rates for the vehicle type
The rate ID
The operation zone ID
Possible values: [Hourly, Regular, Flat, Sharing, Intercity]
The type of rate
Default value: true
Whether the rate is active for the vehicle type
Whether the rate template is corporate custom pricing
The latest update date
{
"_id": "672d07188234567890123456",
"name": "Standard Rate Template",
"corporateId": "672d07188234567890123456",
"isDefault": true,
"vehicleTypeRates": [
{
"vehicleType": "Car",
"vehicleTypeId": "672d07188234567890123456",
"rates": [
{
"rateId": "672d07188234567890123456",
"zoneId": "672d07188234567890123456",
"rateType": "Regular",
"rateActive": true
}
]
}
],
"isCorpCustomPricing": true,
"latestUpdate": "2025-01-01"
}
Invalid ID format
Rate templates not found
Rate template name already exists
Internal server error