CT-e
交付凭证
对已授权 CT-e 登记事件 110180(交付凭证)。
/openapi/v2/empresas/{empresaId}/cte/{cteId}/comprovante-entrega需要 token、timestamp、sign 三个签名头,参见认证与签名。
同步出站,成功返回事件对象。请保存响应中的 protocolo:它就是撤销交付凭证使用的 protocoloEvento。
参数
路径参数
empresaIdstring必填注册时返回的主体(承运人)标识。
示例:1934811222334455cteIdstring必填发行 CT-e 时传入的
id。示例:CTE-ORD-1
请求体
dataEntregastring必填交付时刻,ISO-8601 带偏移,如
2026-09-06T10:00:00-03:00。示例:2026-09-06T10:00:00-03:00documentoRecebedorstring必填签收人证件号(nDoc),2 到 20 位数字。
示例:12345678909nomeRecebedorstring必填签收人姓名(xNome),2 到 60 字符。
示例:JOSE DA SILVAlatitudenumber可选交付地纬度(可选),按六位小数登记。
longitudenumber可选交付地经度(可选),按六位小数登记。
hashEntregastring必填交付凭证影像 SHA-1 的 base64(hashEntrega)。
示例:2jmj7l5rSw0yVb/vlWAYkK/YBwk=dataHashEntregastring必填影像生成时刻,ISO-8601 带偏移。
示例:2026-09-06T10:01:00-03:00chavesNfearray可选已交付的 NF-e chave(44 位字符串),可选。
响应
事件已在 SEFAZ 登记,同步返回事件对象。
chaveAcessostring事件所关联 CT-e 的 44 位访问密钥。
tipostring事件类型。
取值:CancelamentoCartaCorrecaoComprovanteEntregaCancelamentoComprovanteEntregaInsucessoEntregaCancelamentoInsucessoEntregaPrestacaoDesacordoCancelamentoPrestacaoDesacordoEpeccodigostringSEFAZ 事件码(tpEvento):
110111、110110、110113、110180、110181、110190、110191、610110、610111。sequenciainteger同类事件内的序号(信函更正自动递增)。
statusstringSEFAZ 返回的 cStat;
135表示事件已登记并关联。motivostringSEFAZ 返回的 xMotivo。
protocolostring事件协议号;撤销事件时作为
protocoloEvento传入。datastring事件登记时间,ISO-8601 UTC。
linkXmlstring事件 XML(procEvento)下载链接。参见 文件下载。
错误
| 错误码 | HTTP | |
|---|---|---|
| CTe0001 | 404 |
|
| 10003000 | 404 |
|
| 10017040 | 400 | 单据状态不允许该事件;CT-e 须为 |
| 10017042 | 400 | 事件文本非法(净化后长度超出范围)。 |
| 10017043 | 400 | SEFAZ 拒绝了该事件; |
| 10001001 | 400 | 请求字段校验失败(每字段一条);按 |
文本净化与坐标
文本字段会先被净化(去变音、折叠空白),再校验长度;净化后长度超出范围返回 10017042。坐标按六位小数登记。
