trade

package
v0.0.0-...-32237eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2013 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

提供了订单下载,修改收货地址、修改交易备注等功能 auto sdk from taobao ApiMetadata.xml version 20130808 auther: dz7changkong@qq.com

Index

Constants

View Source
const VersionNo = "20130808"

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	AdjustFee         string `json:"adjust_fee"`
	BindOid           int    `json:"bind_oid"`
	BuyerNick         string `json:"buyer_nick"`
	BuyerRate         bool   `json:"buyer_rate"`
	Cid               int    `json:"cid"`
	ConsignTime       string `json:"consign_time"`
	DiscountFee       string `json:"discount_fee"`
	EndTime           string `json:"end_time"`
	Iid               string `json:"iid"`
	InvoiceNo         string `json:"invoice_no"`
	IsDaixiao         bool   `json:"is_daixiao"`
	IsOversold        bool   `json:"is_oversold"`
	IsServiceOrder    bool   `json:"is_service_order"`
	ItemMealId        int    `json:"item_meal_id"`
	ItemMealName      string `json:"item_meal_name"`
	LogisticsCompany  string `json:"logistics_company"`
	Modified          string `json:"modified"`
	Num               int    `json:"num"`
	NumIid            int    `json:"num_iid"`
	Oid               int    `json:"oid"`
	OrderFrom         string `json:"order_from"`
	OuterIid          string `json:"outer_iid"`
	OuterSkuId        string `json:"outer_sku_id"`
	Payment           string `json:"payment"`
	PicPath           string `json:"pic_path"`
	Price             string `json:"price"`
	RefundId          int    `json:"refund_id"`
	RefundStatus      string `json:"refund_status"`
	SellerNick        string `json:"seller_nick"`
	SellerRate        bool   `json:"seller_rate"`
	SellerType        string `json:"seller_type"`
	ShippingType      string `json:"shipping_type"`
	SkuId             string `json:"sku_id"`
	SkuPropertiesName string `json:"sku_properties_name"`
	Snapshot          string `json:"snapshot"`
	SnapshotUrl       string `json:"snapshot_url"`
	Status            string `json:"status"`
	TimeoutActionTime string `json:"timeout_action_time"`
	Title             string `json:"title"`
	TotalFee          string `json:"total_fee"`
}

订单结构

type OrderAmount

type OrderAmount struct {
	AdjustFee         string `json:"adjust_fee"`
	DiscountFee       string `json:"discount_fee"`
	Num               int    `json:"num"`
	NumIid            int    `json:"num_iid"`
	Oid               int    `json:"oid"`
	Payment           string `json:"payment"`
	Price             string `json:"price"`
	PromotionName     string `json:"promotion_name"`
	SkuId             int    `json:"sku_id"`
	SkuPropertiesName string `json:"sku_properties_name"`
	Title             string `json:"title"`
}

子订单的帐务数据结构

type PromotionDetail

type PromotionDetail struct {
	DiscountFee   float64 `json:"discount_fee"`
	GiftItemId    string  `json:"gift_item_id"`
	GiftItemName  string  `json:"gift_item_name"`
	GiftItemNum   string  `json:"gift_item_num"`
	Id            int     `json:"id"`
	PromotionDesc string  `json:"promotion_desc"`
	PromotionId   string  `json:"promotion_id"`
	PromotionName string  `json:"promotion_name"`
}

交易的优惠信息详情

type ServiceOrder

type ServiceOrder struct {
	BuyerNick        string `json:"buyer_nick"`
	ItemOid          int    `json:"item_oid"`
	Num              int    `json:"num"`
	Oid              int    `json:"oid"`
	Payment          string `json:"payment"`
	PicPath          string `json:"pic_path"`
	Price            string `json:"price"`
	RefundId         int    `json:"refund_id"`
	SellerNick       string `json:"seller_nick"`
	ServiceDetailUrl string `json:"service_detail_url"`
	ServiceId        int    `json:"service_id"`
	Title            string `json:"title"`
	TotalFee         string `json:"total_fee"`
}

商城虚拟服务子订单数据结构

type Subtask

type Subtask struct {
	IsSuccess      bool   `json:"is_success"`
	SubTaskRequest string `json:"sub_task_request"`
	SubTaskResult  string `json:"sub_task_result"`
}

批量异步任务的子任务结果

type Task

type Task struct {
	CheckCode   string     `json:"check_code"`
	Created     string     `json:"created"`
	DownloadUrl string     `json:"download_url"`
	Method      string     `json:"method"`
	Schedule    string     `json:"schedule"`
	Status      string     `json:"status"`
	Subtasks    []*Subtask `json:"subtasks"`
	TaskId      int        `json:"task_id"`
}

批量异步任务结果

type TopatsTradesFullinfoGetRequest

type TopatsTradesFullinfoGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
提供异步批量获取订单详情功能<br/>

异步API使用方法,请查看:<a href="http://open.taobao.com/doc/detail.htm?id=30">异步API使用说明</a><br/> 1. 一次可以查询的订单数量为1~100笔,强烈建议一次请求尽可能多的订单<br/> 2. 提交任务后会生成task_id,后继通过此task_id调用taobao.topats.result.get接口获取任务的结果<br/> 3. 如果订阅了主动通知服务,任务完成后TOP会通过HTTP长连接推送消息,通知的消息格式请参考异步API使用文档<br/> 4. 这个任务ID有效时间为2天,2天后任务被删除。<br/> 5. 每个应用每天最多可以调用3万次,超过限制今天无法调用。

func (*TopatsTradesFullinfoGetRequest) GetResponse

func (*TopatsTradesFullinfoGetRequest) SetFields

func (r *TopatsTradesFullinfoGetRequest) SetFields(value string)

可以返回taobao.trade.fullinfo.get允许的所有字段。

func (*TopatsTradesFullinfoGetRequest) SetTids

func (r *TopatsTradesFullinfoGetRequest) SetTids(value string)

交易订单号tid列表,多个tid之间用半角分号分隔。tid个数的取值范围是:1~100个。由于这个接口限制每个应用的调用量是3万次/天,所以强烈建议采用尽可能多的tid,以取到更多的交易数据。

type TopatsTradesFullinfoGetResponse

type TopatsTradesFullinfoGetResponse struct {
	Task *Task `json:"task"`
}

type TopatsTradesFullinfoGetResponseResult

type TopatsTradesFullinfoGetResponseResult struct {
	Response *TopatsTradesFullinfoGetResponse `json:"topats_trades_fullinfo_get_response"`
}

type TopatsTradesSoldGetRequest

type TopatsTradesSoldGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
提供异步下载三个月已卖出的在线订单信息接口。<br/>

异步API使用方法,请查看:<a href="http://open.taobao.com/doc/detail.htm?id=30">异步API使用说明</a><br/> 1. 一次最多可以导出三个月内的所有类型和状态的在线交易记录(可查时间段:前90天内~昨天)<br/> 2. 用户必须拥有店铺才能获取访问在线交易订单数据,否则无法创建任务<br/> 3. 提交任务后,通过taobao.topats.result.get来查看任务执行状态,如果任务已完成,则返回下载URL<br/> 4. 如果订阅了主动通知服务,任务完成后TOP会通过HTTP长连接推送消息,通知的消息格式请参考异步API使用文档<br/> 5. 下载到的结果是zip压缩包,解压后得到一个标准的json格式的文本文件(返回字段与taobao.trade.fullinfo.get一致,每条订单详情以回车符结尾),文件内容的默认编码格式是UTF-8<br/> 6. 任务的执行时段01:00~23:00,通常情况下每半小时执行一次任务,执行结束时间依据订单条数大小而定,通常在30~60分钟可以完成任务<br/> 7. 单个应用每天最多只能调用此接口10万次,超过限制后,当天无法再提交任务

