按行程开票接口

地址URL

https://api.es.xiaojukeji.com/river/Invoice/apply

支持格式

Json

HTTP请求方式

POST

是否需要登录

是 关于登录授权,参见 如何登录授权

访问授权限制

暂无

请求参数

名称 类型 必选 描述
client_id string yes 申请应用时分配的AppKey
access_token string yes 授权后的access token
timestamp bigint yes 当前时间戳
company_id string yes 公司编号
receiver string no 收件人,invoice_type=1或2时必传
receiver_phone string no 收件人电话,invoice_type=1或2时必传
receiver_address string no 收件人地址,invoice_type=1或2时必传
receiver_email string no 电子邮箱(接收电子发票), invoice_type=3必传
invoice_title string no 发票抬头(普票必填,专票不填)
tax_registration_number string no 纳税人识别号(普票必填,专票不填)
invoice_qid string no 资质id(专票必填,普票不填),[专票资质列表api]返回结果中的资质ID
invoice_type int yes 发票类型(1:纸质普票 2:纸质专票 3:电子普票)
invoice_content string yes 发票内容(*运输服务*客运服务费) 此为唯一默认值,不能变更
invoice_no string yes 开票请求编号(接入方唯一标识)
data string yes 发票信息json数据{"total_price":"1000","orders":[{"order_id":xxxx,"price":"20.00"},...]} 最大500条
remark string no 备注
sign string yes 签名

注意事项

开票规则:只有是个人垫付(pay_type=1)或混合支付(pay_type=2)且未开票(is_invoice=0)的订单(已支付或部分退款的)才可以开票,仅支持快车专车豪华车

参数限制:

普票:invoice_type=1或3, invoice_title为发票抬头、tax_registration_number为纳税人识别号,必填;

专票:invoice_type=2, invoice_qid为开票资质ID,必填,并且必须为专票资质列表api返回结果中的资质ID

纸质发票:invoice_type=1或2,如发票金额<200,则邮费到付;如发票金额>=200,则包邮

请求示例

curl -X POST -H "content-type:application/json" \
-d '{"client_id":"client_id_test","access_token":"c69340a883d3c87133793f71f6c960cbc7ae9284","timestamp":1583482495,"company_id":"12345678980","receiver_email":"11000005555@qq.com","invoice_type":3,"invoice_content":"*\u8fd0\u8f93\u670d\u52a1*\u5ba2\u8fd0\u670d\u52a1\u8d39","invoice_no":"125904356705555","data":"{\"total_price\":\"13\",\"orders\":[{\"order_id\":\"1125904356700122\",\"price\":\"13\"}]}","invoice_title":"1259xxxxxx555","tax_registration_number":"222259xxxx05555","sign":"9b4ef177eda266c8db62bdbc81d5c36f"}' \
https://api.es.xiaojukeji.com/river/Invoice/apply

返回示例

    {
        "errno":0,
        "errmsg":"success",
        "data": {
            "invoice_id":"erpa4cfbd6185429572c2c92ba5614a2bc4"    //发票id
        }
    }

results matching ""

    No results matching ""