@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Logistics API
@base https://api.ebay.com/sell/logistics/v1_beta
@version v1_beta.0.0
@auth OAuth2
@endpoints 6
@toc shipment(4), shipping_quote(2)

@group shipment
@endpoint POST /shipment/{shipmentId}/cancel
@required {shipmentId: str}
@returns(200) {cancellation: map{cancellationRequestedDate: str, cancellationStatus: str}, creationDate: str, labelCustomMessage: str, labelDownloadUrl: str, labelSize: str, orders: [map], packageSpecification: map{dimensions: map{height: str, length: str, unit: str, width: str}, weight: map{unit: str, value: str}}, rate: map{additionalOptions: [map], baseShippingCost: map{currency: str, value: str}, destinationTimeZone: str, maxEstimatedDeliveryDate: str, minEstimatedDeliveryDate: str, pickupNetworks: [str], pickupSlotId: str, pickupType: str, rateId: str, shippingCarrierCode: str, shippingCarrierName: str, shippingQuoteId: str, shippingServiceCode: str, shippingServiceName: str, totalShippingCost: map{currency: str, value: str}}, returnTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shipFrom: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shipmentId: str, shipmentTrackingNumber: str, shipTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}}
@errors {400, 404, 409, 500}

@endpoint POST /shipment/create_from_shipping_quote
@required {Content-Type: str, X-EBAY-C-MARKETPLACE-ID: str}
@optional {additionalOptions: [map{additionalCost: map, optionType: str}], labelCustomMessage: str, labelSize: str, rateId: str, returnTo: map{companyName: str, contactAddress: map, fullName: str, primaryPhone: map}, shippingQuoteId: str}
@returns(201) {cancellation: map{cancellationRequestedDate: str, cancellationStatus: str}, creationDate: str, labelCustomMessage: str, labelDownloadUrl: str, labelSize: str, orders: [map], packageSpecification: map{dimensions: map{height: str, length: str, unit: str, width: str}, weight: map{unit: str, value: str}}, rate: map{additionalOptions: [map], baseShippingCost: map{currency: str, value: str}, destinationTimeZone: str, maxEstimatedDeliveryDate: str, minEstimatedDeliveryDate: str, pickupNetworks: [str], pickupSlotId: str, pickupType: str, rateId: str, shippingCarrierCode: str, shippingCarrierName: str, shippingQuoteId: str, shippingServiceCode: str, shippingServiceName: str, totalShippingCost: map{currency: str, value: str}}, returnTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shipFrom: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shipmentId: str, shipmentTrackingNumber: str, shipTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}}
@errors {400, 409, 500}

@endpoint GET /shipment/{shipmentId}/download_label_file
@required {shipmentId: str, Accept: str}
@returns(200)
@errors {400, 404, 500}

@endpoint GET /shipment/{shipmentId}
@required {shipmentId: str}
@returns(200) {cancellation: map{cancellationRequestedDate: str, cancellationStatus: str}, creationDate: str, labelCustomMessage: str, labelDownloadUrl: str, labelSize: str, orders: [map], packageSpecification: map{dimensions: map{height: str, length: str, unit: str, width: str}, weight: map{unit: str, value: str}}, rate: map{additionalOptions: [map], baseShippingCost: map{currency: str, value: str}, destinationTimeZone: str, maxEstimatedDeliveryDate: str, minEstimatedDeliveryDate: str, pickupNetworks: [str], pickupSlotId: str, pickupType: str, rateId: str, shippingCarrierCode: str, shippingCarrierName: str, shippingQuoteId: str, shippingServiceCode: str, shippingServiceName: str, totalShippingCost: map{currency: str, value: str}}, returnTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shipFrom: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shipmentId: str, shipmentTrackingNumber: str, shipTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}}
@errors {400, 404, 500}

@endgroup

@group shipping_quote
@endpoint POST /shipping_quote
@required {X-EBAY-C-MARKETPLACE-ID: str, Content-Type: str}
@optional {orders: [map{channel: str, orderId: str}], packageSpecification: map{dimensions: map, weight: map}, shipFrom: map{companyName: str, contactAddress: map, fullName: str, primaryPhone: map}, shipTo: map{companyName: str, contactAddress: map, fullName: str, primaryPhone: map}}
@returns(201) {creationDate: str, expirationDate: str, orders: [map], packageSpecification: map{dimensions: map{height: str, length: str, unit: str, width: str}, weight: map{unit: str, value: str}}, rates: [map], shipFrom: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shippingQuoteId: str, shipTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, warnings: [map]}
@errors {400, 409, 500}

@endpoint GET /shipping_quote/{shippingQuoteId}
@required {shippingQuoteId: str}
@returns(200) {creationDate: str, expirationDate: str, orders: [map], packageSpecification: map{dimensions: map{height: str, length: str, unit: str, width: str}, weight: map{unit: str, value: str}}, rates: [map], shipFrom: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, shippingQuoteId: str, shipTo: map{companyName: str, contactAddress: map{addressLine1: str, addressLine2: str, city: str, countryCode: str, county: str, postalCode: str, stateOrProvince: str}, fullName: str, primaryPhone: map{phoneNumber: str}}, warnings: [map]}
@errors {400, 404, 500}

@endgroup

@end
