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

alibaba.pur.file.create (创建附件)

创建附件

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
sourcing_attachment_top_out_d_t_o SourcingAttachmentTopOutDto [] 可选
  • 最大列表长度:999
  • 附件属性对象
    • └ channel
    • String
    • 可选
    • 1
    • 渠道
    • └ account_name
    • String
    • 可选
    • 1
    • 账号名称
    • └ account_id
    • String
    • 可选
    • 1
    • 账号ID
    • └ price_position
    • String
    • 可选
    • 1
    • 报价位置

    响应参数

    名称 类型 示例值 描述
    content String 1 附件资源ID
    error_level Number 1 错误级别

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaPurFileCreateRequest req = new AlibabaPurFileCreateRequest();
    List<AlibabaPurFileCreateRequest.SourcingAttachmentTopOutDto> list2 = new ArrayList<AlibabaPurFileCreateRequest.SourcingAttachmentTopOutDto>();
    AlibabaPurFileCreateRequest.SourcingAttachmentTopOutDto obj3 = new AlibabaPurFileCreateRequest.SourcingAttachmentTopOutDto();
    list2.add(obj3);
    obj3.setChannel("1");
    obj3.setAccountName("1");
    obj3.setAccountId("1");
    obj3.setPricePosition("1");
    req.setSourcingAttachmentTopOutDTO(list2);
    AlibabaPurFileCreateResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_pur_file_create_response>
        <content>1</content>
        <error_level>1</error_level>
    </alibaba_pur_file_create_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

    返回
    顶部