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

alibaba.pr.query (pr查询)

查询pr信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
pr_query_dto PrQueryDTO 可选 pr查询入参
  • └ need_file
  • Boolean
  • 可选
  • true
  • 是否需要附件信息
  • └ status_list
  • String []
  • 可选
  • null
  • 状态
  • └ source_type_list
  • String []
  • 可选
  • null
  • 来源类型
  • └ pr_item_id_list
  • Number []
  • 可选
  • null
  • PR行ID,如果传了prItemIdList并且needItem=true,返回结果时这些itemId对应PR下的所有item,不只是这些itemId对应的item
  • └ pr_number_list
  • String []
  • 可选
  • null
  • PR编号
  • └ exclude_pr_number_list
  • String []
  • 可选
  • null
  • 排除的PR编号
  • └ pr_id_list
  • Number []
  • 可选
  • null
  • PRID
  • └ source_value_list
  • String []
  • 可选
  • null
  • 来源值
  • └ need_finance_distribution
  • Boolean
  • 可选
  • true
  • 是否需要财务分摊信息
  • └ need_item
  • Boolean
  • 可选
  • true
  • 是否需要item信息
  • └ requestor
  • String
  • 可选
  • 110711
  • 需求方
  • └ applicant
  • String
  • 可选
  • 1
  • 申请人
  • └ need_surplus_amount
  • Boolean
  • 可选
  • true
  • 是否需要剩余金额信息
  • └ need_custom_info
  • Boolean
  • 可选
  • true
  • 是否需要定制信息

响应参数