func (*TopatsTradesSoldGetRequest) GetResponse

func (r *TopatsTradesSoldGetRequest) GetResponse(accessToken string) (*TopatsTradesSoldGetResponse, []byte, error)

func (*TopatsTradesSoldGetRequest) SetEndTime

func (r *TopatsTradesSoldGetRequest) SetEndTime(value string)

订单创建结束时间,格式yyyyMMdd,取值范围:前90天内~昨天,其中start_time<=end_time,如20120531相当于取订单创建时间到2012-05-31 23:59:59为止的订单。注:如果start_time和end_time相同,表示取一天的订单数据。<span style="color:red">强烈建议超大卖家(直充类,金冠类)把三个月订单拆分成3次来获取,否则单个任务会消耗很长时间。<span>

func (*TopatsTradesSoldGetRequest) SetFields

func (r *TopatsTradesSoldGetRequest) SetFields(value string)

Trade和Order结构体中的所有字段。<span style="color:red">请尽量按需获取,如果只取tid字段,获取订单数据速度会超快。</span>

func (*TopatsTradesSoldGetRequest) SetIsAcookie

func (r *TopatsTradesSoldGetRequest) SetIsAcookie(value string)

默认值为false,表示按正常方式查询订单;如果设置为true则查询到的是模糊后的订单列表,可通过模糊订单列表中的buyer_nick/buyer_id字段与流量数据进行关联。如果没有使用流量数据接口请忽略本字段。

func (*TopatsTradesSoldGetRequest) SetStartTime

func (r *TopatsTradesSoldGetRequest) SetStartTime(value string)

订单创建开始时间,格式yyyyMMdd,取值范围:前90天内~昨天。如:20120501相当于取订单创建时间从2012-05-01 00:00:00开始的订单。

type TopatsTradesSoldGetResponse

type TopatsTradesSoldGetResponse struct {
	Task *Task `json:"task"`
}

type TopatsTradesSoldGetResponseResult

type TopatsTradesSoldGetResponseResult struct {
	Response *TopatsTradesSoldGetResponse `json:"topats_trades_sold_get_response"`
}

type Trade

type Trade struct {
	AdjustFee           string             `json:"adjust_fee"`
	AlipayId            int                `json:"alipay_id"`
	AlipayNo            string             `json:"alipay_no"`
	AlipayUrl           string             `json:"alipay_url"`
	AlipayWarnMsg       string             `json:"alipay_warn_msg"`
	AreaId              string             `json:"area_id"`
	AvailableConfirmFee string             `json:"available_confirm_fee"`
	BuyerAlipayNo       string             `json:"buyer_alipay_no"`
	BuyerArea           string             `json:"buyer_area"`
	BuyerCodFee         string             `json:"buyer_cod_fee"`
	BuyerEmail          string             `json:"buyer_email"`
	BuyerFlag           int                `json:"buyer_flag"`
	BuyerMemo           string             `json:"buyer_memo"`
	BuyerMessage        string             `json:"buyer_message"`
	BuyerNick           string             `json:"buyer_nick"`
	BuyerObtainPointFee int                `json:"buyer_obtain_point_fee"`
	BuyerRate           bool               `json:"buyer_rate"`
	CanRate             bool               `json:"can_rate"`
	CodFee              string             `json:"cod_fee"`
	CodStatus           string             `json:"cod_status"`
	CommissionFee       string             `json:"commission_fee"`
	ConsignTime         string             `json:"consign_time"`
	Created             string             `json:"created"`
	CreditCardFee       string             `json:"credit_card_fee"`
	EndTime             string             `json:"end_time"`
	EticketExt          string             `json:"eticket_ext"`
	ExpressAgencyFee    string             `json:"express_agency_fee"`
	HasBuyerMessage     bool               `json:"has_buyer_message"`
	HasPostFee          bool               `json:"has_post_fee"`
	HasYfx              bool               `json:"has_yfx"`
	Iid                 string             `json:"iid"`
	InvoiceName         string             `json:"invoice_name"`
	Is3D                bool               `json:"is_3D"`
	IsBrandSale         bool               `json:"is_brand_sale"`
	IsDaixiao           bool               `json:"is_daixiao"`
	IsForceWlb          bool               `json:"is_force_wlb"`
	IsLgtype            bool               `json:"is_lgtype"`
	IsPartConsign       bool               `json:"is_part_consign"`
	IsWt                bool               `json:"is_wt"`
	LgAging             string             `json:"lg_aging"`
	LgAgingType         string             `json:"lg_aging_type"`
	MarkDesc            string             `json:"mark_desc"`
	Modified            string             `json:"modified"`
	Num                 int                `json:"num"`
	NumIid              int                `json:"num_iid"`
	NutFeature          string             `json:"nut_feature"`
	Orders              []*Order           `json:"orders"`
	PayTime             string             `json:"pay_time"`
	Payment             string             `json:"payment"`
	PicPath             string             `json:"pic_path"`
	PointFee            int                `json:"point_fee"`
	PostFee             string             `json:"post_fee"`
	Price               string             `json:"price"`
	Promotion           string             `json:"promotion"`
	PromotionDetails    []*PromotionDetail `json:"promotion_details"`
	RealPointFee        int                `json:"real_point_fee"`
	ReceivedPayment     string             `json:"received_payment"`
	ReceiverAddress     string             `json:"receiver_address"`
	ReceiverCity        string             `json:"receiver_city"`
	ReceiverDistrict    string             `json:"receiver_district"`
	ReceiverMobile      string             `json:"receiver_mobile"`
	ReceiverName        string             `json:"receiver_name"`
	ReceiverPhone       string             `json:"receiver_phone"`
	ReceiverState       string             `json:"receiver_state"`
	ReceiverZip         string             `json:"receiver_zip"`
	SellerAlipayNo      string             `json:"seller_alipay_no"`
	SellerCanRate       bool               `json:"seller_can_rate"`
	SellerCodFee        string             `json:"seller_cod_fee"`
	SellerEmail         string             `json:"seller_email"`
	SellerFlag          int                `json:"seller_flag"`
	SellerMemo          string             `json:"seller_memo"`
	SellerMobile        string             `json:"seller_mobile"`
	SellerName          string             `json:"seller_name"`
	SellerNick          string             `json:"seller_nick"`
	SellerPhone         string             `json:"seller_phone"`
	SellerRate          bool               `json:"seller_rate"`
	SendTime            string             `json:"send_time"`
	ServiceOrders       []*ServiceOrder    `json:"service_orders"`
	ShippingType        string             `json:"shipping_type"`
	Snapshot            string             `json:"snapshot"`
	SnapshotUrl         string             `json:"snapshot_url"`
	Status              string             `json:"status"`
	StepPaidFee         string             `json:"step_paid_fee"`
	StepTradeStatus     string             `json:"step_trade_status"`
	Tid                 int                `json:"tid"`
	TimeoutActionTime   string             `json:"timeout_action_time"`
	Title               string             `json:"title"`
	TotalFee            string             `json:"total_fee"`
	TradeFrom           string             `json:"trade_from"`
	TradeMemo           string             `json:"trade_memo"`
	TradeSource         string             `json:"trade_source"`
	Type                string             `json:"type"`
	YfxFee              string             `json:"yfx_fee"`
	YfxId               string             `json:"yfx_id"`
	YfxType             string             `json:"yfx_type"`
}

