logistics

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package logistics 物流相关API

Index

Constants

View Source
const (
	NAMESPACE = "com.alibaba.logistics"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIWebsite

type APIWebsite = string

APIWebsite 是1688业务还是icbu业务

const (
	// API_ALIBABA alibaba
	API_ALIBABA APIWebsite = "alibaba"
	// API_1688 1688
	API_1688 APIWebsite = "1688"
)

type GetLogisticsInfosBuyerViewRequest

type GetLogisticsInfosBuyerViewRequest struct {
	// OrderID 订单ID
	OrderID uint64 `json:"orderId,omitempty"`
	// Fields 需要返回的字段,目前有:company.name,sender,receiver,sendgood。返回的字段要用英文逗号分隔开
	Fields string `json:"fields,omitempty"`
	// Website 是1688业务还是icbu业务
	Website APIWebsite `json:"webSite,omitempty"`
}

GetLogisticsInfosBuyerViewRequest 获取交易订单的物流信息(买家视角) API Request

func (GetLogisticsInfosBuyerViewRequest) Map

Map implement RequestData interface

func (GetLogisticsInfosBuyerViewRequest) Name

Name implement RequestData interface

type GetLogisticsInfosBuyerViewResponse

type GetLogisticsInfosBuyerViewResponse struct {
	go1688.BaseResponse
	// Result 返回结果
	Result []*LogisticsOrder `json:"result,omitempty"`
}

GetLogisticsInfosBuyerViewResponse 获取交易订单的物流信息(买家视角) API Response

type GetLogisticsTraceInfosBuyerViewRequest

type GetLogisticsTraceInfosBuyerViewRequest struct {
	// LogisticsID 该订单下的物流编号
	LogisticsID string `json:"logisticsId,omitempty"`
	// OrderID 订单号
	OrderID uint64 `json:"orderId,omitempty"`
	// Website 是1688业务还是icbu业务
	Website APIWebsite `json:"webSite,omitempty"`
}

GetLogisticsTraceInfosBuyerViewRequest 获取交易订单的物流跟踪信息(买家视角) API Request

func (GetLogisticsTraceInfosBuyerViewRequest) Map

Map implement RequestData interface

func (GetLogisticsTraceInfosBuyerViewRequest) Name

Name implement RequestData interface

type GetLogisticsTraceInfosBuyerViewResponse

type GetLogisticsTraceInfosBuyerViewResponse struct {
	go1688.BaseResponse
	// Traces 跟踪单详情
	Traces []LogisticsTrace `json:"logisticsTrace,omitempty"`
}

GetLogisticsTraceInfosBuyerViewResponse 获取交易订单的物流跟踪信息(买家视角) API Response

type LogisticsOrder

type LogisticsOrder struct {
	// Sender 发件人信息
	Sender *LogisticsSender `json:"sender,omitempty"`
	// ServiceFeature .
	ServiceFeature string `json:"serviceFeature,omitempty"`
	// OrderEntryIDs 订单号列表,无子订单的等于主订单编号,否则为对应子订单列表
	OrderEntryIDs string `json:"orderEntryIds,omitempty"`
	// LogisticsBillNo 物流单号,运单号
	LogisticsBillNo string `json:"logisticsBillNo,omitempty"`
	// LogisticsID 物流信息ID
	LogisticsID string `json:"logisticsId,omitempty"`
	// Receiver 收件人信息
	Receiver *LogisticsReceiver `json:"receiver,omitempty"`
	// LogisticsCompanyID 物流公司ID
	LogisticsCompanyID string `json:"logisticsCompanyId,omitempty"`
	// LogisticsCompanyName 物流公司编码
	LogisticsCompanyName string `json:"logisticsCompanyName,omitempty"`
	// Status 物流状态。WAITACCEPT:未受理;CANCEL:已撤销;ACCEPT:已受理;TRANSPORT:运输中;NOGET:揽件失败;SIGN:已签收;UNSIGN:签收异常
	Status LogisticsStatus `json:"status,omitempty"`
	// SendGoods 商品信息
	SendGoods []LogisticsSendGood `json:"sendGoods,omitempty"`
	// GmtSystemSend .
	GmtSystemSend string `json:"gmtSystemSend,omitempty"`
	// Remarks 备注
	Remarks string `json:"remarks,omitempty"`
}

LogisticsOrder 物流信息

func GetLogisticsInfosBuyerView

func GetLogisticsInfosBuyerView(client *go1688.Client, req *GetLogisticsInfosBuyerViewRequest, accessToken string) ([]*LogisticsOrder, error)

GetLogisticsInfosBuyerView 获取交易订单的物流信息(买家视角) 该接口需要获得订单买家的授权,获取买家的订单的物流详情,在采购或者分销场景中,作为买家也有获取物流详情的需求。该接口能查能根据 订单号查看物流详情,包括发件人,收件人,所发货物明细等。由于物流单录入的原因,可能跟踪信息的API查询会有延迟。该API需要向开放平台申请权限才能访问。In the procurement or distribution scenario, buyers can ask for obtaining the logistics details. The interface can check the logistics details according to the order ID, including the sender, the recipient, the details of the goods sent, and so on. Depending on the logistics information entry time, there may be a delay in API queries regarding the information tracking.

type LogisticsReceiver

type LogisticsReceiver struct {
	// Name 收件人名字
	Name string `json:"receiverName,omitempty"`
	// Phone 收件人电话
	Phone string `json:"receiverPhone,omitempty"`
	// Mobile 收件人电话
	Mobile string `json:"receiverMobile,omitempty"`
	// Encrypt .
	Encrypt string `json:"encrypt,omitempty"`
	// ProvinceCode 省编码
	ProvinceCode string `json:"receiverProvinceCode,omitempty"`
	// CityCode 城市编码
	CityCode string `json:"receiverCityCode,omitempty"`
	// CountyCode 国家编码
	CountyCode string `json:"receiverCountryCode,omitempty"`
	// Address 发货人地址
	Address string `json:"receiverAddress,omitempty"`
	// Province 省份
	Province string `json:"receiverProvince,omitempty"`
	// City 城市
	City string `json:"receiverCity,omitempty"`
	// Country 国家
	County string `json:"receiverCounty,omitempty"`
}

LogisticsReceiver 收件人信息

type LogisticsSendGood

type LogisticsSendGood struct {
	// Name 商品名
	Name string `json:"goodName,omitempty"`
	// Quantity 商品数量
	Quantity string `json:"quantity,omitempty"`
	// Unit 商品单位
	Unit string `json:"unit,omitempty"`
}

LogisticsSendGood 商品信息

type LogisticsSender

type LogisticsSender struct {
	// Name 发件人姓名
	Name string `json:"senderName,omitempty"`
	// Phone 发件人电话
	Phone string `json:"senderPhone,omitempty"`
	// Mobile 发件人电话
	Mobile string `json:"senderMobile,omitempty"`
	// Encrypt .
	Encrypt string `json:"encrypt,omitempty"`
	// ProvinceCode 省编码
	ProvinceCode string `json:"senderProvinceCode,omitempty"`
	// CityCode 城市编码
	CityCode string `json:"senderCityCode,omitempty"`
	// CountyCode 国家编码
	CountyCode string `json:"senderCountryCode,omitempty"`
	// Address 发货人地址
	Address string `json:"senderAddress,omitempty"`
	// Province 省份
	Province string `json:"senderProvince,omitempty"`
	// City 城市
	City string `json:"senderCity,omitempty"`
	// Country 国家
	County string `json:"senderCounty,omitempty"`
}

LogisticsSender 发件人信息

type LogisticsStatus

type LogisticsStatus = string

LogisticsStatus 物流状态

const (
	// WAIT_ACCEPT_STATUS 未受理
	WAIT_ACCEPT_STATUS LogisticsStatus = "WAITACCEPT"
	// CANCEL_STATUS 已撤销
	CANCEL_STATUS LogisticsStatus = "CANCEL"
	// ACCEPT_STATUS 已受理
	ACCEPT_STATUS LogisticsStatus = "ACCEPT"
	// TRANSPORT_STATUS 运输中
	TRANSPORT_STATUS LogisticsStatus = "TRANSPORT"
	// NOGET_STATUS 揽件失败
	NOGET_STATUS LogisticsStatus = "NOGET"
	// SIGN_STATUS 已签收
	SIGN_STATUS LogisticsStatus = "SIGN"
	// UNSIGN_STATUS 签收异常
	UNSIGN_STATUS LogisticsStatus = "UNSIGN"
)

type LogisticsStep

type LogisticsStep struct {
	// AcceptTime 物流跟踪单该步骤的时间
	AcceptTime string `json:"acceptTime,omitempty"`
	// Remark 备注,如:“在浙江浦江县公司进行下级地点扫描,即将发往:广东深圳公司”
	Remark string `json:"remark,omitempty"`
}

LogisticsStep 物流跟踪步骤

type LogisticsTrace

type LogisticsTrace struct {
	// LogisticsID 物流信息ID
	LogisticsID string `json:"logisticsId,omitempty"`
	// OrderID 订单编号
	OrderID uint64 `json:"orderId,omitempty"`
	// LogisticsBillNo 物流单号,运单号
	LogisticsBillNo string `json:"logisticsBillNo,omitempty"`
	// Steps 物流跟踪步骤
	Steps []LogisticsStep `json:"logisticsSteps,omitempty"`
}

LogisticsTrace 跟踪单详情

func GetLogisticsTraceInfosBuyerView

func GetLogisticsTraceInfosBuyerView(client *go1688.Client, req *GetLogisticsTraceInfosBuyerViewRequest, accessToken string) ([]LogisticsTrace, error)

GetLogisticsTraceInfosBuyerView 获取交易订单的物流跟踪信息(买家视角) 该接口需要获取订单买家的授权,获取买家的订单的物流跟踪信息,在采购或者分销场景中,作为买家也有获取物流详情的需求。该接口能查能根据物流单号查看物流单跟踪信息。由于物流单录入的原因,可能跟踪信息的API查询会有延迟。该API需要向开放平台申请权限才能访问。In the procurement or distribution scenario, buyers can obtain information on logistics tracking. The interface can view the logistics tracking information according to the logistics tacking number. Depending on the logistics information entry time, there may be a delay in API queries regarding the information tracking.

type OpLogisticsCompany

type OpLogisticsCompany struct {
	// ID 订单编号
	ID uint64 `json:"id,omitempty"`
	// Name 物流公司名称
	Name string `json:"companyName,omitempty"`
	// No 物流公司编号
	No string `json:"companyNo,omitempty"`
	// Phone 物流公司服务电话
	Phone string `json:"companyPhone,omitempty"`
	// SupportPrint 是否支持打印
	SupportPrint bool `json:"supportPrint,omitempty"`
	// Spelling 全拼
	Spelling string `json:"spelling,omitempty"`
	// GmtCreate 创建时间
	GmtCreate go1688.JsonTime `json:"gmtCreate,omtiempty"`
	// GmtModified 修改时间
	GmtModified go1688.JsonTime `json:"gmtModified,omitempty"`
}

OpLogisticsCompany 物流公司

func GetLogisticCompanyList

func GetLogisticCompanyList(client *go1688.Client, accessToken string) ([]OpLogisticsCompany, error)

GetLogisticCompanyList 物流公司列表-所有的物流公司

func GetLogisticCompanyListOffline

func GetLogisticCompanyListOffline(client *go1688.Client, accessToken string) ([]OpLogisticsCompany, error)

GetLogisticCompanyListOffline 物流公司列表-自联物流

type OpQueryLogisticCompanyListOfflineRequest

type OpQueryLogisticCompanyListOfflineRequest struct{}

OpQueryLogisticCompanyListOfflineRequest 物流公司列表-自联物流 API Request

func (OpQueryLogisticCompanyListOfflineRequest) Map

Map implement RequestData interface

func (OpQueryLogisticCompanyListOfflineRequest) Name

Name implement RequestData interface

type OpQueryLogisticCompanyListRequest

type OpQueryLogisticCompanyListRequest struct{}

OpQueryLogisticCompanyListRequest 物流公司列表-所有的物流公司

func (OpQueryLogisticCompanyListRequest) Map

Map implement RequestData interface

func (OpQueryLogisticCompanyListRequest) Name

Name implement RequestData interface

type OpQueryLogisticCompanyListResponse

type OpQueryLogisticCompanyListResponse struct {
	go1688.BaseResponse
	// Result 物流公司列表
	Result []OpLogisticsCompany `json:"result,omitempty"`
}

OpQueryLogisticCompanyListResponse 物流公司列表-所有的物流公司

Jump to

Keyboard shortcuts

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