Amazon SP API
  1. Shipping
Amazon SP API
  • Overview
  • Authorization Workflow
  • Permissions
  • Sandbox
  • API Models
  • Available API Models
  • Request Apidog Access
  • OPENAPI SPECIFICATION
  • Research Docs
    • Amazon Seller Order Fulfillment Workflow
  • Amazon Warehousing and Distribution
    • getInboundShipment
    • listInboundShipments
    • listInventory
  • Authorization
    • Authorization
  • Catalog Items
    • searchCatalogItems
    • getCatalogItem
  • Catalog [Deprecated]
    • listCatalogItems
    • getCatalogItem
    • listCatalogCategories
  • Definitions
    • searchDefinitionsProductTypes
    • getDefinitionsProductType
  • Easy Ship
    • listHandoverSlots
    • getScheduledPackage
    • createScheduledPackage
    • updateScheduledPackages
    • createScheduledPackageBulk
  • FBAInbound
    • listInboundPlans
    • createInboundPlan
    • getInboundPlan
    • listInboundPlanBoxes
    • cancelInboundPlan
    • listInboundPlanItems
    • updateInboundPlanName
    • listPackingGroupBoxes
    • listPackingGroupItems
    • setPackingInformation
    • listPackingOptions
    • generatePackingOptions
    • confirmPackingOption
    • listInboundPlanPallets
    • listPlacementOptions
    • generatePlacementOptions
    • confirmPlacementOption
    • getShipment
    • listShipmentBoxes
    • listShipmentContentUpdatePreviews
    • generateShipmentContentUpdatePreviews
    • getShipmentContentUpdatePreview
    • confirmShipmentContentUpdatePreview
    • getDeliveryChallanDocument
    • listDeliveryWindowOptions
    • generateDeliveryWindowOptions
    • confirmDeliveryWindowOptions
    • listShipmentItems
    • updateShipmentName
    • listShipmentPallets
    • cancelSelfShipAppointment
    • getSelfShipAppointmentSlots
    • generateSelfShipAppointmentSlots
    • scheduleSelfShipAppointment
    • updateShipmentSourceAddress
    • updateShipmentTrackingDetails
    • listTransportationOptions
    • generateTransportationOptions
    • confirmTransportationOptions
    • listItemComplianceDetails
    • updateItemComplianceDetails
    • createMarketplaceItemLabels
    • listPrepDetails
    • setPrepDetails
    • getInboundOperationStatus
    • getItemEligibilityPreview
  • FBAInventory
    • getInventorySummaries
    • createInventoryItem
    • deleteInventoryItem
    • addInventory
  • FBAOutbound
    • getFulfillmentPreview
    • deliveryOffers
    • listAllFulfillmentOrders
    • createFulfillmentOrder
    • getPackageTrackingDetails
    • listReturnReasonCodes
    • createFulfillmentReturn
    • getFulfillmentOrder
    • updateFulfillmentOrder
    • cancelFulfillmentOrder
    • submitFulfillmentOrderStatusUpdate
    • getFeatures
    • getFeatureInventory
    • getFeatureSKU
  • Feeds
    • getFeeds
    • createFeed
    • cancelFeed
    • getFeed
    • createFeedDocument
    • getFeedDocument
  • Fees
    • getMyFeesEstimateForSKU
    • getMyFeesEstimateForASIN
    • getMyFeesEstimates
  • Finance
    • listTransactions
    • listFinancialEventGroups
    • listFinancialEventsByGroupId
    • listFinancialEventsByOrderId
    • listFinancialEvents
  • Invoices [Brazil]
    • getInvoicesAttributes
    • getInvoicesDocument
    • createInvoicesExport
    • getInvoicesExports
    • getInvoicesExport
    • getInvoices
    • getInvoice
  • Listings Items
    • getListingsRestrictions
    • deleteListingsItem
    • getListingsItem
    • patchListingsItem
    • putListingsItem
  • Merchant Fulfillment
    • getEligibleShipmentServices
    • getShipment
    • cancelShipment
    • createShipment
    • getAdditionalSellerInputs
  • Orders
    • getOrders
    • getOrder
    • getOrderBuyerInfo
    • getOrderAddress
    • getOrderItems
    • getOrderItemsBuyerInfo
    • updateShipmentStatus
    • getOrderRegulatedInfo
    • updateVerificationStatus
    • confirmShipment
  • ProductPricing
    • deprecated
      • getPricing
      • getCompetitivePricing
      • getListingOffers
      • getItemOffers
      • getItemOffersBatch
      • getListingOffersBatch
    • getFeaturedOfferExpectedPriceBatch
    • getCompetitiveSummary
  • Reports
    • getReports
    • createReport
    • cancelReport
    • getReport
    • getReportSchedules
    • createReportSchedule
    • cancelReportSchedule
    • getReportSchedule
    • getReportDocument
  • Sales
    • getOrderMetrics
  • Sellers
    • getMarketplaceParticipations
    • getAccount
  • Service
    • getServiceJobByServiceJobId
    • cancelServiceJobByServiceJobId
    • completeServiceJobByServiceJobId
    • getServiceJobs
    • addAppointmentForServiceJobByServiceJobId
    • rescheduleAppointmentForServiceJobByServiceJobId
    • assignAppointmentResources
    • setAppointmentFulfillmentData
    • getRangeSlotCapacity
    • getFixedSlotCapacity
    • updateSchedule
    • createReservation
    • updateReservation
    • cancelReservation
    • getAppointmmentSlotsByJobId
    • getAppointmentSlots
    • createServiceDocumentUploadDestination
  • ShipmentInvoice[Brazil]
    • getShipmentDetails
    • submitInvoice
    • getInvoiceStatus
  • Shipping
    • getRates
      POST
    • createShipment
      POST
    • directPurchaseShipment
      POST
    • getShipment
      GET
    • purchaseShipment
      POST
    • cancelShipment
      POST
    • oneClickShipment
      POST
    • purchaseLabels
      POST
    • getTracking
      GET
    • retrieveShippingLabel
      POST
    • getShipmentDocuments
      GET
    • purchaseShipment
      POST
    • cancelShipment
      PUT
    • getRates
      POST
    • getAdditionalInputs
      GET
    • getAccount
      GET
    • getCarrierAccountFormInputs
      GET
    • getTrackingInformation
      GET
    • getCarrierAccounts
      PUT
    • linkCarrierAccount
      PUT
    • unlinkCarrierAccount
      PUT
    • generateCollectionForm
      POST
    • getCollectionFormHistory
      PUT
    • getUnmanifestedShipments
      PUT
    • getCollectionForm
      GET
    • getAccessPoints
      GET
  • Supply Sources
    • getSupplySources
    • createSupplySource
    • getSupplySource
    • updateSupplySource
    • archiveSupplySource
    • updateSupplySourceStatus
  • Tokens
    • createRestrictedDataToken
  • Uploads
    • createUploadDestinationForResource
  • Notifications
    • getSubscription
    • createSubscription
    • getSubscriptionById
    • deleteSubscriptionById
    • getDestinations
    • createDestination
    • getDestination
    • deleteDestination
  1. Shipping