交易结构

type TradeAmount

type TradeAmount struct {
	AlipayNo            string             `json:"alipay_no"`
	BuyerCodFee         string             `json:"buyer_cod_fee"`
	BuyerObtainPointFee int                `json:"buyer_obtain_point_fee"`
	CodFee              string             `json:"cod_fee"`
	CommissionFee       string             `json:"commission_fee"`
	Created             string             `json:"created"`
	EndTime             string             `json:"end_time"`
	ExpressAgencyFee    string             `json:"express_agency_fee"`
	OrderAmounts        []*OrderAmount     `json:"order_amounts"`
	PayTime             string             `json:"pay_time"`
	Payment             string             `json:"payment"`
	PostFee             string             `json:"post_fee"`
	PromotionDetails    []*PromotionDetail `json:"promotion_details"`
	SellerCodFee        string             `json:"seller_cod_fee"`
	Tid                 int                `json:"tid"`
	TotalFee            string             `json:"total_fee"`
}

交易订单的帐务信息详情

type TradeAmountGetRequest

type TradeAmountGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
卖家查询该笔交易订单的资金帐务相关的数据;

1. 只供卖家使用,买家不可使用 2. 可查询所有的状态的订单,但不同状态时订单的相关数据可能会有不同

func (*TradeAmountGetRequest) GetResponse

func (r *TradeAmountGetRequest) GetResponse(accessToken string) (*TradeAmountGetResponse, []byte, error)

func (*TradeAmountGetRequest) SetFields

func (r *TradeAmountGetRequest) SetFields(value string)
订单帐务详情需要返回的字段信息,可选值如下:

1. TradeAmount中可指定的fields: tid,alipay_no,created,pay_time,end_time,total_fee,payment,post_fee,cod_fee,commission_fee,buyer_obtain_point_fee 2. OrderAmount中可指定的fields:order_amounts.oid,order_amounts.title,order_amounts.num_iid, order_amounts.sku_properties_name,order_amounts.sku_id,order_amounts.num,order_amounts.price,order_amounts.discount_fee,order_amounts.adjust_fee,order_amounts.payment,order_amounts.promotion_name 3. order_amounts(返回OrderAmount的所有内容) 4. promotion_details(指定该值会返回主订单的promotion_details中除id之外的所有字段)

func (*TradeAmountGetRequest) SetTid

func (r *TradeAmountGetRequest) SetTid(value string)

订单交易编号

type TradeAmountGetResponse

type TradeAmountGetResponse struct {
	TradeAmount *TradeAmount `json:"trade_amount"`
}

type TradeAmountGetResponseResult

type TradeAmountGetResponseResult struct {
	Response *TradeAmountGetResponse `json:"trade_amount_get_response"`
}

type TradeCloseRequest

type TradeCloseRequest struct {
	open_taobao.TaobaoMethodRequest
}

关闭一笔订单,可以是主订单或子订单。当订单从创建到关闭时间小于10s的时候,会报“CLOSE_TRADE_TOO_FAST”错误。

func (*TradeCloseRequest) GetResponse

func (r *TradeCloseRequest) GetResponse(accessToken string) (*TradeCloseResponse, []byte, error)

func (*TradeCloseRequest) SetCloseReason

func (r *TradeCloseRequest) SetCloseReason(value string)
交易关闭原因。可以选择的理由有:

1.未及时付款 2.买家联系不上 3.谢绝还价 4.商品瑕疵 5.协商不一致 6.买家不想买 7.与买家协商一致

func (*TradeCloseRequest) SetTid

func (r *TradeCloseRequest) SetTid(value string)

主订单或子订单编号。

type TradeCloseResponse

type TradeCloseResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeCloseResponseResult

type TradeCloseResponseResult struct {
	Response *TradeCloseResponse `json:"trade_close_response"`
}

type TradeConfirmFee

type TradeConfirmFee struct {
	ConfirmFee     float64 `json:"confirm_fee"`
	ConfirmPostFee float64 `json:"confirm_post_fee"`
	IsLastOrder    bool    `json:"is_last_order"`
}

确认收货费用结构

type TradeConfirmfeeGetRequest

type TradeConfirmfeeGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
获取交易确认收货费用

可以获取主订单或子订单的确认收货费用

func (*TradeConfirmfeeGetRequest) GetResponse

func (r *TradeConfirmfeeGetRequest) GetResponse(accessToken string) (*TradeConfirmfeeGetResponse, []byte, error)

func (*TradeConfirmfeeGetRequest) SetIsDetail

func (r *TradeConfirmfeeGetRequest) SetIsDetail(value string)

是否是子订单。可选值:IS_FATHER(父订单),IS_CHILD(子订单)

func (*TradeConfirmfeeGetRequest) SetTid

func (r *TradeConfirmfeeGetRequest) SetTid(value string)

交易编号,或子订单编号

type TradeConfirmfeeGetResponse

type TradeConfirmfeeGetResponse struct {
	TradeConfirmFee *TradeConfirmFee `json:"trade_confirm_fee"`
}

type TradeConfirmfeeGetResponseResult

type TradeConfirmfeeGetResponseResult struct {
	Response *TradeConfirmfeeGetResponse `json:"trade_confirmfee_get_response"`
}

type TradeFullinfoGetRequest

type TradeFullinfoGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
获取单笔交易的详细信息

<br/>1. 只有在交易成功的状态下才能取到交易佣金,其它状态下取到的都是零或空值 <br/>2. 只有单笔订单的情况下Trade数据结构中才包含商品相关的信息 <br/>3. 获取到的Order中的payment字段在单笔子订单时包含物流费用,多笔子订单时不包含物流费用 <br/>4. 请按需获取字段,减少TOP系统的压力 <br/>5. <span style="color:red">通过异步接口<a href="http://api.taobao.com/apidoc/api.htm?path=cid:5-apiId:10417">taobao.topats.trades.fullinfo.get</a>可以一次性获取多达100笔订单详情</span>

func (*TradeFullinfoGetRequest) GetResponse

func (r *TradeFullinfoGetRequest) GetResponse(accessToken string) (*TradeFullinfoGetResponse, []byte, error)

func (*TradeFullinfoGetRequest) SetFields

func (r *TradeFullinfoGetRequest) SetFields(value string)
1.Trade中可以指定返回的fields:seller_nick, buyer_nick, title, type, created, tid, seller_rate,buyer_flag, buyer_rate, status, payment, adjust_fee, post_fee, total_fee, pay_time, end_time, modified, consign_time, buyer_obtain_point_fee, point_fee, real_point_fee, received_payment, commission_fee, buyer_memo, seller_memo, alipay_no,alipay_id,buyer_message, pic_path, num_iid, num, price, buyer_alipay_no, receiver_name, receiver_state, receiver_city, receiver_district, receiver_address, receiver_zip, receiver_mobile, receiver_phone,seller_flag, seller_alipay_no, seller_mobile, seller_phone, seller_name, seller_email, available_confirm_fee, has_post_fee, timeout_action_time, snapshot_url, cod_fee, cod_status, shipping_type, trade_memo, is_3D,buyer_email,buyer_area, trade_from,is_lgtype,is_force_wlb,is_brand_sale,buyer_cod_fee,discount_fee,seller_cod_fee,express_agency_fee,invoice_name,service_orders,credit_cardfee,step_trade_status,step_paid_fee,mark_desc,has_yfx,yfx_fee,yfx_id,yfx_type,trade_source(注:当该授权用户为卖家时不能查看买家buyer_memo,buyer_flag),eticket_ext,send_time, is_daixiao,is_part_consign

