Edita uma faixa de preço
PUT/api/bookings/resources/{resourceId}/price-rules/{ruleId}
- Auth
- Token erforderlich
- Wer darf:
- owner
- admin
- X-CommunityId
X-CommunityIdSende die X-CommunityId der Community, in der die Operation stattfindet.
Die Beschreibungen der Endpoints stammen aus der API-Spezifikation und sind vorerst auf Portugiesisch. Die Oberfläche drumherum ist übersetzt.
Só owner e admin; mesmas regras de criar.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
resourceIdPflicht | path | string (uuid) | |
ruleIdPflicht | path | string (uuid) |
Header
| Name | Typ | Beschreibung |
|---|---|---|
X-CommunityIdoptional | string (uuid) | ID da comunidade em que a operação acontece. Obrigatório na maioria dos endpoints com escopo de comunidade. |
Request-Body application/json
| Name | Typ | Beschreibung |
|---|---|---|
idoptional | string (uuid) | |
resourceIdoptional | string (uuid) | |
weekdayoptional | integer | 0 = domingo; nulo = todos os dias. · ≥ 0, ≤ 6 |
specificDateoptional | string | |
fromTimeoptional | string | |
toTimeoptional | string | |
modeoptional | FREE | CREDITS | MONEY | CREDITS_OR_MONEY | |
blockMinutesoptional | integer | |
creditsoptional | integer | Créditos por bloco. |
amountoptional | number | Valor por bloco (dinheiro ainda não é cobrado: reserva que exige dinheiro é recusada). |
sortOrderoptional | integer |
Antworten
| Status | Beschreibung |
|---|---|
200 | Atualizada. |
400 | Requisição inválida — falha de validação. |
403 | Autenticado, mas sem permissão para esta operação. |
404 | Recurso não encontrado. |
409 | Conflito com o estado atual do recurso. |
curl-Beispiel
curl -X PUT "https://api.memberfy.net/api/bookings/resources/<resourceId>/price-rules/<ruleId>" \
-H "Authorization: Bearer $TOKEN" \
-H "X-CommunityId: $COMMUNITY_ID" \
-H "Content-Type: application/json" \
-d '{}'