Gerar número de protocolo
🌐 URLs dos Ambientes
🔹 Homologação
https://integracao.hml.cloud.medsenior.com.br/api/v2/protocolo/gerar
🔹 Produção
https://integracao.medsenior.com.br/api/v2/protocolo/gerar
📌 Endpoint
POST /api/v2/protocolo/gerar
🔐 Autenticação
Este endpoint requer um token de autorização.
Authorization: Bearer TOKEN_GERADO_NA_AUTENTICACAO
🔽 Cabeçalhos
| Nome | Valor |
|---|---|
| accept | application/json |
| content-type | application/json |
🔽 Parâmetros de Entrada
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| tipo | string | Sim | Tipo do protocolo (até 30 caracteres) |
| cpf | string? | Não | CPF do solicitante (opcional) |
| telefone | string? | Não | Telefone do solicitante (opcional) |
| ticketId | long? | Não | Identificador do ticket (opcional) |
- Exemplo Json de Entrada
{
"tipo": "Solicitacao",
"cpf": "12345678901",
"ticketId": 1234567890,
"telefone": "27123456789"
}
🔄 Exemplo de Requisição
🔹 Ambiente de homologação
curl -X 'POST' \
'https://integracao.hml.cloud.medsenior.com.br/api/v2/protocolo/gerar' \
-H 'accept: application/json' \
-H 'authorization: Bearer TOKEN_GERADO_NA_AUTENTICACAO' \
-H 'content-type: application/json' \
-d '{
"tipo": "Manifestacao",
"cpf": "12345678901",
"ticketId": 1234567890,
"telefone": "27123456789"
}'
🔹 Ambiente de produção
curl -X 'POST' \
'https://integracao.medsenior.com.br/api/v2/protocolo/gerar' \
-H 'accept: application/json' \
-H 'authorization: Bearer TOKEN_GERADO_NA_AUTENTICACAO' \
-H 'content-type: application/json' \
-d '{
"tipo": "Manifestacao",
"cpf": "12345678901",
"ticketId": 1234567890,
"telefone": "27123456789"
}'
✅ Resposta de Sucesso
- Status Code:
200 OK - Exemplo de Resposta:
{
"protocolo": "123456789012345"
}
❌ Códigos de Erro
| Status Code | Significado | Descrição |
|---|---|---|
| 400 | Bad Request | Parâmetros inválidos ou ausentes. |
| 401 | Unauthorized | Falha na autenticação do token. |
| 500 | Server Error | Erro interno ao gerar o protocolo. |