名称 类型 示例值 描述
result ActionResult null 获取url的出参
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ error_code
  • String
  • 500
  • 码值
  • contents
  • PrTopResponseDTO []
  • null
  • 返回内容
  • └ applicant
  • String
  • 知示
  • 申请人
  • └ requestor
  • String
  • 早霞
  • 实际需求方
  • └ pr_number
  • String
  • PR200293
  • PR编号
  • └ security_id
  • String
  • 123werwr2
  • 加密ID
  • └ id
  • Number
  • fsdsf234
  • id
  • └ company_code
  • String
  • 487
  • 公司CODE
  • └ source_type
  • String
  • 2
  • 来源类型
  • └ source_value
  • String
  • 3
  • 来源值
  • └ status
  • String
  • 成功
  • 状态
  • └ purchase_org_id
  • Number
  • 19976
  • 采购组织ID
  • └ currency_code
  • String
  • 1390
  • PR行上币种一致返回,如果PR行币种不一致不返回
  • └ simplified_process
  • Boolean
  • true
  • 过程
  • └ need_approval
  • Boolean
  • true
  • 是否需要审批
  • └ amount
  • String
  • 100000
  • PR行上币种一致返回,如果PR行币种不一致不返回
  • └ submit_date
  • Date
  • 2020-01-22 02:22:11
  • 提交日期
  • └ edit_url
  • String
  • https://baidu.com
  • 编辑页URL
  • └ detail_url
  • String
  • https://baidu.com
  • 详情页URL
  • └ associated_existing_pr
  • String
  • PR10092
  • 关联的PR
  • └ tenant_id
  • Number
  • 10001
  • 租户ID
  • └ purchase_type
  • String
  • 1
  • 采购类型,如生产采购
  • └ ext
  • String
  • null
  • 扩展信息
  • pr_items
  • PrItemTopResponseDTO []
  • null
  • PR采购项
  • └ id
  • Number
  • 23423
  • id
  • └ source_type
  • String
  • null
  • 来源类型
  • └ source_value
  • String
  • null
  • 来源值
  • └ item_type
  • String
  • null
  • 物料类别,如采购件、制造件
  • └ item_code
  • String
  • null
  • 物料编码,如MPN,skuId
  • └ item_name
  • String
  • null
  • 采购需求名称
  • └ item_description
  • String
  • null
  • 采购需求说明
  • └ category_code
  • String
  • null
  • 采购类别CODE
  • └ category_use
  • String
  • null
  • 采购用途CODE
  • └ acceptance_standard
  • String
  • null
  • 验收标准
  • └ uom
  • String
  • null
  • 单位
  • └ unit_price
  • String
  • 2.00
  • 单价
  • └ quantity
  • Number
  • 300
  • 数量,废弃,数量支持小数,请用quantityDecimal
  • └ quantity_decimal
  • String
  • null
  • 数量
  • └ amount
  • String
  • 200000
  • 金额
  • └ currency_code
  • String
  • null
  • 币种
  • └ need_date_start
  • Date
  • 2020-01-22 02:22:11
  • 期望到货日期开始
  • └ need_date_end
  • Date
  • 2020-01-22 02:22:11
  • 期望到货日期结束
  • └ buyer
  • String
  • null
  • 采购员
  • └ address_id
  • Number
  • null
  • 收货地址ID
  • └ address_info
  • String
  • null
  • 收货地址描述
  • └ receiver
  • String
  • null
  • 收货人
  • └ purchase_org_id
  • Number
  • null
  • 采购组织ID
  • └ purchase_requisition_id
  • Number
  • PR10084
  • PRID
  • └ goods_quotation_id
  • Number
  • 2323
  • 商品id
  • └ address_ext
  • String
  • 杭州市余杭区
  • 地址扩展信息
  • └ sku_id
  • Number
  • 1001
  • skuId
  • └ gmt_create
  • Date
  • 2020-01-22 02:22:11
  • 创建日期
  • └ remark
  • String
  • 你好呀
  • 备注
  • └ status
  • String
  • null
  • 状态
  • └ project_id
  • Number
  • 1009
  • 项目ID
  • └ budget_id
  • Number
  • 1009
  • 预算项ID
  • └ line_number
  • Number
  • 111
  • 行号
  • └ product_id
  • Number
  • 111
  • 产品ID
  • └ is_designated_supplier
  • String
  • null
  • 是否指定供应商
  • └ designated_supplier
  • String
  • null
  • 供应商
  • └ pur_type
  • String
  • null
  • 采购方式,如目录采购
  • └ tenant_id
  • Number
  • 1222
  • 租户ID
  • └ supplier_id
  • Number
  • 1222
  • 供应商ID
  • └ contract_code
  • String
  • afd1234234324
  • 合同编号
  • └ tax_rate
  • String
  • 1.01
  • 税率
  • └ item_attr_info
  • String
  • null
  • 规格属性
  • └ po_unit_price
  • String
  • 20000
  • 创建PO单价
  • └ ext
  • String
  • null
  • 扩展信息
  • └ is_pr_by_detail
  • Boolean
  • true
  • 是否有结构化数据
  • finance_distribution_list
  • FinanceDistributionTopDTO []
  • null
  • 财务分摊信息
  • └ id
  • Number
  • 11132
  • id
  • └ biz_id
  • Number
  • 1
  • bizId
  • └ allocation_amount
  • String
  • 10000
  • 金额
  • └ allocation_quantity
  • String
  • 10000
  • 数量
  • └ unit_price
  • String
  • 10000
  • 价格
  • └ total_amount
  • String
  • 199999
  • 总共金额
  • └ total_quantity
  • String
  • 19999
  • 总共数量
  • └ allocation_value
  • String
  • 333
  • 允许值
  • └ item_description
  • String
  • 这件很好
  • 描述
  • └ parent_distribution_id
  • Number
  • 4
  • 父id
  • └ acct_ccid
  • Number
  • 12
  • ccid
  • └ source_id
  • Number
  • 122
  • 来源id
  • └ currency_code
  • String
  • 1
  • 现在code
  • └ order_type
  • String
  • 3
  • 开单方式
  • └ surplus_amount_max
  • String
  • 100.00
  • PR行剩余金额的总和
  • └ surplus_amount_sum
  • String
  • 30.00
  • PR行剩余最的大金额
  • └ category_use_name
  • String
  • 默认规则
  • 采购用途中文描述
  • └ category_name
  • String
  • IT
  • 采购类目中文描述
  • └ buyer_name
  • String
  • 嘻嘻
  • 采购员名称
  • └ cancel_amount
  • String
  • 20.00
  • PR行已作废金额
  • files
  • AecpFile []
  • null
  • 附件
  • └ id
  • String
  • 1
  • id
  • └ name
  • String
  • 1
  • 名称
  • └ url
  • String
  • https://www.baidi.com
  • url路径
  • └ preview_url
  • String
  • https://www.baidi.com
  • previewUrl
  • uploader
  • AliEmployee
  • null
  • 员工
  • └ work_no
  • String
  • wb8073453
  • 工号
  • └ name
  • String
  • 李红
  • 名称
  • └ nick_name
  • String
  • 红红
  • 昵称
  • └ upload_time
  • Date
  • 2020-01-22 02:22:11
  • 更新时间
  • └ amount_available
  • String
  • 50.00
  • PR可用金额
  • └ status_desc
  • String
  • 审批完成
  • 审批状态描述
  • └ ou_name
  • String
  • 蚂蚁
  • OU名称
  • └ ou_code
  • String
  • Z69
  • OU编码
  • person_list
  • PersonDTO []
  • 当前审批人信息
  • └ work_no
  • String
  • 123456
  • 工号
  • └ user_name
  • String
  • 张三(test)
  • 名称(花名)
  • └ error_msg
  • String
  • 错误了
  • 错误信息
  • └ error_level
  • Number
  • 3
  • 错误信息级别

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaPrQueryRequest req = new AlibabaPrQueryRequest();
AlibabaPrQueryRequest.PrQueryDTO obj1 = new AlibabaPrQueryRequest.PrQueryDTO();
obj1.setNeedFile(true);
obj1.setStatusList("null");
obj1.setSourceTypeList("null");
obj1.setPrItemIdList(new Long[] { null };
);
obj1.setPrNumberList("null");
obj1.setExcludePrNumberList("null");
obj1.setPrIdList(new Long[] { null };
);
obj1.setSourceValueList("null");
obj1.setNeedFinanceDistribution(true);
obj1.setNeedItem(true);
obj1.setRequestor("110711");
obj1.setApplicant("1");
obj1.setNeedSurplusAmount(true);
obj1.setNeedCustomInfo(true);
req.setPrQueryDto(obj1);
AlibabaPrQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_pr_query_response>
    <result>
        <success>true</success>
        <error_code>500</error_code>
        <contents>
            <pr_top_response_d_t_o>
                <applicant>知示</applicant>
                <requestor>早霞</requestor>
                <pr_number>PR200293</pr_number>
                <security_id>123werwr2</security_id>
                <id>fsdsf234</id>
                <company_code>487</company_code>
                <source_type>2</source_type>
                <source_value>3</source_value>
                <status>成功</status>
                <purchase_org_id>19976</purchase_org_id>
                <currency_code>1390</currency_code>
                <simplified_process>true</simplified_process>
                <need_approval>true</need_approval>
                <amount>100000</amount>
                <submit_date>2020-01-22 02:22:11</submit_date>
                <edit_url>https://baidu.com</edit_url>
                <detail_url>https://baidu.com</detail_url>
                <associated_existing_pr>PR10092</associated_existing_pr>
                <tenant_id>10001</tenant_id>
                <purchase_type>1</purchase_type>
                <ext>null</ext>
                <pr_items>
                    <pr_item_top_response_d_t_o>
                        <id>23423</id>
                        <source_type>null</source_type>
                        <source_value>null</source_value>
                        <item_type>null</item_type>
                        <item_code>null</item_code>
                        <item_name>null</item_name>
                        <item_description>null</item_description>
                        <category_code>null</category_code>
                        <category_use>null</category_use>
                        <acceptance_standard>null</acceptance_standard>
                        <uom>null</uom>
                        <unit_price>2.00</unit_price>
                        <quantity>300</quantity>
                        <quantity_decimal>null</quantity_decimal>
                        <amount>200000</amount>
                        <currency_code>null</currency_code>
                        <need_date_start>2020-01-22 02:22:11</need_date_start>
                        <need_date_end>2020-01-22 02:22:11</need_date_end>
                        <buyer>null</buyer>
                        <address_id>null</address_id>
                        <address_info>null</address_info>
                        <receiver>null</receiver>
                        <purchase_org_id>null</purchase_org_id>
                        <purchase_requisition_id>PR10084</purchase_requisition_id>
                        <goods_quotation_id>2323</goods_quotation_id>
                        <address_ext>杭州市余杭区</address_ext>
                        <sku_id>1001</sku_id>
                        <gmt_create>2020-01-22 02:22:11</gmt_create>
                        <remark>你好呀</remark>
                        <status>null</status>
                        <project_id>1009</project_id>
                        <budget_id>1009</budget_id>
                        <line_number>111</line_number>
                        <product_id>111</product_id>
                        <is_designated_supplier>null</is_designated_supplier>
                        <designated_supplier>null</designated_supplier>
                        <pur_type>null</pur_type>
                        <tenant_id>1222</tenant_id>
                        <supplier_id>1222</supplier_id>
                        <contract_code>afd1234234324</contract_code>
                        <tax_rate>1.01</tax_rate>
                        <item_attr_info>null</item_attr_info>
                        <po_unit_price>20000</po_unit_price>
                        <ext>null</ext>
                        <is_pr_by_detail>true</is_pr_by_detail>
                        <finance_distribution_list>
                            <finance_distribution_top_d_t_o>
                                <id>11132</id>
                                <biz_id>1</biz_id>
                                <allocation_amount>10000</allocation_amount>
                                <allocation_quantity>10000</allocation_quantity>
                                <unit_price>10000</unit_price>
                                <total_amount>199999</total_amount>
                                <total_quantity>19999</total_quantity>
                                <allocation_value>333</allocation_value>
                                <item_description>这件很好</item_description>
                                <parent_distribution_id>4</parent_distribution_id>
                                <acct_ccid>12</acct_ccid>
                                <source_id>122</source_id>
                                <currency_code>1</currency_code>
                            </finance_distribution_top_d_t_o>
                        </finance_distribution_list>
                        <order_type>3</order_type>
                        <surplus_amount_max>100.00</surplus_amount_max>
                        <surplus_amount_sum>30.00</surplus_amount_sum>
                        <category_use_name>默认规则</category_use_name>
                        <category_name>IT</category_name>
                        <buyer_name>嘻嘻</buyer_name>
                        <cancel_amount>20.00</cancel_amount>
                    </pr_item_top_response_d_t_o>
                </pr_items>
                <files>
                    <aecp_file>
                        <id>1</id>
                        <name>1</name>
                        <url>https://www.baidi.com</url>
                        <preview_url>https://www.baidi.com</preview_url>
                        <uploader>
                            <work_no>wb8073453</work_no>
                            <name>李红</name>
                            <nick_name>红红</nick_name>
                        </uploader>
                        <upload_time>2020-01-22 02:22:11</upload_time>
                    </aecp_file>
                </files>
                <amount_available>50.00</amount_available>
                <status_desc>审批完成</status_desc>
                <ou_name>蚂蚁</ou_name>
                <ou_code>Z69</ou_code>
                <person_list>
                    <person_d_t_o>
                        <work_no>123456</work_no>
                        <user_name>张三(test)</user_name>
                    </person_d_t_o>
                </person_list>
            </pr_top_response_d_t_o>
        </contents>
        <error_msg>错误了</error_msg>
        <error_level>3</error_level>
    </result>
</alibaba_pr_query_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

返回
顶部