trade

package
v0.0.0-...-f648943 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2014 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

提供了订单下载,修改收货地址、修改交易备注等功能 auto sdk from taobao ApiMetadata.xml version 20140725 auther: [email protected]

Index

Constants

View Source
const VersionNo = "20140725"

Variables

This section is empty.

Functions

This section is empty.

Types

type ListResult

type ListResult struct {
	ResultList struct {
		TakeoutThirdOrder []*TakeoutThirdOrder `json:"takeout_third_order"`
	} `json:"result_list"`
	ResultSize int    `json:"result_size"`
	RetCode    string `json:"ret_code"`
	TotalCount int    `json:"total_count"`
}

外卖订单查询结果

type LogisticServiceTag

type LogisticServiceTag struct {
	ServiceTag  string `json:"service_tag"`
	ServiceType string `json:"service_type"`
}

物流服务标签

type LogisticsTag

type LogisticsTag struct {
	LogisticServiceTagList struct {
		LogisticServiceTag []*LogisticServiceTag `json:"logistic_service_tag"`
	} `json:"logistic_service_tag_list"`
	OrderId string `json:"order_id"`
}

物流的服务标签

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"`
	DivideOrderFee    string `json:"divide_order_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"`
	IsWww             bool   `json:"is_www"`
	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"`
	PartMjzDiscount   string `json:"part_mjz_discount"`
	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"`
	StoreCode         string `json:"store_code"`
	TicketExpdateKey  string `json:"ticket_expdate_key"`
	TicketOuterId     string `json:"ticket_outer_id"`
	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"`
	DivideOrderFee    string `json:"divide_order_fee"`
	Num               int    `json:"num"`
	NumIid            int    `json:"num_iid"`
	Oid               int    `json:"oid"`
	PartMjzDiscount   string `json:"part_mjz_discount"`
	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 OrderGoods

type OrderGoods struct {
	AuctionCode   string `json:"auction_code"`
	Count         int    `json:"count"`
	GoodsCode     string `json:"goods_code"`
	GoodsName     string `json:"goods_name"`
	GoodsPicId    string `json:"goods_pic_id"`
	GoodsQuantity int    `json:"goods_quantity"`
	ItemValue     int    `json:"item_value"`
	Name          string `json:"name"`
	OrderGoodsId  int    `json:"order_goods_id"`
	RealPrice     string `json:"real_price"`
	SellProperty  string `json:"sell_property"`
	UserId        int    `json:"user_id"`
}

物流订单商品

type PromotionDetail

