Skip to content

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 ​

WhatCondition
The “Token for API access and booking form” panelAPI access: the API service is in the plan and access has not been disabled by RentProg administration
Copy and refresh the tokenManager and above; the field is not shown to partners and guests
The Webhooks panelAPI access, separately enabled webhook access, and the webhook service in the plan
Add, change and delete webhook URLsCompany employees
See the webhook signing secretCompany employees; not shown to partners and guests

How to copy the token ​

  1. Open the company profile, the “Integrations” tab, the “Token for API access and booking form” panel.
  2. 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 ​

  1. Click “Refresh Token” in the “Token for API access and booking form” panel.
  2. Confirm the refresh.
  3. 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, and active_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:

MethodWhere the field is
GET /api/v1/public/all_cars_fullon every vehicle in the array
GET /api/v1/public/car_data_with_bookingsin the vehicle object
GET /api/v1/public/search_carson 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}
]
FieldWhat it contains
starts_onThe first day of the interval, in YYYY-MM-DD format
ends_onThe last day of the interval, inclusive
percentA 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 ​

  1. Take the day's price from the prices table the way you do without adjustments, taking the season and the rental-duration tier into account.
  2. If the day falls into a date_adjustments interval, multiply the price by 1 + percent / 100.
  3. Round the result using the rule below.
  4. 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 multiplyingRounding step
1000 and above10
from 10 to 999.991
below 100.1

Examples:

Price after multiplyingResultNote
999.61000step 1, rounded up
42.543step 1, half rounds up
9699691020 with a −5% adjustment: already a multiple of the step, unchanged
9.9510.0step 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 ​

  1. Expand the Webhooks panel and click “Add webhook URL”.
  2. Enter your program's address in the “Webhook URL” field.
  3. Select events in the “Event subscriptions” field — at least one.
  4. Turn on “Only created via API” or “Only updated via API” if you only need records that came in through the API.
  5. 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:

HeaderWhat it contains
X-Webhook-Signaturesha256= and the request body signature using the HMAC-SHA256 algorithm with the URL's secret
X-Webhook-Event-IdEvent ID
Idempotency-KeyThe 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 responseWhat RentProg does
200, 201 or 204The delivery succeeded
408, 429, a dropped connection or no response within 10 secondsRetries the delivery with an increasing pause, up to 8 attempts in total; after the last one — an error
404Records an error and deactivates the URL
Secure connection errorRecords an error without retries
Any other codeRecords 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 ​

  1. Expand the Webhooks panel and find the “Recent webhook errors” block.
  2. Check the event's address and response code, and fix your program if needed.
  3. 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.
This article was prepared with AI and may contain inaccuracies. Report an error