CT-e
事件列表
返回该 CT-e 全部已登记事件。
GET
/openapi/v2/empresas/{empresaId}/cte/{cteId}/eventos需要
token、timestamp、sign 三个签名头,参见认证与签名。事件是单据授权之后向税务局登记的动作:取消、信函更正、交付凭证、交付失败及其撤销。本接口列出已登记的那些。查询响应中的 eventos 为同一列表。
路径参数
empresaId* | string | 主体标识 |
cteId* | string | 单据标识 |
* 必填字段
200
事件对象数组;无事件时为空数组。
chaveAcesso | string | 访问密钥 |
tipo | string | 事件类型 |
codigo | string | 事件代码 |
sequencia | int | 事件序号 |
status | string | 登记状态码 |
motivo | string | 状态说明 |
protocolo | string | 事件回执号 |
data | string | 登记时刻 |
linkXml | string | 事件 XML 链接 |
tipo事件类型
| 取值 | 含义 |
|---|---|
| Cancelamento | 取消 CT-e,代码 110111 |
| CartaCorrecao | 信函更正,代码 110110 |
| Epec | EPEC 应急事前授权,由平台登记,代码 110113 |
| ComprovanteEntrega | 交付凭证,代码 110180 |
| CancelamentoComprovanteEntrega | 撤销交付凭证,代码 110181 |
| InsucessoEntrega | 交付失败,代码 110190 |
| CancelamentoInsucessoEntrega | 撤销交付失败,代码 110191 |
| PrestacaoDesacordo | 服务不符,代码 610110 |
| CancelamentoPrestacaoDesacordo | 撤销服务不符,代码 610111 |
codigo事件代码
| 取值 | 含义 |
|---|---|
| 110111 | 取消 CT-e,即 Cancelamento |
| 110110 | 信函更正,即 CartaCorrecao |
| 110113 | EPEC 应急事前授权,由平台登记,即 Epec |
| 110180 | 交付凭证,即 ComprovanteEntrega |
| 110181 | 撤销交付凭证,即 CancelamentoComprovanteEntrega |
| 110190 | 交付失败,即 InsucessoEntrega |
| 110191 | 撤销交付失败,即 CancelamentoInsucessoEntrega |
| 610110 | 服务不符,即 PrestacaoDesacordo |
| 610111 | 撤销服务不符,即 CancelamentoPrestacaoDesacordo |
status登记状态码
平台只在这些状态码下返回 200;税务局其他返回一律转为 10017043。
| 取值 | 含义 |
|---|---|
| 134 | 已登记,税务局视为成功 |
| 135 | 已登记并挂到单据 |
| 136 | 已登记但未挂到单据 |
| 错误码 | HTTP | |
|---|---|---|
| 10017003 | 404 | cteId 不存在或非本主体。核对 id 与 empresaId。 |
| 10003000 | 404 | empresaId 不存在。 |