cancelShipment

Pending
PUT
/shipping/v2/shipments/{shipmentId}/cancel
shipping
Last modified:2024-11-28 09:36:30
Maintainer:Not configured
Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled.
Usage Plan:
Rate (requests per second)Burst
80100
The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

Request

Path Params
shipmentId
string 
required
The shipment identifier originally returned by the purchaseShipment operation.
Header Params
x-amzn-shipping-business-id
enum<string> 
optional
Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
Allowed values:
AmazonShipping_USAmazonShipping_INAmazonShipping_UKAmazonShipping_UAEAmazonShipping_SAAmazonShipping_EGAmazonShipping_ITAmazonShipping_ESAmazonShipping_FRAmazonShipping_JP

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://sandbox.sellingpartnerapi-na.amazon.com/shipping/v2/shipments//cancel'

Responses

🟢200OK
application/json
Success.
Headers
x-amzn-RateLimit-Limit
string 
optional
Your rate limit (requests per second) for this operation.
x-amzn-RequestId
string 
optional
Unique request reference identifier.
Body
Response schema.
payload
object (Shipment) 
optional
Contains information pertaining to a shipment in an inbound plan.
Example:
{"destination":{"destinationType":"AMAZON_OPTIMIZED"},"freightInformation":{"declaredValue":{"amount":5.5,"code":"CAD"},"freightClass":"FC_50"},"inboundPlanId":"wf1234abcd-1234-abcd-5678-1234abcd5678","placementOptionId":"pl1234abcd-1234-abcd-5678-1234abcd5678","selectedDeliveryWindow":{"availabilityType":"AVAILABLE","deliveryWindowOptionId":"dw1234abcd-1234-abcd-5678-1234abcd5678","editableUntil":"2024-01-05T20:00:00.000Z","endDate":"2024-01-05T20:00:00.000Z","startDate":"2024-01-05T14:00:00.000Z"},"shipmentConfirmationId":"shipmentConfirmationId","shipmentId":"sh1234abcd-1234-abcd-5678-1234abcd5678","source":{"sourceType":"SELLER_FACILITY"}}
amazonReferenceId
string 
optional
A unique identifier created by Amazon that identifies this Amazon-partnered, Less Than Truckload/Full Truckload (LTL/FTL) shipment.
>= 1 characters<= 1024 characters
contactInformation
object (ContactInformation) 
optional
The seller's contact information.
Example:
{"email":"email@email.com","name":"name","phoneNumber":"1234567890"}
dates
object (Dates) 
optional
Specifies the date that the seller expects their shipment will be shipped.
Example:
{"readyToShipWindow":{"end":"2024-01-06T14:48:00.000Z","start":"2024-01-05T14:48:00.000Z"}}
destination
object (ShipmentDestination) 
required
The Amazon fulfillment center address and warehouse ID.
freightInformation
object (FreightInformation) 
optional
Freight information describes the skus being transported. Freight carrier options and quotes will only be returned if the freight information is provided.
Example:
{"declaredValue":{"amount":5.5,"code":"CAD"},"freightClass":"FC_50"}
name
string 
optional
The name of the shipment.
placementOptionId
string 
required
The identifier of a placement option. A placement option represents the shipment splits and destinations of SKUs.
>= 38 characters<= 38 characters
Match pattern:
^[a-zA-Z0-9-]*$
selectedDeliveryWindow
object (SelectedDeliveryWindow) 
optional
Selected delivery window attributes.
Example:
{"availabilityType":"AVAILABLE","deliveryWindowOptionId":"dw1234abcd-1234-abcd-5678-1234abcd5678","editableUntil":"2024-01-05T20:00:00.000Z","endDate":"2024-01-05T20:00:00.000Z","startDate":"2024-01-05T14:00:00.000Z"}
selectedTransportationOptionId
string 
optional
Identifier of a transportation option. A transportation option represent one option for how to send a shipment.
>= 38 characters<= 38 characters
Match pattern:
^[a-zA-Z0-9-]*$
selfShipAppointmentDetails
array[object (SelfShipAppointmentDetails) {3}] 
optional
List of self ship appointment details.
shipmentConfirmationId
string 
optional
The confirmed shipment ID which shows up on labels (for example, FBA1234ABCD).
>= 1 characters<= 1024 characters
shipmentId
string 
required
Identifier of a shipment. A shipment contains the boxes and units being inbounded.
>= 38 characters<= 38 characters
Match pattern:
^[a-zA-Z0-9-]*$
source
object (ShipmentSource) 
required
Specifies the 'ship from' address for the shipment.
status
string 
optional
The status of a shipment. The state of the shipment will typically start as UNCONFIRMED, then transition to WORKING after a placement option has been confirmed, and then to READY_TO_SHIP once labels are generated.
Possible values: ABANDONED, CANCELLED, CHECKED_IN, CLOSED, DELETED, DELIVERED, IN_TRANSIT, MIXED, READY_TO_SHIP, RECEIVING, SHIPPED, UNCONFIRMED, WORKING
>= 1 characters<= 1024 characters
trackingDetails
object (TrackingDetails) 
optional
Representation of tracking metadata.
errors
array[object (Error) {3}] 
optional
A list of error responses that are returned when a request is unsuccessful.
code
string 
required
An error code that identifies the type of error that occurred.
message
string 
required
A message that describes the error condition.
details
string 
optional
Additional details that can help the caller understand or fix the issue.
Example
{}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🟠413413
🟠415415
🟠429429
🔴500Server Error
🔴503Service Unavailable
Previous
purchaseShipment
Next
getRates
Built with