Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Esta API utiliza função padrão do produto para processamento da requisição. Função principal - PLVLDUSRP e função auxiliar - PLSA090USR.

02. CONFIGURAÇÕES INI

Para iniciar a instalação do processo, devemos configurar seu INI Protheus com a funcionalidade REST para habilitar o acesso as API´s. Documentos auxiliares:

Configurando o REST

Com o INI Protheus configurado, a nomenclatura das API´s ficará no formato: <url + Porta + chave rest definidos no INI Protheus> +  /totvsHealthPlans/v1/

...

BeneficiaryElegibility.

...

Exemplo:

Image Modified

Logo, a minha URL será: http://localhost:8080/rest/totvsHealthPlans/v1/BeneficiaryElegibility?cardNumberOrCpf={cardOrcpf}

03. VERBOS

Seguem os verbos disponíveis na API:

Verbo

Path

Descrição

GET/BeneficiaryElegibilityElegibilidade do Beneficiário

04.PATH PARAMS - GET

Lista de query params obrigatórios:

Campo

Descrição

CPF, MATRICULA ou MATRICULA ANTIGA Cpf ou  Matrícula do beneficiário

Exemplo de chamada para utilização de um beneficiário em Dezembro de 2017:

http://localhost:8080/rest/totvsHealthPlans/v1/BeneficiaryElegibility

...

?cardNumberOrCpf=00010001000003002


Image Modified

05. EXEMPLOS DE JSONS DE RESPOSTA


Sucesso 200



