Logistics API ドキュメント

ロジスティクス API(Logistics API)

Logistics API は、eBay が交渉した配送料金の取得、配送ラベルの作成、出荷の管理を提供する限定リリース API です。USPS の配送料金とラベルのみをサポートしています。

注: これは限定リリース API であり、ビジネスユニットによって承認された特定の開発者のみが利用できます。

重要: セラーは、この API を使用する前に eBay アカウントで支払い方法を設定する必要があります。

バージョン: v1_beta.0.0

ベースURL: https://api.ebay.com/sell/logistics/v1_beta

認証(OAuth スコープ)

この API は 認可コード(Authorization Code) フローを使用します。

スコープ 説明
https://api.ebay.com/oauth/api_scope/sell.logisticsロジスティクス情報へのアクセス

リソース一覧

Logistics API は以下の 2 リソース、合計 6 エンドポイント(2 GET + 2 POST + 1 POST + 1 GET)で構成されています。

リソース 説明
shipment出荷の作成、取得、キャンセル、ラベルダウンロード4
shipping_quote配送見積もりの作成と取得2

shipment — 出荷管理(4 エンドポイント)

POST /shipment/create_from_shipping_quote

createFromShippingQuote — 配送見積もりから出荷を作成します。選択した料金に基づいて配送ラベルが生成され、追加の配送オプションを含めることができます。出荷を作成すると、合計配送コストが請求契約アカウントに請求されます。

パラメータ場所必須説明
Content-Typeヘッダー必須application/json
X-EBAY-C-MARKETPLACE-IDヘッダー必須出荷の eBay マーケットプレイス。

リクエストボディ: CreateShipmentFromQuoteRequest

レスポンス: 201 → Shipment / 400 / 409 / 500

GET /shipment/{shipmentId}

getShipment — 指定された出荷 ID の出荷詳細を取得します。

パラメータ場所必須説明
shipmentIdパス必須出荷の一意の識別子(createFromShippingQuote で生成)。

レスポンス: 200 → Shipment / 400 / 404 / 500

POST /shipment/{shipmentId}/cancel

cancelShipment — 出荷をキャンセルし、関連する配送ラベルを削除します。合計配送コストが請求契約アカウントに返金されます。配送ラベルが使用済みの場合はキャンセルできません。

パラメータ場所必須説明
shipmentIdパス必須キャンセルする出荷の一意の識別子。

レスポンス: 200 → Shipment / 400 / 404 / 409 / 500

GET /shipment/{shipmentId}/download_label_file

downloadLabelFile — 出荷に関連する配送ラベルファイルをダウンロードします。デフォルトのファイル形式は PDF です。

パラメータ場所必須説明
shipmentIdパス必須配送ラベルに関連する出荷の一意の識別子。
Acceptヘッダー必須application/pdf

レスポンス: 200 → PDF ファイル / 400 / 404 / 500

shipping_quote — 配送見積もり(2 エンドポイント)

POST /shipping_quote

createShippingQuote — ライブの配送料金リストを含む配送見積もりを返します。料金は発送元、配送先、パッケージサイズに基づき、すべて eBay が交渉した価格です。USPS のみサポート。

パラメータ場所必須説明
Content-Typeヘッダー必須application/json
X-EBAY-C-MARKETPLACE-IDヘッダー必須配送見積もりの eBay マーケットプレイス。

リクエストボディ: ShippingQuoteRequest

レスポンス: 201 → ShippingQuote / 400 / 409 / 500

GET /shipping_quote/{shippingQuoteId}

getShippingQuote — 指定された配送見積もりの詳細を取得します。

パラメータ場所必須説明
shippingQuoteIdパス必須配送見積もりの一意の識別子(createShippingQuote で生成)。

レスポンス: 200 → ShippingQuote / 400 / 404 / 500

スキーマ定義(全 19 スキーマ)

出荷

CreateShipmentFromQuoteRequest

フィールド説明
shippingQuoteIdstring配送見積もり ID
rateIdstring選択した料金 ID
additionalOptionsarray[AdditionalOption]追加配送オプション
labelSizestringラベルサイズ
labelCustomMessagestringラベルのカスタムメッセージ
returnToContact返品先

Shipment

フィールド説明
shipmentIdstring出荷 ID
shipmentTrackingNumberstring追跡番号
ratePurchasedRate購入した料金情報
shipFromContact発送元
shipToContact配送先
returnToContact返品先
ordersarray[Order]関連する注文
packageSpecificationPackageSpecificationパッケージ仕様
labelDownloadUrlstringラベルダウンロード URL
labelSizestringラベルサイズ
labelCustomMessagestringラベルのカスタムメッセージ
cancellationShipmentCancellationキャンセル情報
creationDatestring作成日時