2.Order中可以指定返回fields:orders.title, orders.pic_path, orders.price, orders.num, orders.num_iid, orders.sku_id, orders.refund_status, orders.status, orders.oid, orders.total_fee, orders.payment, orders.discount_fee, orders.adjust_fee, orders.snapshot_url, orders.timeout_action_time,orders.sku_properties_name, orders.item_meal_name, orders.item_meal_id,item_memo,orders.buyer_rate, orders.seller_rate, orders.outer_iid, orders.outer_sku_id, orders.refund_id, orders.seller_type, orders.is_oversold,orders.end_time,orders.order_from,orders.consign_time,orders.shipping_type,orders.logistics_company,orders.invice_no, orders.is_daixiao 3.fields:orders(返回Order的所有内容) 4.flelds:promotion_details(返回promotion_details所有内容,优惠详情),invoice_name(发票抬头)

func (*TradeFullinfoGetRequest) SetTid

func (r *TradeFullinfoGetRequest) SetTid(value string)

交易编号

type TradeFullinfoGetResponse

type TradeFullinfoGetResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeFullinfoGetResponseResult

type TradeFullinfoGetResponseResult struct {
	Response *TradeFullinfoGetResponse `json:"trade_fullinfo_get_response"`
}

type TradeGetRequest

type TradeGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

获取单笔交易的部分信息

func (*TradeGetRequest) GetResponse

func (r *TradeGetRequest) GetResponse(accessToken string) (*TradeGetResponse, []byte, error)

func (*TradeGetRequest) SetFields

func (r *TradeGetRequest) SetFields(value string)
需要返回的字段。目前支持有:<br>

1. Trade中可以指定返回的fields:seller_nick, buyer_nick, title, type, created, tid, seller_rate, buyer_rate, status, payment, discount_fee, adjust_fee, post_fee, total_fee, pay_time, end_time, modified, consign_time, buyer_obtain_point_fee, point_fee, real_point_fee, received_payment, commission_fee, buyer_memo, seller_memo, alipay_no, buyer_message, pic_path, num_iid, num, price, cod_fee, cod_status, shipping_type, is_daixiao <br> 2. Order中可以指定返回fields:orders.title, orders.pic_path, orders.price, orders.num, orders.num_iid, orders.sku_id, orders.refund_status, orders.status, orders.oid, orders.total_fee, orders.payment, orders.discount_fee, orders.adjust_fee, orders.sku_properties_name, orders.item_meal_name, orders.outer_sku_id, orders.outer_iid, orders.buyer_rate, orders.seller_rate, orders.is_daixiao <br> 3. fields:orders(返回Order中的所有允许返回的字段)

func (*TradeGetRequest) SetTid

func (r *TradeGetRequest) SetTid(value string)

交易编号

type TradeGetResponse

type TradeGetResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeGetResponseResult

type TradeGetResponseResult struct {
	Response *TradeGetResponse `json:"trade_get_response"`
}

type TradeMemoAddRequest

type TradeMemoAddRequest struct {
	open_taobao.TaobaoMethodRequest
}

根据登录用户的身份(买家或卖家),自动添加相应的交易备注,不能重复调用些接口添加备注,需要更新备注请用taobao.trade.memo.update

func (*TradeMemoAddRequest) GetResponse

func (r *TradeMemoAddRequest) GetResponse(accessToken string) (*TradeMemoAddResponse, []byte, error)

func (*TradeMemoAddRequest) SetFlag

func (r *TradeMemoAddRequest) SetFlag(value string)

交易备注旗帜,可选值为:0(灰色), 1(红色), 2(黄色), 3(绿色), 4(蓝色), 5(粉红色),默认值为0

func (*TradeMemoAddRequest) SetMemo

func (r *TradeMemoAddRequest) SetMemo(value string)

交易备注。最大长度: 1000个字节

func (*TradeMemoAddRequest) SetTid

func (r *TradeMemoAddRequest) SetTid(value string)

交易编号

type TradeMemoAddResponse

type TradeMemoAddResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeMemoAddResponseResult

type TradeMemoAddResponseResult struct {
	Response *TradeMemoAddResponse `json:"trade_memo_add_response"`
}

type TradeMemoUpdateRequest

type TradeMemoUpdateRequest struct {
	open_taobao.TaobaoMethodRequest
}

需要商家或以上权限才可调用此接口,可重复调用本接口更新交易备注,本接口同时具有添加备注的功能

func (*TradeMemoUpdateRequest) GetResponse

func (r *TradeMemoUpdateRequest) GetResponse(accessToken string) (*TradeMemoUpdateResponse, []byte, error)

func (*TradeMemoUpdateRequest) SetFlag

func (r *TradeMemoUpdateRequest) SetFlag(value string)

交易备注旗帜,可选值为:0(灰色), 1(红色), 2(黄色), 3(绿色), 4(蓝色), 5(粉红色),默认值为0

func (*TradeMemoUpdateRequest) SetMemo

func (r *TradeMemoUpdateRequest) SetMemo(value string)

交易备注。最大长度: 1000个字节

func (*TradeMemoUpdateRequest) SetReset

func (r *TradeMemoUpdateRequest) SetReset(value string)
是否对memo的值置空

若为true,则不管传入的memo字段的值是否为空,都将会对已有的memo值清空,慎用; 若用false,则会根据memo是否为空来修改memo的值:若memo为空则忽略对已有memo字段的修改,若memo非空,则使用新传入的memo覆盖已有的memo的值

func (*TradeMemoUpdateRequest) SetTid

func (r *TradeMemoUpdateRequest) SetTid(value string)

交易编号

type TradeMemoUpdateResponse

type TradeMemoUpdateResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeMemoUpdateResponseResult

type TradeMemoUpdateResponseResult struct {
	Response *TradeMemoUpdateResponse `json:"trade_memo_update_response"`
}

type TradeOrderskuUpdateRequest

type TradeOrderskuUpdateRequest struct {
	open_taobao.TaobaoMethodRequest
}
只能更新发货前子订单的销售属性

只能更新价格相同的销售属性。对于拍下减库存的交易会同步更新销售属性的库存量。对于旺店的交易,要使用商品扩展信息中的SKU价格来比较。 必须使用sku_id或sku_props中的一个参数来更新,如果两个都传的话,sku_id优先

func (*TradeOrderskuUpdateRequest) GetResponse

func (r *TradeOrderskuUpdateRequest) GetResponse(accessToken string) (*TradeOrderskuUpdateResponse, []byte, error)

func (*TradeOrderskuUpdateRequest) SetOid

func (r *TradeOrderskuUpdateRequest) SetOid(value string)

子订单编号(对于单笔订单的交易可以传交易编号)。

func (*TradeOrderskuUpdateRequest) SetSkuId

func (r *TradeOrderskuUpdateRequest) SetSkuId(value string)

销售属性编号,可以通过taobao.item.skus.get获取订单对应的商品的所有销售属性。

func (*TradeOrderskuUpdateRequest) SetSkuProps

