POST
/api/nfce/company/get查询 NFC-e 公司
返回由 token 请求头标识的 NFC-e 公司数据。注意:方法是 POST,但 body 中无字段 — 公司仅通过令牌解析。返回中不含证书内容:cert_file 为旧版证书地址,通过 cert_content 登记的公司为空字符串;csc 以明文返回;number_nfce 是登记时保存的值,不代表下一个编号。
必需请求头
tokenstring | string | NFC-e 公司令牌 |
signstring | string | MD5 签名 |
timestampstring | string | 秒级 Unix 时间戳 |
Body
为空。可以发送 {}。
示例
# sign = md5(token + path + body + timestamp) # 按接口路径生成的调用模板,占位符替换为实际值 curl -X POST "https://api.tffiscal.com/api/nfce/company/get" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"success": true,
"data": {
"company_id": 10234,
"cnpj": "12345678000199",
"name": "Empresa Exemplo LTDA",
"alias": "Loja Centro",
"ie": "123456789",
"invoice_type": "simples_nacional",
"email": "contato@empresa.com",
"telefone": "11999999999",
"cep": "01001000",
"address": "Rua Exemplo",
"house_number": "100",
"complemento": "Sala 5",
"town": "Centro",
"city": "São Paulo",
"state": "SP",
"state_code": "SP",
"cert_file": "",
"csc_id": "000001",
"csc": "ABCDEF0123456789",
"serie_nfce": 1,
"number_nfce": 42
}
}