销售管理类

    returnorder/get


    目录

    1.接口说明

    1.1接口描述

         获取单个销售退货单

    1.2适用版本

         支持U8V12.0 及更高版本

    2.使用场景

    销售应用

    3.接口调用说明

    3.1请求说明

    url https://api.yonyouup.com/api/returnorder/get
    格式 JSON
    https请求方式 GET


    3.2url参数说明

    参数 是否必填 类型 描述
    from_account sting 调用方id
    to_account string 提供方id
    app_key string 应用编码
    token string 全局访问唯一识别码
    ds_sequence number 数据源序号(默认取应用的第一个数据源)
    id string id

    3.3请求示例

    GET https://api.yonyouup.com/api/returnorder/get?from_account=openapi_dev&to_account=openapi_ent&app_key=opa6fdd4bea98b95ad7&token=26d2fc4a06844448957a7f8260f3d08b&id=xxxxx


    3.4返回参数说明

    参数说明 类型 参数路径 描述
    errcode string   错误码,0 为正常。
    errmsg string   错误信息。
    code string 单据号
    date string 单据日期
    operation_type string 业务类型
    saletype string 销售类型编码
    saletypename string 销售类型
    state string 订单状态
    custcode string 客户编码
    cusname string 客户
    cusabbname string 客户简称
    deptcode string 部门编码
    deptname string 部门名称
    personcode string 人员编码
    personname string 人员
    define1 string 单据头自定义项1
    define2 string 单据头自定义项2
    define3 string 单据头自定义项3
    define4 date 单据头自定义项4
    define5 number 单据头自定义项5
    define6 date 单据头自定义项6
    define7 number 单据头自定义项7
    define8 string 单据头自定义项8
    define9 string 单据头自定义项9
    define10 string 单据头自定义项10
    define11 string 单据头自定义项11
    define12 string 单据头自定义项12
    define13 string 单据头自定义项13
    define14 string 单据头自定义项14
    define15 number 单据头自定义项15
    define16 number 单据头自定义项16
    remark string 备注
    socode string entry 销售订单号
    warehouse_code string entry 仓库编码
    warehouse_name string entry 仓库名称
    inventory_code string entry 存货编码
    inventory_name string entry 存货名称
    invstd string entry 存货规格
    ccomunitcode string entry 主计量单位编码
    cinvm_unit string entry 主计量单位
    quantity number entry 数量
    quotedprice number entry 报价
    money number entry 无税金额
    sum number entry 价税合计
    free1 string entry 自由项1
    free2 string entry 自由项2
    free3 string entry 自由项3
    free4 string entry 自由项4
    free5 string entry 自由项5
    free6 string entry 自由项6
    free7 string entry 自由项7
    free8 string entry 自由项8
    free9 string entry 自由项9
    free10 string entry 自由项10
    define22 string entry 单据体自定义项1
    define23 string entry 单据体自定义项2
    define24 string entry 单据体自定义项3
    define25 string entry 单据体自定义项4
    define26 number entry 单据体自定义项5
    define27 number entry 单据体自定义项6
    define28 string entry 单据体自定义项7
    define29 string entry 单据体自定义项8
    define30 string entry 单据体自定义项9
    define31 string entry 单据体自定义项10
    define32 string entry 单据体自定义项11
    define33 string entry 单据体自定义项12
    define34 number entry 单据体自定义项13
    define35 number entry 单据体自定义项14
    define36 string entry 单据体自定义项15
    define37 string entry 单据体自定义项16
    rowno number entry 行号
    batch string entry 批号
    dmdate string entry 生产日期
    overdate string entry 失效日期
    cmassunit string entry 保质期单位
    imassdate number entry 保质期
    expirationdate string entry 有效期至
    expiratdatecalcu number entry 有效期推算方式
    expirationitem date entry 有效期计算项
    price number entry 无税单价
    taxprice number entry 含税单价
    taxrate number entry 税率(%)
    tax number entry 税额
    natprice number entry 本币单价
    natmoney number entry 本币金额
    nattax number entry 本币税额
    natsum number entry 本币价税合计
    discount number entry 折扣额
    natdiscount number entry 本币折扣额
    discount1 number entry 扣率(%)
    discount2 number entry 扣率2(%)
    reasoncode string entry 退货原因编码
    reasonname string entry 退货原因

    3.5正确返回示例

    JSON示例:

    application/json;charset=UTF-8
    {
    	"returnorder":{
    		"remark":"",
    		"define1":"崔可",
    		"define2":"",
    		"define3":"",
    		"state":"Approved",
    		"define4":"",
    		"define5":"",
    		"define6":"",
    		"define7":"",
    		"date":"2014-12-02",
    		"define16":"",
    		"define8":"",
    		"define9":"",
    		"deptcode":"0302",
    		"deptname":"销售部",
    		"code":"0000000004",
    		"operation_type":"分期收款",
    		"cusabbname":"鹏程电子",
    		"define15":"",
    		"saletypename":"普通销售",
    		"define14":"",
    		"define13":"",
    		"define12":"",
    		"saletype":"01",
    		"define11":"",
    		"define10":"",
    		"personcode":"00040",
    		"custcode":"0215",
    		"cusname":"天津鹏程电子有限公司",
    		"entry":[
    			{
    				"expiratdatecalcu":"0",
    				"inventory_code":"01019002065",
    				"natmoney":"22307.6900",
    				"natprice":"743.5900000000",
    				"expirationdate":"",
    				"rowno":"1",
    				"dmdate":"",
    				"discount2":"100.0000000000",
    				"discount1":"100.0000000000",
    				"quantity":"30.0000000000",
    				"taxprice":"870.0000000000",
    				"define29":"",
    				"define27":"",
    				"define28":"",
    				"discount":"0.0000",
    				"define33":"",
    				"define32":"",
    				"define31":"",
    				"invstd":"希捷1000G/7200RPM/32M/SATA2/企业级",
    				"define30":"",
    				"price":"743.5900000000",
    				"tax":"3792.3100",
    				"define37":"",
    				"define36":"",
    				"batch":"",
    				"define35":"",
    				"define34":"",
    				"natsum":"26100.0000",
    				"warehouse_name":"PC原材料仓",
    				"expirationitem":"",
    				"quotedprice":"870.0000000000",
    				"free1":"",
    				"free3":"",
    				"free2":"",
    				"free5":"",
    				"sum":"26100.0000",
    				"free4":"",
    				"free7":"",
    				"free6":"",
    				"free9":"",
    				"free8":"",
    				"free10":"",
    				"taxrate":"17.0000000000",
    				"define24":"",
    				"define23":"",
    				"natdiscount":"0.0000",
    				"socode":"0000000006",
    				"define26":"",
    				"define25":"",
    				"define22":"",
    				"money":"22307.6900",
    				"warehouse_code":"30",
    				"reasoncode":"",
    				"cinvm_unit":"PCS",
    				"overdate":"",
    				"nattax":"3792.3100",
    				"inventory_name":"硬盘-1000G",
    				"cmassunit":"",
    				"imassdate":"",
    				"ccomunitcode":"0108",
    				"reasonname":""
    			},
    			{
    				"expiratdatecalcu":"0",
    				"inventory_code":"1004",
    				"natmoney":"6393.1600",
    				"natprice":"581.2000000000",
    				"expirationdate":"",
    				"rowno":"2",
    				"dmdate":"",
    				"discount2":"100.0000000000",
    				"discount1":"100.0000000000",
    				"quantity":"11.0000000000",
    				"taxprice":"680.0000000000",
    				"define29":"",
    				"define27":"",
    				"define28":"",
    				"discount":"0.0000",
    				"define33":"",
    				"define32":"",
    				"define31":"",
    				"invstd":"",
    				"define30":"",
    				"price":"581.2000000000",
    				"tax":"1086.8400",
    				"define37":"",
    				"define36":"",
    				"batch":"",
    				"define35":"",
    				"define34":"",
    				"natsum":"7480.0000",
    				"warehouse_name":"PC机材料仓库",
    				"expirationitem":"",
    				"quotedprice":"680.0000000000",
    				"free1":"",
    				"free3":"",
    				"free2":"",
    				"free5":"",
    				"sum":"7480.0000",
    				"free4":"",
    				"free7":"",
    				"free6":"",
    				"free9":"",
    				"free8":"",
    				"free10":"",
    				"taxrate":"17.0000000000",
    				"define24":"",
    				"define23":"",
    				"natdiscount":"0.0000",
    				"socode":"0000000006",
    				"define26":"",
    				"define25":"",
    				"define22":"",
    				"money":"6393.1600",
    				"warehouse_code":"02",
    				"reasoncode":"",
    				"cinvm_unit":"台",
    				"overdate":"",
    				"nattax":"1086.8400",
    				"inventory_name":"服务器存储配件",
    				"cmassunit":"",
    				"imassdate":"",
    				"ccomunitcode":"0202",
    				"reasonname":""
    			}
    		],
    		"personname":"崔可"
    	},
    	"errmsg":"",
    	"errcode":"0"
    }
    

    3.6错误返回示例

    application/json;charset=UTF-8
    {
    	"errcode":"30021",
    	"errmsg":"此应用未上线"
    } 

    4.API测试

    API测试 SDK下载