func (r *TradeOrderskuUpdateRequest) SetSkuProps(value string)

销售属性组合串,格式:p1:v1;p2:v2,如:1627207:28329;20509:28314。可以通过taobao.item.skus.get获取订单对应的商品的所有销售属性。

type TradeOrderskuUpdateResponse

type TradeOrderskuUpdateResponse struct {
	Order *Order `json:"order"`
}

type TradeOrderskuUpdateResponseResult

type TradeOrderskuUpdateResponseResult struct {
	Response *TradeOrderskuUpdateResponse `json:"trade_ordersku_update_response"`
}

type TradePostageUpdateRequest

type TradePostageUpdateRequest struct {
	open_taobao.TaobaoMethodRequest
}

修改订单邮费接口,通过传入订单编号和邮费价格,修改订单的邮费,返回修改时间modified,邮费post_fee,总费用total_fee。

func (*TradePostageUpdateRequest) GetResponse

func (r *TradePostageUpdateRequest) GetResponse(accessToken string) (*TradePostageUpdateResponse, []byte, error)

func (*TradePostageUpdateRequest) SetPostFee

func (r *TradePostageUpdateRequest) SetPostFee(value string)

邮费价格(邮费单位是元)

func (*TradePostageUpdateRequest) SetTid

func (r *TradePostageUpdateRequest) SetTid(value string)

主订单编号

type TradePostageUpdateResponse

type TradePostageUpdateResponse struct {
	Trade *Trade `json:"trade"`
}

type TradePostageUpdateResponseResult

type TradePostageUpdateResponseResult struct {
	Response *TradePostageUpdateResponse `json:"trade_postage_update_response"`
}

type TradeReceivetimeDelayRequest

type TradeReceivetimeDelayRequest struct {
	open_taobao.TaobaoMethodRequest
}

延长交易收货时间

func (*TradeReceivetimeDelayRequest) GetResponse

func (r *TradeReceivetimeDelayRequest) GetResponse(accessToken string) (*TradeReceivetimeDelayResponse, []byte, error)

func (*TradeReceivetimeDelayRequest) SetDays

func (r *TradeReceivetimeDelayRequest) SetDays(value string)

延长收货的天数,可选值为:3, 5, 7, 10。

func (*TradeReceivetimeDelayRequest) SetTid

func (r *TradeReceivetimeDelayRequest) SetTid(value string)

主订单号

type TradeReceivetimeDelayResponse

type TradeReceivetimeDelayResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeReceivetimeDelayResponseResult

type TradeReceivetimeDelayResponseResult struct {
	Response *TradeReceivetimeDelayResponse `json:"trade_receivetime_delay_response"`
}

type TradeShippingaddressUpdateRequest

type TradeShippingaddressUpdateRequest struct {
	open_taobao.TaobaoMethodRequest
}
只能更新一笔交易里面的买家收货地址

只能更新发货前(即买家已付款,等待卖家发货状态)的交易的买家收货地址 更新后的发货地址可以通过taobao.trade.fullinfo.get查到 参数中所说的字节为GBK编码的(英文和数字占1字节,中文占2字节)

func (*TradeShippingaddressUpdateRequest) GetResponse

func (*TradeShippingaddressUpdateRequest) SetReceiverAddress

func (r *TradeShippingaddressUpdateRequest) SetReceiverAddress(value string)

收货地址。最大长度为228个字节。

func (*TradeShippingaddressUpdateRequest) SetReceiverCity

func (r *TradeShippingaddressUpdateRequest) SetReceiverCity(value string)

城市。最大长度为32个字节。如:杭州

func (*TradeShippingaddressUpdateRequest) SetReceiverDistrict

func (r *TradeShippingaddressUpdateRequest) SetReceiverDistrict(value string)

区/县。最大长度为32个字节。如:西湖区

func (*TradeShippingaddressUpdateRequest) SetReceiverMobile

func (r *TradeShippingaddressUpdateRequest) SetReceiverMobile(value string)

移动电话。最大长度为30个字节。

func (*TradeShippingaddressUpdateRequest) SetReceiverName

func (r *TradeShippingaddressUpdateRequest) SetReceiverName(value string)

收货人全名。最大长度为50个字节。

func (*TradeShippingaddressUpdateRequest) SetReceiverPhone

func (r *TradeShippingaddressUpdateRequest) SetReceiverPhone(value string)

固定电话。最大长度为30个字节。

func (*TradeShippingaddressUpdateRequest) SetReceiverState

func (r *TradeShippingaddressUpdateRequest) SetReceiverState(value string)

省份。最大长度为32个字节。如:浙江

func (*TradeShippingaddressUpdateRequest) SetReceiverZip

func (r *TradeShippingaddressUpdateRequest) SetReceiverZip(value string)

邮政编码。必须由6个数字组成。

func (*TradeShippingaddressUpdateRequest) SetTid

func (r *TradeShippingaddressUpdateRequest) SetTid(value string)

交易编号。

type TradeShippingaddressUpdateResponse

type TradeShippingaddressUpdateResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeShippingaddressUpdateResponseResult

type TradeShippingaddressUpdateResponseResult struct {
	Response *TradeShippingaddressUpdateResponse `json:"trade_shippingaddress_update_response"`
}

type TradeSnapshotGetRequest

type TradeSnapshotGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
交易快照查询

目前只支持类型为“旺店标准版(600)”或“旺店入门版(610)”的交易 对于“旺店标准版”类型的交易,返回的snapshot字段为交易快照编号 对于“旺店入门版”类型的交易,返回的snapshot字段为JSON结构的数据(其中的shopPromotion包含了优惠,积分等信息)

func (*TradeSnapshotGetRequest) GetResponse

func (r *TradeSnapshotGetRequest) GetResponse(accessToken string) (*TradeSnapshotGetResponse, []byte, error)

func (*TradeSnapshotGetRequest) SetFields

func (r *TradeSnapshotGetRequest) SetFields(value string)

需要返回的字段列表。现只支持:"snapshot"字段

func (*TradeSnapshotGetRequest) SetTid

func (r *TradeSnapshotGetRequest) SetTid(value string)

交易编号

type TradeSnapshotGetResponse

type TradeSnapshotGetResponse struct {
	Trade *Trade `json:"trade"`
}

type TradeSnapshotGetResponseResult

type TradeSnapshotGetResponseResult struct {
	Response *TradeSnapshotGetResponse `json:"trade_snapshot_get_response"`
}

type TradesSoldGetRequest

type TradesSoldGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
搜索当前会话用户作为卖家已卖出的交易数据(只能获取到三个月以内的交易信息)

<br/>1. 返回的数据结果是以订单的创建时间倒序排列的。 <br/>2. 返回的数据结果只包含了订单的部分数据,可通过taobao.trade.fullinfo.get获取订单详情。 <br/>3. <span style="color:red">通过异步接口<a href="http://api.taobao.com/apidoc/api.htm?path=cid:5-apiId:11117">taobao.topats.trades.sold.get</a>可以一次性获取卖家3个月内的订单详情数据。

func (*TradesSoldGetRequest) GetResponse

func (r *TradesSoldGetRequest) GetResponse(accessToken string) (*TradesSoldGetResponse, []byte, error)

func (*TradesSoldGetRequest) SetBuyerNick

func (r *TradesSoldGetRequest) SetBuyerNick(value string)

买家昵称

func (*TradesSoldGetRequest) SetEndCreated

