Consulta a troca de plano agendada
GET/api/subscriptions/{id}/scheduled-change
- Auth
- Token erforderlich
- 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.
FIN-68. A troca de plano que espera o fim do período. O assinante, ou owner/admin da comunidade do X-CommunityId (e SuperAdmin); assinatura de outra pessoa ou de outra comunidade responde 404. Sem troca agendada, 404 (`noScheduledChange`). `data`: `changeType` (`UPGRADE`, `DOWNGRADE`, `SAME_PRICE` ou `INTERVAL_CHANGE`), `currentProduct` e `newProduct` (`id`, `title`, `price`, `billingInterval`), `effectiveDate` (quando a troca vale: a renovação em que a cobrança já vem no preço novo), `scheduledAt` e `scheduledById` (o perfil que agendou). O mesmo objeto vem em `scheduledChange` de `GET /api/subscriptions`, `GET /api/subscriptions/{id}` e `GET /api/subscriptions/me` (ou `null`).
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | path | string |
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. |
Antworten
| Status | Beschreibung |
|---|---|
200 | Operação realizada com sucesso. |
400 | Requisição inválida — falha de validação. |
401 | Token ausente, inválido ou expirado. |
404 | Recurso não encontrado. |
500 | Erro interno do servidor. |
curl-Beispiel
curl -X GET "https://api.memberfy.net/api/subscriptions/<id>/scheduled-change" \
-H "Authorization: Bearer $TOKEN" \
-H "X-CommunityId: $COMMUNITY_ID"