{
    "beneficiaries": [
        {
            "rejectionCauses": [],
            "beneficiary": {
                "gender""2",
                "phoneNumber""",
                "subscriberId""00010001000003002",
                "companyName""SUB CONTRATO PESSOA JURIDICA",
                "age"49,
                "cardExpiration""2018-12-21",
                "holderRelationship""T",
                "newbornAttendance""S",
                "holderCPF""22701624800",
                "isInterchange"false,
                "whenToCharge""2",
                "birthdate""1972-12-01",
                "isOwner"true,
                "CNS""801641924550001",
                "oldSubscriberId""",
                "name""USUARIO - 00010001000003002",
                "healthInsurance": {
                    "code""0005",
                    "roomType""12",
                    "description""PRODUTO MEDICO"
                },
                "weight""0.00",
                "socialName""USUARIO - 00010001000003002",
                "height""0.00"
            },
            "warnings": [],
            "elegibilityResponse""S"
        },
        {
            "rejectionCauses": [
                {
                    "idTiss""1014",
                    "code""506",
                    "alert"false,
                    "interchangeCode"null,
                    "detail""Somente guias ate 17/01/18 serao validas.&nbsp;<br>;Data do Evento&nbsp;13/04/22<br>;Periodo do Bloqueio&nbsp;De 18/01/18 Até 13/04/24<br>;Motivo do Bloqueio&nbsp;001 - A PEDIDO DA DIRETORIA (NAO USA<br>;Nível: BA1 - Usuários&nbsp;06 - Atualizações / Contrato - Família / Família-Usuário / Folder Usuário<br>;",
                    "description""BENEFICIARIO COM DATA DE EXCLUSAO"
                },
                {
                    "idTiss""1799",
                    "code""037",
                    "alert"false,
                    "interchangeCode"null,
                    "detail""Data de validade do cartao magnetico&nbsp;21/12/18<br>;Data do atendimento&nbsp;13/04/22<br>;Qtd. de dias ultrapassados&nbsp;1209<br>;Nível: BA1 - Usuários&nbsp;11 - Atualizações / Contrato - Família / Família-Usuário / Folder Usuário<br>;",
                    "description""OUTROS"
                }
            ],
            "beneficiary": {
                "gender""2",
                "phoneNumber""",
                "subscriberId""00010001000010009",
                "companyName""SUB CONTRATO PESSOA JURIDICA",
                "age"49,
                "cardExpiration""2018-12-21",
                "holderRelationship""T",
                "newbornAttendance""S",
                "holderCPF""22701624800",
                "isInterchange"false,
                "whenToCharge""2",
                "birthdate""1972-12-01",
                "isOwner"true,
                "CNS""801641924550001",
                "oldSubscriberId""",
                "name""USUARIO - 00010001000010009",
                "healthInsurance": {
                    "code""0005",
                    "roomType""12",
                    "description""PRODUTO MEDICO"
                },
                "weight""0.00",
                "socialName""USUARIO - 00010001000010009",
                "height""0.00"
            },
            "warnings": [],
            "elegibilityResponse""S"
        },
        {
            "rejectionCauses": [
                {
                    "idTiss""1799",
                    "code""004",
                    "alert"false,
                    "interchangeCode"null,
                    "detail""Parcela(s) em Aberto&nbsp;1<br>;Dias Atrasados (dias corridos ref titulo em aberto mais antigo)&nbsp;92<br>;Saldo Original&nbsp;200.00<br>;",
                    "description""OUTROS"
                }
            ],
            "beneficiary": {
                "gender""2",
                "phoneNumber""",
                "subscriberId""00010013000002000",
                "companyName""NOGUEIRA",
                "age"49,
                "cardExpiration""",
                "holderRelationship""T",
                "newbornAttendance""S",
                "holderCPF""22701624800",
                "isInterchange"false,
                "whenToCharge""2",
                "birthdate""1972-12-01",
                "isOwner"true,
                "CNS""801641924550001",
                "oldSubscriberId""",
                "name""USUARIO - 00010013000002000",
                "healthInsurance": {
                    "code""0001",
                    "roomType""11",
                    "description""PRODUTO EXEMPLO 1"
                },
                "weight""0.00",
                "socialName""USUARIO - 00010013000002000",
                "height""0.00"
            },
            "warnings": [],
            "elegibilityResponse""S"
        },
        {
            "rejectionCauses": [
                {
                    "idTiss""1799",
                    "code""004",
                    "alert"false,
                    "interchangeCode"null,
                    "detail""Parcela(s) em Aberto&nbsp;1<br>;Dias Atrasados (dias corridos ref titulo em aberto mais antigo)&nbsp;2<br>;Saldo Original&nbsp;200.00<br>;",
                    "description""OUTROS"
                }
            ],
            "beneficiary": {
                "gender""2",
                "phoneNumber""",
                "owner": {
                    "gender""1",
                    "phoneNumber""",
                    "subscriberId""00011060000006010",
                    "companyName""10 ANO DE PLANO E 60 ANOS DE IDADE",
                    "age"49,
                    "cardExpiration""",
                    "holderRelationship""T",
                    "newbornAttendance""S",
                    "holderCPF""74827314233",
                    "isInterchange"false,
                    "whenToCharge""2",
                    "birthdate""1972-12-01",
                    "isOwner"false,
                    "CNS""287611986630008",
                    "oldSubscriberId""",
                    "name""USUARIO - 00011060000006010",
                    "healthInsurance": {
                        "code""0007",
                        "roomType""11",
                        "description""PRODUTO PARA TESTES DO NIVES D"
                    },
                    "weight""0.00",
                    "socialName""USUARIO - 00011060000006010",
                    "height""0.00"
                },
                "subscriberId""00011060000006029",
                "companyName""10 ANO DE PLANO E 60 ANOS DE IDADE",
                "age"49,
                "cardExpiration""",
                "holderRelationship""D",
                "newbornAttendance""S",
                "holderCPF""22701624800",
                "isInterchange"false,
                "whenToCharge""2",
                "birthdate""1972-12-01",
                "isOwner"false,
                "CNS""801641924550001",
                "oldSubscriberId""",
                "name""USUARIO - 00011060000006029",
                "healthInsurance": {
                    "code""0007",
                    "roomType""11",
                    "description""PRODUTO PARA TESTES DO NIVES D"
                },
                "weight""0.00",
                "socialName""USUARIO - 00011060000006029",
                "height""0.00"
            },
            "warnings": [],
            "elegibilityResponse""S"
        }
    ],
    "serviceResponse"true,
    "authorizationType"null,
    "journey"null
}


Erro 200

1
2
3
4

{
    "hasError"true,
    "errorMessage""Não foi informado o CPF ou MATRICULA"
}