func (r *TradesSoldGetRequest) SetEndCreated(value string)

查询交易创建时间结束。格式:yyyy-MM-dd HH:mm:ss

func (*TradesSoldGetRequest) SetExtType

func (r *TradesSoldGetRequest) SetExtType(value string)

可选值有ershou(二手市场的订单),service(商城服务子订单)mark(双十一大促活动异常订单)作为扩展类型筛选只能做单个ext_type查询,不能全部查询所有的ext_type类型

func (*TradesSoldGetRequest) SetFields

func (r *TradesSoldGetRequest) SetFields(value string)
需要返回的字段。目前支持有:<br>

1. Trade中可以指定返回的fields:<br> seller_nick, buyer_nick, title, type, created, tid, seller_rate,seller_can_rate, buyer_rate,can_rate, status, payment, discount_fee, adjust_fee, post_fee, total_fee, pay_time, end_time, modified, consign_time, buyer_obtain_point_fee, point_fee, real_point_fee, received_payment, pic_path, num_iid, num, price, cod_fee, cod_status, shipping_type, receiver_name, receiver_state, receiver_city, receiver_district, receiver_address, receiver_zip, receiver_mobile, receiver_phone,seller_flag,alipay_id,alipay_no,is_lgtype,is_force_wlb,is_brand_sale,buyer_area,has_buyer_message, credit_card_fee, lg_aging_type, lg_aging, step_trade_status,step_paid_fee,mark_desc,has_yfx,yfx_fee,yfx_id,yfx_type,trade_source,send_time,is_daixiao,is_wt,is_part_consign <br> 2. Order中可以指定返回fields:orders.title, orders.pic_path, orders.price, orders.num, orders.num_iid, orders.sku_id, orders.refund_status, orders.status, orders.oid, orders.total_fee, orders.payment, orders.discount_fee, orders.adjust_fee, orders.sku_properties_name, orders.item_meal_name, orders.buyer_rate, orders.seller_rate, orders.outer_iid, orders.outer_sku_id, orders.refund_id, orders.seller_type, orders.end_time,orders.order_from,orders.consign_time,orders.shipping_type,orders.logistics_company,orders.invice_no,orders.is_daixiao<br> 3. fields:orders(返回2中Order的所有内容) 4.fields:service_orders(返回service_order中所有内容)

func (*TradesSoldGetRequest) SetIsAcookie

func (r *TradesSoldGetRequest) SetIsAcookie(value string)

默认值为false,表示按正常方式查询订单;如果设置为true则查询到的是模糊后的订单列表,可通过模糊订单列表中的buyer_nick/buyer_id字段与流量数据进行关联。如果没有使用流量数据接口请忽略本字段。

func (*TradesSoldGetRequest) SetPageNo

func (r *TradesSoldGetRequest) SetPageNo(value string)

页码。取值范围:大于零的整数; 默认值:1

func (*TradesSoldGetRequest) SetPageSize

func (r *TradesSoldGetRequest) SetPageSize(value string)

每页条数。取值范围:大于零的整数; 默认值:40;最大值:100

func (*TradesSoldGetRequest) SetRateStatus

func (r *TradesSoldGetRequest) SetRateStatus(value string)
评价状态,默认查询所有评价状态的数据,除了默认值外每次只能查询一种状态。<br>

可选值: RATE_UNBUYER(买家未评) RATE_UNSELLER(卖家未评) RATE_BUYER_UNSELLER(买家已评,卖家未评) RATE_UNBUYER_SELLER(买家未评,卖家已评) RATE_BUYER_SELLER(买家已评,卖家已评)

func (*TradesSoldGetRequest) SetStartCreated

func (r *TradesSoldGetRequest) SetStartCreated(value string)

查询三个月内交易创建时间开始。格式:yyyy-MM-dd HH:mm:ss

func (*TradesSoldGetRequest) SetStatus

func (r *TradesSoldGetRequest) SetStatus(value string)
交易状态,默认查询所有交易状态的数据,除了默认值外每次只能查询一种状态。

可选值: TRADE_NO_CREATE_PAY(没有创建支付宝交易) WAIT_BUYER_PAY(等待买家付款) WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款) SELLER_CONSIGNED_PART(卖家部分发货) WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货) TRADE_BUYER_SIGNED(买家已签收,货到付款专用) TRADE_FINISHED(交易成功) TRADE_CLOSED(交易关闭) TRADE_CLOSED_BY_TAOBAO(交易被淘宝关闭) ALL_WAIT_PAY(包含:WAIT_BUYER_PAY、TRADE_NO_CREATE_PAY) ALL_CLOSED(包含:TRADE_CLOSED、TRADE_CLOSED_BY_TAOBAO)

func (*TradesSoldGetRequest) SetTag

func (r *TradesSoldGetRequest) SetTag(value string)

卖家对交易的自定义分组标签,目前可选值为:time_card(点卡软件代充),fee_card(话费软件代充)

func (*TradesSoldGetRequest) SetType

func (r *TradesSoldGetRequest) SetType(value string)
交易类型列表,同时查询多种交易类型可用逗号分隔。<span style="color:red;font-weight: bold;">默认同时查询guarantee_trade, auto_delivery, ec, cod,step的5种交易类型的数据;查询所有交易类型的数据,需要设置下面全部可选值。</span>

可选值: fixed(一口价) auction(拍卖) guarantee_trade(一口价、拍卖) step(分阶段付款,万人团,阶梯团订单) independent_simple_trade(旺店入门版交易) independent_shop_trade(旺店标准版交易) auto_delivery(自动发货) ec(直冲) cod(货到付款) game_equipment(游戏装备) shopex_trade(ShopEX交易) netcn_trade(万网交易) external_trade(统一外部交易) instant_trade (即时到账) b2c_cod(大商家货到付款) hotel_trade(酒店类型交易) super_market_trade(商超交易) super_market_cod_trade(商超货到付款交易) taohua(淘花网交易类型) waimai(外卖交易类型) nopaid(即时到帐/趣味猜交易类型) step (万人团) eticket(电子凭证) tmall_i18n(天猫国际); 注:guarantee_trade是一个组合查询条件,并不是一种交易类型,获取批量或单个订单中不会返回此种类型的订单。

func (*TradesSoldGetRequest) SetUseHasNext

func (r *TradesSoldGetRequest) SetUseHasNext(value string)

是否启用has_next的分页方式,如果指定true,则返回的结果中不包含总记录数,但是会新增一个是否存在下一页的的字段,通过此种方式获取增量交易,接口调用成功率在原有的基础上有所提升。

type TradesSoldGetResponse

type TradesSoldGetResponse struct {
	HasNext      bool     `json:"has_next"`
	TotalResults int      `json:"total_results"`
	Trades       []*Trade `json:"trades"`
}

type TradesSoldGetResponseResult

type TradesSoldGetResponseResult struct {
	Response *TradesSoldGetResponse `json:"trades_sold_get_response"`
}

type TradesSoldIncrementGetRequest

type TradesSoldIncrementGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
搜索当前会话用户作为卖家已卖出的增量交易数据(只能获取到三个月以内的交易信息)

<br/>1. 一次请求只能查询时间跨度为一天的增量交易记录,即end_modified - start_modified <= 1天。 <br/>2. 返回的数据结果是以订单的修改时间倒序排列的,通过从后往前翻页的方式可以避免漏单问题。 <br/>3. 返回的数据结果只包含了订单的部分数据,可通过taobao.trade.fullinfo.get获取订单详情。 <br/>4. <span style="color:red">使用<a href="http://open.taobao.com/doc/category_list.htm?id=87">主动通知</a>监听订单变更事件,可以实时获取订单更新数据。</span>

