文档中心 > API类目 > 信息平台-采购

alibaba.pur.supplier.invoicecreate (preInvoice创建)

preInvoice创建

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
invoice SupplierPreInvoiceInfoVO 可选 预发票头信息
  • invoice_item_list
  • SupplierPreInvoiceItem []
  • 可选
  • 预发票行信息
  • └ line_close_reason
  • String
  • 可选
  • 暂无
  • 关闭原因
  • └ line_status
  • String
  • 可选
  • 暂无
  • 行状态
  • └ source_kp_line_no
  • String
  • 可选
  • 暂无
  • 关联开票单行号
  • └ source_kp_no
  • String
  • 可选
  • 暂无
  • 关联开票单单号
  • └ line_remark
  • String
  • 可选
  • 暂无
  • 应付发票行备注
  • └ tax_rate
  • String
  • 可选
  • 17%
  • 税率
  • └ tax_code
  • String
  • 可选
  • VAT-17
  • 税码
  • └ tax_amount
  • String
  • 可选
  • 145.30
  • 发票行税额
  • └ amount
  • String
  • 可选
  • 1000.00
  • 发票行总金额
  • └ invoice_line_quantity
  • String
  • 可选
  • 10
  • 发票行数量
  • └ spec
  • String
  • 可选
  • 暂无
  • 规格型号
  • └ goods_name
  • String
  • 可选
  • E5-2680V4
  • 货物或服务名称
  • └ item_code
  • String
  • 可选
  • E5-2680V4
  • 货物或服务id
  • └ source_inventory
  • String
  • 可选
  • 暂无
  • 匹配入库id
  • └ source_rt_line_no
  • String
  • 可选
  • 暂无
  • 匹配接收行编号
  • └ source_rt_no
  • String
  • 可选
  • 暂无
  • 匹配接收行编号
  • └ source_po_line_no
  • String
  • 可选
  • 暂无
  • 匹配订单行编号
  • └ source_po_no
  • String
  • 可选
  • 暂无
  • 匹配订单头编号
  • └ line_no
  • String
  • 必须
  • 暂无
  • 应付发票行编号
  • └ close_reason
  • String
  • 可选
  • 暂无
  • 关闭原因
  • └ status
  • String
  • 可选
  • 暂无
  • 应付发票状态
  • └ remark
  • String
  • 可选
  • For test
  • 应付发票备注
  • └ drawer
  • String
  • 可选
  • 暂无
  • 开票人
  • └ reviewer
  • String
  • 可选
  • 暂无
  • 复核人
  • └ payee
  • String
  • 可选
  • 暂无
  • 收款人
  • └ currency
  • String
  • 可选
  • USD
  • 币种
  • └ total_amount
  • String
  • 可选
  • 1000.00
  • 价税合计
  • └ tax_amount
  • String
  • 可选
  • 145.30
  • 税额合计
  • └ invoice_seller_account_no
  • String
  • 可选
  • 暂无
  • 卖方账户
  • └ invoice_seller_bank_no
  • String
  • 可选
  • 暂无
  • 卖方开户行
  • └ invoice_seller_phone
  • String
  • 可选
  • 暂无
  • 卖方电话
  • └ invoice_seller_address
  • String
  • 可选
  • 暂无
  • 卖方地址
  • └ invoice_seller_tax_code
  • String
  • 可选
  • 暂无
  • 纳税人识别号
  • └ invoice_seller_name
  • String
  • 可选
  • 暂无
  • 开票方抬头
  • └ invoice_buyer_account_no
  • String
  • 可选
  • 暂无
  • 购买方账户
  • └ invoice_buyer_bank_no
  • String
  • 可选
  • 暂无
  • 购买方开户行
  • └ invoice_buyer_phone
  • String
  • 可选
  • 暂无
  • 购买方电话
  • └ invoice_buyer_address
  • String
  • 可选
  • 暂无
  • 购买方地址
  • └ invoice_buyer_tax_code
  • String
  • 可选
  • 暂无
  • 纳税人识别号
  • └ invoice_buyer_name
  • String
  • 可选
  • 暂无
  • 开票方抬头
  • └ invoice_type
  • String
  • 可选
  • Invoice Credit
  • 发票类型
  • └ invoice_code
  • String
  • 可选
  • 暂无
  • 发票代码
  • └ invoice_no
  • String
  • 可选
  • 暂无
  • 发票号码
  • └ day_after_invoicing
  • Date
  • 可选
  • 2018-04-09 10:10:10
  • 开票日期
  • └ demander_purchase_org_code
  • String
  • 可选
  • 暂无
  • 采购组织
  • └ ou_code
  • String
  • 必须
  • 暂无
  • 供应商ou代码
  • └ supplier_name
  • String
  • 必须
  • 服务器
  • 供应商名称
  • └ attachment
  • byte[] []
  • 可选
  • 暂无
  • 发票附件
  • └ supplier_code
  • String
  • 必须
  • 暂无
  • 供应商编码