type PromotionDetail struct {
	DiscountFee   float64 `json:"discount_fee,string"`
	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 TakeoutThirdOrder

type TakeoutThirdOrder struct {
	Address         string  `json:"address"`
	AlipayStreamId  string  `json:"alipay_stream_id"`
	CreateTime      string  `json:"create_time"`
	DeliveryPay     float64 `json:"delivery_pay,string"`
	EndDeliverytime string  `json:"end_deliverytime"`
	From            int     `json:"from"`
	GoodsList       struct {
		OrderGoods []*OrderGoods `json:"order_goods"`
	} `json:"goods_list"`
	Id                int               `json:"id"`
	Note              string            `json:"note"`
	OrderStatus       int               `json:"order_status"`
	PayAccount        string            `json:"pay_account"`
	PeopleNumber      int               `json:"people_number"`
	StartDeliverytime string            `json:"start_deliverytime"`
	StoreContactphone string            `json:"store_contactphone"`
	StoreId           int               `json:"store_id"`
	StoreName         string            `json:"store_name"`
	TotalPay          float64           `json:"total_pay,string"`
	UserAddress       *UserThirdAddress `json:"user_address"`
	UserId            int               `json:"user_id"`
}

外卖订单对象

type Trade

type Trade struct {
	AdjustFee           string `json:"adjust_fee"`
	AlipayId            int    `json:"alipay_id"`
	AlipayNo            string `json:"alipay_no"`
	AlipayPoint         int    `json:"alipay_point"`
	AlipayUrl           string `json:"alipay_url"`
	AlipayWarnMsg       string `json:"alipay_warn_msg"`
	AreaId              string `json:"area_id"`
	ArriveCutTime       string `json:"arrive_cut_time"`
	ArriveInterval      int    `json:"arrive_interval"`
	AsyncModified       string `json:"async_modified"`
	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"`
	ConsignInterval     int    `json:"consign_interval"`
	ConsignTime         string `json:"consign_time"`
	Created             string `json:"created"`
	CreditCardFee       string `json:"credit_card_fee"`
	DiscountFee         string `json:"discount_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"`
	InvoiceType         string `json:"invoice_type"`
	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"`
	O2o                 string `json:"o2o"`
	O2oDelivery         string `json:"o2o_delivery"`
	O2oGuideId          string `json:"o2o_guide_id"`
	O2oGuideName        string `json:"o2o_guide_name"`
	O2oShopId           string `json:"o2o_shop_id"`
	O2oShopName         string `json:"o2o_shop_name"`
	Orders              struct {
		Order []*Order `json:"order"`
	} `json:"orders"`
	PayTime          string `json:"pay_time"`
	Payment          string `json:"payment"`
	PccAf            int    `json:"pcc_af"`
	PicPath          string `json:"pic_path"`
	PointFee         int    `json:"point_fee"`
	PostFee          string `json:"post_fee"`
	Price            string `json:"price"`
	Promotion        string `json:"promotion"`
	PromotionDetails struct {
		PromotionDetail []*PromotionDetail `json:"promotion_detail"`
	} `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    struct {
		ServiceOrder []*ServiceOrder `json:"service_order"`
	} `json:"service_orders"`
	ServiceTags struct {
		LogisticsTag []*LogisticsTag `json:"logistics_tag"`
	} `json:"service_tags"`
	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"`
	ZeroPurchase      bool   `json:"zero_purchase"`
}

交易结构

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        struct {
		OrderAmount []*OrderAmount `json:"order_amount"`
	} `json:"order_amounts"`
	PayTime          string `json:"pay_time"`
	Payment          string `json:"payment"`
	PostFee          string `json:"post_fee"`
	PromotionDetails struct {
		PromotionDetail []*PromotionDetail `json:"promotion_detail"`
	} `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)

订单交易编号<br /> 支持最大值为:9223372036854775807<br /> 支持最小值为:-9223372036854775808

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,string"`
	ConfirmPostFee float64 `json:"confirm_post_fee,string"`
	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系统的压力

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, arrive_interval, arrive_cut_time, consign_interval,zero_purchase,alipay_point,pcc_af,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,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.invoice_no, orders.is_daixiao

3.fields:orders(返回Order的所有内容) 4.flelds:promotion_details(返回promotion_details所有内容,优惠详情),invoice_name(发票抬头),orders.is_www(子订单是否是www订单,orders.store_code(发货的仓库编码)<br> 5. field:service_tags(返回物流标签)

func (*TradeFullinfoGetRequest) SetTid

func (r *TradeFullinfoGetRequest) SetTid(value string)

交易编号<br /> 支持最大值为:9223372036854775807<br /> 支持最小值为:1

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,consign_interval,arrive_interval,arrive_cut_time <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中的所有允许返回的字段),orders.is_wwww(是否是www订单),orders.store_code(仓库代码)<br> 4. field:service_tags(返回物流标签)

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<br /> 支持最大值为:5<br /> 支持最小值为: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<br /> 支持最大值为:5<br /> 支持最小值为: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。<br /> 支持最大值为:10<br /> 支持最小值为:3

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个字节。<br /> 支持最大长度为:228<br /> 支持的最大列表长度为:228

func (*TradeShippingaddressUpdateRequest) SetReceiverCity

func (r *TradeShippingaddressUpdateRequest) SetReceiverCity(value string)

城市。最大长度为32个字节。如:杭州<br /> 支持最大长度为:32<br /> 支持的最大列表长度为:32

func (*TradeShippingaddressUpdateRequest) SetReceiverDistrict

func (r *TradeShippingaddressUpdateRequest) SetReceiverDistrict(value string)

区/县。最大长度为32个字节。如:西湖区<br /> 支持最大长度为:32<br /> 支持的最大列表长度为:32

func (*TradeShippingaddressUpdateRequest) SetReceiverMobile

func (r *TradeShippingaddressUpdateRequest) SetReceiverMobile(value string)

移动电话。最大长度为30个字节。<br /> 支持最大长度为:30<br /> 支持的最大列表长度为:30

func (*TradeShippingaddressUpdateRequest) SetReceiverName

func (r *TradeShippingaddressUpdateRequest) SetReceiverName(value string)

收货人全名。最大长度为50个字节。<br /> 支持最大长度为:50<br /> 支持的最大列表长度为:50

func (*TradeShippingaddressUpdateRequest) SetReceiverPhone

func (r *TradeShippingaddressUpdateRequest) SetReceiverPhone(value string)

固定电话。最大长度为30个字节。<br /> 支持最大长度为:30<br /> 支持的最大列表长度为:30

func (*TradeShippingaddressUpdateRequest) SetReceiverState

func (r *TradeShippingaddressUpdateRequest) SetReceiverState(value string)

省份。最大长度为32个字节。如:浙江<br /> 支持最大长度为:32<br /> 支持的最大列表长度为:32

func (*TradeShippingaddressUpdateRequest) SetReceiverZip

func (r *TradeShippingaddressUpdateRequest) SetReceiverZip(value string)

邮政编码。必须由6个数字组成。<br /> 支持最大长度为:6<br /> 支持的最大列表长度为: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 TradeWaimaiConfirmRequest

type TradeWaimaiConfirmRequest struct {
	open_taobao.TaobaoMethodRequest
}

商家确认订单,进行发货

func (*TradeWaimaiConfirmRequest) GetResponse

func (r *TradeWaimaiConfirmRequest) GetResponse(accessToken string) (*TradeWaimaiConfirmResponse, []byte, error)

func (*TradeWaimaiConfirmRequest) SetOrderId

func (r *TradeWaimaiConfirmRequest) SetOrderId(value string)

未确认发货的订单编号

type TradeWaimaiConfirmResponse

type TradeWaimaiConfirmResponse struct {
	RetCode string `json:"ret_code"`
}

type TradeWaimaiConfirmResponseResult

type TradeWaimaiConfirmResponseResult struct {
	Response *TradeWaimaiConfirmResponse `json:"trade_waimai_confirm_response"`
}

type TradeWaimaiGetRequest

type TradeWaimaiGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

可以按商家或是店铺维度的进行查询买家付款卖家未确认订单,一次返回不大于20条订单

func (*TradeWaimaiGetRequest) GetResponse

func (r *TradeWaimaiGetRequest) GetResponse(accessToken string) (*TradeWaimaiGetResponse, []byte, error)

func (*TradeWaimaiGetRequest) SetIsAll

func (r *TradeWaimaiGetRequest) SetIsAll(value string)
true-查询仅按商家维度

false-查询按商家下所属店铺维度

func (*TradeWaimaiGetRequest) SetMaxSize

func (r *TradeWaimaiGetRequest) SetMaxSize(value string)

返回记录数,超过20按20条返回数据<br /> 支持最大值为:20<br /> 支持最小值为:1

func (*TradeWaimaiGetRequest) SetStoreId

func (r *TradeWaimaiGetRequest) SetStoreId(value string)

外卖分店ID

type TradeWaimaiGetResponse

type TradeWaimaiGetResponse struct {
	Result *ListResult `json:"result"`
}

type TradeWaimaiGetResponseResult

type TradeWaimaiGetResponseResult struct {
	Response *TradeWaimaiGetResponse `json:"trade_waimai_get_response"`
}

type TradeWaimaiOrdersGetRequest

type TradeWaimaiOrdersGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

获取淘宝外卖全部订单

func (*TradeWaimaiOrdersGetRequest) GetResponse

func (r *TradeWaimaiOrdersGetRequest) GetResponse(accessToken string) (*TradeWaimaiOrdersGetResponse, []byte, error)

func (*TradeWaimaiOrdersGetRequest) SetIsAllOrder

func (r *TradeWaimaiOrdersGetRequest) SetIsAllOrder(value string)

true 仅有支付宝订单,false 包括所有类型订单(货到付款,支付券等)

func (*TradeWaimaiOrdersGetRequest) SetIsAllShop

func (r *TradeWaimaiOrdersGetRequest) SetIsAllShop(value string)
true-查询仅按商家维度

false-查询按商家下所属店铺维度

func (*TradeWaimaiOrdersGetRequest) SetKeyword

func (r *TradeWaimaiOrdersGetRequest) SetKeyword(value string)

买家昵称/订单ID 搜索

func (*TradeWaimaiOrdersGetRequest) SetOrderStatus

func (r *TradeWaimaiOrdersGetRequest) SetOrderStatus(value string)

订单状态 待确认订单2 , 退款中订单4 , 已发货12 关闭20 交易成功21

func (*TradeWaimaiOrdersGetRequest) SetPageNo

func (r *TradeWaimaiOrdersGetRequest) SetPageNo(value string)

页码<br /> 支持的最大列表长度为:100

func (*TradeWaimaiOrdersGetRequest) SetPageSize

func (r *TradeWaimaiOrdersGetRequest) SetPageSize(value string)

返回记录数,超过20按20条返回数据<br /> 支持最大值为:20<br /> 支持最小值为:1

func (*TradeWaimaiOrdersGetRequest) SetShopId

func (r *TradeWaimaiOrdersGetRequest) SetShopId(value string)

外卖分店ID

type TradeWaimaiOrdersGetResponse

type TradeWaimaiOrdersGetResponse struct {
	Result *ListResult `json:"result"`
}

type TradeWaimaiOrdersGetResponseResult

type TradeWaimaiOrdersGetResponseResult struct {
	Response *TradeWaimaiOrdersGetResponse `json:"trade_waimai_orders_get_response"`
}

type TradeWaimaiRefuseRequest

type TradeWaimaiRefuseRequest struct {
	open_taobao.TaobaoMethodRequest
}

商家拒绝订单,产生退款操作

func (*TradeWaimaiRefuseRequest) GetResponse

func (r *TradeWaimaiRefuseRequest) GetResponse(accessToken string) (*TradeWaimaiRefuseResponse, []byte, error)

func (*TradeWaimaiRefuseRequest) SetOrderId

func (r *TradeWaimaiRefuseRequest) SetOrderId(value string)

买家付款未发货订单号

func (*TradeWaimaiRefuseRequest) SetReason

func (r *TradeWaimaiRefuseRequest) SetReason(value string)

拒单理由

type TradeWaimaiRefuseResponse

type TradeWaimaiRefuseResponse struct {
	RetCode string `json:"ret_code"`
}

type TradeWaimaiRefuseResponseResult

type TradeWaimaiRefuseResponseResult struct {
	Response *TradeWaimaiRefuseResponse `json:"trade_waimai_refuse_response"`
}

type TradesSoldGetRequest

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

<br/>1. 返回的数据结果是以订单的创建时间倒序排列的。 <br/>2. 返回的数据结果只包含了订单的部分数据,可通过taobao.trade.fullinfo.get获取订单详情。 <br/> <span style="color:red">注意:type字段的说明,如果该字段不传,接口默认只查4种类型订单,非默认查询的订单是不返回。遇到订单查不到的情况的,通常都是这个原因造成。解决办法就是type加上订单类型就可正常返回了。用taobao.trade.fullinfo.get 查订单fields返回type 很容易的能知道订单的类型(type)</span>

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,zero_purchase <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.invoice_no,orders.is_daixiao<br> 3. fields:orders(返回2中Order的所有内容) 4.fields:service_orders(返回service_order中所有内容)

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) WAIT_PRE_AUTH_CONFIRM(余额宝0元购合约中)

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(天猫国际);nopaid (无付款交易)insurance_plus(保险)finance(基金) 注:guarantee_trade是一个组合查询条件,并不是一种交易类型,获取批量或单个订单中不会返回此种类型的订单。 pre_auth_type(预授权0元购)

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       struct {
		Trade []*Trade `json:"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/detail.htm?spm=0.0.0.0.F9TTxy&id=101744">消息服务</a>监听订单变更事件,可以实时获取订单更新数据。</span> <br/>注意:type字段的说明,如果该字段不传,接口默认只查4种类型订单,非默认查询的订单是不返回。遇到订单查不到的情况的,通常都是这个原因造成。解决办法就是type加上订单类型就可正常返回了。用taobao.trade.fullinfo.get 查订单fields返回type 很容易的能知道订单的类型(type)

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,zero_purchase 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.consign_time,orders.shipping_type,orders.logistics_company,orders.invoice_no,orders.is_daixiao 3.fields:orders(返回Order的所有内容) 4.fields:service_orders(返回service_order中所有内容)

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) WAIT_PRE_AUTH_CONFIRM(余额宝0元购合约中)

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(天猫国际);nopaid(无付款交易)insurance_plus(保险)finance(基金) 注:guarantee_trade是一个组合查询条件,并不是一种交易类型,获取批量或单个订单中不会返回此种类型的订单。 pre_auth_type(预授权0元购)

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       struct {
		Trade []*Trade `json:"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.invoice_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       struct {
		Trade []*Trade `json:"trade"`
	} `json:"trades"`
}

type TradesSoldIncrementvGetResponseResult

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

type UserThirdAddress

type UserThirdAddress struct {
	Address string `json:"address"`
	Mobile  string `json:"mobile"`
	Name    string `json:"name"`
	Phone   string `json:"phone"`
}

送货地址对象

Jump to

Keyboard shortcuts

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