Árvore de páginas

API do Cadastro de Produtos - Método GET

Exemplo de Resposta em Caso de Sucesso

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

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

Observação

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

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

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

Observação

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

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

JSON - Exemplo de resposta do DELETE
true
  • Sem rótulos