Pular para o conteúdo

Renovar a carteirinha (pelo próprio associado)

POST
/v1/me/membership/renew
curl --request POST \
--url https://api.vimine.network/v1/me/membership/renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "accept_statuto": { "version": 1, "sha256": "example" } }'

Dentro da janela de renovação (60 dias antes do vencimento, ou depois dele). Uma carteirinha de tipo gratuito sem etapa de aprovação é renovada na hora (renewed: true, novo expires_at); senão, um pedido de renovação é registrado e a associação é avisada (requested: true) — ele se conclui quando a secretaria registra a taxa ou aprova. accept_statuto precisa indicar o statuto em vigor. Repetir o pedido não tem efeito.

Tipo de mídiaapplication/json
object
accept_statuto
obrigatório
object
version
obrigatório
integer
sha256
string
Exemplogerado
{
"accept_statuto": {
"version": 1,
"sha256": "example"
}
}

Renovada ou solicitada

Tipo de mídiaapplication/json
object
renewed
boolean
requested
boolean
status
string
expires_at
string formato: date-time
nullable
renewal_requested_at
string formato: date-time
nullable
Exemplogerado
{
"renewed": true,
"requested": true,
"status": "example",
"expires_at": "2026-04-15T12:00:00Z",
"renewal_requested_at": "2026-04-15T12:00:00Z"
}

Requisição inválida

Tipo de mídiaapplication/problem+json
object
type
obrigatório
string formato: uri
title
obrigatório
string
status
obrigatório
integer
detail
string
code
obrigatório
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Exemplogerado
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Credenciais ausentes ou inválidas

Tipo de mídiaapplication/problem+json
object
type
obrigatório
string formato: uri
title
obrigatório
string
status
obrigatório
integer
detail
string
code
obrigatório
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Exemplogerado
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Não permitido

Tipo de mídiaapplication/problem+json
object
type
obrigatório
string formato: uri
title
obrigatório
string
status
obrigatório
integer
detail
string
code
obrigatório
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Exemplogerado
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Não encontrado

Tipo de mídiaapplication/problem+json
object
type
obrigatório
string formato: uri
title
obrigatório
string
status
obrigatório
integer
detail
string
code
obrigatório
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Exemplogerado
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Fora da janela de renovação (too_early) ou a carteirinha não pode ser renovada (not_renewable)

accept_statuto não indica o statuto em vigor

Limite de requisições excedido

Tipo de mídiaapplication/problem+json
object
type
obrigatório
string formato: uri
title
obrigatório
string
status
obrigatório
integer
detail
string
code
obrigatório
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Exemplogerado
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Erro interno

Tipo de mídiaapplication/problem+json
object
type
obrigatório
string formato: uri
title
obrigatório
string
status
obrigatório
integer
detail
string
code
obrigatório
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Exemplogerado
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}