- 用途说明:查询商品详情
- 请求方式:POST
- 请求地址:http://api.kingdee.com/jdy/basedata/material_detail?access_token=
请求参数
headers参数
- 所有的接口必须携带header参数
| 参数名称 | 参数示例 | 是否必填 | 参数说明 |
|---|---|---|---|
| Content-Type | application/json | true | 固定传:application/json |
| groupName | ns-v7g6 | true | 分组名称,获取授权信息时返回的groupName |
| accountId | 16xxxxxxxxxxxx | true | 账套ID,获取授权信息时返回的accountId |
| X-GW-Router-Addr | https://tf.jdy.com | true | IDC域名,获取授权信息时返回的domain |
params参数
| 参数名称 | 必选 | 类型 | 说明 |
|---|---|---|---|
| id | true | number | 商品ID |
| number | true* | number | 商品编码(*id与number二选一) |
请求示例
'http://api.kingdee.com/jdy/basedata/material_detail?access_token=XXX'
-H 'Cache-Control: no-cache'
-H 'Connection: keep-alive'
-H 'Content-type: application/json;charset=utf-8'
-H 'groupname: ns-v7g6'
-H 'accountid: 1584244570835057173'
-d '{id:925150323784304640}'
响应参数
data数据结构
| 参数名称 | 类型 | 说明 |
|---|---|---|
| id | number | 商品id(修改商品时必填) |
| number | String | 商品编码,不传递则由后台生成(不设置有编码规则和更新时必传) |
| name | String | 商品名称 |
| enable | String | 状态(1启用,0禁用) |
| baseunitid_id | String | 计量单位id |
| baseunitid_name | String | 基本单位名称 |
| auxunitid_name | String | 辅助单位名称 |
| mullabel | json<[mullabel](# 商品标签对象 mullabel)> | 商品标签 |
| parent_id | String | 商品分类id |
| barcode | String | 条形码 |
| model | String | 规格型号 |
| brandid_id | String | 品牌 |
| producingpace | String | 产地 |
| helpcode | String | 助记码 |
| ismulti_unit | boolean | 是否启用多单位,默认false,不启用 |
| fixunit1_id | String | 辅助单位1,启动多单位,才需要传递 |
| coefficient1 | number | 换算率1 |
| conversionunitid1_id | String | 换算单位1 |
| fixunit2_id | String | 辅助单位2 |
| coefficient2 | number | 换算率2 |
| conversionunitid2_id | String | 换算单位2 |
| fixunit3_id | String | 辅助单位3 |
| coefficient3 | number | 换算率3 |
| conversionunitid3_id | String | 换算单位3 |
| purchaseunitid_id | String | 采购单位 |
| saleunitid_id | String | 销售单位 |
| storeunitid_id | String | 库存单位 |
| auxunitid_id | String | 报表辅助单位 |
| auxunitid_number | String | 报表辅助单位 |
| isweight | boolean | 是否启用称重 |
| isserial | boolean | 是否启用序列号管理 |
| isbatch | boolean | 是否启用批次管理 |
| issale | boolean | 是否可销售 |
| ispurchase | boolean | 是否可采购 |
| issubpart | boolean | 是否可为子件 |
| isassembly | boolean | 是否可为组件 |
| iskfperiod | boolean | 是否启用保质期 |
| kfperiodtype | String | 保质期单位,1:天,2:月,3:年 |
| kfperiod | String | 保质期 |
| alarmday | String | 预警天数 |
| isasstattr | boolean | 是否启用辅助属性,默认false |
| auxentity | array<[auxentity](# 辅助属性对象 auxentity)> | 辅助属性 |
| barcodeentity | array<[barcodeentity](# 商品条码对象 barcodeentity)> | 商品条码 |
| priceentity | array<[priceentity](# 商品价格对象 priceentity)> | 商品价格 |
| inv_mgr_type | String | 库存管理方式,0:统一库存,1:分仓库存,默认统一库存 |
| mininventoryqty | String | 最低库存 |
| maxinventoryqty | String | 最高库存 |
| secinventoryqty | String | 预警库存 |
| costmethod | String | 成本计算方法, 1:移动平均法,2:加权平均法,3:先进先出法 |
| fetchcategoryid_id | String | 税收分类编码 |
| taxrate | String | 税率 |
| stockid_id | String | 默认仓库 |
| spaceid_id | String | 默认仓位 |
| venderid_id | String | 默认供应商 |
| purchaseid_id | String | 采购员 |
| refistrationnumber | String | 注册证号 |
| prolicense | String | 生产许可证 |
| gross_weight | String | 毛重 |
| net_weight | String | 净重 |
| length | String | 长 |
| wide | String | 宽 |
| high | String | 高 |
| volume | String | 体积 |
| images | array | 商品图片,商品图片服务器连接(上传图片接口的返回值)的集合,多个用英文逗号分隔 |
| checktype | String | 商品类型,普通:1、套装:2、服务:3 |
| remark | String | 备注 |
商品标签对象 mullabel
| 参数名称 | 类型 | 说明 |
|---|---|---|
| number | String | 商品标签编码,多个编码使用英文逗号隔开 |
辅助属性对象 auxentity
| 参数名称 | 类型 | 说明 |
|---|---|---|
| id | number | id |
| skuid | String | 辅助属性id,传递则更新 |
| skunumber | String | SKU编码 |
| pictureurl | String | 辅助属性主图 |
| mulpictureurl | String | 辅助属性图片集合(包含url属性的json对象集合的字符串) |
| auxid1_id | String | 辅助属性1 |
| auxid1_number | String | 辅助属性1编码 |
| auxid1_name | String | 辅助属性1名称 |
| auxtypeid1_id | String | 辅助属性类型1 |
| auxtypeid1_number | String | 辅助属性类型1编码 |
| auxtypeid1_name | String | 辅助属性类型1名称 |
| auxid2_id | String | 辅助属性2 |
| auxid2_number | String | 辅助属性2编码 |
| auxid2_name | String | 辅助属性2名称 |
| auxtypeid2_id | String | 辅助属性类型2 |
| auxtypeid2_number | String | 辅助属性类型2编码 |
| auxtypeid2_name | String | 辅助属性类型2名称 |
| auxid3_id | String | 辅助属性3 |
| auxid3_number | String | 辅助属性3编码 |
| auxid3_name | String | 辅助属性3名称 |
| auxtypeid3_id | String | 辅助属性类型3 |
| auxtypeid3_number | String | 辅助属性类型3编码 |
| auxtypeid3_name | String | 辅助属性类型3名称 |
| auxid4_id | String | 辅助属性4 |
| auxid4_number | String | 辅助属性4编码 |
| auxid4_name | String | 辅助属性4名称 |
| auxtypeid4_id | String | 辅助属性类型4 |
| auxtypeid4_number | String | 辅助属性类型4编码 |
| auxtypeid4_name | String | 辅助属性类型4名称 |
| auxid5_id | String | 辅助属性5 |
| auxid5_number | String | 辅助属性5编码 |
| auxid5_name | String | 辅助属性5名称 |
| auxtypeid5_id | String | 辅助属性类型3 |
| auxtypeid5_number | String | 辅助属性类型5编码 |
| auxtypeid5_name | String | 辅助属性类型5名称 |
| auxcombinationname | String | 辅助属性名称连接,使用/分隔每个属性 |
| concattypeid | String | 多个辅助属性id连接串,使用英文逗号隔开 |
套装明细对象 bomentity
| 参数名称 | 类型 | 说明 |
|---|---|---|
| id | String | 套装分录id,传递则更新 |
| materialid_id | String | 商品id |
| materialid_name | String | 商品名称 |
| materialid_number | String | 商品编码 |
| bomaux_id | String | 辅助属性id |
| bomaux_name | String | 辅助属性名称 |
| bomaux_number | String | 辅助属性编码 |
| auxid1_id | String | 辅助属性1 |
| auxid1_number | String | 辅助属性1编码 |
| auxid1_name | String | 辅助属性1名称 |
| auxid2_id | String | 辅助属性2 |
| auxid2_number | String | 辅助属性2编码 |
| auxid2_name | String | 辅助属性2名称 |
| auxid3_id | String | 辅助属性3 |
| auxid3_number | String | 辅助属性3编码 |
| auxid3_name | String | 辅助属性3名称 |
| auxid4_id | String | 辅助属性4 |
| auxid4_number | String | 辅助属性4编码 |
| auxid4_name | String | 辅助属性4名称 |
| auxid5_id | String | 辅助属性5 |
| auxid5_number | String | 辅助属性5编码 |
| auxid5_name | String | 辅助属性5名称 |
| unitid_id | String | 套装计量单位id |
| unitid_name | String | 套装计量单位名称 |
| unitid_number | String | 套装计量单位编码 |
| qty | String | 数量 |
| price | String | 单价 |
| amount | String | 金额 |
| entrycostprice | String | 参考成本 |
| costamount | String | 成本 |
| isfree | boolean | 是否赠品 |
| isreplace | boolean | 是否允许替换 |
| materialreplace | array<[materialreplace] | 替换商品 |
套装商品替换商品对象 materialreplace
| 参数名称 | 类型 | 说明 |
|---|---|---|
| id | String | 替换商品id |
| number | String | 替换商品编码 |
| name | String | 替换商品名称 |
| baseunitid_id | String | 替换商品计量单位id |
| baseunitid_name | String | 替换商品计量单位名称 |
| baseunitid_number | String | 替换商品计量单位编码 |
商品条码对象 barcodeentity
| 参数名称 | 类型 | 说明 |
|---|---|---|
| id | String | 条形码id,传递则更新 |
| barcode_barcode | String | 条形码 |
| barcode_unitid_id | String | 条码单位id |
| barcode_unitid_name | String | 条码单位名称 |
| barcode_unitid_number | String | 条码单位编码 |
| seq | number | 条码分录序号 |
| barcode_skuid | number | SKUID |
| barcode_skunumber | String | SKU编码 |
| barcode_name | String | 辅助属性名称 |
| barcode_propauxid | barcodeentity.aux | 辅助属性 |
| barcode_auxid1 | TY-002 | 辅助属性1 |
| barcode_auxid2 | TY-002 | 辅助属性2 |
| barcode_auxid3 | TY-002 | 辅助属性3 |
| barcode_unitid | TY-002 | 单位 |
商品价格对象 priceentity
| 参数名称 | 类型 | 说明 |
|---|---|---|
| id | String | 商品价格id,传递则更新 |
| price_barcode | String | 条形码 |
| price_unitid_id | String | 价格单位id |
| price_unitid_name | String | 价格单位名称 |
| price_unitid_number | String | 价格单位编码 |
| price_purchaseprice | String | 采购价 |
| price_maxpurchaseprice | String | 最高采购价 |
| price_costprice | String | 参考成本 |
| price_distributionprice | String | 配送价 |
| price_tradeprice | String | 批发价 |
| price_retailprice | String | 零售价 |
| price_minsalesprice | String | 最低销售价 |
| price_nearpurprice | String | 最近采购单价 |
| price_nearpurtaxprice | String | 最近采购含税单价 |
| price_nearsalprice | String | 最近销售单价 |
| price_nearsaltaxprice | String | 最近销售含税单价 |
| price_saleprice1 | String | 价格等级1 |
| price_saleprice2 | String | 价格等级2 |
| price_saleprice3 | String | 价格等级3 |
| price_auxid_id | String | 辅助属性id |
| price_auxid1_id | String | 辅助属性1id |
| price_auxid1_number | String | 辅助属性1编码 |
| price_auxid1_name | String | 辅助属性1名称 |
| price_auxid2_id | String | 辅助属性2id |
| price_auxid2_number | String | 辅助属性2编码 |
| price_auxid2_name | String | 辅助属性2名称 |
| price_auxid3_id | String | 辅助属性3id |
| price_auxid3_number | String | 辅助属性3编码 |
| price_auxid3_name | String | 辅助属性3名称 |
| price_auxid4_id | String | 辅助属性4id |
| price_auxid4_number | String | 辅助属性4编码 |
| price_auxid4_name | String | 辅助属性4名称 |
| price_auxid5_id | String | 辅助属性5id |
| price_auxid5_number | String | 辅助属性5编码 |
| price_auxid5_name | String | 辅助属性5名称 |
| price_minpurtaxprice | String | 最低含税采购价 |
| price_nearpurunitcost | String | 最近采购入库成本 |
| price_nearsupplier | String | 最近成交供应商 |
响应示例
{
success: true,
data: {
auxunitid_name: 555,
isautosplit: true,
isfloat: false,
modifierfield_id: 676,
number: a20,
baseunitid_name: 555,
modifierfield_number: 36937,
enable: 1,
retailprice: 0,
auxtype1: false,
model: ,
id: 828924464967199744,
secinventoryqty: 0,
auxtype3: false,
auxtype2: false,
saleunitid_name: 555,
createrfield_id: 676,
computationrule: 1,
disabledate: ,
purchaseunitid_number: 555,
issubpart: true,
mullabel: [],
priceentity: [
{
id: 828924469866146816,
seq: 1,
price_unitid_id: 773137134616844288,
price_unitid_number: 555,
price_unitid_name: 555,
price_auxid: null,
price_barcode: ,
price_purchaseprice: 0,
price_saleprice1: 0,
price_saleprice2: 0,
price_saleprice3: 0,
price_saleprice4: 0,
price_saleprice5: 0,
price_saleprice6: 0,
price_saleprice7: 0,
price_saleprice8: 0,
price_saleprice9: 0,
price_saleprice10: 0,
price_skuid: 0,
price_name: ,
price_auxid1: null,
price_auxid2: null,
price_auxid3: null,
price_tradeprice: 0,
price_costprice: 0,
price_maxpurchaseprice: 0,
price_minsalesprice: 0,
price_distributionprice: 0,
price_retailprice: 0
}
],
fullpinyin: a20,
auxunitid_number: 555,
maxpurchaseprice: 0,
kfperiodtype: 1,
costprice: 0,
radio_accout: false,
inv_mgr_type: 0,
isserial: false,
radio_costprice: false,
helpcode: ,
kfperiod: 0,
ismulti_unit: false,
createtime: 2020-02-18 16:44:56,
isbatchcost: false,
radio_all: false,
isbatch: false,
url: http://tf-feature1.jdy.com/fileserver/jdyattachmentimage/jdy/19002/202002/api/apiForm/1/attachments/71280421920309248/E99984E4BBB61.jpg,
stockup_day: 0,
refistrationnumber: ,
fixunitcount: 0,
mininventoryqty: 0,
baseunitid_id: 773137134616844288,
isinvauxset: false,
isassembly: true,
net_weight: 0,
txtbarcode: ,
storeunitid_name: 555,
checktype: 1,
high: 0,
producingpace: ,
purchaseunitid_name: 555,
iskfperiod: false,
gross_weight: 0,
barcode: ,
taxrate: 0,
store_entity: [
{
id: 828924469866158081,
seq: 1,
store_storeid: null,
store_auxid: null,
store_auxid1: null,
store_auxid2: null,
store_auxid3: null,
store_minqty: 0,
stroe_maxqty: 0,
stroe_secqty: 0,
store_skuid: 0,
store_aux_name: null,
space_spid: null
}
],
barcodeentity: [],
saleunitid_id: 773137134616844288,
volume: 0,
createrfield_number: 36937,
pinyin: a20,
name: a20,
coefficient4: 0,
storeunitid_number: 555,
coefficient3: 0,
coefficient2: 0,
isweight: false,
coefficient1: 0,
costmethod: 1,
baseunitid_number: 555,
saleunitid_number: 555,
isauxcost: false,
modifytime: 2020-02-18 17:44:34,
auxentity: [],
issale: true,
isasstattr: false,
minsalesprice: 0,
multicount: 0,
createrfield_name: 张海生,
storeunitid_id: 773137134616844288,
purchaseunitid_id: 773137134616844288,
auxunitid_id: 773137134616844288,
seccoefficient: 0,
alarmday: 0,
bomentity: [],
prolicense: ,
tradeprice: 0,
modifierfield_name: 张海生,
wide: 0,
attachmentcountfield: 0,
maxinventoryqty: 0,
length: 0,
ispurchase: true,
purchaseprice: 0,
bomprice: 0,
radio_stock: false,
isshowauxbarcode: false
},
errorCode: success
}