01.CONCEITOA integração via APIs REST permite a comunicação eficiente e escalável entre diferentes sistemas ou aplicativos, utilizando métodos HTTP padrão como GET, POST, PUT e DELETE. Essas APIs seguem o padrão REST, facilitando o compartilhamento de dados e funcionalidades entre os sistemas. Cada método HTTP tem um propósito específico: - GET: Utilizado para consultar dados no servidor sem modificar nada, como, por exemplo, uma consulta de cadastro.
- POST: Utilizado para enviar dados ao servidor para serem processados ou armazenados, como, por exemplo, a inclusão de um cadastro.
- PUT: Utilizado para atualizar dados no servidor, como, por exemplo, a alteração de um cadastro.
- DELETE: Utilizado para remover dados do servidor, como, por exemplo, a exclusão de um cadastro.
Informações |
---|
| Por padrão, para consultar um determinado dado do servidor através do método GET, é necessário informar a chave primária (PK) do registro do modelo, codificada em base64. Caso contrário, se a chave primária não for informada, os registros serão retornados conforme a paginação padrão. Exemplo: "RCBNRyAwMSBEIE1HIDAxIDAwMDAwMDAwMDAwMDAwMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==" - representa a chave primária do registro da tabela da rotina em base64 http://localhost:8085/rest/FwModel/TAFA053/RCBNRyAwMSBEIE1HIDAxIDAwMDAwMDAwMDAwMDAwMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA== Para atualizar um determinado dado do servidor através do método PUT, é necessário informar a chave primária (PK) do registro do modelo, codificada em base64. Nesse caso, a chave primária é obrigatória para realizar a alteração; caso contrário, a operação será entendida como uma inclusão de novo registro. Para excluir um determinado dado do servidor através do método DELETE, também é necessário informar a chave primária (PK) do registro do modelo, codificada em base64. Para incluir dados no servidor através do método POST em outras filiais, é importante o uso do tenantId no header da requisição. |
02. API REST DISPONÍVEISApós configurar o REST do Protheus, é possível verificar todas as APIs REST disponíveis seguindo os passos abaixo: - Acesse o endereço configurado do REST. No exemplo, foi configurado como:
http://localhost:8080/rest . - Procure pelo serviço FWMODEL.
- Clique em /rest/fwmodel.catalog.
Para consumir uma API REST disponível no módulo TAF (TOTVS Automação Fiscal), siga o formato abaixo:
Bloco de código |
---|
theme | RDark |
---|
title | API's disponíveis no módulo SIGATAF |
---|
| http://localhost:8080/rest/FwModel/TAFA053
http://localhost:8080/rest/FwModel/TAFA057
http://localhost:8080/rest/FwModel/TAFA448
http://localhost:8080/rest/FwModel/TAFA535 |
Onde: - http://localhost:8080/rest é o endereço configurado do REST.
- /FwModel é um segmento fixo indicando o framework.
- /TAFA053 é o nome da API disponível.
03.ESTRUTURA DE ENVIOA estrutura do JSON de envio (body) não precisa ser informada na requisição para os métodos GET e DELETE; basta consumir a API. No entanto, para os métodos POST e PUT, o JSON deve ser enviado no seguinte formato básico: Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo |
---|
| {
"id": "TAFA057",
"operation": 1,
"models": [
{
"id": "MODEL_C1L",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1L_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1L_CODIGO",
"order": 3,
"value": "PRD12345"
},
{
"id": "C1L_DESCRI",
"order": 4,
"value": "PRD-VIA-POST"
},
{
"id": "C1L_UM",
"order": 6,
"value": "000084"
},
{
"id": "C1L_TIPITE",
"order": 8,
"value": "000010"
},
{
"id": "C1L_CODGEN",
"order": 12,
"value": "000102"
},
{
"id": "C1L_CODSER",
"order": 14,
"value": "000045"
},
{
"id": "C1L_ORIMER",
"order": 21,
"value": "000001"
},
{
"id": "C1L_ALQICM",
"order": 23,
"value": "18.00"
},
{
"id": "C1L_DTINCL",
"order": 26,
"value": "20221019"
},
{
"id": "C1L_SRVMUN",
"order": 29,
"value": "1402"
},
{
"id": "C1L_IDTSER",
"order": 48,
"value": "000016"
}
],
"models": [
{
"id": "MODEL_C1M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1M_FILIAL",
"order": 1
},
{
"id": "C1M_DTALT",
"order": 2
},
{
"id": "C1M_HRALT",
"order": 3
},
{
"id": "C1M_NRCAMP",
"order": 4
},
{
"id": "C1M_CTDANT",
"order": 6
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "C1M_FILIAL",
"value": "D MG 01"
},
{
"id": "C1M_DTALT",
"value": "20240520"
},
{
"id": "C1M_HRALT",
"value": "1313"
},
{
"id": "C1M_NRCAMP",
"value": "000001"
},
{
"id": "C1M_CTDANT",
"value": "PRD12345"
}
]
}
]
}
]
}
]
} |
Estrutura Hierárquica - id: é id da API
- models: são os modelos de negócios de cada API, que contém:
- id: é o modelo de dados definido no MVC
- modeltype: é tipo de modelo de dados, "FIELDS" ou "GRID"
- fields: é um vetor com os campos do modelo, que contém:
- id: é nome do campo
- order: é a ordem do campo
- value: é o valor do campo
- models: é um vetor com os submodelos do modelo de dados do MVC, que contém:
- id: é o submodelo de dados definido no MVC
- modeltype: é tipo de modelo de dados, "FIELDS" ou "GRID"
- struct: é um vetor definindo os campos do GRID, que contém:
- id: é nome do campo
- order: é a ordem do campo
- items: é um vetor definindo os itens do GRID, que contém:
- id: é um sequêncial do vetor dos itens
- fields: é um vetor com os campos e valores dos itens do GRID, que contém:
- id: é nome do campo
- value: é o valor do campo
A estrutura do JSON de resposta para os métodos GET (por chave primária - pk), POST e PUT é basicamente a seguinte: Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do GET[pk] |
---|
| {
"id": "TAFA057",
"pk": "RCBNRyAwMSBEIE1HIDAxIDAwMDAwMDAwMDAwMDAwMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==",
"models": []
} |
Onde a estrutua hierárquica é: : - id: é id da API
- pk: chave primária de cada registro para realizar uma consulta específica GET[id], consumir o método put e delete
- models: são os modelos de negócios de cada API, ou seja, modelo de dados do MVC (FIELDS, GRID)
A estrutura do JSON de resposta para o método GET, sem especificar uma chave primária (pk), será conforme abaixo:
Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do GET sem [pk] |
---|
| {
"total": 142,
"count": 10,
"startindex": 1,
"resources": [{
"id": "TAFA057",
"pk": "RCBNRyAwMSBEIE1HIDAxIDAwMDAwMDAwMDAwMDAwMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==",
"models": []
}, {
"id": "TAFA057",
"pk": "RCBNRyAwMSBEIE1HIDAxIDEyMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==",
"models": []
}
]
} |
Onde a estrutua hierárquica é: - total: é o total de registros que existem no sistema
- count: é a quantidade de registros retornados na requisição
- startindex: é o contador inicial para realizar a paginação
- resources: são as informações dos modelos de dados da API, composto por:
- id: é id da API
- pk: chave primária de cada registro para realizar uma consulta específica, consumir o método PUT e DELETE
- models: são os modelos de negócios de cada API, ou seja, modelo de dados do MVC (FIELDS, GRID)
A estrutura do JSON de resposta para o método DELETE será da seguinte maneira:
Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do POST |
---|
| true |
A estrutura do JSON de resposta em caso de falha será da seguinte maneira: Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta falha no POST |
---|
| {
"errorCode": 400,
"errorMessage": "\r\n --- Erro no Modelo ---\r\nId submodelo origem:[MODEL_C1L]\r\nId campo origem:[C1L_CODIGO]\r\nId submodelo erro: [MODEL_C1L]\r\nId campo erro: [C1L_CODIGO]\r\nId erro:
[TAFJAGRAVADO]\r\nMensagem de erro: [ Esta chave de registro formada pelos campos obrigatórios já foi informada em outro momento neste mesmo cadastro.
Para manter a integridade da informação não poderá haver duplicidade no cadastro, portanto não será permitido salvar este registro.]
\r\nMensagem da solução: [Deverá ser alterada a chave de identificação única do registro composta pelos campos obrigatórios de forma a não coincidir com outros dados já gravados neste mesmo
cadastro.\r\n]\r\nValor atribuído: []\r\nValor anterior: [1234 ]\r\n"
}
{
"errorCode": 400,
"errorMessage": "\r\n --- Erro no Modelo ---\r\nId submodelo origem:[MODEL_C1L]\r\nId campo origem:[C1L_UM]\r\nId submodelo erro: [MODEL_C1L]\r\nId campo erro:
[C1L_UM]\r\nId erro: [C1L_UM ]\r\nMensagem de erro: [ Deve representar a Unidade de medida utilizada na quantificação de estoques, conforme determina o fisco no Convênio 31/99, no
Guia Prático EFD Fiscal e Contribuições.
\r\n\r\nA informação deste campo corresponde á um código de identificação conforme respectivo cadastro.]
\r\nMensagem da solução: [\r\n]\r\nValor atribuído: []\r\nValor anterior: [xxx ]\r\n"
} | 04.API TAFA053 - CADASTRO DE PARTICIPANTES
API do Cadastro de Participantes - Método GETExemplo de Resposta em Caso de Sucesso
Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do TAFA053 |
---|
| {
"total": 10,
"count": 10,
"startindex": 1,
"resources": [
{
"id": "TAFA053",
"operation": 1,
"pk": "RCBNRyAwMSBDTElFTlRFLVRFU1RFLUFQSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=",
"models": [
{
"id": "MODEL_C1H",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1H_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1H_ID",
"order": 2,
"value": "c4a89a27-3b86-db80-ce12-2bdf92ea8cc7"
},
{
"id": "C1H_CODPAR",
"order": 3,
"value": "CLIENTE-TESTE-API"
},
{
"id": "C1H_PPES",
"order": 4,
"value": "1"
},
{
"id": "C1H_NOME",
"order": 5,
"value": "COMANDO PUT REALIZADO COM SUCESSO"
},
{
"id": "C1H_END",
"order": 8,
"value": "RUA DOIS"
},
{
"id": "C1H_NUM",
"order": 9,
"value": "SN"
},
{
"id": "C1H_CODPAI",
"order": 15,
"value": "000001"
},
{
"id": "C1H_UF",
"order": 17,
"value": "000027"
},
{
"id": "C1H_CODMUN",
"order": 19,
"value": "003293"
},
{
"id": "C1H_CPF",
"order": 27,
"value": "33915531707"
},
{
"id": "C1H_DTINCL",
"order": 30,
"value": "20240514"
},
{
"id": "C1H_INDDES",
"order": 53,
"value": "2"
},
{
"id": "C1H_CPRB",
"order": 54,
"value": "0"
},
{
"id": "C1H_INDNIF",
"order": 61,
"value": "2"
},
{
"id": "C1H_NEWCAD",
"order": 67,
"value": "1"
}
]
}
]
}
]
} |
API do Cadastro de Participantes - Método GET[pk]Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do TAFA053 - GET com PK |
---|
| {
"id": "TAFA053",
"operation": 1,
"pk": "RCBNRyAwMSBEIE1HIDAxIENGNDAxMDMwMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==",
"models": [
{
"id": "MODEL_C1H",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1H_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1H_ID",
"order": 2,
"value": "0dc2e70e-8430-3c8c-0753-30912d762d7f"
},
{
"id": "C1H_CODPAR",
"order": 3,
"value": "CF4010301"
},
{
"id": "C1H_PPES",
"order": 4,
"value": "1"
},
{
"id": "C1H_NOME",
"order": 5,
"value": "CLIENTE R-4010 03"
},
{
"id": "C1H_END",
"order": 8,
"value": "RUA DOIS"
},
{
"id": "C1H_NUM",
"order": 9,
"value": "SN"
},
{
"id": "C1H_CODPAI",
"order": 15,
"value": "000001"
},
{
"id": "C1H_UF",
"order": 17,
"value": "000027"
},
{
"id": "C1H_CODMUN",
"order": 19,
"value": "003293"
},
{
"id": "C1H_CPF",
"order": 27,
"value": "33915531707"
},
{
"id": "C1H_INDDES",
"order": 53,
"value": "2"
},
{
"id": "C1H_CPRB",
"order": 54,
"value": "0"
},
{
"id": "C1H_INDNIF",
"order": 61,
"value": "2"
}
],
"models": [
{
"id": "MODEL_C1I",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1I_FILIAL",
"order": 1
},
{
"id": "C1I_DTALT",
"order": 2
},
{
"id": "C1I_HRALT",
"order": 3
},
{
"id": "C1I_NRCAMP",
"order": 4
},
{
"id": "C1I_CTDANT",
"order": 6
}
]
},
{
"id": "MODEL_V3R",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3R_FILIAL",
"order": 1
},
{
"id": "V3R_ID",
"order": 2
},
{
"id": "V3R_CODIGO",
"order": 3
},
{
"id": "V3R_CPF",
"order": 4
},
{
"id": "V3R_NOME",
"order": 5
},
{
"id": "V3R_DESCDP",
"order": 8
},
{
"id": "V3R_CREDEP",
"order": 9
}
]
}
]
}
]
} |
API do Cadastro de Participantes - Método POSTNo método POST não deve ser passado uma PK no parâmetro e nem no body. Nota |
---|
theme | RDark |
---|
title | Remover chave |
---|
| "pk": "RCBNRyAwMSBDTElFTlRFLVRFU1RFLUFQSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=", |
Os campos de controle interno do TAF devem ser removidos do body, por exemplo o campo C1H_ID, pois são campos gravados internamente Nota |
---|
theme | RDark |
---|
title | Remover campo |
---|
| { "id": "C1H_ID", "order": 2, "value": "c4a89a27-3b86-db80-ce12-2bdf92ea8cc7" }, |
Exemplo de Envio Esperado Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do POST |
---|
| {
"id": "TAFA053",
"operation": 1,
"models": [
{
"id": "MODEL_C1H",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1H_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1H_CODPAR",
"order": 3,
"value": "INCLUSAO VIA POST 001"
},
{
"id": "C1H_PPES",
"order": 4,
"value": "1"
},
{
"id": "C1H_NOME",
"order": 5,
"value": "INCLUSAO VIA POST 001"
},
{
"id": "C1H_END",
"order": 8,
"value": "RUA DOIS"
},
{
"id": "C1H_NUM",
"order": 9,
"value": "SN"
},
{
"id": "C1H_CODPAI",
"order": 15,
"value": "000001"
},
{
"id": "C1H_UF",
"order": 17,
"value": "000027"
},
{
"id": "C1H_CODMUN",
"order": 19,
"value": "003293"
},
{
"id": "C1H_CPF",
"order": 27,
"value": "33915531707"
},
{
"id": "C1H_DTINCL",
"order": 30,
"value": "20240514"
},
{
"id": "C1H_INDDES",
"order": 53,
"value": "2"
},
{
"id": "C1H_CPRB",
"order": 54,
"value": "0"
},
{
"id": "C1H_INDNIF",
"order": 61,
"value": "2"
},
{
"id": "C1H_NEWCAD",
"order": 67,
"value": "1"
}
],
"models": [
{
"id": "MODEL_C1I",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1I_FILIAL",
"order": 1
},
{
"id": "C1I_DTALT",
"order": 2
},
{
"id": "C1I_HRALT",
"order": 3
},
{
"id": "C1I_NRCAMP",
"order": 4
},
{
"id": "C1I_CTDANT",
"order": 6
}
]
},
{
"id": "MODEL_V3R",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3R_FILIAL",
"order": 1
},
{
"id": "V3R_ID",
"order": 2
},
{
"id": "V3R_CODIGO",
"order": 3
},
{
"id": "V3R_CPF",
"order": 4
},
{
"id": "V3R_NOME",
"order": 5
},
{
"id": "V3R_DESCDP",
"order": 8
},
{
"id": "V3R_CREDEP",
"order": 9
}
]
}
]
}
]
} |
Exemplo de Resposta em Caso de SucessoEssa será a resposta logo após o POST. É devolvido apenas um GET do registro que foi incluído. Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do POST |
---|
| {
"id": "TAFA053",
"operation": 1,
"pk": "RCBNRyAwMiBEIE1HIDAyIElOQ0xVU0FPIFZJQSBQT1NUIDAwMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==",
"models": [
{
"id": "MODEL_C1H",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1H_FILIAL",
"order": 1,
"value": "D MG 02"
},
{
"id": "C1H_ID",
"order": 2,
"value": "9e694068-bbf0-6c07-e7cd-7b4fd2bbed7e"
},
{
"id": "C1H_CODPAR",
"order": 3,
"value": "INCLUSAO VIA POST 001"
},
{
"id": "C1H_PPES",
"order": 4,
"value": "1"
},
{
"id": "C1H_NOME",
"order": 5,
"value": "INCLUSAO VIA POST 001"
},
{
"id": "C1H_END",
"order": 8,
"value": "RUA DOIS"
},
{
"id": "C1H_NUM",
"order": 9,
"value": "SN"
},
{
"id": "C1H_CODPAI",
"order": 15,
"value": "000001"
},
{
"id": "C1H_UF",
"order": 17,
"value": "000027"
},
{
"id": "C1H_CODMUN",
"order": 19,
"value": "003293"
},
{
"id": "C1H_CPF",
"order": 27,
"value": "33915531707"
},
{
"id": "C1H_DTINCL",
"order": 30,
"value": "20240514"
},
{
"id": "C1H_INDDES",
"order": 53,
"value": "2"
},
{
"id": "C1H_CPRB",
"order": 54,
"value": "0"
},
{
"id": "C1H_INDNIF",
"order": 61,
"value": "2"
},
{
"id": "C1H_NEWCAD",
"order": 67,
"value": "1"
}
],
"models": [
{
"id": "MODEL_C1I",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1I_FILIAL",
"order": 1
},
{
"id": "C1I_DTALT",
"order": 2
},
{
"id": "C1I_HRALT",
"order": 3
},
{
"id": "C1I_NRCAMP",
"order": 4
},
{
"id": "C1I_CTDANT",
"order": 6
}
]
},
{
"id": "MODEL_V3R",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3R_FILIAL",
"order": 1
},
{
"id": "V3R_ID",
"order": 2
},
{
"id": "V3R_CODIGO",
"order": 3
},
{
"id": "V3R_CPF",
"order": 4
},
{
"id": "V3R_NOME",
"order": 5
},
{
"id": "V3R_DESCDP",
"order": 8
},
{
"id": "V3R_CREDEP",
"order": 9
}
]
}
]
}
]
} |
API do Cadastro de Participantes - Método PUT[pk] Nota |
---|
theme | RDark |
---|
title | Observação |
---|
| No método PUT deve ser passado um PK no parâmetro. Esta chave deve ser removida ao enviar um PUT "pk": "RCBNRyAwMSBJTkNMVVNBTyBWSUEgUE9TVCAwMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=", Os campos de controle interno do TAF devem ser removidos do body, por exemplo o campo C1H_ID, pois são campos gravados internamente |
Exemplo de Envio EsperadoNeste arquivo, o campo alteardo foi C1H_NOME Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do PUT |
---|
| {
"id": "TAFA053",
"operation": 1,
"models": [
{
"id": "MODEL_C1H",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1H_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1H_CODPAR",
"order": 3,
"value": "INCLUSAO VIA POST 001"
},
{
"id": "C1H_PPES",
"order": 4,
"value": "1"
},
{
"id": "C1H_NOME",
"order": 5,
"value": "ALTERACAO VIA PUT 001"
},
{
"id": "C1H_END",
"order": 8,
"value": "RUA DOIS"
},
{
"id": "C1H_NUM",
"order": 9,
"value": "SN"
},
{
"id": "C1H_CODPAI",
"order": 15,
"value": "000001"
},
{
"id": "C1H_UF",
"order": 17,
"value": "000027"
},
{
"id": "C1H_CODMUN",
"order": 19,
"value": "003293"
},
{
"id": "C1H_CPF",
"order": 27,
"value": "33915531707"
},
{
"id": "C1H_DTINCL",
"order": 30,
"value": "20240514"
},
{
"id": "C1H_INDDES",
"order": 53,
"value": "2"
},
{
"id": "C1H_CPRB",
"order": 54,
"value": "0"
},
{
"id": "C1H_INDNIF",
"order": 61,
"value": "2"
},
{
"id": "C1H_NEWCAD",
"order": 67,
"value": "1"
}
],
"models": [
{
"id": "MODEL_C1I",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1I_FILIAL",
"order": 1
},
{
"id": "C1I_DTALT",
"order": 2
},
{
"id": "C1I_HRALT",
"order": 3
},
{
"id": "C1I_NRCAMP",
"order": 4
},
{
"id": "C1I_CTDANT",
"order": 6
}
]
},
{
"id": "MODEL_V3R",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3R_FILIAL",
"order": 1
},
{
"id": "V3R_ID",
"order": 2
},
{
"id": "V3R_CODIGO",
"order": 3
},
{
"id": "V3R_CPF",
"order": 4
},
{
"id": "V3R_NOME",
"order": 5
},
{
"id": "V3R_DESCDP",
"order": 8
},
{
"id": "V3R_CREDEP",
"order": 9
}
]
}
]
}
]
} |
Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do PUT |
---|
| {
"id": "TAFA053",
"operation": 1,
"pk": "RCBNRyAwMSBJTkNMVVNBTyBWSUEgUE9TVCAwMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=",
"models": [
{
"id": "MODEL_C1H",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1H_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1H_ID",
"order": 2,
"value": "86754139-0a03-d989-71f7-6d16b6120f55"
},
{
"id": "C1H_CODPAR",
"order": 3,
"value": "INCLUSAO VIA POST 001"
},
{
"id": "C1H_PPES",
"order": 4,
"value": "1"
},
{
"id": "C1H_NOME",
"order": 5,
"value": "ALTERACAO VIA PUT 001"
},
{
"id": "C1H_END",
"order": 8,
"value": "RUA DOIS"
},
{
"id": "C1H_NUM",
"order": 9,
"value": "SN"
},
{
"id": "C1H_CODPAI",
"order": 15,
"value": "000001"
},
{
"id": "C1H_UF",
"order": 17,
"value": "000027"
},
{
"id": "C1H_CODMUN",
"order": 19,
"value": "003293"
},
{
"id": "C1H_CPF",
"order": 27,
"value": "33915531707"
},
{
"id": "C1H_DTINCL",
"order": 30,
"value": "20240514"
},
{
"id": "C1H_INDDES",
"order": 53,
"value": "2"
},
{
"id": "C1H_CPRB",
"order": 54,
"value": "0"
},
{
"id": "C1H_INDNIF",
"order": 61,
"value": "2"
},
{
"id": "C1H_NEWCAD",
"order": 67,
"value": "1"
}
],
"models": [
{
"id": "MODEL_C1I",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1I_FILIAL",
"order": 1
},
{
"id": "C1I_DTALT",
"order": 2
},
{
"id": "C1I_HRALT",
"order": 3
},
{
"id": "C1I_NRCAMP",
"order": 4
},
{
"id": "C1I_CTDANT",
"order": 6
}
]
},
{
"id": "MODEL_V3R",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3R_FILIAL",
"order": 1
},
{
"id": "V3R_ID",
"order": 2
},
{
"id": "V3R_CODIGO",
"order": 3
},
{
"id": "V3R_CPF",
"order": 4
},
{
"id": "V3R_NOME",
"order": 5
},
{
"id": "V3R_DESCDP",
"order": 8
},
{
"id": "V3R_CREDEP",
"order": 9
}
]
}
]
}
]
} |
API do Cadastro de Participantes - Método DELETE Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do DELETE |
---|
| true | 05.API TAFA057- CADASTRO DE PRODUTOS
API do Cadastro de Produtos - Método GETExemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do GET |
---|
| {
"total": 8,
"count": 8,
"startindex": 1,
"resources": [
{
"id": "TAFA057",
"operation": 1,
"pk": "RCBNRyAwMSAwMDAwMDAwMDAwMDAwMDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=",
"models": [
{
"id": "MODEL_C1L",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1L_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1L_ID",
"order": 2,
"value": "2eb0ea11-fce9-2162-4d87-6703d2f0a82b"
},
{
"id": "C1L_CODIGO",
"order": 3,
"value": "000000000000002"
},
{
"id": "C1L_DESCRI",
"order": 4,
"value": "SERVIÇO - PESSOA FISICA"
},
{
"id": "C1L_UM",
"order": 6,
"value": "000084"
},
{
"id": "C1L_TIPITE",
"order": 8,
"value": "000010"
},
{
"id": "C1L_CODGEN",
"order": 12,
"value": "000102"
},
{
"id": "C1L_CODSER",
"order": 14,
"value": "000045"
},
{
"id": "C1L_ORIMER",
"order": 21,
"value": "000001"
},
{
"id": "C1L_ALQICM",
"order": 23,
"value": "18.00"
},
{
"id": "C1L_DTINCL",
"order": 26,
"value": "20221019"
},
{
"id": "C1L_SRVMUN",
"order": 29,
"value": "1402"
},
{
"id": "C1L_IDTSER",
"order": 48,
"value": "000016"
}
],
"models": [
{
"id": "MODEL_C1M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1M_FILIAL",
"order": 1
},
{
"id": "C1M_DTALT",
"order": 2
},
{
"id": "C1M_HRALT",
"order": 3
},
{
"id": "C1M_NRCAMP",
"order": 4
},
{
"id": "C1M_CTDANT",
"order": 6
}
]
}
]
}
]
}
]
} |
API de Cadastro de Produtos - Método GET[pk]Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do GET por PK |
---|
| {
"id": "TAFA057",
"operation": 1,
"pk": "RCBNRyAwMSBQUkQxMjM0NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=",
"models": [
{
"id": "MODEL_C1L",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1L_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1L_ID",
"order": 2,
"value": "c8efa207-e3f3-452b-1328-6d4aecaebf20"
},
{
"id": "C1L_CODIGO",
"order": 3,
"value": "PRD12345"
},
{
"id": "C1L_DESCRI",
"order": 4,
"value": "PRD-VIA-POST"
},
{
"id": "C1L_UM",
"order": 6,
"value": "000084"
},
{
"id": "C1L_TIPITE",
"order": 8,
"value": "000010"
},
{
"id": "C1L_CODGEN",
"order": 12,
"value": "000102"
},
{
"id": "C1L_CODSER",
"order": 14,
"value": "000045"
},
{
"id": "C1L_ORIMER",
"order": 21,
"value": "000001"
},
{
"id": "C1L_ALQICM",
"order": 23,
"value": "18.00"
},
{
"id": "C1L_DTINCL",
"order": 26,
"value": "20221019"
},
{
"id": "C1L_SRVMUN",
"order": 29,
"value": "1402"
},
{
"id": "C1L_IDTSER",
"order": 48,
"value": "000016"
}
],
"models": [
{
"id": "MODEL_C1M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1M_FILIAL",
"order": 1
},
{
"id": "C1M_DTALT",
"order": 2
},
{
"id": "C1M_HRALT",
"order": 3
},
{
"id": "C1M_NRCAMP",
"order": 4
},
{
"id": "C1M_CTDANT",
"order": 6
}
]
}
]
}
]
} |
API do Cadastro de Produtos - Método POST Nota |
---|
| O cadastro de item segue a mesma lógica do cadastro de participantes no método POST. A chave primária (PK) e os campos de controle interno do TAF, como o campo C1L_ID, não são enviados no corpo (body) da requisição. |
Exemplo de Envio Esperado Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do método POST |
---|
| {
"id": "TAFA057",
"operation": 1,
"models": [
{
"id": "MODEL_C1L",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1L_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1L_CODIGO",
"order": 3,
"value": "PRD12345"
},
{
"id": "C1L_DESCRI",
"order": 4,
"value": "PRD-VIA-POST"
},
{
"id": "C1L_UM",
"order": 6,
"value": "000084"
},
{
"id": "C1L_TIPITE",
"order": 8,
"value": "000010"
},
{
"id": "C1L_CODGEN",
"order": 12,
"value": "000102"
},
{
"id": "C1L_CODSER",
"order": 14,
"value": "000045"
},
{
"id": "C1L_ORIMER",
"order": 21,
"value": "000001"
},
{
"id": "C1L_ALQICM",
"order": 23,
"value": "18.00"
},
{
"id": "C1L_DTINCL",
"order": 26,
"value": "20221019"
},
{
"id": "C1L_SRVMUN",
"order": 29,
"value": "1402"
},
{
"id": "C1L_IDTSER",
"order": 48,
"value": "000016"
}
],
"models": [
{
"id": "MODEL_C1M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1M_FILIAL",
"order": 1
},
{
"id": "C1M_DTALT",
"order": 2
},
{
"id": "C1M_HRALT",
"order": 3
},
{
"id": "C1M_NRCAMP",
"order": 4
},
{
"id": "C1M_CTDANT",
"order": 6
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "C1M_FILIAL",
"value": "D MG 01"
},
{
"id": "C1M_DTALT",
"value": "20240520"
},
{
"id": "C1M_HRALT",
"value": "1313"
},
{
"id": "C1M_NRCAMP",
"value": "000001"
},
{
"id": "C1M_CTDANT",
"value": "PRD12345"
}
]
}
]
}
]
}
]
} |
Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do POST |
---|
| {
"id": "TAFA057",
"operation": 1,
"pk": "RCBNRyAwMiBEIE1HIDAyIFBSRDEyMzQ1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==",
"models": [
{
"id": "MODEL_C1L",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1L_FILIAL",
"order": 1,
"value": "D MG 02"
},
{
"id": "C1L_ID",
"order": 2,
"value": "20c06f27-8012-78f4-4185-19a1f86ef300"
},
{
"id": "C1L_CODIGO",
"order": 3,
"value": "PRD123456"
},
{
"id": "C1L_DESCRI",
"order": 4,
"value": "PRD-VIA-POST"
},
{
"id": "C1L_UM",
"order": 6,
"value": "000084"
},
{
"id": "C1L_TIPITE",
"order": 8,
"value": "000010"
},
{
"id": "C1L_CODGEN",
"order": 12,
"value": "000102"
},
{
"id": "C1L_CODSER",
"order": 14,
"value": "000045"
},
{
"id": "C1L_ORIMER",
"order": 21,
"value": "000001"
},
{
"id": "C1L_ALQICM",
"order": 23,
"value": "18.00"
},
{
"id": "C1L_DTINCL",
"order": 26,
"value": "20221019"
},
{
"id": "C1L_SRVMUN",
"order": 29,
"value": "1402"
},
{
"id": "C1L_IDTSER",
"order": 48,
"value": "000016"
}
],
"models": [
{
"id": "MODEL_C1M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1M_FILIAL",
"order": 1
},
{
"id": "C1M_DTALT",
"order": 2
},
{
"id": "C1M_HRALT",
"order": 3
},
{
"id": "C1M_NRCAMP",
"order": 4
},
{
"id": "C1M_CTDANT",
"order": 6
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "C1M_FILIAL",
"value": "D MG 02"
},
{
"id": "C1M_DTALT",
"value": "20240520"
},
{
"id": "C1M_HRALT",
"value": "1313"
},
{
"id": "C1M_NRCAMP",
"value": "000001"
},
{
"id": "C1M_CTDANT",
"value": "PRD12345"
}
]
}
]
}
]
}
]
} |
API do Cadastro de Produtos - Método PUT Nota |
---|
| No método PUT deve ser passado um PK no parâmetro, também mantemos a mesma regra quanto aos campos de controle interno do TAF. Esta chave deve ser removida ao enviar um PUT "pk": "RCBNRyAwMSBQUkQxMjM0NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=", |
Exemplo de Envio Esperado Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do PUT |
---|
| Neste arquivo, o campo alteardo foi C1L_DESCRI
{
"id": "TAFA057",
"operation": 1,
"models": [
{
"id": "MODEL_C1L",
"modeltype": "FIELDS",
"fields": [
{
"id": "C1L_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "C1L_CODIGO",
"order": 3,
"value": "PRD12345"
},
{
"id": "C1L_DESCRI",
"order": 4,
"value": "PRD-ALTERADO-PUT"
},
{
"id": "C1L_UM",
"order": 6,
"value": "000084"
},
{
"id": "C1L_TIPITE",
"order": 8,
"value": "000010"
},
{
"id": "C1L_CODGEN",
"order": 12,
"value": "000102"
},
{
"id": "C1L_CODSER",
"order": 14,
"value": "000045"
},
{
"id": "C1L_ORIMER",
"order": 21,
"value": "000001"
},
{
"id": "C1L_ALQICM",
"order": 23,
"value": "18.00"
},
{
"id": "C1L_DTINCL",
"order": 26,
"value": "20221019"
},
{
"id": "C1L_SRVMUN",
"order": 29,
"value": "1402"
},
{
"id": "C1L_IDTSER",
"order": 48,
"value": "000016"
}
],
"models": [
{
"id": "MODEL_C1M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "C1M_FILIAL",
"order": 1
},
{
"id": "C1M_DTALT",
"order": 2
},
{
"id": "C1M_HRALT",
"order": 3
},
{
"id": "C1M_NRCAMP",
"order": 4
},
{
"id": "C1M_CTDANT",
"order": 6
}
]
}
]
}
]
} |
API de Cadastro de Produtos - Método DELETE Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do DELETE |
---|
| true | 06.API TAFA448 - CADASTRO DE FATURA/RECIBO Dica |
---|
| Ao realizar um POST, devem ser respeitados os campos de ID recebidos no método GET. Por exemplo, considere os seguintes campos: C1H_UF: Enviar o código 000027 vinculado à tabela C09 (unidade federativa), e não SP. C1H_CODMUN: Enviar o código 003293 vinculado à tabela C07 (Municípios do IBGE), e não AMERICO DE CAMPOS. C1L_UM: Enviar o código presente na tabela de unidade de medida, e não UN. Certifique-se de que os dados enviados no POST correspondam corretamente aos identificadores recebidos no GET, evitando o uso de valores literais inadequados. |
API do Cadastro de Fatura/Recibo - Método GETExemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de reposta do GET |
---|
| {
"id": "TAFA448",
"operation": 1,
"pk": "RCBNRyAwMSBEIE1HIDAxIDEgICAgMjAyNDA1NTUgICAgICAgMjBkZjFjYTYtMmNlNi0zYjI4LTM5ZmItMmY1M2E3NTRlZjU0MjAyMzEyMTQ=",
"models": [
{
"id": "MODEL_LEM",
"modeltype": "FIELDS",
"fields": [
{
"id": "LEM_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "LEM_ID",
"order": 2,
"value": "b33a7fc4-5590-7f53-f06b-04635ea69c2e"
},
{
"id": "LEM_NUMERO",
"order": 3,
"value": "20240555"
},
{
"id": "LEM_NATTIT",
"order": 4,
"value": "0"
},
{
"id": "LEM_PREFIX",
"order": 5,
"value": "1"
},
{
"id": "LEM_DTEMIS",
"order": 6,
"value": "20231214"
},
{
"id": "LEM_IDPART",
"order": 7,
"value": "20df1ca6-2ce6-3b28-39fb-2f53a754ef54"
},
{
"id": "LEM_VLBRUT",
"order": 10,
"value": "15000.00"
},
{
"id": "LEM_TPRECF",
"order": 37,
"value": "1"
},
{
"id": "LEM_DTCONT",
"order": 52,
"value": "20231214"
}
],
"models": [
{
"id": "MODEL_T5M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5M_FILIAL",
"order": 1
},
{
"id": "T5M_IDTSER",
"order": 2
},
{
"id": "T5M_VLRETS",
"order": 4
},
{
"id": "T5M_VLRETP",
"order": 5
},
{
"id": "T5M_VLSV15",
"order": 6
},
{
"id": "T5M_VLSV20",
"order": 7
},
{
"id": "T5M_VLSV25",
"order": 8
},
{
"id": "T5M_VLADIC",
"order": 9
},
{
"id": "T5M_VLADNE",
"order": 10
},
{
"id": "T5M_BSINSS",
"order": 11
},
{
"id": "T5M_VLINSS",
"order": 12
},
{
"id": "T5M_TPREPA",
"order": 13
},
{
"id": "T5M_DESCRI",
"order": 14
},
{
"id": "T5M_VLBRUT",
"order": 15
},
{
"id": "T5M_VLREAP",
"order": 16
}
]
},
{
"id": "MODEL_T51",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T51_FILIAL",
"order": 1
},
{
"id": "T51_NUMPAR",
"order": 2
},
{
"id": "T51_VLRPAR",
"order": 3
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "A"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 2,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "B"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 3,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "C"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
}
]
},
{
"id": "MODEL_T9E",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T9E_FILIAL",
"order": 1
},
{
"id": "T9E_NUMPRO",
"order": 2
},
{
"id": "T9E_TPPROC",
"order": 4
},
{
"id": "T9E_IDSUSP",
"order": 6
},
{
"id": "T9E_CODTRI",
"order": 7
},
{
"id": "T9E_VALSUS",
"order": 9
},
{
"id": "T9E_CNATRE",
"order": 10
},
{
"id": "T9E_BSSUSP",
"order": 13
},
{
"id": "T9E_VLRANO",
"order": 14
},
{
"id": "T9E_VLRANA",
"order": 15
}
]
},
{
"id": "MODEL_V3S",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3S_FILIAL",
"order": 1
},
{
"id": "V3S_ID",
"order": 2
},
{
"id": "V3S_IDPART",
"order": 3
},
{
"id": "V3S_NUMFAT",
"order": 4
},
{
"id": "V3S_IDNATR",
"order": 6
},
{
"id": "V3S_DECTER",
"order": 8
},
{
"id": "V3S_VALOR",
"order": 9
},
{
"id": "V3S_IDPROC",
"order": 10
},
{
"id": "V3S_IFCISC",
"order": 15
},
{
"id": "V3S_COMPFP",
"order": 16
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3S_FILIAL",
"value": "D MG 01"
},
{
"id": "V3S_ID",
"value": "b33a7fc4-5590-7f53-f06b-04635ea69c2e"
},
{
"id": "V3S_IDPART",
"value": "20df1ca6-2ce6-3b28-39fb-2f53a754ef54"
},
{
"id": "V3S_NUMFAT",
"value": "20240555"
},
{
"id": "V3S_IDNATR",
"value": "000106"
},
{
"id": "V3S_DECTER",
"value": "2"
},
{
"id": "V3S_VALOR",
"value": "15000.00"
}
],
"models": [
{
"id": "MODEL_V47",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V47_FILIAL",
"order": 1
},
{
"id": "V47_IDPART",
"order": 2
},
{
"id": "V47_NUMFAT",
"order": 3
},
{
"id": "V47_IDNATR",
"order": 4
},
{
"id": "V47_IDTRIB",
"order": 6
},
{
"id": "V47_DECTER",
"order": 7
},
{
"id": "V47_BASECA",
"order": 9
},
{
"id": "V47_ALIQ",
"order": 10
},
{
"id": "V47_VLTRIB",
"order": 11
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V47_FILIAL",
"value": "D MG 01"
},
{
"id": "V47_IDPART",
"value": "20df1ca6-2ce6-3b28-39fb-2f53a754ef54"
},
{
"id": "V47_NUMFAT",
"value": "20240555"
},
{
"id": "V47_IDNATR",
"value": "000106"
},
{
"id": "V47_IDTRIB",
"value": "000012"
},
{
"id": "V47_DECTER",
"value": "2"
},
{
"id": "V47_BASECA",
"value": "15000.00"
},
{
"id": "V47_VLTRIB",
"value": "300.00"
}
],
"models": [
{
"id": "MODEL_V4L",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4L_FILIAL",
"order": 1
},
{
"id": "V4L_ID",
"order": 2
},
{
"id": "V4L_IDPART",
"order": 3
},
{
"id": "V4L_NUMFAT",
"order": 4
},
{
"id": "V4L_TPDEDU",
"order": 5
},
{
"id": "V4L_VLRDED",
"order": 6
},
{
"id": "V4L_VLDEDS",
"order": 7
},
{
"id": "V4L_NUMPRE",
"order": 8
},
{
"id": "V4L_DECTER",
"order": 9
},
{
"id": "V4L_IENTID",
"order": 10
},
{
"id": "V4L_VLFPRE",
"order": 11
}
]
},
{
"id": "MODEL_V4M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4M_FILIAL",
"order": 1
},
{
"id": "V4M_ID",
"order": 2
},
{
"id": "V4M_IDPART",
"order": 3
},
{
"id": "V4M_NUMFAT",
"order": 4
},
{
"id": "V4M_IDTPIS",
"order": 5
},
{
"id": "V4M_VLRISE",
"order": 8
},
{
"id": "V4M_DRENDI",
"order": 9
},
{
"id": "V4M_DECTER",
"order": 10
}
]
}
]
}
]
}
]
}
]
}
]
}
]
} |
API do Cadastro de Fatura/Recibo - Método GET [id]Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do GET por PK |
---|
| {
"id": "TAFA448",
"operation": 1,
"pk": "RCBNRyAwMSAxICAgIDQwMjAwMDAwMiAgICAgIDFiNjAxMjQzLTBjZjMtYjg2ZS0xZDg2LTJhODYzZDA0MzI1ZjIwMjMxMjE0",
"models": [
{
"id": "MODEL_LEM",
"modeltype": "FIELDS",
"fields": [
{
"id": "LEM_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "LEM_ID",
"order": 2,
"value": "0131747c-8bd1-eea3-748f-5008a18a6848"
},
{
"id": "LEM_NUMERO",
"order": 3,
"value": "402000002"
},
{
"id": "LEM_NATTIT",
"order": 4,
"value": "0"
},
{
"id": "LEM_PREFIX",
"order": 5,
"value": "1"
},
{
"id": "LEM_DTEMIS",
"order": 6,
"value": "20231214"
},
{
"id": "LEM_IDPART",
"order": 7,
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "LEM_VLBRUT",
"order": 10,
"value": "15000.00"
},
{
"id": "LEM_DOCORI",
"order": 15,
"value": "ee80cf78-452f-c850-12e7-8140b6ce66cd"
},
{
"id": "LEM_TPRECF",
"order": 37,
"value": "1"
},
{
"id": "LEM_DTCONT",
"order": 52,
"value": "20231214"
}
],
"models": [
{
"id": "MODEL_T5M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5M_FILIAL",
"order": 1
},
{
"id": "T5M_IDTSER",
"order": 2
},
{
"id": "T5M_VLRETS",
"order": 4
},
{
"id": "T5M_VLRETP",
"order": 5
},
{
"id": "T5M_VLSV15",
"order": 6
},
{
"id": "T5M_VLSV20",
"order": 7
},
{
"id": "T5M_VLSV25",
"order": 8
},
{
"id": "T5M_VLADIC",
"order": 9
},
{
"id": "T5M_VLADNE",
"order": 10
},
{
"id": "T5M_BSINSS",
"order": 11
},
{
"id": "T5M_VLINSS",
"order": 12
},
{
"id": "T5M_TPREPA",
"order": 13
},
{
"id": "T5M_DESCRI",
"order": 14
},
{
"id": "T5M_VLBRUT",
"order": 15
},
{
"id": "T5M_VLREAP",
"order": 16
}
]
},
{
"id": "MODEL_T51",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T51_FILIAL",
"order": 1
},
{
"id": "T51_NUMPAR",
"order": 2
},
{
"id": "T51_VLRPAR",
"order": 3
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "A"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 2,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "B"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 3,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "C"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
}
]
},
{
"id": "MODEL_T9E",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T9E_FILIAL",
"order": 1
},
{
"id": "T9E_NUMPRO",
"order": 2
},
{
"id": "T9E_TPPROC",
"order": 4
},
{
"id": "T9E_IDSUSP",
"order": 6
},
{
"id": "T9E_CODTRI",
"order": 7
},
{
"id": "T9E_VALSUS",
"order": 9
},
{
"id": "T9E_CNATRE",
"order": 10
},
{
"id": "T9E_BSSUSP",
"order": 13
},
{
"id": "T9E_VLRANO",
"order": 14
},
{
"id": "T9E_VLRANA",
"order": 15
}
]
},
{
"id": "MODEL_V3S",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3S_FILIAL",
"order": 1
},
{
"id": "V3S_ID",
"order": 2
},
{
"id": "V3S_IDPART",
"order": 3
},
{
"id": "V3S_NUMFAT",
"order": 4
},
{
"id": "V3S_IDNATR",
"order": 6
},
{
"id": "V3S_DECTER",
"order": 8
},
{
"id": "V3S_VALOR",
"order": 9
},
{
"id": "V3S_IDPROC",
"order": 10
},
{
"id": "V3S_IFCISC",
"order": 15
},
{
"id": "V3S_COMPFP",
"order": 16
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3S_FILIAL",
"value": "D MG 01"
},
{
"id": "V3S_ID",
"value": "0131747c-8bd1-eea3-748f-5008a18a6848"
},
{
"id": "V3S_IDPART",
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "V3S_NUMFAT",
"value": "402000002"
},
{
"id": "V3S_IDNATR",
"value": "000106"
},
{
"id": "V3S_DECTER",
"value": "2"
},
{
"id": "V3S_VALOR",
"value": "15000.00"
}
],
"models": [
{
"id": "MODEL_V47",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V47_FILIAL",
"order": 1
},
{
"id": "V47_IDPART",
"order": 2
},
{
"id": "V47_NUMFAT",
"order": 3
},
{
"id": "V47_IDNATR",
"order": 4
},
{
"id": "V47_IDTRIB",
"order": 6
},
{
"id": "V47_DECTER",
"order": 7
},
{
"id": "V47_BASECA",
"order": 9
},
{
"id": "V47_ALIQ",
"order": 10
},
{
"id": "V47_VLTRIB",
"order": 11
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V47_FILIAL",
"value": "D MG 01"
},
{
"id": "V47_IDPART",
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "V47_NUMFAT",
"value": "402000002"
},
{
"id": "V47_IDNATR",
"value": "000106"
},
{
"id": "V47_IDTRIB",
"value": "000012"
},
{
"id": "V47_DECTER",
"value": "2"
},
{
"id": "V47_BASECA",
"value": "15000.00"
},
{
"id": "V47_VLTRIB",
"value": "300.00"
}
],
"models": [
{
"id": "MODEL_V4L",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4L_FILIAL",
"order": 1
},
{
"id": "V4L_ID",
"order": 2
},
{
"id": "V4L_IDPART",
"order": 3
},
{
"id": "V4L_NUMFAT",
"order": 4
},
{
"id": "V4L_TPDEDU",
"order": 5
},
{
"id": "V4L_VLRDED",
"order": 6
},
{
"id": "V4L_VLDEDS",
"order": 7
},
{
"id": "V4L_NUMPRE",
"order": 8
},
{
"id": "V4L_DECTER",
"order": 9
},
{
"id": "V4L_IENTID",
"order": 10
},
{
"id": "V4L_VLFPRE",
"order": 11
}
]
},
{
"id": "MODEL_V4M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4M_FILIAL",
"order": 1
},
{
"id": "V4M_ID",
"order": 2
},
{
"id": "V4M_IDPART",
"order": 3
},
{
"id": "V4M_NUMFAT",
"order": 4
},
{
"id": "V4M_IDTPIS",
"order": 5
},
{
"id": "V4M_VLRISE",
"order": 8
},
{
"id": "V4M_DRENDI",
"order": 9
},
{
"id": "V4M_DECTER",
"order": 10
}
]
}
]
}
]
}
]
}
]
}
]
}
]
} |
API do Cadastro de Fatura/Recibo - Método POST Nota |
---|
| Neste endpoint, há uma particularidade a ser observada. Como o campo LEM_PARTIC é do tipo virtual, ele deve ser incluído no corpo da requisição com o código do fornecedor. Para isso, basta substituir o campo LEM_IDPART pelos dados do LEM_PARTIC. Ao invés de enviarmos a seguinte estruura: { "id": "LEM_IDPART", "order": 7, "value": "1b601243-0cf3-b86e-1d86-2a863d04325f" }, Enviaremos assim: { "id": "LEM_PARTIC", "order": 7, "value": "FF0000201" } Outro ponto importante é que o campo de ID do participante se resvolve internamente para os submodelos, como exemplo o campo V47_IDPART, podendo neste caso ser enviado o campo ID para este submodelo. |
Exemplo de Envio Esperado Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do POST |
---|
| {
"id": "TAFA448",
"operation": 1,
"models": [
{
"id": "MODEL_LEM",
"modeltype": "FIELDS",
"fields": [
{
"id": "LEM_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "LEM_NUMERO",
"order": 3,
"value": "20240555"
},
{
"id": "LEM_NATTIT",
"order": 4,
"value": "0"
},
{
"id": "LEM_PREFIX",
"order": 5,
"value": "1"
},
{
"id": "LEM_DTEMIS",
"order": 6,
"value": "20231214"
},
{
"id": "LEM_PARTIC",
"order": 7,
"value": "FF0001101"
},
{
"id": "LEM_VLBRUT",
"order": 10,
"value": "15000.00"
},
{
"id": "LEM_TPRECF",
"order": 37,
"value": "1"
},
{
"id": "LEM_DTCONT",
"order": 52,
"value": "20231214"
}
],
"models": [
{
"id": "MODEL_T5M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5M_FILIAL",
"order": 1
},
{
"id": "T5M_IDTSER",
"order": 2
},
{
"id": "T5M_VLRETS",
"order": 4
},
{
"id": "T5M_VLRETP",
"order": 5
},
{
"id": "T5M_VLSV15",
"order": 6
},
{
"id": "T5M_VLSV20",
"order": 7
},
{
"id": "T5M_VLSV25",
"order": 8
},
{
"id": "T5M_VLADIC",
"order": 9
},
{
"id": "T5M_VLADNE",
"order": 10
},
{
"id": "T5M_BSINSS",
"order": 11
},
{
"id": "T5M_VLINSS",
"order": 12
},
{
"id": "T5M_TPREPA",
"order": 13
},
{
"id": "T5M_DESCRI",
"order": 14
},
{
"id": "T5M_VLBRUT",
"order": 15
},
{
"id": "T5M_VLREAP",
"order": 16
}
]
},
{
"id": "MODEL_T51",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T51_FILIAL",
"order": 1
},
{
"id": "T51_NUMPAR",
"order": 2
},
{
"id": "T51_VLRPAR",
"order": 3
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "A"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 2,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "B"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 3,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "C"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
}
]
},
{
"id": "MODEL_T9E",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T9E_FILIAL",
"order": 1
},
{
"id": "T9E_NUMPRO",
"order": 2
},
{
"id": "T9E_TPPROC",
"order": 4
},
{
"id": "T9E_IDSUSP",
"order": 6
},
{
"id": "T9E_CODTRI",
"order": 7
},
{
"id": "T9E_VALSUS",
"order": 9
},
{
"id": "T9E_CNATRE",
"order": 10
},
{
"id": "T9E_BSSUSP",
"order": 13
},
{
"id": "T9E_VLRANO",
"order": 14
},
{
"id": "T9E_VLRANA",
"order": 15
}
]
},
{
"id": "MODEL_V3S",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3S_FILIAL",
"order": 1
},
{
"id": "V3S_ID",
"order": 2
},
{
"id": "V3S_IDPART",
"order": 3
},
{
"id": "V3S_NUMFAT",
"order": 4
},
{
"id": "V3S_IDNATR",
"order": 6
},
{
"id": "V3S_DECTER",
"order": 8
},
{
"id": "V3S_VALOR",
"order": 9
},
{
"id": "V3S_IDPROC",
"order": 10
},
{
"id": "V3S_IFCISC",
"order": 15
},
{
"id": "V3S_COMPFP",
"order": 16
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3S_FILIAL",
"value": "D MG 01"
},
{
"id": "V3S_ID",
"value": "0131747c-8bd1-eea3-748f-5008a18a6848"
},
{
"id": "V3S_IDPART",
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "V3S_NUMFAT",
"value": "402000002"
},
{
"id": "V3S_IDNATR",
"value": "000106"
},
{
"id": "V3S_DECTER",
"value": "2"
},
{
"id": "V3S_VALOR",
"value": "15000.00"
}
],
"models": [
{
"id": "MODEL_V47",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V47_FILIAL",
"order": 1
},
{
"id": "V47_IDPART",
"order": 2
},
{
"id": "V47_NUMFAT",
"order": 3
},
{
"id": "V47_IDNATR",
"order": 4
},
{
"id": "V47_IDTRIB",
"order": 6
},
{
"id": "V47_DECTER",
"order": 7
},
{
"id": "V47_BASECA",
"order": 9
},
{
"id": "V47_ALIQ",
"order": 10
},
{
"id": "V47_VLTRIB",
"order": 11
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V47_FILIAL",
"value": "D MG 01"
},
{
"id": "V47_IDPART",
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "V47_NUMFAT",
"value": "402000002"
},
{
"id": "V47_IDNATR",
"value": "000106"
},
{
"id": "V47_IDTRIB",
"value": "000012"
},
{
"id": "V47_DECTER",
"value": "2"
},
{
"id": "V47_BASECA",
"value": "15000.00"
},
{
"id": "V47_VLTRIB",
"value": "300.00"
}
],
"models": [
{
"id": "MODEL_V4L",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4L_FILIAL",
"order": 1
},
{
"id": "V4L_ID",
"order": 2
},
{
"id": "V4L_IDPART",
"order": 3
},
{
"id": "V4L_NUMFAT",
"order": 4
},
{
"id": "V4L_TPDEDU",
"order": 5
},
{
"id": "V4L_VLRDED",
"order": 6
},
{
"id": "V4L_VLDEDS",
"order": 7
},
{
"id": "V4L_NUMPRE",
"order": 8
},
{
"id": "V4L_DECTER",
"order": 9
},
{
"id": "V4L_IENTID",
"order": 10
},
{
"id": "V4L_VLFPRE",
"order": 11
}
]
},
{
"id": "MODEL_V4M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4M_FILIAL",
"order": 1
},
{
"id": "V4M_ID",
"order": 2
},
{
"id": "V4M_IDPART",
"order": 3
},
{
"id": "V4M_NUMFAT",
"order": 4
},
{
"id": "V4M_IDTPIS",
"order": 5
},
{
"id": "V4M_VLRISE",
"order": 8
},
{
"id": "V4M_DRENDI",
"order": 9
},
{
"id": "V4M_DECTER",
"order": 10
}
]
}
]
}
]
}
]
}
]
}
]
}
]
} |
Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do POST |
---|
| {
"id": "TAFA448",
"operation": 1,
"models": [
{
"id": "MODEL_LEM",
"modeltype": "FIELDS",
"fields": [
{
"id": "LEM_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "LEM_NUMERO",
"order": 3,
"value": "20240555"
},
{
"id": "LEM_NATTIT",
"order": 4,
"value": "0"
},
{
"id": "LEM_PREFIX",
"order": 5,
"value": "12345"
},
{
"id": "LEM_DTEMIS",
"order": 6,
"value": "20231214"
},
{
"id": "LEM_PARTIC",
"order": 7,
"value": "FF0000201"
},
{
"id": "LEM_VLBRUT",
"order": 10,
"value": "15000.00"
},
{
"id": "LEM_DOCORI",
"order": 15,
"value": "ee80cf78-452f-c850-12e7-8140b6ce66cd"
},
{
"id": "LEM_TPRECF",
"order": 37,
"value": "1"
},
{
"id": "LEM_DTCONT",
"order": 52,
"value": "20231214"
}
],
"models": [
{
"id": "MODEL_T5M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5M_FILIAL",
"order": 1
},
{
"id": "T5M_IDTSER",
"order": 2
},
{
"id": "T5M_VLRETS",
"order": 4
},
{
"id": "T5M_VLRETP",
"order": 5
},
{
"id": "T5M_VLSV15",
"order": 6
},
{
"id": "T5M_VLSV20",
"order": 7
},
{
"id": "T5M_VLSV25",
"order": 8
},
{
"id": "T5M_VLADIC",
"order": 9
},
{
"id": "T5M_VLADNE",
"order": 10
},
{
"id": "T5M_BSINSS",
"order": 11
},
{
"id": "T5M_VLINSS",
"order": 12
},
{
"id": "T5M_TPREPA",
"order": 13
},
{
"id": "T5M_DESCRI",
"order": 14
},
{
"id": "T5M_VLBRUT",
"order": 15
},
{
"id": "T5M_VLREAP",
"order": 16
}
]
},
{
"id": "MODEL_T51",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T51_FILIAL",
"order": 1
},
{
"id": "T51_NUMPAR",
"order": 2
},
{
"id": "T51_VLRPAR",
"order": 3
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "A"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 2,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "B"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 3,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "C"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
}
]
},
{
"id": "MODEL_T9E",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T9E_FILIAL",
"order": 1
},
{
"id": "T9E_NUMPRO",
"order": 2
},
{
"id": "T9E_TPPROC",
"order": 4
},
{
"id": "T9E_IDSUSP",
"order": 6
},
{
"id": "T9E_CODTRI",
"order": 7
},
{
"id": "T9E_VALSUS",
"order": 9
},
{
"id": "T9E_CNATRE",
"order": 10
},
{
"id": "T9E_BSSUSP",
"order": 13
},
{
"id": "T9E_VLRANO",
"order": 14
},
{
"id": "T9E_VLRANA",
"order": 15
}
]
},
{
"id": "MODEL_V3S",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3S_FILIAL",
"order": 1
},
{
"id": "V3S_ID",
"order": 2
},
{
"id": "V3S_IDPART",
"order": 3
},
{
"id": "V3S_NUMFAT",
"order": 4
},
{
"id": "V3S_IDNATR",
"order": 6
},
{
"id": "V3S_DECTER",
"order": 8
},
{
"id": "V3S_VALOR",
"order": 9
},
{
"id": "V3S_IDPROC",
"order": 10
},
{
"id": "V3S_IFCISC",
"order": 15
},
{
"id": "V3S_COMPFP",
"order": 16
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3S_FILIAL",
"value": "D MG 01"
},
{
"id": "V3S_ID",
"value": "0131747c-8bd1-eea3-748f-5008a18a6848"
},
{
"id": "V3S_IDPART",
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "V3S_NUMFAT",
"value": "402000002"
},
{
"id": "V3S_IDNATR",
"value": "000106"
},
{
"id": "V3S_DECTER",
"value": "2"
},
{
"id": "V3S_VALOR",
"value": "15000.00"
}
],
"models": [
{
"id": "MODEL_V47",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V47_FILIAL",
"order": 1
},
{
"id": "V47_IDPART",
"order": 2
},
{
"id": "V47_NUMFAT",
"order": 3
},
{
"id": "V47_IDNATR",
"order": 4
},
{
"id": "V47_IDTRIB",
"order": 6
},
{
"id": "V47_DECTER",
"order": 7
},
{
"id": "V47_BASECA",
"order": 9
},
{
"id": "V47_ALIQ",
"order": 10
},
{
"id": "V47_VLTRIB",
"order": 11
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V47_FILIAL",
"value": "D MG 01"
},
{
"id": "V47_IDPART",
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "V47_NUMFAT",
"value": "402000002"
},
{
"id": "V47_IDNATR",
"value": "000106"
},
{
"id": "V47_IDTRIB",
"value": "000012"
},
{
"id": "V47_DECTER",
"value": "2"
},
{
"id": "V47_BASECA",
"value": "15000.00"
},
{
"id": "V47_VLTRIB",
"value": "300.00"
}
],
"models": [
{
"id": "MODEL_V4L",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4L_FILIAL",
"order": 1
},
{
"id": "V4L_ID",
"order": 2
},
{
"id": "V4L_IDPART",
"order": 3
},
{
"id": "V4L_NUMFAT",
"order": 4
},
{
"id": "V4L_TPDEDU",
"order": 5
},
{
"id": "V4L_VLRDED",
"order": 6
},
{
"id": "V4L_VLDEDS",
"order": 7
},
{
"id": "V4L_NUMPRE",
"order": 8
},
{
"id": "V4L_DECTER",
"order": 9
},
{
"id": "V4L_IENTID",
"order": 10
},
{
"id": "V4L_VLFPRE",
"order": 11
}
]
},
{
"id": "MODEL_V4M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4M_FILIAL",
"order": 1
},
{
"id": "V4M_ID",
"order": 2
},
{
"id": "V4M_IDPART",
"order": 3
},
{
"id": "V4M_NUMFAT",
"order": 4
},
{
"id": "V4M_IDTPIS",
"order": 5
},
{
"id": "V4M_VLRISE",
"order": 8
},
{
"id": "V4M_DRENDI",
"order": 9
},
{
"id": "V4M_DECTER",
"order": 10
}
]
}
]
}
]
}
]
}
]
}
]
}
]
} |
Nota |
---|
| Deve seguir a mesma regra de envio do POST, tratando o envio do campo LEM_PARTIC e removendo o campo de PK. |
Exemplo de Envio Esperado Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do PUT |
---|
| {
"id": "TAFA448",
"operation": 1,
"models": [
{
"id": "MODEL_LEM",
"modeltype": "FIELDS",
"fields": [
{
"id": "LEM_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "LEM_NUMERO",
"order": 3,
"value": "20240555"
},
{
"id": "LEM_NATTIT",
"order": 4,
"value": "0"
},
{
"id": "LEM_PREFIX",
"order": 5,
"value": "1"
},
{
"id": "LEM_DTEMIS",
"order": 6,
"value": "20231214"
},
{
"id": "LEM_PARTIC",
"order": 7,
"value": "FF0001101"
},
{
"id": "LEM_VLBRUT",
"order": 10,
"value": "15000.00"
},
{
"id": "LEM_TPRECF",
"order": 37,
"value": "1"
},
{
"id": "LEM_DTCONT",
"order": 52,
"value": "20231214"
}
],
"models": [
{
"id": "MODEL_T5M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5M_FILIAL",
"order": 1
},
{
"id": "T5M_IDTSER",
"order": 2
},
{
"id": "T5M_VLRETS",
"order": 4
},
{
"id": "T5M_VLRETP",
"order": 5
},
{
"id": "T5M_VLSV15",
"order": 6
},
{
"id": "T5M_VLSV20",
"order": 7
},
{
"id": "T5M_VLSV25",
"order": 8
},
{
"id": "T5M_VLADIC",
"order": 9
},
{
"id": "T5M_VLADNE",
"order": 10
},
{
"id": "T5M_BSINSS",
"order": 11
},
{
"id": "T5M_VLINSS",
"order": 12
},
{
"id": "T5M_TPREPA",
"order": 13
},
{
"id": "T5M_DESCRI",
"order": 14
},
{
"id": "T5M_VLBRUT",
"order": 15
},
{
"id": "T5M_VLREAP",
"order": 16
}
]
},
{
"id": "MODEL_T51",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T51_FILIAL",
"order": 1
},
{
"id": "T51_NUMPAR",
"order": 2
},
{
"id": "T51_VLRPAR",
"order": 3
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "A"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 2,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "B"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 3,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "C"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
}
]
},
{
"id": "MODEL_T9E",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T9E_FILIAL",
"order": 1
},
{
"id": "T9E_NUMPRO",
"order": 2
},
{
"id": "T9E_TPPROC",
"order": 4
},
{
"id": "T9E_IDSUSP",
"order": 6
},
{
"id": "T9E_CODTRI",
"order": 7
},
{
"id": "T9E_VALSUS",
"order": 9
},
{
"id": "T9E_CNATRE",
"order": 10
},
{
"id": "T9E_BSSUSP",
"order": 13
},
{
"id": "T9E_VLRANO",
"order": 14
},
{
"id": "T9E_VLRANA",
"order": 15
}
]
},
{
"id": "MODEL_V3S",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3S_FILIAL",
"order": 1
},
{
"id": "V3S_ID",
"order": 2
},
{
"id": "V3S_IDPART",
"order": 3
},
{
"id": "V3S_NUMFAT",
"order": 4
},
{
"id": "V3S_IDNATR",
"order": 6
},
{
"id": "V3S_DECTER",
"order": 8
},
{
"id": "V3S_VALOR",
"order": 9
},
{
"id": "V3S_IDPROC",
"order": 10
},
{
"id": "V3S_IFCISC",
"order": 15
},
{
"id": "V3S_COMPFP",
"order": 16
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3S_FILIAL",
"value": "D MG 01"
},
{
"id": "V3S_NUMFAT",
"value": "402000002"
},
{
"id": "V3S_IDNATR",
"value": "000106"
},
{
"id": "V3S_DECTER",
"value": "2"
},
{
"id": "V3S_VALOR",
"value": "15000.00"
}
],
"models": [
{
"id": "MODEL_V47",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V47_FILIAL",
"order": 1
},
{
"id": "V47_IDPART",
"order": 2
},
{
"id": "V47_NUMFAT",
"order": 3
},
{
"id": "V47_IDNATR",
"order": 4
},
{
"id": "V47_IDTRIB",
"order": 6
},
{
"id": "V47_DECTER",
"order": 7
},
{
"id": "V47_BASECA",
"order": 9
},
{
"id": "V47_ALIQ",
"order": 10
},
{
"id": "V47_VLTRIB",
"order": 11
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V47_FILIAL",
"value": "D MG 01"
},
{
"id": "V47_IDPART",
"value": "1b601243-0cf3-b86e-1d86-2a863d04325f"
},
{
"id": "V47_NUMFAT",
"value": "402000002"
},
{
"id": "V47_IDNATR",
"value": "000106"
},
{
"id": "V47_IDTRIB",
"value": "000012"
},
{
"id": "V47_DECTER",
"value": "2"
},
{
"id": "V47_BASECA",
"value": "15000.00"
},
{
"id": "V47_VLTRIB",
"value": "300.00"
}
],
"models": [
{
"id": "MODEL_V4L",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4L_FILIAL",
"order": 1
},
{
"id": "V4L_ID",
"order": 2
},
{
"id": "V4L_IDPART",
"order": 3
},
{
"id": "V4L_NUMFAT",
"order": 4
},
{
"id": "V4L_TPDEDU",
"order": 5
},
{
"id": "V4L_VLRDED",
"order": 6
},
{
"id": "V4L_VLDEDS",
"order": 7
},
{
"id": "V4L_NUMPRE",
"order": 8
},
{
"id": "V4L_DECTER",
"order": 9
},
{
"id": "V4L_IENTID",
"order": 10
},
{
"id": "V4L_VLFPRE",
"order": 11
}
]
},
{
"id": "MODEL_V4M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4M_FILIAL",
"order": 1
},
{
"id": "V4M_ID",
"order": 2
},
{
"id": "V4M_IDPART",
"order": 3
},
{
"id": "V4M_NUMFAT",
"order": 4
},
{
"id": "V4M_IDTPIS",
"order": 5
},
{
"id": "V4M_VLRISE",
"order": 8
},
{
"id": "V4M_DRENDI",
"order": 9
},
{
"id": "V4M_DECTER",
"order": 10
}
]
}
]
}
]
}
]
}
]
}
]
}
]
} |
Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do PUT |
---|
| {
"id": "TAFA448",
"operation": 1,
"pk": "RCBNRyAwMSBEIE1HIDAxIDEgICAgMjAyNDA1NTUgICAgICAgMjBkZjFjYTYtMmNlNi0zYjI4LTM5ZmItMmY1M2E3NTRlZjU0MjAyMzEyMTQ=",
"models": [
{
"id": "MODEL_LEM",
"modeltype": "FIELDS",
"fields": [
{
"id": "LEM_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "LEM_ID",
"order": 2,
"value": "b33a7fc4-5590-7f53-f06b-04635ea69c2e"
},
{
"id": "LEM_NUMERO",
"order": 3,
"value": "20240555"
},
{
"id": "LEM_NATTIT",
"order": 4,
"value": "0"
},
{
"id": "LEM_PREFIX",
"order": 5,
"value": "1"
},
{
"id": "LEM_DTEMIS",
"order": 6,
"value": "20231214"
},
{
"id": "LEM_IDPART",
"order": 7,
"value": "20df1ca6-2ce6-3b28-39fb-2f53a754ef54"
},
{
"id": "LEM_VLBRUT",
"order": 10,
"value": "15000.00"
},
{
"id": "LEM_TPRECF",
"order": 37,
"value": "1"
},
{
"id": "LEM_DTCONT",
"order": 52,
"value": "20231214"
}
],
"models": [
{
"id": "MODEL_T5M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5M_FILIAL",
"order": 1
},
{
"id": "T5M_IDTSER",
"order": 2
},
{
"id": "T5M_VLRETS",
"order": 4
},
{
"id": "T5M_VLRETP",
"order": 5
},
{
"id": "T5M_VLSV15",
"order": 6
},
{
"id": "T5M_VLSV20",
"order": 7
},
{
"id": "T5M_VLSV25",
"order": 8
},
{
"id": "T5M_VLADIC",
"order": 9
},
{
"id": "T5M_VLADNE",
"order": 10
},
{
"id": "T5M_BSINSS",
"order": 11
},
{
"id": "T5M_VLINSS",
"order": 12
},
{
"id": "T5M_TPREPA",
"order": 13
},
{
"id": "T5M_DESCRI",
"order": 14
},
{
"id": "T5M_VLBRUT",
"order": 15
},
{
"id": "T5M_VLREAP",
"order": 16
}
]
},
{
"id": "MODEL_T51",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T51_FILIAL",
"order": 1
},
{
"id": "T51_NUMPAR",
"order": 2
},
{
"id": "T51_VLRPAR",
"order": 3
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "A"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 2,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "B"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
},
{
"id": 3,
"deleted": 0,
"fields": [
{
"id": "T51_FILIAL",
"value": "D MG 01"
},
{
"id": "T51_NUMPAR",
"value": "C"
},
{
"id": "T51_VLRPAR",
"value": "5000.00"
}
],
"models": [
{
"id": "MODEL_T5P",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T5P_FILIAL",
"order": 1
},
{
"id": "T5P_DTPGTO",
"order": 2
},
{
"id": "T5P_VLPGTO",
"order": 3
},
{
"id": "T5P_PROCID",
"order": 4
}
]
}
]
}
]
},
{
"id": "MODEL_T9E",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "T9E_FILIAL",
"order": 1
},
{
"id": "T9E_NUMPRO",
"order": 2
},
{
"id": "T9E_TPPROC",
"order": 4
},
{
"id": "T9E_IDSUSP",
"order": 6
},
{
"id": "T9E_CODTRI",
"order": 7
},
{
"id": "T9E_VALSUS",
"order": 9
},
{
"id": "T9E_CNATRE",
"order": 10
},
{
"id": "T9E_BSSUSP",
"order": 13
},
{
"id": "T9E_VLRANO",
"order": 14
},
{
"id": "T9E_VLRANA",
"order": 15
}
]
},
{
"id": "MODEL_V3S",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V3S_FILIAL",
"order": 1
},
{
"id": "V3S_ID",
"order": 2
},
{
"id": "V3S_IDPART",
"order": 3
},
{
"id": "V3S_NUMFAT",
"order": 4
},
{
"id": "V3S_IDNATR",
"order": 6
},
{
"id": "V3S_DECTER",
"order": 8
},
{
"id": "V3S_VALOR",
"order": 9
},
{
"id": "V3S_IDPROC",
"order": 10
},
{
"id": "V3S_IFCISC",
"order": 15
},
{
"id": "V3S_COMPFP",
"order": 16
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3S_FILIAL",
"value": "D MG 01"
},
{
"id": "V3S_ID",
"value": "b33a7fc4-5590-7f53-f06b-04635ea69c2e"
},
{
"id": "V3S_IDPART",
"value": "20df1ca6-2ce6-3b28-39fb-2f53a754ef54"
},
{
"id": "V3S_NUMFAT",
"value": "20240555"
},
{
"id": "V3S_IDNATR",
"value": "000106"
},
{
"id": "V3S_DECTER",
"value": "2"
},
{
"id": "V3S_VALOR",
"value": "15000.00"
}
],
"models": [
{
"id": "MODEL_V47",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V47_FILIAL",
"order": 1
},
{
"id": "V47_IDPART",
"order": 2
},
{
"id": "V47_NUMFAT",
"order": 3
},
{
"id": "V47_IDNATR",
"order": 4
},
{
"id": "V47_IDTRIB",
"order": 6
},
{
"id": "V47_DECTER",
"order": 7
},
{
"id": "V47_BASECA",
"order": 9
},
{
"id": "V47_ALIQ",
"order": 10
},
{
"id": "V47_VLTRIB",
"order": 11
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V47_FILIAL",
"value": "D MG 01"
},
{
"id": "V47_IDPART",
"value": "20df1ca6-2ce6-3b28-39fb-2f53a754ef54"
},
{
"id": "V47_NUMFAT",
"value": "20240555"
},
{
"id": "V47_IDNATR",
"value": "000106"
},
{
"id": "V47_IDTRIB",
"value": "000012"
},
{
"id": "V47_DECTER",
"value": "2"
},
{
"id": "V47_BASECA",
"value": "15000.00"
},
{
"id": "V47_VLTRIB",
"value": "300.00"
}
],
"models": [
{
"id": "MODEL_V4L",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4L_FILIAL",
"order": 1
},
{
"id": "V4L_ID",
"order": 2
},
{
"id": "V4L_IDPART",
"order": 3
},
{
"id": "V4L_NUMFAT",
"order": 4
},
{
"id": "V4L_TPDEDU",
"order": 5
},
{
"id": "V4L_VLRDED",
"order": 6
},
{
"id": "V4L_VLDEDS",
"order": 7
},
{
"id": "V4L_NUMPRE",
"order": 8
},
{
"id": "V4L_DECTER",
"order": 9
},
{
"id": "V4L_IENTID",
"order": 10
},
{
"id": "V4L_VLFPRE",
"order": 11
}
]
},
{
"id": "MODEL_V4M",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4M_FILIAL",
"order": 1
},
{
"id": "V4M_ID",
"order": 2
},
{
"id": "V4M_IDPART",
"order": 3
},
{
"id": "V4M_NUMFAT",
"order": 4
},
{
"id": "V4M_IDTPIS",
"order": 5
},
{
"id": "V4M_VLRISE",
"order": 8
},
{
"id": "V4M_DRENDI",
"order": 9
},
{
"id": "V4M_DECTER",
"order": 10
}
]
}
]
}
]
}
]
}
]
}
]
}
]
} |
Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do DELETE |
---|
| true | 07.API TAFA535 - CADASTRO DE PAGAMENTOSAPI de Pagamentos - Método GETExemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do GET |
---|
| {
"total": 1,
"count": 1,
"startindex": 1,
"resources": [
{
"id": "TAFA535",
"operation": 1,
"pk": "RCBNRyAwMSBEIE1HIDAxIFBHVE80MDIwMDEgICAgIDEyMyAgODczODg5M2UtMjM3NS0wZDI1LWQxZTItOGUxOTQ5NTlhNzhhMjAyMzA0MDEwICAgMjAyMzA0MDEwMSA=",
"models": [
{
"id": "MODEL_V3U",
"modeltype": "FIELDS",
"fields": [
{
"id": "V3U_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "V3U_ID",
"order": 2,
"value": "d91034e5-0b16-cea6-918e-6403326b9457"
},
{
"id": "V3U_NUMERO",
"order": 3,
"value": "PGTO402001"
},
{
"id": "V3U_SERIE",
"order": 4,
"value": "123"
},
{
"id": "V3U_CODPAR",
"order": 5,
"value": "FF4020101"
},
{
"id": "V3U_IDPART",
"order": 7,
"value": "8738893e-2375-0d25-d1e2-8e194959a78a"
},
{
"id": "V3U_DTEMIS",
"order": 8,
"value": "20230401"
},
{
"id": "V3U_NATTIT",
"order": 9,
"value": "0"
},
{
"id": "V3U_DTPAGT",
"order": 11,
"value": "20230401"
},
{
"id": "V3U_SEQUEN",
"order": 12,
"value": "01"
}
]
}
]
}
]
} |
API de Pagamentos - GET [pk]Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do GET por PK |
---|
| {
"id": "TAFA535",
"operation": 1,
"pk": "RCBNRyAwMSBQR1RPNDAyMDAxICAgICAxMjMgIDg3Mzg4OTNlLTIzNzUtMGQyNS1kMWUyLThlMTk0OTU5YTc4YTIwMjMwNDAxMCAgIDIwMjMwNDAxMDEg",
"models": [
{
"id": "MODEL_V3U",
"modeltype": "FIELDS",
"fields": [
{
"id": "V3U_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "V3U_ID",
"order": 2,
"value": "d91034e5-0b16-cea6-918e-6403326b9457"
},
{
"id": "V3U_NUMERO",
"order": 3,
"value": "PGTO402001"
},
{
"id": "V3U_SERIE",
"order": 4,
"value": "123"
},
{
"id": "V3U_CODPAR",
"order": 5,
"value": "FF4020101"
},
{
"id": "V3U_IDPART",
"order": 7,
"value": "8738893e-2375-0d25-d1e2-8e194959a78a"
},
{
"id": "V3U_DTEMIS",
"order": 8,
"value": "20230401"
},
{
"id": "V3U_NATTIT",
"order": 9,
"value": "0"
},
{
"id": "V3U_DTPAGT",
"order": 11,
"value": "20230401"
},
{
"id": "V3U_SEQUEN",
"order": 12,
"value": "01"
}
],
"models": [
{
"id": "MODEL_V3V",
"modeltype": "GRID",
"struct": [
{
"id": "V3V_FILIAL",
"order": 1
},
{
"id": "V3V_ID",
"order": 2
},
{
"id": "V3V_CNATRE",
"order": 4
},
{
"id": "V3V_VALOR",
"order": 5
},
{
"id": "V3V_DECTER",
"order": 6
},
{
"id": "V3V_IDPROC",
"order": 10
},
{
"id": "V3V_IFCISC",
"order": 12
},
{
"id": "V3V_COMPFP",
"order": 13
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3V_FILIAL",
"value": "D MG 01"
},
{
"id": "V3V_ID",
"value": "d91034e5-0b16-cea6-918e-6403326b9457"
},
{
"id": "V3V_CNATRE",
"value": "000016"
},
{
"id": "V3V_VALOR",
"value": "10000.00"
},
{
"id": "V3V_DECTER",
"value": "2"
}
],
"models": [
{
"id": "MODEL_V46",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V46_FILIAL",
"order": 1
},
{
"id": "V46_ID",
"order": 2
},
{
"id": "V46_IDNAT",
"order": 3
},
{
"id": "V46_IDTRIB",
"order": 4
},
{
"id": "V46_BASE",
"order": 6
},
{
"id": "V46_VALOR",
"order": 7
},
{
"id": "V46_ALIQ",
"order": 8
}
]
},
{
"id": "MODEL_V4H",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4H_FILIAL",
"order": 1
},
{
"id": "V4H_ID",
"order": 2
},
{
"id": "V4H_IDPROC",
"order": 3
},
{
"id": "V4H_IDSUSP",
"order": 6
},
{
"id": "V4H_IDTRIB",
"order": 7
},
{
"id": "V4H_VALSUS",
"order": 9
},
{
"id": "V4H_VBASSU",
"order": 10
},
{
"id": "V4H_VLRANO",
"order": 11
},
{
"id": "V4H_VLRANA",
"order": 12
}
]
}
]
}
]
}
]
}
]
} |
API de Cadastro de Pagamentos - Metodo POST Nota |
---|
| Para o POST de um pagamento, seguiremos a mesma abordagem dos métodos das API's anteriores. Removindo a PK da body e tratando os camos de controle internos do TAF (id). |
Exemplo de Envio Esperado Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do POST |
---|
| {
"id": "TAFA535",
"operation": 1,
"models": [
{
"id": "MODEL_V3U",
"modeltype": "FIELDS",
"fields": [
{
"id": "V3U_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "V3U_NUMERO",
"order": 3,
"value": "PGTOTESTE2"
},
{
"id": "V3U_SERIE",
"order": 4,
"value": "123"
},
{
"id": "V3U_CODPAR",
"order": 5,
"value": "FF4020101"
},
{
"id": "V3U_DTEMIS",
"order": 8,
"value": "20230401"
},
{
"id": "V3U_NATTIT",
"order": 9,
"value": "0"
},
{
"id": "V3U_DTPAGT",
"order": 11,
"value": "20230401"
},
{
"id": "V3U_SEQUEN",
"order": 12,
"value": "01"
}
],
"models": [
{
"id": "MODEL_V3V",
"modeltype": "GRID",
"struct": [
{
"id": "V3V_FILIAL",
"order": 1
},
{
"id": "V3V_ID",
"order": 2
},
{
"id": "V3V_CNATRE",
"order": 4
},
{
"id": "V3V_VALOR",
"order": 5
},
{
"id": "V3V_DECTER",
"order": 6
},
{
"id": "V3V_IDPROC",
"order": 10
},
{
"id": "V3V_IFCISC",
"order": 12
},
{
"id": "V3V_COMPFP",
"order": 13
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3V_FILIAL",
"value": "D MG 01"
},
{
"id": "V3V_CNATRE",
"value": "000016"
},
{
"id": "V3V_VALOR",
"value": "10000.00"
},
{
"id": "V3V_DECTER",
"value": "2"
}
],
"models": [
{
"id": "MODEL_V46",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V46_FILIAL",
"order": 1
},
{
"id": "V46_ID",
"order": 2
},
{
"id": "V46_IDNAT",
"order": 3
},
{
"id": "V46_IDTRIB",
"order": 4
},
{
"id": "V46_BASE",
"order": 6
},
{
"id": "V46_VALOR",
"order": 7
},
{
"id": "V46_ALIQ",
"order": 8
}
]
},
{
"id": "MODEL_V4H",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4H_FILIAL",
"order": 1
},
{
"id": "V4H_ID",
"order": 2
},
{
"id": "V4H_IDPROC",
"order": 3
},
{
"id": "V4H_IDSUSP",
"order": 6
},
{
"id": "V4H_IDTRIB",
"order": 7
},
{
"id": "V4H_VALSUS",
"order": 9
},
{
"id": "V4H_VBASSU",
"order": 10
},
{
"id": "V4H_VLRANO",
"order": 11
},
{
"id": "V4H_VLRANA",
"order": 12
}
]
}
]
}
]
}
]
}
]
} |
Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do POST |
---|
| {
"id": "TAFA535",
"operation": 1,
"pk": "RCBNRyAwMSBEIE1HIDAxIFBHVE9URVNURTIgICAgIDEyMyAgODczODg5M2UtMjM3NS0wZDI1LWQxZTItOGUxOTQ5NTlhNzhhMjAyMzA0MDEwICAgMjAyMzA0MDEwMSA=",
"models": [
{
"id": "MODEL_V3U",
"modeltype": "FIELDS",
"fields": [
{
"id": "V3U_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "V3U_ID",
"order": 2,
"value": "695d6002-7f12-1016-cfab-551d46ce3539"
},
{
"id": "V3U_NUMERO",
"order": 3,
"value": "PGTOTESTE2"
},
{
"id": "V3U_SERIE",
"order": 4,
"value": "123"
},
{
"id": "V3U_CODPAR",
"order": 5,
"value": "FF4020101"
},
{
"id": "V3U_IDPART",
"order": 7,
"value": "8738893e-2375-0d25-d1e2-8e194959a78a"
},
{
"id": "V3U_DTEMIS",
"order": 8,
"value": "20230401"
},
{
"id": "V3U_NATTIT",
"order": 9,
"value": "0"
},
{
"id": "V3U_DTPAGT",
"order": 11,
"value": "20230401"
},
{
"id": "V3U_SEQUEN",
"order": 12,
"value": "01"
}
],
"models": [
{
"id": "MODEL_V3V",
"modeltype": "GRID",
"struct": [
{
"id": "V3V_FILIAL",
"order": 1
},
{
"id": "V3V_ID",
"order": 2
},
{
"id": "V3V_CNATRE",
"order": 4
},
{
"id": "V3V_VALOR",
"order": 5
},
{
"id": "V3V_DECTER",
"order": 6
},
{
"id": "V3V_IDPROC",
"order": 10
},
{
"id": "V3V_IFCISC",
"order": 12
},
{
"id": "V3V_COMPFP",
"order": 13
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3V_FILIAL",
"value": "D MG 01"
},
{
"id": "V3V_ID",
"value": "695d6002-7f12-1016-cfab-551d46ce3539"
},
{
"id": "V3V_CNATRE",
"value": "000001"
},
{
"id": "V3V_VALOR",
"value": "10000.00"
},
{
"id": "V3V_DECTER",
"value": "2"
}
],
"models": [
{
"id": "MODEL_V46",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V46_FILIAL",
"order": 1
},
{
"id": "V46_ID",
"order": 2
},
{
"id": "V46_IDNAT",
"order": 3
},
{
"id": "V46_IDTRIB",
"order": 4
},
{
"id": "V46_BASE",
"order": 6
},
{
"id": "V46_VALOR",
"order": 7
},
{
"id": "V46_ALIQ",
"order": 8
}
]
},
{
"id": "MODEL_V4H",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4H_FILIAL",
"order": 1
},
{
"id": "V4H_ID",
"order": 2
},
{
"id": "V4H_IDPROC",
"order": 3
},
{
"id": "V4H_IDSUSP",
"order": 6
},
{
"id": "V4H_IDTRIB",
"order": 7
},
{
"id": "V4H_VALSUS",
"order": 9
},
{
"id": "V4H_VBASSU",
"order": 10
},
{
"id": "V4H_VLRANO",
"order": 11
},
{
"id": "V4H_VLRANA",
"order": 12
}
]
}
]
}
]
}
]
}
]
} |
API de Cadastro de Pagamentos Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de envio do PUT |
---|
| {
"id": "TAFA535",
"operation": 1,
"models": [
{
"id": "MODEL_V3U",
"modeltype": "FIELDS",
"fields": [
{
"id": "V3U_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "V3U_NUMERO",
"order": 3,
"value": "PGTO-PUT"
},
{
"id": "V3U_SERIE",
"order": 4,
"value": "123"
},
{
"id": "V3U_CODPAR",
"order": 5,
"value": "FF4020101"
},
{
"id": "V3U_DTEMIS",
"order": 8,
"value": "20230401"
},
{
"id": "V3U_NATTIT",
"order": 9,
"value": "0"
},
{
"id": "V3U_DTPAGT",
"order": 11,
"value": "20230401"
},
{
"id": "V3U_SEQUEN",
"order": 12,
"value": "01"
}
],
"models": [
{
"id": "MODEL_V3V",
"modeltype": "GRID",
"struct": [
{
"id": "V3V_FILIAL",
"order": 1
},
{
"id": "V3V_ID",
"order": 2
},
{
"id": "V3V_CNATRE",
"order": 4
},
{
"id": "V3V_VALOR",
"order": 5
},
{
"id": "V3V_DECTER",
"order": 6
},
{
"id": "V3V_IDPROC",
"order": 10
},
{
"id": "V3V_IFCISC",
"order": 12
},
{
"id": "V3V_COMPFP",
"order": 13
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3V_FILIAL",
"value": "D MG 01"
},
{
"id": "V3V_CNATRE",
"value": "000016"
},
{
"id": "V3V_VALOR",
"value": "10000.00"
},
{
"id": "V3V_DECTER",
"value": "2"
}
],
"models": [
{
"id": "MODEL_V46",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V46_FILIAL",
"order": 1
},
{
"id": "V46_ID",
"order": 2
},
{
"id": "V46_IDNAT",
"order": 3
},
{
"id": "V46_IDTRIB",
"order": 4
},
{
"id": "V46_BASE",
"order": 6
},
{
"id": "V46_VALOR",
"order": 7
},
{
"id": "V46_ALIQ",
"order": 8
}
]
},
{
"id": "MODEL_V4H",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4H_FILIAL",
"order": 1
},
{
"id": "V4H_ID",
"order": 2
},
{
"id": "V4H_IDPROC",
"order": 3
},
{
"id": "V4H_IDSUSP",
"order": 6
},
{
"id": "V4H_IDTRIB",
"order": 7
},
{
"id": "V4H_VALSUS",
"order": 9
},
{
"id": "V4H_VBASSU",
"order": 10
},
{
"id": "V4H_VLRANO",
"order": 11
},
{
"id": "V4H_VLRANA",
"order": 12
}
]
}
]
}
]
}
]
}
]
} |
Exemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do PUT |
---|
| {
"id": "TAFA535",
"operation": 1,
"models": [
{
"id": "MODEL_V3U",
"modeltype": "FIELDS",
"fields": [
{
"id": "V3U_FILIAL",
"order": 1,
"value": "D MG 01"
},
{
"id": "V3U_NUMERO",
"order": 3,
"value": "PGTO-PUT"
},
{
"id": "V3U_SERIE",
"order": 4,
"value": "123"
},
{
"id": "V3U_CODPAR",
"order": 5,
"value": "FF4020101"
},
{
"id": "V3U_DTEMIS",
"order": 8,
"value": "20230401"
},
{
"id": "V3U_NATTIT",
"order": 9,
"value": "0"
},
{
"id": "V3U_DTPAGT",
"order": 11,
"value": "20230401"
},
{
"id": "V3U_SEQUEN",
"order": 12,
"value": "01"
}
],
"models": [
{
"id": "MODEL_V3V",
"modeltype": "GRID",
"struct": [
{
"id": "V3V_FILIAL",
"order": 1
},
{
"id": "V3V_ID",
"order": 2
},
{
"id": "V3V_CNATRE",
"order": 4
},
{
"id": "V3V_VALOR",
"order": 5
},
{
"id": "V3V_DECTER",
"order": 6
},
{
"id": "V3V_IDPROC",
"order": 10
},
{
"id": "V3V_IFCISC",
"order": 12
},
{
"id": "V3V_COMPFP",
"order": 13
}
],
"items": [
{
"id": 1,
"deleted": 0,
"fields": [
{
"id": "V3V_FILIAL",
"value": "D MG 01"
},
{
"id": "V3V_CNATRE",
"value": "000016"
},
{
"id": "V3V_VALOR",
"value": "10000.00"
},
{
"id": "V3V_DECTER",
"value": "2"
}
],
"models": [
{
"id": "MODEL_V46",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V46_FILIAL",
"order": 1
},
{
"id": "V46_ID",
"order": 2
},
{
"id": "V46_IDNAT",
"order": 3
},
{
"id": "V46_IDTRIB",
"order": 4
},
{
"id": "V46_BASE",
"order": 6
},
{
"id": "V46_VALOR",
"order": 7
},
{
"id": "V46_ALIQ",
"order": 8
}
]
},
{
"id": "MODEL_V4H",
"modeltype": "GRID",
"optional": 1,
"struct": [
{
"id": "V4H_FILIAL",
"order": 1
},
{
"id": "V4H_ID",
"order": 2
},
{
"id": "V4H_IDPROC",
"order": 3
},
{
"id": "V4H_IDSUSP",
"order": 6
},
{
"id": "V4H_IDTRIB",
"order": 7
},
{
"id": "V4H_VALSUS",
"order": 9
},
{
"id": "V4H_VBASSU",
"order": 10
},
{
"id": "V4H_VLRANO",
"order": 11
},
{
"id": "V4H_VLRANA",
"order": 12
}
]
}
]
}
]
}
]
}
]
} |
API de Pagamentos - Método DELETEExemplo de Resposta em Caso de Sucesso Bloco de código |
---|
theme | RDark |
---|
title | JSON - Exemplo de resposta do DELETE |
---|
| true |
08. ASSUNTOS RELACIONADOS |