purinvoice/get
目录 |
1.接口说明
1.1接口描述
获取单个单张采购发票
1.2适用版本
支持U8V12.0 及更高版本
2.使用场景
采购应用
3.接口调用说明
3.1请求说明
| url | https://api.yonyouup.com/api/purinvoice/get |
| 格式 | JSON |
| https请求方式 | GET |
3.2url参数说明
| 参数 | 是否必填 | 类型 | 描述 |
|---|---|---|---|
| from_account | 是 | sting | 调用方id |
| to_account | 是 | string | 提供方id |
| app_key | 是 | string | 应用编码 |
| token | 是 | string | 全局访问唯一识别码 |
| ds_sequence | 否 | number | 数据源序号(默认取应用的第一个数据源) |
| id | 是 | string | 采购发票号 |
3.3请求示例
GET https://api.yonyouup.com/api/purinvoice/get?from_account=openapi_dev&to_account=openapi_ent&app_key=opa6fdd4bea98b95ad7&token=26d2fc4a06844448957a7f8260f3d08b&id=xxxxx
3.4返回参数说明
| 参数说明 | 类型 | 参数路径 | 描述 |
|---|---|---|---|
| errcode | string | 错误码,0 为正常。 | |
| errmsg | string | 错误信息。 | |
| type | string | 采购发票类型 | |
| cpbvcode | string | 采购发票号 | |
| cexchrate | number | 汇率 | |
| cexch_name | string | 币种 | |
| cexch_code | string | 币种编码 | |
| cdepname | string | 部门名称 | |
| cdepcode | string | 部门编码 | |
| cptname | string | 采购类型名称 | |
| cptcode | string | 采购类型编码 | |
| cpersonname | string | 业务员名称 | |
| cpersoncode | string | 业务员编码 | |
| cvenname | string | 供应商名称 | |
| cvencode | string | 供应商编码 | |
| cvenabbname | string | 供应商简称 | |
| ipbvtaxrate | number | 表头税率 | |
| dpbvdate | date | 开票日期 | |
| cpbvbilltype | string | 发票类型 | |
| cbustype | string | 业务类型 | |
| cordercode | string | entry | 采购订单号 |
| cinvm_unit | string | entry | 主计量 |
| ccomunitcode | string | entry | 主计量单位编码 |
| cinva_unit | string | entry | 采购单位 |
| cunitid | string | entry | 采购单位编码 |
| cinvcode | string | entry | 存货编码 |
| cinvname | string | entry | 存货名称 |
| cinvstd | string | entry | 规格型号 |
| ipbvquantity | number | entry | 数量 |
| ivouchrowno | number | entry | 行号 |
| inum | number | entry | 件数 |
| itaxrate | number | entry | 税率 |
| icost | number | entry | 本币单价 |
| imoney | number | entry | 本币金额 |
| itaxprice | number | entry | 本币税额 |
| isum | number | entry | 本币价税合计 |
| ioricost | number | entry | 原币单价 |
| iorimoney | number | entry | 原币金额 |
| ioritaxprice | number | entry | 原币税额 |
| ioritaxcost | number | entry | 原币含税单价 |
| iorisum | number | entry | 原币价税合计 |
3.5正确返回示例
JSON示例:
application/json;charset=UTF-8
{
"errmsg":"",
"errcode":"0",
"purinvoice":{
"cexchrate":"1.0",
"cpbvbilltype":"01",
"cdepname":"采购部",
"cdepcode":"0401",
"cexch_code":"RMB",
"cvenabbname":"辰环手机配件",
"cexch_name":"人民币",
"cpersonname":"顾潇",
"cbustype":"直运采购",
"ipbvtaxrate":"17.0",
"type":"专用发票",
"cpbvcode":"0000000001",
"cpersoncode":"00043",
"cptcode":"",
"cvencode":"01002",
"dpbvdate":"2014-12-3100:00:00.0",
"cvenname":"深圳辰环手机配件有限公司",
"cptname":"",
"entry":[
{
"imoney":"2500.0000",
"cinvm_unit":"PCS",
"cunitid":"",
"itaxrate":"0E-10",
"cinva_unit":"",
"isum":"2500.0000",
"cinvstd":"汇智PR2510N包装套件",
"ivouchrowno":"1",
"iorisum":"2500.0000",
"ipbvquantity":"5000.0000000000",
"cinvcode":"B010-39100240",
"cinvname":"包装套件",
"ccomunitcode":"0108",
"id":"1000000001",
"iorimoney":"2500.0000",
"ioritaxprice":"0.0000",
"inum":"0E-10",
"ioritaxcost":"0.500000",
"ioricost":"0.5000000000",
"icost":"0.5000000000",
"itaxprice":"0.0000"
},
{
"imoney":"650.0000",
"cinvm_unit":"PCS",
"cunitid":"",
"itaxrate":"0E-10",
"cinva_unit":"",
"isum":"650.0000",
"cinvstd":"汇智PR2510N包装套件",
"ivouchrowno":"1",
"iorisum":"650.0000",
"ipbvquantity":"1300.0000000000",
"cinvcode":"B010-39100240",
"cinvname":"包装套件",
"ccomunitcode":"0108",
"id":"1000000002",
"iorimoney":"650.0000",
"ioritaxprice":"0.0000",
"inum":"0E-10",
"ioritaxcost":"0.500000",
"ioricost":"0.5000000000",
"icost":"0.5000000000",
"itaxprice":"0.0000"
}
]
}
}
3.6错误返回示例
application/json;charset=UTF-8
{
"errcode":"30021",
"errmsg":"此应用未上线"
}