12.1获取开票码

优质
小牛编辑
138浏览
2023-12-01
*商品和服务税收分类编码表 点击下载

请求参数说明

参数描述必填示例值类型最大长度
action接口参数组object
└action需要调用的接口名称invoice_createstring
getGET参数组,本组参数需要参与签名object
└biz_id账单编号20191125001number
└amt开票金额8.88number
postPOST参数组object
└drawer开票人西瓜string
└payer收款人雪碧string
└reviewer复核人雪碧string
└remark发票备注西瓜测试string
└items商品明细list
└└code商品编码(19位数字)3070401000000000000number
└└name商品名称青椒土豆丝string
└└price商品单价8.88number
└└quantity商品数量1number
└└uom商品单位string
└└taxRate商品税率(免税时传0)0.06number
└└amount合计金额8.88number
└└catalogCode商品分类编码(19位数字)3070401000000000000number

请求示例

{
    "action":{
        "action":"invoice_create"
    },
    "get":{
        "biz_id":"20191125001",
        "amt":"8.88"
    },
    "post":{
        "drawer":"西瓜",
        "payer":"雪碧",
        "reviewer":"雪碧",
        "remark":"西瓜测试",
        "items":[{
           "code":"3070401000000000000",
           "name":"青椒土豆丝",
           "price":"8.88",
           "quantity":"1",
           "uom":"份",
           "taxRate":"0.06",
           "amount":"8.88",
           "catalogCode":"3070401000000000000"
        }]
    }
}

响应参数说明

参数描述必填示例值类型最大长度
status返回状态。接口成功时为1,出错为01number
info错误时会返回相应的错误信息开票成功string
url开票二维码地址(二维码有效期为30天)string
msid门店编号10021number

响应示例

{
  "status": "1",
  "info": "开票成功",
  "url": "https://www.chinaeinv.com:980/scancode/91370200264807TEST4A/gp20191126001/d5dccb55639671d04f32fc110dce0efb",
  "server_timestamp": 1567480027,
  "server_time": "2019-09-03 11:07:07",
  "server_name": "api-105.hz",
  "msid": "10021"
}