How to get an API token and set up webhooks
The company token gives external programs access to branch data through the RentProg API. Webhooks work in the opposite direction: RentProg itself tells your program that a booking, client or vehicle has been created, changed or deleted.
Both settings are in the company profile, on the “Integrations” tab, in the “Token for API access and booking form” and Webhooks panels.
Who has access
| What | Condition |
|---|---|
| The “Token for API access and booking form” panel | API access: the API service is in the plan and access has not been disabled by RentProg administration |
| Copy and refresh the token | Manager and above; the field is not shown to partners and guests |
The Webhooks panel | API access, separately enabled webhook access, and the webhook service in the plan |
| Add, change and delete webhook URLs | Company employees |
| See the webhook signing secret | Company employees; not shown to partners and guests |
How to copy the token
- Open the company profile, the “Integrations” tab, the “Token for API access and booking form” panel.
- Click the “API Token” field or the copy icon in it — the token is copied to the clipboard.
Each branch has its own token. The same token is needed by external services, for example the booking form on your website.
How to refresh the token
- Click “Refresh Token” in the “Token for API access and booking form” panel.
- Confirm the refresh.
- Copy the new token and replace it in all external services.
Important
When the token is refreshed, all external services using the old token will stop working. The old token cannot be restored.
How a program signs in to the API
The program exchanges the company token for a temporary access key and then sends it in the Authorization header of every request:
GET /api/v1/public/get_token?company_token=<company token>The temporary key is valid for 4 hours. Rate limits:
- Standard reads: 120 requests per minute, separately per company and per IP address; both limits apply at the same time.
- Writes: 60 requests per minute, separately per company and per IP address; both limits apply at the same time.
free_cars_with_price,search_clients,search_bookings,search_cars,icalendar_event, andactive_bookings_icalendar: a shared separate limit of 30 requests per minute per IP address.- Getting a temporary key through
get_token: 60 requests per minute per IP address.
Important
If API access is disabled, the server refuses and asks you to contact support. If the company's subscription is suspended for non-payment, the API also refuses until the company balance is topped up.
Date price adjustments in vehicle responses
A date adjustment is a percentage markup or discount on the daily price for a range of dates. It does not change the prices in the prices tables: API responses return adjustments in a separate date_adjustments field, and your program applies them itself. The field is added alongside the existing ones; no existing field has changed.
A vehicle has the field in the responses of three methods:
| Method | Where the field is |
|---|---|
GET /api/v1/public/all_cars_full | on every vehicle in the array |
GET /api/v1/public/car_data_with_bookings | in the vehicle object |
GET /api/v1/public/search_cars | on every vehicle in the array |
Example of the field on a vehicle:
"date_adjustments": [
{"starts_on": "2026-12-30", "ends_on": "2027-01-02", "percent": 15.0},
{"starts_on": "2027-01-03", "ends_on": "2027-01-03", "percent": -5.0}
]| Field | What it contains |
|---|---|
starts_on | The first day of the interval, in YYYY-MM-DD format |
ends_on | The last day of the interval, inclusive |
percent | A number: positive is a markup, negative is a discount; 15.0 means “plus 15%” |
What the response guarantees:
- The intervals are already resolved: they do not overlap and are in ascending date order. If several adjustments cover the same day, the one created last is returned.
- Adjacent intervals with the same percentage are merged into one.
- Cancelled adjustments are not returned.
- Intervals that ended before yesterday are not returned. Yesterday is used to leave a margin for the branch time zone; an interval that spans yesterday is returned whole, with its real start date.
- A vehicle without adjustments has
[]in the field. - An adjustment applies to a vehicle while it stays in the branch where the adjustment was created: after the vehicle is moved to another branch, the adjustment disappears from the responses.
The all_cars_full and car_data_with_bookings responses are cached for up to 30 seconds. Creating an adjustment, cancelling it, and moving a vehicle to another branch reset the cache, so the next request already returns the new intervals. search_cars is not cached.
The price that RentProg calculates itself (selected_price in free_cars_with_price and car_data) already includes adjustments. Daily and hourly rental receive adjustments; weekly and monthly rental and periodic payments do not, so do not apply date_adjustments to them.
How to calculate a day's price with an adjustment
- Take the day's price from the
pricestable the way you do without adjustments, taking the season and the rental-duration tier into account. - If the day falls into a
date_adjustmentsinterval, multiply the price by1 + percent / 100. - Round the result using the rule below.
- Do not round or change days outside the intervals: their price stays as in the table.
Rounding starts from the new, not yet rounded price: it determines the step, then the value is rounded to that step, with a half going up.
| Price after multiplying | Rounding step |
|---|---|
| 1000 and above | 10 |
| from 10 to 999.99 | 1 |
| below 10 | 0.1 |
Examples:
| Price after multiplying | Result | Note |
|---|---|---|
| 999.6 | 1000 | step 1, rounded up |
| 42.5 | 43 | step 1, half rounds up |
| 969 | 969 | 1020 with a −5% adjustment: already a multiple of the step, unchanged |
| 9.95 | 10.0 | step 0.1, half rounds up |
Rounding does not preserve endings such as “…90”: a price after an adjustment can end in any digit within the step.
How to add a webhook URL
- Expand the
Webhookspanel and click “Add webhook URL”. - Enter your program's address in the “Webhook URL” field.
- Select events in the “Event subscriptions” field — at least one.
- Turn on “Only created via API” or “Only updated via API” if you only need records that came in through the API.
- Click the save icon with the tooltip “Save webhook URL”.
The URL will not be saved without an address or without events. The address is checked for format.
Events you can subscribe to: “Booking created”, “Booking updated”, “Booking deleted”, “Client created”, “Client updated”, “Client deleted”, as well as vehicle creation, change and deletion.
A URL belongs to the branch in which it was created: events arrive for that branch's records.
How to verify a delivery signature
After saving, the URL gets a signing secret field. The secret is generated once when the URL is created and does not change when you edit it. Copy it with the copy icon and store it on your program's side.
Each delivery is a POST request with a JSON body:
{"event": "booking_create", "payload": "<record data as a JSON string>"}Delivery headers:
| Header | What it contains |
|---|---|
X-Webhook-Signature | sha256= and the request body signature using the HMAC-SHA256 algorithm with the URL's secret |
X-Webhook-Event-Id | Event ID |
Idempotency-Key | The same event ID — identical for all retries and resends |
The signature is computed over the exact bytes of the request body. RentProg does not send unsigned deliveries.
When a delivery is considered failed
| Your program's response | What RentProg does |
|---|---|
| 200, 201 or 204 | The delivery succeeded |
| 408, 429, a dropped connection or no response within 10 seconds | Retries the delivery with an increasing pause, up to 8 attempts in total; after the last one — an error |
| 404 | Records an error and deactivates the URL |
| Secure connection error | Records an error without retries |
| Any other code | Records an error without retries |
Important
A 404 response turns off the URL entirely: no further events are sent to it until you activate it.
How to resend failed deliveries
- Expand the
Webhookspanel and find the “Recent webhook errors” block. - Check the event's address and response code, and fix your program if needed.
- Click “Resend” next to the event.
The block shows failed deliveries for the whole company group; the “Load more” button loads earlier ones. You can resend only an event in error status and only to an active URL: if the URL is deactivated, activate it first.
How to manage a URL
A saved URL has icons:
- “Update webhook URL” — save a changed address, events or toggles;
- “Deactivate webhook URL” — temporarily stop sending events;
- “Activate webhook URL” — turn sending back on;
- “Delete webhook URL” — delete the URL along with its event history, after confirmation.