响应参数

名称 类型 示例值 描述
result ActionResult 暂无 获取url的出参
  • └ content
  • Boolean
  • true
  • 返回值
  • └ error_msg
  • String
  • 字段不能为空
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaPurSupplierInvoicecreateRequest req = new AlibabaPurSupplierInvoicecreateRequest();
AlibabaPurSupplierInvoicecreateRequest.SupplierPreInvoiceInfoVO obj1 = new AlibabaPurSupplierInvoicecreateRequest.SupplierPreInvoiceInfoVO();
List<AlibabaPurSupplierInvoicecreateRequest.SupplierPreInvoiceItem> list3 = new ArrayList<AlibabaPurSupplierInvoicecreateRequest.SupplierPreInvoiceItem>();
AlibabaPurSupplierInvoicecreateRequest.SupplierPreInvoiceItem obj4 = new AlibabaPurSupplierInvoicecreateRequest.SupplierPreInvoiceItem();
list3.add(obj4);
obj4.setLineCloseReason("暂无");
obj4.setLineStatus("暂无");
obj4.setSourceKpLineNo("暂无");
obj4.setSourceKpNo("暂无");
obj4.setLineRemark("暂无");
obj4.setTaxRate("17%");
obj4.setTaxCode("VAT-17");
obj4.setTaxAmount("145.30");
obj4.setAmount("1000.00");
obj4.setInvoiceLineQuantity("10");
obj4.setSpec("暂无");
obj4.setGoodsName("E5-2680V4");
obj4.setItemCode("E5-2680V4");
obj4.setSourceInventory("暂无");
obj4.setSourceRtLineNo("暂无");
obj4.setSourceRtNo("暂无");
obj4.setSourcePoLineNo("暂无");
obj4.setSourcePoNo("暂无");
obj4.setLineNo("暂无");
obj1.setInvoiceItemList(list3);
obj1.setCloseReason("暂无");
obj1.setStatus("暂无");
obj1.setRemark("For test");
obj1.setDrawer("暂无");
obj1.setReviewer("暂无");
obj1.setPayee("暂无");
obj1.setCurrency("USD");
obj1.setTotalAmount("1000.00");
obj1.setTaxAmount("145.30");
obj1.setInvoiceSellerAccountNo("暂无");
obj1.setInvoiceSellerBankNo("暂无");
obj1.setInvoiceSellerPhone("暂无");
obj1.setInvoiceSellerAddress("暂无");
obj1.setInvoiceSellerTaxCode("暂无");
obj1.setInvoiceSellerName("暂无");
obj1.setInvoiceBuyerAccountNo("暂无");
obj1.setInvoiceBuyerBankNo("暂无");
obj1.setInvoiceBuyerPhone("暂无");
obj1.setInvoiceBuyerAddress("暂无");
obj1.setInvoiceBuyerTaxCode("暂无");
obj1.setInvoiceBuyerName("暂无");
obj1.setInvoiceType("Invoice Credit");
obj1.setInvoiceCode("暂无");
obj1.setInvoiceNo("暂无");
obj1.setDayAfterInvoicing(StringUtils.parseDateTime("2018-04-09 10:10:10"));
obj1.setDemanderPurchaseOrgCode("暂无");
obj1.setOuCode("暂无");
obj1.setSupplierName("服务器");
obj1.setSupplierCode("暂无");
req.setInvoice(obj1);
AlibabaPurSupplierInvoicecreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_pur_supplier_invoicecreate_response>
    <result>
        <content>true</content>
        <error_msg>字段不能为空</error_msg>
    </result>
</alibaba_pur_supplier_invoicecreate_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部