2017-09-25 10 views
1

UPS Rates API(JSONはオプションのShoptimeintransitに基づいています)を使用して、提供された出荷日の利用可能な配送日を取得しています。 DeliveryTimeInformationで複数の出荷日のUPS料金APIに関する問題

https://www.ups.com/upsdeveloperkit/downloadresource?loc=en_CA

、私はピックアップの情報を設定しています。

{ 
    "Security": { 
    "UsernameToken": { 
     "Username": "xxxxxxx", 
     "Password": "xxxxxxx" 
    }, 
    "UPSServiceAccessToken": { 
     "AccessLicenseNumber": "xxxxxxxxxxx" 
    } 
    }, 
    "RateRequest": { 
    "Request": { 
     "RequestOption": "Shoptimeintransit", 
     "TransactionReference": { 
     "CustomerContext": "Your Customer Context" 
     } 
    }, 
    "CustomerClassification": { 
     "Code": "00" 
    }, 
    "PickupType": { 
     "Code": "06" 
    }, 
    "Shipment": { 
     "DeliveryTimeInformation": { 
     "PackageBillType": "07", 
     "Pickup": { 
      "Date": "20170925", 
      "Time": "1140" 
     } 
     }, 
     "Shipper": { 

     "ShipperNumber": "xxxxxxx", 
     "Address": { 
      "City": "Kansas City", 
      "StateProvinceCode": "MO", 
      "CountryCode": "US", 
      "PostalCode": "xxxx" 
     } 
     }, 
     "ShipTo": { 

     "Address": { 
      "City": "Redwood", 
      "StateProvinceCode": "CA", 
      "CountryCode": "US", 
      "PostalCode": "xxxx" 
     } 
     }, 
     "ShipFrom": { 

     "Address": { 
      "City": "Kansas City", 
      "StateProvinceCode": "MO", 
      "CountryCode": "US", 
      "PostalCode": "xxxx" 
     } 
     }, 
     "Package": { 
     "PackagingType": { 
      "Code": "02" 
     }, 
     "Dimensions": { 
      "UnitOfMeasurement": { 
      "Code": "IN" 
      }, 
      "Length": "5", 
      "Width": "4", 
      "Height": "3" 
     }, 
     "PackageWeight": { 
      "UnitOfMeasurement": { 
      "Code": "LBS" 
      }, 
      "Weight": "1" 
     } 
     }, 

     "NumOfPieces": "3", 
     "ShipmentRatingOptions": { 
     "NegotiatedRatesIndicator": "" 
     } 
    } 
    } 
} 

質問は、私は次のN個の出荷日程はご利用いただけ納期を必要とされますが、APIはDeliveryTimeInformation>ピックアップセクションの単一出荷日を要します。

したがって、1つの可能性は、APIをN回呼び出して結果を結合することです。これは良い考えではありません。

拾い上げ日付をリストとして使用し、提供されたデータのサービスコードである可能なすべての納品日を返すすべてのAPIを知っている人は誰でも知っています。

答えて

2

DeliveryTimeInformationのドキュメントの状態Max Allowed: 1、いいえ。

次回のAPIアップデート(1月と7月に1回)をカスタマーサービスを通じてリクエストできますが、それまではN個のリクエストを行う必要があります。

+0

ありがとう、マーティン、私は同じことをしました。私は彼らが日付範囲のオプションのためのいくつかのAPIを提供する必要がありますと思う。 –

関連する問題