PUT /api/v1/properties/{propertyId}/rates
Replaces the whole grid. A duration absent from the body loses its rate and disappears from the booking choices for this villa.
The five durations the product supports are 60, 120, 180, 300 and 480 minutes. The list
is closed: no duration can be added or renamed.
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Refused — 403 |
| Field | Type | Required | Description |
|---|---|---|---|
rates | array | yes | One object per priced duration |
rates[].durationMinutes | integer | yes | One of 60, 120, 180, 300, 480 |
rates[].amount | integer | yes | Strictly positive, minor unit of the currency |
curl -X PUT -H "x-api-key: $VILLASLOT_API_KEY" -H "content-type: application/json" \
-d '{"rates":[{"durationMinutes":120,"amount":2800000}]}' \
"https://villaslot.app/api/v1/properties/1f0a…/rates"200 OK — the saved grid, read back.403 Forbidden — the key bearer is a member.422 Unprocessable Entity — rates missing or not a list, an unsupported duration, a
duplicated duration, or an amount that is not a positive integer.401 Unauthorized — missing or invalid key, or a key whose bearer left the organization.404 Not Found — unknown id, or an id belonging to another organization. The two are
deliberately indistinguishable.429 Too Many Requests — over 120 requests in a minute for this key.