ShipmentCancellation

フィールド説明
cancellationRequestedDatestringキャンセル依頼日時
cancellationStatusstringキャンセルステータス

PurchasedRate

フィールド説明
rateIdstring料金 ID
shippingQuoteIdstring配送見積もり ID
shippingCarrierCodestring配送業者コード
shippingCarrierNamestring配送業者名
shippingServiceCodestring配送サービスコード
shippingServiceNamestring配送サービス名
baseShippingCostAmount基本配送コスト
totalShippingCostAmount合計配送コスト
additionalOptionsarray[AdditionalOption]追加オプション
minEstimatedDeliveryDatestring最短配達予定日
maxEstimatedDeliveryDatestring最長配達予定日
pickupTypestring集荷タイプ
pickupSlotIdstring集荷スロット ID
pickupNetworksarray[string]集荷ネットワーク
destinationTimeZonestring配送先タイムゾーン

配送見積もり

ShippingQuoteRequest

フィールド説明
ordersarray[Order]関連する注文
packageSpecificationPackageSpecificationパッケージ仕様(サイズ、重量)
shipFromContact発送元
shipToContact配送先

ShippingQuote

フィールド説明
shippingQuoteIdstring配送見積もり ID
ratesarray[Rate]利用可能な料金の配列
ordersarray[Order]関連する注文
packageSpecificationPackageSpecificationパッケージ仕様
shipFromContact発送元
shipToContact配送先
creationDatestring作成日時
expirationDatestring有効期限
warningsarray[Error]警告

Rate

フィールド説明
rateIdstring料金 ID
shippingCarrierCodestring配送業者コード
shippingCarrierNamestring配送業者名
shippingServiceCodestringサービスコード
shippingServiceNamestringサービス名
baseShippingCostAmount基本配送コスト
additionalOptionsarray[AdditionalOption]追加オプション
rateRecommendationarray[string]推奨事項
minEstimatedDeliveryDatestring最短配達予定日
maxEstimatedDeliveryDatestring最長配達予定日
pickupTypestring集荷タイプ
pickupSlotsarray[PickupSlot]集荷スロット
pickupNetworksarray[string]集荷ネットワーク
destinationTimeZonestring配送先タイムゾーン

共通型

Contact

フィールド説明
fullNamestringフルネーム
companyNamestring会社名
contactAddressContactAddress住所
primaryPhonePhoneNumber電話番号

ContactAddress

フィールド説明
addressLine1string住所 1 行目
addressLine2string住所 2 行目
citystring市区町村
stateOrProvincestring都道府県/州
postalCodestring郵便番号
countryCodestring国コード
countystring

PackageSpecification

フィールド説明
dimensionsDimensions寸法
weightWeight重量

Dimensions

フィールド説明
heightstring高さ
lengthstring長さ
widthstring
unitstring単位

Weight

フィールド説明
valuestring重量値
unitstring単位

Amount

フィールド説明
currencystring通貨コード
valuestring金額

AdditionalOption

フィールド説明
optionTypestringオプションタイプ
additionalCostAmount追加コスト

Order

フィールド説明
orderIdstring注文 ID
channelstringチャネル

PickupSlot

フィールド説明
pickupSlotIdstring集荷スロット ID
pickupSlotStartTimestring開始時間
pickupSlotEndTimestring終了時間
pickupSlotTimeZonestringタイムゾーン

PhoneNumber

フィールド説明
phoneNumberstring電話番号

Error

フィールド説明
categorystringエラーカテゴリ
domainstringエラードメイン
errorIdintegerエラー ID
messagestring短いメッセージ
longMessagestring詳細メッセージ
inputRefIdsarray[string]入力参照 ID
outputRefIdsarray[string]出力参照 ID
parametersarray[ErrorParameter]エラーパラメータ
subdomainstringエラーサブドメイン

ErrorParameter

フィールド説明
namestringパラメータ名
valuestringパラメータ値

エンドポイント一覧(全 6 エンドポイント)

メソッド エンドポイント operationId 説明
POST/shipment/create_from_shipping_quotecreateFromShippingQuote配送見積もりから出荷を作成
GET/shipment/{shipmentId}getShipment出荷詳細を取得
POST/shipment/{shipmentId}/cancelcancelShipment出荷をキャンセル
GET/shipment/{shipmentId}/download_label_filedownloadLabelFile配送ラベルをダウンロード
POST/shipping_quotecreateShippingQuote配送見積もりを作成
GET/shipping_quote/{shippingQuoteId}getShippingQuote配送見積もりの詳細を取得
トップに戻る