func (*TradesSoldIncrementGetRequest) GetResponse

func (*TradesSoldIncrementGetRequest) SetEndModified

func (r *TradesSoldIncrementGetRequest) SetEndModified(value string)

查询修改结束时间,必须大于修改开始时间(修改时间跨度不能大于一天),格式:yyyy-MM-dd HH:mm:ss。<span style="color:red;font-weight: bold;">建议使用30分钟以内的时间跨度,能大大提高响应速度和成功率</span>。

func (*TradesSoldIncrementGetRequest) SetExtType

func (r *TradesSoldIncrementGetRequest) SetExtType(value string)

可选值有ershou(二手市场的订单),service(商城服务子订单)mark(双十一大促活动异常订单)作为扩展类型筛选只能做单个ext_type查询,不能全部查询所有的ext_type类型

func (*TradesSoldIncrementGetRequest) SetFields

func (r *TradesSoldIncrementGetRequest) SetFields(value string)
需要返回的字段。目前支持有:

1.Trade中可以指定返回的fields:seller_nick, buyer_nick, title, type, created, tid, seller_rate,seller_can_rate, buyer_rate,can_rate,status, payment, discount_fee, adjust_fee, post_fee, total_fee, pay_time, end_time, modified, consign_time, buyer_obtain_point_fee, point_fee, real_point_fee, received_payment,pic_path, num_iid, num, price, cod_fee, cod_status, shipping_type, receiver_name, receiver_state, receiver_city, receiver_district, receiver_address, receiver_zip, receiver_mobile, receiver_phone,alipay_id,alipay_no,is_lgtype,is_force_wlb,is_brand_sale,has_buyer_message,credit_card_fee,step_trade_status,step_paid_fee,mark_desc,send_time,,has_yfx,yfx_fee,yfx_id,yfx_type,trade_source,seller_flag,is_daixiao,is_part_consign 2.Order中可以指定返回fields: orders.title, orders.pic_path, orders.price, orders.num, orders.num_iid, orders.sku_id, orders.refund_status, orders.status, orders.oid, orders.total_fee, orders.payment, orders.discount_fee, orders.adjust_fee, orders.sku_properties_name, orders.item_meal_name, orders.buyer_rate, orders.seller_rate, orders.outer_iid, orders.outer_sku_id, orders.refund_id, orders.seller_type,orders.end_time, orders.order_from,orders.consign_time,orders.shipping_type,orders.logistics_company,orders.invice_no,orders.is_daixiao 3.fields:orders(返回Order的所有内容) 4.fields:service_orders(返回service_order中所有内容)

func (*TradesSoldIncrementGetRequest) SetIsAcookie

func (r *TradesSoldIncrementGetRequest) SetIsAcookie(value string)

默认值为false,表示按正常方式查询订单;如果设置为true则查询到的是模糊后的订单列表,可通过模糊订单列表中的buyer_nick/buyer_id字段与流量数据进行关联。如果没有使用流量数据接口请忽略本字段。

func (*TradesSoldIncrementGetRequest) SetPageNo

func (r *TradesSoldIncrementGetRequest) SetPageNo(value string)

页码。取值范围:大于零的整数;默认值:1。<span style="color:red;font-weight: bold;">注:必须采用倒序的分页方式(从最后一页往回取)才能避免漏单问题。</span>

func (*TradesSoldIncrementGetRequest) SetPageSize

func (r *TradesSoldIncrementGetRequest) SetPageSize(value string)

每页条数。取值范围:1~100,默认值:40。<span style="color:red;font-weight: bold;">建议使用40~50,可以提高成功率,减少超时数量</span>。

func (*TradesSoldIncrementGetRequest) SetStartModified

func (r *TradesSoldIncrementGetRequest) SetStartModified(value string)

查询修改开始时间(修改时间跨度不能大于一天)。格式:yyyy-MM-dd HH:mm:ss

func (*TradesSoldIncrementGetRequest) SetStatus

func (r *TradesSoldIncrementGetRequest) SetStatus(value string)
交易状态,默认查询所有交易状态的数据,除了默认值外每次只能查询一种状态。 可选值 TRADE_NO_CREATE_PAY(没有创建支付宝交易) WAIT_BUYER_PAY(等待买家付款)

SELLER_CONSIGNED_PART(卖家部分发货) WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款) WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货) TRADE_BUYER_SIGNED(买家已签收,货到付款专用) TRADE_FINISHED(交易成功) TRADE_CLOSED(交易关闭) TRADE_CLOSED_BY_TAOBAO(交易被淘宝关闭) ALL_WAIT_PAY(包含:WAIT_BUYER_PAY、TRADE_NO_CREATE_PAY) ALL_CLOSED(包含:TRADE_CLOSED、TRADE_CLOSED_BY_TAOBAO)

func (*TradesSoldIncrementGetRequest) SetTag

func (r *TradesSoldIncrementGetRequest) SetTag(value string)

卖家对交易的自定义分组标签,目前可选值为:time_card(点卡软件代充),fee_card(话费软件代充)

func (*TradesSoldIncrementGetRequest) SetType

func (r *TradesSoldIncrementGetRequest) SetType(value string)
交易类型列表,同时查询多种交易类型可用逗号分隔。<span style="color:red;font-weight: bold;">默认同时查询guarantee_trade, auto_delivery, ec, cod,step的5种交易类型的数据;查询所有交易类型的数据,需要设置下面全部可选值。</span>

可选值: fixed(一口价) auction(拍卖) step(分阶段付款,万人团,阶梯团订单) guarantee_trade(一口价、拍卖) independent_simple_trade(旺店入门版交易) independent_shop_trade(旺店标准版交易) auto_delivery(自动发货) ec(直冲) cod(货到付款) fenxiao(分销) game_equipment(游戏装备) shopex_trade(ShopEX交易) netcn_trade(万网交易) external_trade(统一外部交易) instant_trade (即时到账) b2c_cod(大商家货到付款) hotel_trade(酒店类型交易) super_market_trade(商超交易), super_market_cod_trade(商超货到付款交易) taohua(桃花网交易类型) waimai(外卖交易类型) nopaid(即时到帐/趣味猜交易类型)

eticket(电子凭证)

tmall_i18n(天猫国际); 注:guarantee_trade是一个组合查询条件,并不是一种交易类型,获取批量或单个订单中不会返回此种类型的订单。

func (*TradesSoldIncrementGetRequest) SetUseHasNext

func (r *TradesSoldIncrementGetRequest) SetUseHasNext(value string)

是否启用has_next的分页方式,如果指定true,则返回的结果中不包含总记录数,但是会新增一个是否存在下一页的的字段,<span style="color:red;font-weight: bold;">通过此种方式获取增量交易,效率在原有的基础上有80%的提升</span>。

type TradesSoldIncrementGetResponse

type TradesSoldIncrementGetResponse struct {
	HasNext      bool     `json:"has_next"`
	TotalResults int      `json:"total_results"`
	Trades       []*Trade `json:"trades"`
}

type TradesSoldIncrementGetResponseResult

type TradesSoldIncrementGetResponseResult struct {
	Response *TradesSoldIncrementGetResponse `json:"trades_sold_increment_get_response"`
}

