Árvore de páginas

Versões comparadas

Chave

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

...

Bloco de código
languagec#
themeMidnight
titleAPI Retorno - Sucesso
linenumberstrue
collapsetrue
{
    "id": "PLIncBenModel",
    "operation": 1,
    "pk": "TSBTUCAgICAwMDA3Nzk=",
    "models": [
        {
            "id": "MASTERBBA",
            "modeltype": "FIELDS",
            "fields": [
                {
                    "id": "BBA_FILIAL",
                    "order": 1,
                    "value": "M SP"
                },
                {
                    "id": "BBA_CODSEQ",
                    "order": 2,
                    "value": "000779"
                },
                {
                    "id": "BBA_TIPSOL",
                    "order": 3,
                    "value": "2"
                },
                {
                    "id": "BBA_STATUS",
                    "order": 4,
                    "value": "2"
                },
                {
                    "id": "BBA_CODINT",
                    "order": 5,
                    "value": "0001"
                },
                {
                    "id": "BBA_CODEMP",
                    "order": 6,
                    "value": "1008"
                },
                {
                    "id": "BBA_CONEMP",
                    "order": 7,
                    "value": "000000000001"
                },
                {
                    "id": "BBA_VERCON",
                    "order": 8,
                    "value": "001"
                },
                {
                    "id": "BBA_SUBCON",
                    "order": 9,
                    "value": "000000004"
                },
                {
                    "id": "BBA_VERSUB",
                    "order": 10,
                    "value": "001"
                },
                {
                    "id": "BBA_EMPBEN",
                    "order": 12,
                    "value": "NOME BENEFICIARIO TITULAR"
                },
                {
                    "id": "BBA_CODPRO",
                    "order": 13,
                    "value": "0001"
                },
                {
                    "id": "BBA_VERSAO",
                    "order": 14,
                    "value": "001"
                },
                {
                    "id": "BBA_DATSOL",
                    "order": 15,
                    "value": "20220607"
                },
                {
                    "id": "BBA_HORSOL",
                    "order": 16,
                    "value": "10:24"
                },
                {
                    "id": "BBA_NROPRO",
                    "order": 18,
                    "value": "41750520220607000779"
                },
                {
                    "id": "BBA_TIPMAN",
                    "order": 19,
                    "value": "1"
                },
                {
                    "id": "BBA_CPFTIT",
                    "order": 20,
                    "value": "48273995496"
                }
            ],
            "models": [
                {
                    "id": "DETAILB2N",
                    "modeltype": "GRID",
                    "struct": [
                        {
                            "id": "B2N_FILIAL",
                            "order": 1
                        },
                        {
                            "id": "B2N_STATUS",
                            "order": 2
                        },
                        {
                            "id": "B2N_PROTOC",
                            "order": 3
                        },
                        {
                            "id": "B2N_NOMUSR",
                            "order": 4
                        },
                        {
                            "id": "B2N_FLGCTR",
                            "order": 5
                        },
                        {
                            "id": "B2N_TIPUSU",
                            "order": 6
                        },
                        {
                            "id": "B2N_DATNAS",
                            "order": 7
                        },
                        {
                            "id": "B2N_GRAUPA",
                            "order": 8
                        },
                        {
                            "id": "B2N_ESTCIV",
                            "order": 10
                        },
                        {
                            "id": "B2N_SEXO",
                            "order": 11
                        },
                        {
                            "id": "B2N_CPFUSR",
                            "order": 12
                        },
                        {
                            "id": "B2N_DRGUSR",
                            "order": 13
                        },
                        {
                            "id": "B2N_ORGEM",
                            "order": 14
                        },
                        {
                            "id": "B2N_RGEST",
                            "order": 15
                        },
                        {
                            "id": "B2N_NRCRNA",
                            "order": 16
                        },
                        {
                            "id": "B2N_CEPUSR",
                            "order": 17
                        },
                        {
                            "id": "B2N_ENDERE",
                            "order": 18
                        },
                        {
                            "id": "B2N_NR_END",
                            "order": 19
                        },
                        {
                            "id": "B2N_COMEND",
                            "order": 20
                        },
                        {
                            "id": "B2N_UNIVER",
                            "order": 21
                        },
                        {
                            "id": "B2N_BAIRRO",
                            "order": 22
                        },
                        {
                            "id": "B2N_EMAIL",
                            "order": 23
                        },
                        {
                            "id": "B2N_CODMUN",
                            "order": 24
                        },
                        {
                            "id": "B2N_INVALI",
                            "order": 25
                        },
                        {
                            "id": "B2N_MUNICI",
                            "order": 26
                        },
                        {
                            "id": "B2N_DATOBI",
                            "order": 27
                        },
                        {
                            "id": "B2N_ESTADO",
                            "order": 28
                        },
                        {
                            "id": "B2N_TELEFO",
                            "order": 29
                        },
                        {
                            "id": "B2N_DDD",
                            "order": 30
                        },
                        {
                            "id": "B2N_MAE",
                            "order": 31
                        },
                        {
                            "id": "B2N_PAI",
                            "order": 32
                        },
                        {
                            "id": "B2N_COMUNI",
                            "order": 33
                        },
                        {
                            "id": "B2N_BANCO",
                            "order": 34
                        },
                        {
                            "id": "B2N_AGENC",
                            "order": 35
                        },
                        {
                            "id": "B2N_CONTA",
                            "order": 36
                        },
                        {
                            "id": "B2N_DATADT",
                            "order": 37
                        },
                        {
                            "id": "B2N_CODMOT",
                            "order": 38
                        },
                        {
                            "id": "B2N_CODSEQ",
                            "order": 40
                        },
                        {
                            "id": "B2N_BA1REC",
                            "order": 41
                        },
                        {
                            "id": "B2N_CODEMP",
                            "order": 42
                        },
                        {
                            "id": "B2N_CONEMP",
                            "order": 43
                        },
                        {
                            "id": "B2N_SUBCON",
                            "order": 44
                        },
                        {
                            "id": "B2N_CODPRO",
                            "order": 45
                        },
                        {
                            "id": "B2N_DTBLOQ",
                            "order": 46
                        },
                        {
                            "id": "B2N_TIPBLO",
                            "order": 47
                        }
                    ],
                    "items": [
                        {
                            "id": 1,
                            "deleted": 0,
                            "fields": [
                                {
                                    "id": "B2N_FILIAL",
                                    "value": "M SP"
                                },
                                {
                                    "id": "B2N_PROTOC",
                                    "value": "000779"
                                },
                                {
                                    "id": "B2N_NOMUSR",
                                    "value": "NOME BENEFICIARIO TITULAR"
                                },
                                {
                                    "id": "B2N_FLGCTR",
                                    "value": "0"
                                },
                                {
                                    "id": "B2N_TIPUSU",
                                    "value": "T"
                                },
                                {
                                    "id": "B2N_DATNAS",
                                    "value": "19560523"
                                },
                                {
                                    "id": "B2N_GRAUPA",
                                    "value": "01"
                                },
                                {
                                    "id": "B2N_ESTCIV",
                                    "value": "C"
                                },
                                {
                                    "id": "B2N_SEXO",
                                    "value": "2"
                                },
                                {
                                    "id": "B2N_CPFUSR",
                                    "value": "48273995496"
                                },
                                {
                                    "id": "B2N_DRGUSR",
                                    "value": "446430211"
                                },
                                {
                                    "id": "B2N_ORGEM",
                                    "value": "SSP"
                                },
                                {
                                    "id": "B2N_RGEST",
                                    "value": "SP"
                                },
                                {
                                    "id": "B2N_CEPUSR",
                                    "value": "57490000"
                                },
                                {
                                    "id": "B2N_ENDERE",
                                    "value": "TESTE"
                                },
                                {
                                    "id": "B2N_NR_END",
                                    "value": "1140"
                                },
                                {
                                    "id": "B2N_COMEND",
                                    "value": "APTO 22"
                                },
                                {
                                    "id": "B2N_BAIRRO",
                                    "value": "CENTRO SUL"
                                },
                                {
                                    "id": "B2N_EMAIL",
                                    "value": "[email protected]"
                                },
                                {
                                    "id": "B2N_CODMUN",
                                    "value": "2700102"
                                },
                                {
                                    "id": "B2N_MUNICI",
                                    "value": "AGUA BRANCA"
                                },
                                {
                                    "id": "B2N_ESTADO",
                                    "value": "AL"
                                },
                                {
                                    "id": "B2N_TELEFO",
                                    "value": "21993595175"
                                },
                                {
                                    "id": "B2N_DDD",
                                    "value": "021"
                                },
                                {
                                    "id": "B2N_MAE",
                                    "value": "MAE DO BENEFICIARIO TITULAR"
                                },
                                {
                                    "id": "B2N_PAI",
                                    "value": "PAI DO BENEFICIARIO TITULAR"
                                },
                                {
                                    "id": "B2N_CODSEQ",
                                    "value": "000350"
                                },
                                {
                                    "id": "B2N_CODEMP",
                                    "value": "1008"
                                },
                                {
                                    "id": "B2N_CONEMP",
                                    "value": "000000000001"
                                },
                                {
                                    "id": "B2N_SUBCON",
                                    "value": "000000004"
                                },
                                {
                                    "id": "B2N_CODPRO",
                                    "value": "0001"
                                }
                            ]
                        },
                        {
                            "id": 2,
                            "deleted": 0,
                            "fields": [
                                {
                                    "id": "B2N_FILIAL",
                                    "value": "M SP"
                                },
                                {
                                    "id": "B2N_PROTOC",
                                    "value": "000779"
                                },
                                {
                                    "id": "B2N_NOMUSR",
                                    "value": "BENEFICIARIO DEPENDENTE"
                                },
                                {
                                    "id": "B2N_FLGCTR",
                                    "value": "0"
                                },
                                {
                                    "id": "B2N_TIPUSU",
                                    "value": "D"
                                },
                                {
                                    "id": "B2N_DATNAS",
                                    "value": "19750217"
                                },
                                {
                                    "id": "B2N_GRAUPA",
                                    "value": "03"
                                },
                                {
                                    "id": "B2N_ESTCIV",
                                    "value": "C"
                                },
                                {
                                    "id": "B2N_SEXO",
                                    "value": "1"
                                },
                                {
                                    "id": "B2N_CPFUSR",
                                    "value": "89631553663"
                                },
                                {
                                    "id": "B2N_DRGUSR",
                                    "value": "490643784"
                                },
                                {
                                    "id": "B2N_ORGEM",
                                    "value": "SSP"
                                },
                                {
                                    "id": "B2N_RGEST",
                                    "value": "SP"
                                },
                                {
                                    "id": "B2N_CEPUSR",
                                    "value": "57490000"
                                },
                                {
                                    "id": "B2N_ENDERE",
                                    "value": "RUA DE ALAGOAS"
                                },
                                {
                                    "id": "B2N_NR_END",
                                    "value": "1140"
                                },
                                {
                                    "id": "B2N_COMEND",
                                    "value": "APTO 52"
                                },
                                {
                                    "id": "B2N_BAIRRO",
                                    "value": "CENTRO SUL"
                                },
                                {
                                    "id": "B2N_EMAIL",
                                    "value": "[email protected]"
                                },
                                {
                                    "id": "B2N_CODMUN",
                                    "value": "2700102"
                                },
                                {
                                    "id": "B2N_MUNICI",
                                    "value": "AGUA BRANCA"
                                },
                                {
                                    "id": "B2N_ESTADO",
                                    "value": "AL"
                                },
                                {
                                    "id": "B2N_TELEFO",
                                    "value": "81993910031"
                                },
                                {
                                    "id": "B2N_DDD",
                                    "value": "081"
                                },
                                {
                                    "id": "B2N_MAE",
                                    "value": "MAE DO DEPENDENTE"
                                },
                                {
                                    "id": "B2N_PAI",
                                    "value": "PAI DO DEPENDENTE"
                                },
                                {
                                    "id": "B2N_CODSEQ",
                                    "value": "000351"
                                },
                                {
                                    "id": "B2N_CODEMP",
                                    "value": "1008"
                                },
                                {
                                    "id": "B2N_CONEMP",
                                    "value": "000000000001"
                                },
                                {
                                    "id": "B2N_SUBCON",
                                    "value": "000000004"
                                },
                                {
                                    "id": "B2N_CODPRO",
                                    "value": "0001"
                                }
                            ]
                        }
                    ]
                },
                {
                    "id": "DETAILANEXO",
                    "modeltype": "GRID",
                    "optional": 1,
                    "struct": [
                        {
                            "id": "CODSEQ",
                            "order": 1
                        },
                        {
                            "id": "DIRECTORY",
                            "order": 2
                        },
                        {
                            "id": "FILENAME",
                            "order": 3
                        }
                    ],
                    "items": [
                        {
                            "id": 1,
                            "deleted": 0,
                            "fields": [
                                {
                                    "id": "CODSEQ",
                                    "value": "000779"
                                },
                                {
                                    "id": "DIRECTORY",
                                    "value": "COMPROVANTE_TESTE.PNG"
                                },
                                {
                                    "id": "FILENAME",
                                    "value": "COMPROVANTE_TESTE"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

...

Bloco de código
languagec#
themeMidnight
titleRetorno API - Falha
linenumberstrue
collapsetrue
{
    "errorCode": 400,
    "errorMessage": "\r\n --- Erro no Modelo ---\r\nId submodelo origem:[DETAILB2N]\r\nId campo origem:[VLDDATA_POST]\r\nId submodelo erro: [DETAILB2N]\r\nId campo erro: []\r\nId erro: [VALID     ]\r\nMensagem de erro: [ O campo 	  (B2N_NOMUSR) não foi preenchido.[Item: 1]]\r\nMensagem da solução: [\r\n]\r\nValor atribuído: []\r\nValor anterior: []\r\n"
}
Bloco de código
languagec#
themeMidnight
titleRequest body - Inclusão de um dependente em uma família já existente 
linenumberstrue
collapsetrue
{
   "id":"PLIncBenModel",
   "operation":3,
   "models":[
      {
         "id":"MASTERBBA",
         "modeltype":"FIELDS",
         "fields":[
            {
               "id":"BBA_MATRIC",
               "order":1,
               "value":"00011008000019017"
            }
         ],
         "models":[
            {
               "id":"DETAILB2N",
               "modeltype":"GRID",
               "items":[
                  {
                     "id":1,
                     "deleted":0,
                     "fields":[
                        {
                           "id":"B2N_NOMUSR",
                           "value":"BENEFICIARIO DEPENDENTE"
                        },
                        {
                           "id":"B2N_DATNAS",
                           "value":"19750217"
                        },
                        {
                           "id":"B2N_GRAUPA",
                           "value":"03"
                        },
                        {
                           "id":"B2N_ESTCIV",
                           "value":"C"
                        },
                        {
                           "id":"B2N_SEXO",
                           "value":"1"
                        },
                        {
                           "id":"B2N_CPFUSR",
                           "value":"89631553663"
                        },
                        {
                           "id":"B2N_DRGUSR",
                           "value":"490643784"
                        },
                        {
                           "id":"B2N_ORGEM",
                           "value":"SSP"
                        },
                        {
                           "id":"B2N_RGEST",
                           "value":"SP"
                        },
                        {
                           "id":"B2N_CEPUSR",
                           "value":"57490000"
                        },
                        {
                           "id":"B2N_ENDERE",
                           "value":"RUA DE ALAGOAS"
                        },
                        {
                           "id":"B2N_NR_END",
                           "value":"1140"
                        },
                        {
                           "id":"B2N_COMEND",
                           "value":"APTO 52"
                        },
                        {
                           "id":"B2N_BAIRRO",
                           "value":"CENTRO SUL"
                        },
                        {
                           "id":"B2N_EMAIL",
                           "value":"[email protected]"
                        },
                        {
                           "id":"B2N_CODMUN",
                           "value":"2700102"
                        },
                        {
                           "id":"B2N_MUNICI",
                           "value":"AGUA BRANCA"
                        },
                        {
                           "id":"B2N_ESTADO",
                           "value":"AL"
                        },
                        {
                           "id":"B2N_TELEFO",
                           "value":"81993910031"
                        },
                        {
                           "id":"B2N_DDD",
                           "value":"081"
                        },
                        {
                           "id":"B2N_MAE",
                           "value":"MAE DO DEPENDENTE"
                        },
                        {
                           "id":"B2N_PAI",
                           "value":"PAI DO DEPENDENTE"
                        },
                        {
                           "id":"B2N_CODPRO",
                           "value":"0001"
                        }
                     ]
                  }
               ]
            },
            {
                "id": "DETAILANEXO",
                "modeltype": "GRID",
                "items": [
                    {
                        "id": 1,
                        "deleted": 0,
                        "fields": [
                            {
                                "id": "DIRECTORY",
                                "value": "https://centraldeatendimento.totvs.com/hc/article_attachments/360027449931/mceclip2.png"
                            },
                            {
                                "id": "FILENAME",
                                "value": "COMPROVANTE_TESTE_01"
                            }
               "value": "COMPROVANTE_TESTE_01"
        ]
                    }
                ]
        ]
    }
         ]
      }
   ]
}
Bloco de código
languagec#
themeMidnight
titleRetorno API - Falha
linenumberstrue
collapsetrue
{
    "errorCode": 400,
    "errorMessage": "\r\n --- Erro no Modelo ---\r\nId submodelo origem:[DETAILB2N]\r\nId campo origem:[VLDDATA_POST]\r\nId submodelo erro: [DETAILB2N]\r\nId campo erro: []\r\nId erro: [VALID]
            }
 ]\r\nMensagem de erro: [ O campo 	  (B2N_NOMUSR) não foi preenchido.[Item: 1]]\r\nMensagem da solução: [\r\n]\r\nValor atribuído: []\r\nValor anterior: []\r\n"]
      }
   ]
}

PUT API PLINCBENMODEL

Endpoint

...