openapi: 3.0.0
info:
title: Logistics API
description: 'Note: This is a (Limited Release) API available only to select developers approved by business units.
The Logistics API resources offer the following capabilities:
Important! Sellers must set up a payment method via their eBay account before they can use the methods in this API to create a shipment and the associated shipping label.
' contact: name: eBay Inc, license: name: eBay API License Agreement url: https://go.developer.ebay.com/api-license-agreement version: v1_beta.0.0 servers: - url: https://api.ebay.com{basePath} description: Production variables: basePath: default: /sell/logistics/v1_beta paths: /shipment/{shipmentId}/cancel: post: tags: - shipment description: This method cancels the shipment associated with the specified shipment ID and the associated shipping label is deleted. When you cancel a shipment, the totalShippingCost of the canceled shipment is refunded to the account established by the user's billing agreement.Important! Sellers must set up their payment method before they can use this method to create a shipment and the associated shipping label.
Error 90030 Payment could not be completed.
Accept
HTTP header to specify the format of the returned file. The default file format is a PDF file.
operationId: downloadLabelFile
parameters:
- name: shipmentId
in: path
description: This path parameter specifies the unique eBay-assigned identifier of the shipment associated with the shipping label you want to download.Accept: application/pdf
. '
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/pdf:
schema:
type: array
items:
type: string
'400':
description: Bad Request
'404':
description: Not Found
x-response-codes:
errors:
'90005':
domain: API_LOGISTICS
category: REQUEST
description: The resource could not be found.
'500':
description: Internal Server Error
x-response-codes:
errors:
'90000':
domain: API_LOGISTICS
category: APPLICATION
description: A system error has occurred.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope/sell.logistics
/shipment/{shipmentId}:
get:
tags:
- shipment
description: This method retrieves the shipment details for the specified shipment ID. Call createFromShippingQuote to generate a shipment ID.
operationId: getShipment
parameters:
- name: shipmentId
in: path
description: This path parameter specifies the unique eBay-assigned identifier of the shipment you want to retrieve.CAD
. US
represents the United States and DE
represents Germany. For implementation help, refer to eBay API documentation
county:
type: string
description: The county (not country) in which the address is located. Counties typically contain multiple cities or towns.
postalCode:
type: string
description: The postal code of the address.
stateOrProvince:
type: string
description: The state or province in which the address is located. States and provinces often contain multiple counties.
description: This complex type specifies the details of a geographical address.
CreateShipmentFromQuoteRequest:
type: object
properties:
additionalOptions:
type: array
description: Supply a list of one or more shipping options that the seller wants to purchase for this shipment. 4"x6"
'
rateId:
type: string
description: The unique eBay-assigned identifier of the shipping rate that the seller selected for the shipment. This value is generated by using the createShippingQuote method and is returned in the rates.rateId field.
returnTo:
description: 'The optional return address and contact details for the shipment. The return address is printed on the shipping label. If not specified, the return address defaults to the shipFrom address returned in shipping quote. '
$ref: '#/components/schemas/Contact'
shippingQuoteId:
type: string
description: The unique eBay-assigned identifier of the shipping quote that was generated by the createShippingQuote method.
description: This complex type contains the request payload for the createFromShippingQuote method.
Dimensions:
type: object
properties:
height:
type: string
description: The numeric value of the height of the package.
length:
type: string
description: The numeric value of the length of the package.
unit:
type: string
description: The unit of measure used to express the height, length, and width of the package. For implementation help, refer to eBay API documentation
width:
type: string
description: The numeric value of the width of the package.
description: This complex type defines the dimensions of a package to be shipped.
Error:
type: object
properties:
category:
type: string
description: 'The category type for this error or warning. It takes a string that can have one of three values:Application
: Indicates an exception or error occurred in the application code or at runtime. Examples include catching an exception in a service''s business logic, system failures, or request errors from a dependency.Business
: Used when your service or a dependent service refused to continue processing on the resource because of a business rule violation such as "Seller does not ship item to Antarctica" or "Buyer ineligible to purchase an alcoholic item". Business errors are not syntactical input errors.Request
: Used when there is anything wrong with the request, such as authentication, syntactical errors, rate limiting or missing headers, bad HTTP header values, and so on.inputRefId
.
items:
type: string
parameters:
type: array
description: This optional complex field type contains a list of one or more context-specific ErrorParameter
objects, with each item in the list entry being a parameter (or input field name) that caused an error condition. Each ErrorParameter
object consists of two fields, a name
and a value
.
items:
$ref: '#/components/schemas/ErrorParameter'
subdomain:
type: string
description: Name of the domain's subsystem or subdivision. For example, checkout is a subdomain in the buying domain.
description: A container that defines the elements of error and warning message.
ErrorParameter:
type: object
properties:
name:
type: string
description: Name of the entity that threw the error.
value:
type: string
description: A description of the error.
description: Container for an error parameter.
Order:
type: object
properties:
channel:
type: string
description: The marketplace where the order was created.EBAY
to get the rates available for eBay orders.
orderId:
type: string
description: The unique identifier of the order. The getOrders method of the Fulfillment API can be used to retrieve order IDs.
description: This complex type defines an order from which a seller is including one or more line items in a single package to be shipped.
PackageSpecification:
type: object
properties:
dimensions:
description: Declares the height, length, width, and unit of measure for the package to be shipped.
$ref: '#/components/schemas/Dimensions'
weight:
description: Declares the weight of the package.
$ref: '#/components/schemas/Weight'
description: This complex type specifies the dimensions and weight of a package.
PhoneNumber:
type: object
properties:
phoneNumber:
type: string
description: A telephone number.
description: This complex type contains a string field representing a telephone number.
PickupSlot:
type: object
properties:
pickupSlotEndTime:
type: string
description: The date and time the pickup slot ends, formatted as an ISO 8601 string, which is based on the 24-hour Coordinated Universal Time (UTC) clock. [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[sss]Z
2018-08-20T07:09:00.000Z
pickupSlotId:
type: string
description: Seller-defined name for the pickup slot.
pickupSlotStartTime:
type: string
description: The date and time the pickup slot begins, formatted as an ISO 8601 UTC string.
pickupSlotTimeZone:
type: string
description: The time zone of the pickup location, returned as Time Zone Database ID (also know as an Olson time zone ID).
description: This complex type defines a time window for the pickup of a package.
PurchasedRate:
type: object
properties:
additionalOptions:
type: array
description: An list of additional, optional features that have been purchased for the shipment.
items:
$ref: '#/components/schemas/AdditionalOption'
baseShippingCost:
description: The amount of the "base cost" for the shipment as set by the given carrier for the specified service. This cost excludes any addition costs accrued from the addition of any optional shipping options.
$ref: '#/components/schemas/Amount'
destinationTimeZone:
type: string
description: The time zone of the destination according to Time Zone Database. For example, "America/Los_Angeles".
maxEstimatedDeliveryDate:
type: string
description: A string value representing maximum (latest) estimated delivery time, formatted as an ISO 8601 string, which is based on the 24-hour Coordinated Universal Time (UTC) clock. [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[sss]Z
2018-08-20T07:09:00.000Z
minEstimatedDeliveryDate:
type: string
description: A string value representing minimum (earliest) estimated delivery time, formatted as an ISO 8601ISO 8601 UTC string.
pickupNetworks:
type: array
description: A list of pickup networks compatible with the shipping service.
items:
type: string
pickupSlotId:
type: string
description: This unique eBay-assigned ID value is returned only if the shipment has been configured for a scheduled pickup.
pickupType:
type: string
description: The type of pickup or drop off configured for the shipment. For implementation help, refer to eBay API documentation
rateId:
type: string
description: The eBay-generated ID of the shipping rate that the seller has chosen to purchase for the shipment.
shippingCarrierCode:
type: string
description: The ID code for the carrier that was selected for the package shipment.
shippingCarrierName:
type: string
description: The name of the shipping carrier.
shippingQuoteId:
type: string
description: The unique eBay-generated ID of the shipping quote from which the seller selected a shipping rate (rateId).
shippingServiceCode:
type: string
description: String ID code for the shipping service selected for the package shipment. This is a service that the shipping carrier supplies.
shippingServiceName:
type: string
description: The name of the shipping service.
totalShippingCost:
description: The total shipping cost, which is the sum cost of the base shipping cost and the cost of all the selected shipping options.
$ref: '#/components/schemas/Amount'
description: The "rate" that has been selected and purchased for the shipment, as referenced by the rateId value.
Rate:
type: object
properties:
additionalOptions:
type: array
description: Contains service and pricing information for one or more shipping options that are offered by the carrier and can be purchased in addition to the base shipping service provided by this rate. Shipping options can include items such as INSURANCE
and SIGNATURE
.
items:
$ref: '#/components/schemas/AdditionalOption'
baseShippingCost:
description: A live quote for the cost that the carrier (identified by shippingCarrierCode) is charging for the shipping service being offered (identified by shippingServiceCode), excluding any additional shipping options.
$ref: '#/components/schemas/Amount'
destinationTimeZone:
type: string
description: The name of the time zone region, as defined in the IANA Time Zone Database, to which the package is being shipped. -08:00
, but so do several other time zones, including America/Tijuana,America/Dawson, and Pacific/Pitcairn.
maxEstimatedDeliveryDate:
type: string
description: The latest stated date and time the shipment will be delivered at this rate. [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[sss]Z
2018-08-20T07:09:00.000Z
minEstimatedDeliveryDate:
type: string
description: The estimated earliest date and time the shipment will be delivered at this rate. The time stamp is formatted as an ISO 8601 UTC string.
pickupNetworks:
type: array
description: A list of pickup networks compatible with the shipping service.
items:
type: string
pickupSlots:
type: array
description: A list of available pickup slots for the package.
items:
$ref: '#/components/schemas/PickupSlot'
pickupType:
type: string
description: The type of pickup or drop-off service associated with the pickupSlots time frames. For implementation help, refer to eBay API documentation
rateId:
type: string
description: The unique eBay-assigned ID for this shipping rate.
rateRecommendation:
type: array
description: 'A list of reasons this rate is recommended. Available values are: BUYER_CHOSEN
— The rate meets or exceeds the requirements of the buyer''s preferred shipping option.CHEAPEST_ON_TIME
— The rate is the cheapest rate available that will provide delivery within the seller''s time frame commitment.EBAY_PLUS_OK
— The rate complies with the shipping requirements of the eBay Plus program.FASTEST_ON_TIME
— The rate has the fastest shipping time, and will provide delivery within the seller''s time frame commitment.GUARANTEED_DELIVERY_OK
— The rate complies with the shipping requirements of the eBay Guaranteed Delivery program.[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[sss]Z
2018-08-20T07:09:00.000Z
labelCustomMessage:
type: string
description: If supported by the selected shipping carrier, this field can contain optional seller text to be printed on the shipping label.
labelDownloadUrl:
type: string
description: The direct URL the seller can use to download an image of the shipping label. By default, the file format is PDF. See downloadLabelFile for requesting different response file formats.
labelSize:
type: string
description: 'The seller''s desired label size. The support for multi-sized labels is shipping-carrier specific and if the size requested in the creaateFromShippingQuote call matches a size the carrier supports, the value will be represented here in the shipment. 4"x6"
'
orders:
type: array
description: A list of one or more orders that will be shipped in the shipping package.
items:
$ref: '#/components/schemas/Order'
packageSpecification:
description: The weight and dimensions of the package.
$ref: '#/components/schemas/PackageSpecification'
rate:
description: The shipping rate that the seller has chosen to purchase for this shipment. Each rate, identified by a rateId, contains the offered base service, options, and shipping parameters that were selected for the package shipment.
$ref: '#/components/schemas/PurchasedRate'
returnTo:
description: The address and contact details that should be used for item returns. Sellers have the option to define a return address that is different from their shipFrom address. If not specified, the return address defaults to the shipFrom address in the shipping quote.
$ref: '#/components/schemas/Contact'
shipFrom:
description: The address and contact details for the origin of the package shipment.
$ref: '#/components/schemas/Contact'
shipmentId:
type: string
description: The unique eBay-assigned ID for the shipment. The ID is generated when the shipment is created by a call to createFromShippingQuote.
shipmentTrackingNumber:
type: string
description: A unique carrier-assigned ID string that can be used to track the shipment.
shipTo:
description: The address and contact details for the destination of the shipment.
$ref: '#/components/schemas/Contact'
description: 'This complex type defines a shipment for a specific package (for example, a box or letter). Shipments are always linked to a purchased shipping label. '
ShipmentCancellation:
type: object
properties:
cancellationRequestedDate:
type: string
description: The time and date the request was made to cancel the shipment, formatted as an ISO 8601 UTC string.
cancellationStatus:
type: string
description: This enum specifies the current cancellation status of a shipment, if a cancellation request has been made. For implementation help, refer to eBay API documentation
description: This type defines a shipment cancellation by the date and time the cancellation request was made and the current status of the request.
ShippingQuote:
type: object
properties:
creationDate:
type: string
description: The date and time this quote was created, expressed as an ISO 8601 UTC string.
expirationDate:
type: string
description: The last date and time that this quote will be honored, expressed as an ISO 8601 UTC string. After this time the quote expires and the expressed rates can no longer be purchased.
orders:
type: array
description: A list of one or more orders that will be shipped in the shipping package.
items:
$ref: '#/components/schemas/Order'
packageSpecification:
description: The weight and dimensions of the package covered by this shipping quote.
$ref: '#/components/schemas/PackageSpecification'
rates:
type: array
description: A list of rates where each rate, as identified by a rateId, contains information about a specific shipping service offered by a carrier. Rates include shipping carrier and service, the to and from locations, the pickup and delivery windows, the seller's shipping parameters, the service constraints, and the cost for the base service and a list of additional shipping options.POUND
and OUNCE
. If the metric system of measurement is being used, the applicable values for weight units are KILOGRAM
and GRAM
. The metric system is used by most countries outside of the US. For implementation help, refer to eBay API documentation
value:
type: string
description: The numeric value of the weight of the package, as measured by the value of unit.
description: This complex type contains information about the weight of an object such as a shipping package.
securitySchemes:
api_auth:
type: oauth2
description: The security definitions for this API. Please check individual operations for applicable scopes.
flows:
authorizationCode:
authorizationUrl: https://auth.ebay.com/oauth2/authorize
tokenUrl: https://api.ebay.com/identity/v1/oauth2/token
scopes:
https://api.ebay.com/oauth/api_scope/sell.logistics: ' This scope would allow signed in user to access Logistics information.'