UPS运输REST API

UPS运输REST API,api,rest,restful-url,shipping,ups,Api,Rest,Restful Url,Shipping,Ups,我想使用UPS的API进行一个虚拟REST调用,以生成一个测试假发货请求 我将遵循装运包的剩余UPS文档: https://www.ups.com/upsdeveloperkit/downloadresource?loc=en_US 第116页显示了客户端应用程序创建装运并使用装运标签获得成功响应的示例。我想重新创建它,因此我试图将一些虚假数据发布到测试URL地址: https://wwwcie.ups.com/ship/v1/shipments 我发出了请求(带有标题和正文信息),但我一直

我想使用UPS的API进行一个虚拟REST调用,以生成一个测试假发货请求

我将遵循装运包的剩余UPS文档:

https://www.ups.com/upsdeveloperkit/downloadresource?loc=en_US
第116页显示了客户端应用程序创建装运并使用装运标签获得成功响应的示例。我想重新创建它,因此我试图将一些虚假数据发布到测试URL地址:

https://wwwcie.ups.com/ship/v1/shipments
我发出了请求(带有标题和正文信息),但我一直收到错误代码120100(缺少或无效的发货人编号)

很多论坛帖子都说这与我的地址没有在我的UPS帐户上设置有关,但我已经在我的帐户上设置了地址,我只想向测试URL端点发出一个虚假请求

以下是请求正文:

{
"ShipmentRequest":{
"Shipment":{ "Description":"1206 PTR", "Shipper":{
"Name":"ShipperName", "AttentionName":"AttentionName", "TaxIdentificationNumber":"TaxID", "Phone":{
"Number":"1234567890" },
"ShipperNumber":"ShipperNumber", "Address":{
"AddressLine":"AddressLine", "City":"City", "StateProvinceCode":"STD", "PostalCode":"PostalCode", "CountryCode":"EN"
} },
"ShipTo":{
"Name":"ShipToName", "AttentionName":"AttentionName", "Phone":{
"Number":"1234567890" },
"FaxNumber":"1234567999", "TaxIdentificationNumber":"456999", "Address":{
"AddressLine":"AddressLine", "City":"City", "StateProvinceCode":"STD", "PostalCode":"PostalCode", "CountryCode":"EN"
} },
"ShipFrom":{ "Name":"ShipperName", "AttentionName":"AttentionName", "Phone":{
"Number":"1234567890" },
"FaxNumber":"1234567999", "TaxIdentificationNumber":"456999", "Address":{
"AddressLine":"AddressLine", "City":"City",
"StateProvinceCode":"STD", "PostalCode":"PsotalCode", "CountryCode":"EN"
} },
"PaymentInformation":{ "ShipmentCharge":{
"Type":"01", "BillShipper":{
"AccountNumber":"AccountNumber" }
} },
"Service":{
"Code":"01", "Description":"Expedited"
},
"Package":[{ "Description":"International Goods", "Packaging":{
"Code":"02" },
"PackageWeight":{ "UnitOfMeasurement":{
"Code":"LBS" },
"Weight":"10" },
"PackageServiceOptions":"" },
{
"Description":"International Goods", "Packaging":{
"Code":"02" },
"PackageWeight":{ "UnitOfMeasurement":{
"Code":"LBS" },
"Weight":"20" },
"PackageServiceOptions":"" }]
, "ItemizedChargesRequestedIndicator":"", "RatingMethodRequestedIndicator":"", "TaxInformationIndicator":"", "ShipmentRatingOptions":{
"NegotiatedRatesIndicator":"" }
}, "LabelSpecification":{
"LabelImageFormat":{ "Code":"GIF"
} }
} }

我通过查找链接到UPS开发人员帐户的发货人编号(帐号)解决了此问题