type TradesSoldIncrementvGetRequest

type TradesSoldIncrementvGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
搜索当前会话用户作为卖家已卖出的增量交易数据(只能获取到三个月以内的交易信息)

<br/>1. 一次请求只能查询时间跨度为一天的增量交易记录,即end_create - start_create <= 1天。 <br/>2. 返回的数据结果是以订单入库时间的倒序排列的(该时间和订单修改时间不同),通过从后往前翻页的方式可以避免漏单问题。 <br/>3. 返回的数据结果只包含了订单的部分数据,可通过taobao.trade.fullinfo.get获取订单详情。 <br/>4. 使用主动通知监听订单变更事件,可以实时获取订单更新数据。

func (*TradesSoldIncrementvGetRequest) GetResponse

func (*TradesSoldIncrementvGetRequest) SetEndCreate

func (r *TradesSoldIncrementvGetRequest) SetEndCreate(value string)

查询入库结束时间,必须大于入库开始时间(修改时间跨度不能大于一天),格式:yyyy-MM-dd HH:mm:ss。<span style="color:red;font-weight: bold;">建议使用30分钟以内的时间跨度,能大大提高响应速度和成功率</span>。

func (*TradesSoldIncrementvGetRequest) SetExtType

func (r *TradesSoldIncrementvGetRequest) SetExtType(value string)

可选值有ershou(二手市场的订单),service(商城服务子订单)mark(双十一大促活动异常订单)作为扩展类型筛选只能做单个ext_type查询,不能全部查询所有的ext_type类型

func (*TradesSoldIncrementvGetRequest) SetFields

func (r *TradesSoldIncrementvGetRequest) SetFields(value string)
需要返回的字段。目前支持有:

1.Trade中可以指定返回的fields:seller_nick, buyer_nick, title, type, created, tid, seller_rate, buyer_rate, status, payment, discount_fee, adjust_fee, post_fee, total_fee, pay_time, end_time, modified, consign_time, buyer_obtain_point_fee, point_fee, real_point_fee, received_payment,pic_path, num_iid, num, price, cod_fee, cod_status, shipping_type, receiver_name, receiver_state, receiver_city, receiver_district, receiver_address, receiver_zip, receiver_mobile, receiver_phone,alipay_id,alipay_no,is_lgtype,is_force_wlb,is_brand_sale,has_buyer_message,credit_card_fee,step_trade_status,step_paid_fee,mark_desc,is_daixiao,is_part_consign 2.Order中可以指定返回fields: orders.title, orders.pic_path, orders.price, orders.num, orders.num_iid, orders.sku_id, orders.refund_status, orders.status, orders.oid, orders.total_fee, orders.payment, orders.discount_fee, orders.adjust_fee, orders.sku_properties_name, orders.item_meal_name, orders.buyer_rate, orders.seller_rate, orders.outer_iid, orders.outer_sku_id, orders.refund_id, orders.seller_type,orders.end_time, orders.order_from,orders.consign_time,orders.shipping_type,orders.logistics_company,orders.invice_no,orders.is_daixiao 3.fields:orders(返回Order的所有内容) 4.fields:service_orders(返回service_order中所有内容)

func (*TradesSoldIncrementvGetRequest) SetPageNo

func (r *TradesSoldIncrementvGetRequest) SetPageNo(value string)

页码。取值范围:大于零的整数;默认值:1。<span style="color:red;font-weight: bold;">注:必须采用倒序的分页方式(从最后一页往回取)才能避免漏单问题。</span>

func (*TradesSoldIncrementvGetRequest) SetPageSize

func (r *TradesSoldIncrementvGetRequest) SetPageSize(value string)

每页条数。取值范围:1~100,默认值:40。<span style="color:red;font-weight: bold;">建议使用40~50,可以提高成功率,减少超时数量</span>。

func (*TradesSoldIncrementvGetRequest) SetStartCreate

func (r *TradesSoldIncrementvGetRequest) SetStartCreate(value string)

查询入库开始时间(修改时间跨度不能大于一天)。格式:yyyy-MM-dd HH:mm:ss

func (*TradesSoldIncrementvGetRequest) SetStatus

func (r *TradesSoldIncrementvGetRequest) SetStatus(value string)
交易状态,默认查询所有交易状态的数据,除了默认值外每次只能查询一种状态。 可选值 TRADE_NO_CREATE_PAY(没有创建支付宝交易) WAIT_BUYER_PAY(等待买家付款) WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款)

SELLER_CONSIGNED_PART(卖家部分发货) WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货) TRADE_BUYER_SIGNED(买家已签收,货到付款专用) TRADE_FINISHED(交易成功) TRADE_CLOSED(交易关闭) TRADE_CLOSED_BY_TAOBAO(交易被淘宝关闭) ALL_WAIT_PAY(包含:WAIT_BUYER_PAY、TRADE_NO_CREATE_PAY) ALL_CLOSED(包含:TRADE_CLOSED、TRADE_CLOSED_BY_TAOBAO)

func (*TradesSoldIncrementvGetRequest) SetTag

func (r *TradesSoldIncrementvGetRequest) SetTag(value string)

卖家对交易的自定义分组标签,目前可选值为:time_card(点卡软件代充),fee_card(话费软件代充)

func (*TradesSoldIncrementvGetRequest) SetType

func (r *TradesSoldIncrementvGetRequest) SetType(value string)
交易类型列表,同时查询多种交易类型可用逗号分隔。<span style="color:red;font-weight: bold;">默认同时查询guarantee_trade, auto_delivery, ec, cod,step的5种交易类型的数据;查询所有交易类型的数据,需要设置下面全部可选值。</span>

可选值: fixed(一口价) auction(拍卖) step(分阶段付款,万人团,阶梯团订单) guarantee_trade(一口价、拍卖) independent_simple_trade(旺店入门版交易) independent_shop_trade(旺店标准版交易) auto_delivery(自动发货) ec(直冲) cod(货到付款) fenxiao(分销) game_equipment(游戏装备) shopex_trade(ShopEX交易) netcn_trade(万网交易) external_trade(统一外部交易) instant_trade (即时到账) b2c_cod(大商家货到付款) hotel_trade(酒店类型交易) super_market_trade(商超交易), super_market_cod_trade(商超货到付款交易) taohua(桃花网交易类型) waimai(外卖交易类型) nopaid(即时到帐/趣味猜交易类型) eticket(电子凭证) tmall_i18n(天猫国际)。 注:guarantee_trade是一个组合查询条件,并不是一种交易类型,获取批量或单个订单中不会返回此种类型的订单。

func (*TradesSoldIncrementvGetRequest) SetUseHasNext

func (r *TradesSoldIncrementvGetRequest) SetUseHasNext(value string)

是否启用has_next的分页方式,如果指定true,则返回的结果中不包含总记录数,但是会新增一个是否存在下一页的的字段,<span style="color:red;font-weight: bold;">通过此种方式获取增量交易,效率在原有的基础上有80%的提升</span>。

type TradesSoldIncrementvGetResponse

type TradesSoldIncrementvGetResponse struct {
	HasNext      bool     `json:"has_next"`
	TotalResults int      `json:"total_results"`
	Trades       []*Trade `json:"trades"`
}

type TradesSoldIncrementvGetResponseResult

type TradesSoldIncrementvGetResponseResult struct {
	Response *TradesSoldIncrementvGetResponse `json:"trades_sold_incrementv_get_response"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL