Sudrel · Schema

NfeEntrada

Pedido de NF-e no modo `informado`: os tributos de cada item vêm prontos. Campos em português, `snake_case`. O que a Sudrel preencher aparece em `ajustes` na resposta.

FinanceInvoicingBrazilSoftware-as-a-Service

Properties

Name Type Description
empresa_id string
referencia string Seu identificador, único por empresa e ambiente.
modo string
operacao string Modos calcular e conferir. Padrão venda.
subtipo string Remessa e devolução.
chave_referenciada string Chave de acesso da NF-e de origem (44 caracteres; pode ter letra com CNPJ alfanumérico). Obrigatória com `finalidade` `devolucao` ou `complementar` e com `operacao: devolucao`; aceita nas outras. Na d
serie integer Omitida: a série da API desta empresa.
natureza_operacao string
tipo_operacao string
finalidade string
presenca string
consumidor_final boolean
intermediador boolean Só `false` nesta versão (venda pelo próprio canal).
destinatario object Só o documento basta. Com CNPJ, a Sudrel completa `nome` e `endereco` pela consulta pública do CNPJ (base da Receita Federal) e `contribuinte` e `inscricao_estadual` pelo cadastro da SEFAZ da UF do de
itens array
entrega object Local de entrega, quando é outro endereço que não o do destinatário (grupo `entrega` do XML). Só na NF-e.
transporte object
cobranca object Fatura e duplicatas (grupo `cobr`), impressas no DANFE para o boleto ou a venda a prazo. Só na NF-e.
totais object Opcional. O que você mandar é conferido contra a soma dos itens; o que faltar é somado.
pagamentos array
troco number
autorizados_xml array CPF/CNPJ autorizados a baixar o XML.
informacoes_complementares string
informacoes_fisco string
View JSON Schema on GitHub

JSON Schema

sudrel-com-br-nfe-entrada-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sudrel-com-br/json-schema/sudrel-com-br-nfe-entrada-schema.json",
  "title": "NfeEntrada",
  "description": "Pedido de NF-e no modo `informado`: os tributos de cada item vêm prontos.\nCampos em português, `snake_case`. O que a Sudrel preencher aparece em\n`ajustes` na resposta.\n",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sudrel-com-br-openapi.yml#/components/schemas/NfeEntrada",
  "type": "object",
  "required": [
    "empresa_id",
    "natureza_operacao",
    "presenca",
    "destinatario",
    "itens",
    "pagamentos"
  ],
  "properties": {
    "empresa_id": {
      "type": "string"
    },
    "referencia": {
      "type": "string",
      "maxLength": 60,
      "description": "Seu identificador, único por empresa e ambiente."
    },
    "modo": {
      "type": "string",
      "enum": [
        "informado",
        "calcular",
        "conferir"
      ],
      "default": "informado"
    },
    "operacao": {
      "type": "string",
      "enum": [
        "venda",
        "venda_consumidor_final",
        "remessa",
        "transferencia",
        "bonificacao",
        "devolucao"
      ],
      "description": "Modos calcular e conferir. Padrão venda."
    },
    "subtipo": {
      "type": "string",
      "enum": [
        "conserto",
        "demonstracao",
        "industrializacao",
        "outras",
        "armazem_geral",
        "retorno_armazem_geral",
        "retorno_simbolico_armazem_geral",
        "conta_e_ordem",
        "industrializacao_conta_e_ordem",
        "comercializacao"
      ],
      "description": "Remessa e devolução."
    },
    "chave_referenciada": {
      "type": "string",
      "description": "Chave de acesso da NF-e de origem (44 caracteres; pode ter letra com CNPJ alfanumérico). Obrigatória com `finalidade` `devolucao` ou `complementar` e com `operacao: devolucao`; aceita nas outras. Na devolução vai em cada item (`det/DFeReferenciado`); nas outras finalidades, em `NFref/refNFe`."
    },
    "serie": {
      "type": "integer",
      "minimum": 0,
      "maximum": 889,
      "description": "Omitida: a série da API desta empresa."
    },
    "natureza_operacao": {
      "type": "string",
      "maxLength": 60
    },
    "tipo_operacao": {
      "type": "string",
      "enum": [
        "saida",
        "entrada"
      ],
      "default": "saida"
    },
    "finalidade": {
      "type": "string",
      "enum": [
        "normal",
        "complementar",
        "ajuste",
        "devolucao"
      ],
      "default": "normal"
    },
    "presenca": {
      "type": "string",
      "enum": [
        "nao_se_aplica",
        "presencial",
        "internet",
        "telefone",
        "entrega_em_domicilio",
        "presencial_fora_do_estabelecimento",
        "outros"
      ]
    },
    "consumidor_final": {
      "type": "boolean",
      "default": false
    },
    "intermediador": {
      "type": "boolean",
      "description": "Só `false` nesta versão (venda pelo próprio canal)."
    },
    "destinatario": {
      "type": "object",
      "required": [
        "documento"
      ],
      "description": "Só o documento basta. Com CNPJ, a Sudrel completa `nome` e `endereco` pela\nconsulta pública do CNPJ (base da Receita Federal) e `contribuinte` e\n`inscricao_estadual` pelo cadastro da SEFAZ da UF do destinatário. Com CPF,\nmande `nome` e, no `endereco`, só `cep` e `numero`: rua, bairro e\ncidade vêm do CEP, e o CPF é `nao_contribuinte`. O que você mandar\nprevalece; o que a Sudrel preencheu volta em `ajustes` (regras\n`nfe_destinatario_*`). Sem resposta da SEFAZ sobre a inscrição estadual, a\nnota é recusada com `destinatario_ie_indisponivel` (retentável), nunca\nemitida com um palpite.\n",
      "properties": {
        "documento": {
          "type": "string",
          "description": "CPF ou CNPJ."
        },
        "nome": {
          "type": "string",
          "maxLength": 60,
          "description": "Obrigatório com CPF. Com CNPJ, vem da Receita se faltar."
        },
        "contribuinte": {
          "type": "string",
          "enum": [
            "contribuinte",
            "isento",
            "nao_contribuinte"
          ],
          "description": "Sem ele, a Sudrel consulta a SEFAZ (CNPJ) ou usa `nao_contribuinte` (CPF)."
        },
        "inscricao_estadual": {
          "type": "string",
          "description": "Obrigatória com `contribuinte`."
        },
        "optante_simples": {
          "type": "boolean",
          "description": "Modo calcular: o destinatário é ME/EPP? Exigido na venda interna do fabricante a contribuinte (alíquota de 7% da Bahia)."
        },
        "email": {
          "type": "string"
        },
        "endereco": {
          "type": "object",
          "description": "Completo, ou só `cep` e `numero` (o resto vem do CEP). Com CNPJ, pode faltar inteiro (vem da Receita).",
          "properties": {
            "logradouro": {
              "type": "string"
            },
            "numero": {
              "type": "string"
            },
            "complemento": {
              "type": "string"
            },
            "bairro": {
              "type": "string"
            },
            "municipio_ibge": {
              "type": "string"
            },
            "municipio": {
              "type": "string"
            },
            "uf": {
              "type": "string",
              "description": "`EX` para exterior."
            },
            "cep": {
              "type": "string"
            },
            "telefone": {
              "type": "string"
            }
          }
        }
      }
    },
    "itens": {
      "type": "array",
      "minItems": 1,
      "maxItems": 990,
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/NfeItem"
          },
          {
            "$ref": "#/$defs/NfeItemCalculado"
          }
        ]
      }
    },
    "entrega": {
      "type": "object",
      "description": "Local de entrega, quando é outro endereço que não o do destinatário (grupo `entrega` do XML). Só na NF-e.",
      "required": [
        "documento",
        "endereco"
      ],
      "properties": {
        "documento": {
          "type": "string",
          "description": "CPF ou CNPJ de quem recebe."
        },
        "nome": {
          "type": "string",
          "maxLength": 60
        },
        "inscricao_estadual": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "maxLength": 60
        },
        "endereco": {
          "type": "object",
          "required": [
            "logradouro",
            "numero",
            "bairro",
            "municipio_ibge",
            "municipio",
            "uf"
          ],
          "properties": {
            "logradouro": {
              "type": "string"
            },
            "numero": {
              "type": "string"
            },
            "complemento": {
              "type": "string"
            },
            "bairro": {
              "type": "string"
            },
            "municipio_ibge": {
              "type": "string"
            },
            "municipio": {
              "type": "string"
            },
            "uf": {
              "type": "string"
            },
            "cep": {
              "type": "string"
            },
            "telefone": {
              "type": "string"
            }
          }
        }
      }
    },
    "transporte": {
      "type": "object",
      "properties": {
        "modalidade": {
          "type": "string",
          "enum": [
            "emitente",
            "destinatario",
            "terceiros",
            "proprio_emitente",
            "proprio_destinatario",
            "sem_frete"
          ],
          "default": "sem_frete"
        },
        "transportadora": {
          "type": "object",
          "description": "Quem leva a mercadoria (grupo `transporta`), impresso no DANFE. Só na NF-e.",
          "properties": {
            "documento": {
              "type": "string",
              "description": "CPF ou CNPJ."
            },
            "nome": {
              "type": "string",
              "maxLength": 60
            },
            "inscricao_estadual": {
              "type": "string"
            },
            "endereco": {
              "type": "string",
              "maxLength": 60,
              "description": "Uma linha: rua, número e bairro."
            },
            "municipio": {
              "type": "string",
              "maxLength": 60
            },
            "uf": {
              "type": "string"
            }
          }
        },
        "volumes": {
          "type": "array",
          "maxItems": 5000,
          "description": "Volumes transportados (grupo `vol`). Só na NF-e.",
          "items": {
            "type": "object",
            "properties": {
              "quantidade": {
                "type": "integer"
              },
              "especie": {
                "type": "string",
                "maxLength": 60,
                "description": "Ex.: \"CAIXA\", \"VOLUME(S)\"."
              },
              "marca": {
                "type": "string",
                "maxLength": 60
              },
              "numeracao": {
                "type": "string",
                "maxLength": 60
              },
              "peso_liquido": {
                "type": "number",
                "description": "Em kg."
              },
              "peso_bruto": {
                "type": "number",
                "description": "Em kg."
              },
              "lacres": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 60
                }
              }
            }
          }
        }
      }
    },
    "cobranca": {
      "type": "object",
      "description": "Fatura e duplicatas (grupo `cobr`), impressas no DANFE para o boleto ou a venda a prazo. Só na NF-e.",
      "properties": {
        "fatura": {
          "type": "object",
          "properties": {
            "numero": {
              "type": "string",
              "maxLength": 60
            },
            "valor_original": {
              "type": "number"
            },
            "desconto": {
              "type": "number"
            },
            "valor_liquido": {
              "type": "number",
              "description": "Omitido: valor original menos o desconto."
            }
          }
        },
        "duplicatas": {
          "type": "array",
          "maxItems": 120,
          "items": {
            "type": "object",
            "required": [
              "vencimento",
              "valor"
            ],
            "properties": {
              "numero": {
                "type": "string",
                "maxLength": 60,
                "description": "Omitido: \"001\", \"002\"... pela ordem da lista."
              },
              "vencimento": {
                "type": "string",
                "format": "date",
                "description": "AAAA-MM-DD."
              },
              "valor": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "totais": {
      "type": "object",
      "description": "Opcional. O que você mandar é conferido contra a soma dos itens; o que faltar é somado.",
      "properties": {
        "valor_produtos": {
          "type": "number"
        },
        "valor_nota": {
          "type": "number"
        },
        "base_icms": {
          "type": "number"
        },
        "valor_icms": {
          "type": "number"
        },
        "valor_desconto": {
          "type": "number"
        },
        "valor_frete": {
          "type": "number"
        },
        "valor_seguro": {
          "type": "number"
        },
        "outras_despesas": {
          "type": "number"
        },
        "valor_pis": {
          "type": "number"
        },
        "valor_cofins": {
          "type": "number"
        },
        "ibs_cbs": {
          "type": "object",
          "properties": {
            "base_calculo": {
              "type": "number"
            },
            "ibs_uf": {
              "type": "number"
            },
            "ibs_municipio": {
              "type": "number"
            },
            "ibs": {
              "type": "number"
            },
            "cbs": {
              "type": "number"
            }
          }
        }
      }
    },
    "pagamentos": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "forma",
          "valor"
        ],
        "properties": {
          "forma": {
            "type": "string",
            "enum": [
              "dinheiro",
              "cheque",
              "cartao_credito",
              "cartao_debito",
              "credito_loja",
              "vale_alimentacao",
              "vale_refeicao",
              "vale_presente",
              "vale_combustivel",
              "boleto",
              "deposito",
              "pix",
              "pix_estatico",
              "transferencia",
              "programa_fidelidade",
              "sem_pagamento",
              "outros"
            ],
            "description": "`pix` é o Pix dinâmico (tPag 17); `pix_estatico` (tPag 20) é o QR fixo ou a chave."
          },
          "valor": {
            "type": "number"
          }
        }
      }
    },
    "troco": {
      "type": "number"
    },
    "autorizados_xml": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "CPF/CNPJ autorizados a baixar o XML."
    },
    "informacoes_complementares": {
      "type": "string",
      "maxLength": 5000
    },
    "informacoes_fisco": {
      "type": "string",
      "maxLength": 2000
    }
  },
  "$defs": {
    "NfeItem": {
      "type": "object",
      "required": [
        "codigo",
        "descricao",
        "ncm",
        "cfop",
        "origem",
        "unidade",
        "quantidade",
        "valor_unitario",
        "icms",
        "pis",
        "cofins"
      ],
      "properties": {
        "codigo": {
          "type": "string"
        },
        "descricao": {
          "type": "string"
        },
        "gtin": {
          "type": "string",
          "description": "Omitido: \"SEM GTIN\"."
        },
        "ncm": {
          "type": "string",
          "pattern": "^[0-9]{8}$"
        },
        "cest": {
          "type": "string"
        },
        "cfop": {
          "type": "string",
          "pattern": "^[0-9]{4}$"
        },
        "origem": {
          "type": "string",
          "description": "Origem da mercadoria, 0 a 8."
        },
        "unidade": {
          "type": "string"
        },
        "quantidade": {
          "type": "number"
        },
        "valor_unitario": {
          "type": "number"
        },
        "valor_total": {
          "type": "number",
          "description": "Omitido: quantidade vezes valor unitário."
        },
        "desconto": {
          "type": "number"
        },
        "frete": {
          "type": "number"
        },
        "seguro": {
          "type": "number"
        },
        "outras_despesas": {
          "type": "number"
        },
        "icms": {
          "type": "object",
          "description": "`cst` (00, 10, 20, 40, 41, 50, 60, 70) ou `csosn` (101, 102, 103, 300, 400, 500), com base, alíquota e valor quando o grupo pede. CST 10 e 70 exigem o grupo `st`.",
          "properties": {
            "cst": {
              "type": "string"
            },
            "csosn": {
              "type": "string"
            },
            "modalidade_base_calculo": {
              "type": "string"
            },
            "base_calculo": {
              "type": "number"
            },
            "aliquota": {
              "type": "number"
            },
            "valor": {
              "type": "number"
            },
            "reducao_base_calculo": {
              "type": "number",
              "description": "CST 20 e 70."
            },
            "fcp": {
              "type": "object",
              "description": "FECP (CST 00, 10, 20 e 70).",
              "properties": {
                "base_calculo": {
                  "type": "number"
                },
                "aliquota": {
                  "type": "number"
                },
                "valor": {
                  "type": "number"
                }
              }
            },
            "st": {
              "type": "object",
              "description": "ICMS-ST do substituto (CST 10 e 70).",
              "properties": {
                "modalidade_base_calculo": {
                  "type": "string",
                  "default": "4"
                },
                "mva": {
                  "type": "number"
                },
                "reducao_base_calculo": {
                  "type": "number"
                },
                "base_calculo": {
                  "type": "number"
                },
                "aliquota": {
                  "type": "number"
                },
                "valor": {
                  "type": "number"
                },
                "fcp": {
                  "type": "object",
                  "properties": {
                    "base_calculo": {
                      "type": "number"
                    },
                    "aliquota": {
                      "type": "number"
                    },
                    "valor": {
                      "type": "number"
                    }
                  }
                }
              }
            },
            "st_retido": {
              "type": "object",
              "description": "ICMS-ST retido anteriormente (CST 60 / CSOSN 500).",
              "properties": {
                "base_calculo": {
                  "type": "number"
                },
                "aliquota": {
                  "type": "number"
                },
                "valor_substituto": {
                  "type": "number"
                },
                "valor": {
                  "type": "number"
                }
              }
            }
          }
        },
        "pis": {
          "$ref": "#/$defs/NfePisCofins"
        },
        "cofins": {
          "$ref": "#/$defs/NfePisCofins"
        },
        "ex_tipi": {
          "type": "string",
          "description": "Exceção da TIPI (EXTIPI)."
        },
        "item_referenciado": {
          "type": "integer",
          "minimum": 1,
          "maximum": 990,
          "description": "Devolução: número deste item na nota de origem (`nItem`). Opcional; vai junto da chave da nota de origem no item."
        },
        "escala_relevante": {
          "type": "boolean",
          "description": "Produzido em escala relevante (`indEscala`). Com `false`, informe `cnpj_fabricante`. Exige `cest`."
        },
        "cnpj_fabricante": {
          "type": "string",
          "description": "CNPJ do fabricante (`CNPJFab`), quando a produção não é em escala relevante."
        },
        "pedido_compra": {
          "type": "object",
          "description": "Pedido de compra do seu cliente e o item dele (`xPed` e `nItemPed`).",
          "properties": {
            "numero": {
              "type": "string",
              "maxLength": 15
            },
            "item": {
              "type": "string",
              "pattern": "^[0-9]{1,6}$"
            }
          }
        },
        "lotes": {
          "type": "array",
          "maxItems": 500,
          "description": "Rastreabilidade por lote (grupo `rastro`).",
          "items": {
            "type": "object",
            "required": [
              "numero",
              "quantidade",
              "fabricacao",
              "validade"
            ],
            "properties": {
              "numero": {
                "type": "string",
                "maxLength": 20
              },
              "quantidade": {
                "type": "number"
              },
              "fabricacao": {
                "type": "string",
                "format": "date",
                "description": "AAAA-MM-DD."
              },
              "validade": {
                "type": "string",
                "format": "date",
                "description": "AAAA-MM-DD."
              },
              "codigo_agregacao": {
                "type": "string",
                "maxLength": 20
              }
            }
          }
        },
        "combustivel": {
          "type": "object",
          "description": "Produto da tabela da ANP: combustível, lubrificante, graxa (grupo `comb`).",
          "required": [
            "codigo_anp",
            "descricao_anp"
          ],
          "properties": {
            "codigo_anp": {
              "type": "string",
              "pattern": "^[0-9]{9}$",
              "description": "Ex.: \"650101002\"."
            },
            "descricao_anp": {
              "type": "string",
              "minLength": 2,
              "maxLength": 95,
              "description": "Ex.: \"OUTRAS GRAXAS\"."
            },
            "uf_consumo": {
              "type": "string",
              "description": "Omitida: a UF do destinatário. Na NFC-e, obrigatória."
            }
          }
        },
        "ipi": {
          "type": "object",
          "description": "Grupo IPI (acréscimo da fase 3). IPITrib com CST 00, 49, 50 ou 99; IPINT com CST 01 a 05 ou 51 a 55.",
          "properties": {
            "cst": {
              "type": "string"
            },
            "enquadramento": {
              "type": "string",
              "default": "999"
            },
            "base_calculo": {
              "type": "number"
            },
            "aliquota": {
              "type": "number"
            },
            "valor": {
              "type": "number"
            }
          }
        },
        "ibs_cbs": {
          "type": "object",
          "properties": {
            "cst": {
              "type": "string"
            },
            "classificacao_tributaria": {
              "type": "string"
            },
            "base_calculo": {
              "type": "number"
            },
            "ibs_uf": {
              "type": "object",
              "properties": {
                "aliquota": {
                  "type": "number"
                },
                "valor": {
                  "type": "number"
                }
              }
            },
            "ibs_municipio": {
              "type": "object",
              "properties": {
                "aliquota": {
                  "type": "number"
                },
                "valor": {
                  "type": "number"
                }
              }
            },
            "cbs": {
              "type": "object",
              "properties": {
                "aliquota": {
                  "type": "number"
                },
                "valor": {
                  "type": "number"
                }
              }
            }
          }
        }
      }
    },
    "NfeItemCalculado": {
      "type": "object",
      "description": "Item dos modos calcular e conferir (no conferir, mais os campos do item informado).",
      "required": [
        "produto",
        "quantidade",
        "valor_unitario"
      ],
      "properties": {
        "produto": {
          "type": "string",
          "description": "Código do produto em /v1/produtos."
        },
        "quantidade": {
          "type": "number"
        },
        "valor_unitario": {
          "type": "number"
        },
        "desconto": {
          "type": "number"
        },
        "frete": {
          "type": "number"
        },
        "seguro": {
          "type": "number"
        },
        "outras_despesas": {
          "type": "number"
        },
        "informacoes_adicionais": {
          "type": "string"
        },
        "st_retido": {
          "type": "object",
          "description": "ICMS-ST retido anteriormente na revenda (CST 60 / CSOSN 500). Prevalece sobre o que viria das entradas vinculadas.",
          "properties": {
            "base_calculo": {
              "type": "number"
            },
            "aliquota": {
              "type": "number"
            },
            "valor_substituto": {
              "type": "number"
            },
            "valor": {
              "type": "number"
            }
          }
        },
        "escala_relevante": {
          "type": "boolean",
          "description": "Como no item informado: passa sem mudar."
        },
        "cnpj_fabricante": {
          "type": "string",
          "description": "Como no item informado."
        },
        "pedido_compra": {
          "type": "object",
          "description": "Como no item informado (`numero` e `item`)."
        },
        "lotes": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Como no item informado (`numero`, `quantidade`, `fabricacao`, `validade`)."
        },
        "combustivel": {
          "type": "object",
          "description": "Como no item informado (`codigo_anp`, `descricao_anp`, `uf_consumo`)."
        }
      }
    },
    "NfePisCofins": {
      "type": "object",
      "required": [
        "cst"
      ],
      "properties": {
        "cst": {
          "type": "string"
        },
        "base_calculo": {
          "type": "number"
        },
        "aliquota": {
          "type": "number"
        },
        "valor": {
          "type": "number"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sudrel-com-br-nfe-entrada"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.