它会在 API 文档中得到很好的评论。
我个人在发货 API 中使用了以下内容,这些评论是从提供的文档中收集的。
这是来自我的个人代码,不是跟踪 API,但我想它会相似且一致:
// Mandatory - The MessageTime element contains the time at which the message was sent by the requestor. The format of
// the element should be YYYY-MM-DD(T)hh-mm-ss - Time Zone where “T” is the separator between date
// and time
request.ServiceHeader.MessageTime = DateTime.Now;
// Mandatory - The MessageReference element should contain a unique reference to the message, so that trace of
// a particular message can easily be carried out. It must be a minimum length of 28 and maximum
// 32.The value can be decided by the customer.
request.ServiceHeader.MessageReference = Guid.NewGuid().ToString("N");
编辑
我仔细检查了跟踪 API,结果是一样的:
