# Workflow for creating a shipment

Overview of how to create a shipment.

## Creating a shipment via multi step process

Creating a shipment is a multi-step process that includes calls to the Shipping API. Here is the recommended workflow for creating a shipment:

1. Call the [`getRates`](https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#post-shippingv2shipmentsrates) operation to get a set of eligible rates for the shipment.

2. (Conditional) Call the [`getAdditionalInputs`](https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#get-shippingv2shipmentsadditionalinputsschema) operation if directed to do so by the `getRates` operation to discover additional data required to purchase a shipment. This step is required for international shipments.

3. Call the [`purchaseShipment`](https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#post-shippingv2shipments) operation with any required additional inputs to create a shipment.

Here is a diagram of the recommended workflow for creating a shipment:

![Create a shipment workflow](https://m.media-amazon.com/images/G/01/spapi/shipping-use-case-guide/create-a-shipment-workflow.png)

## Creating a shipment via single step process

Alternatively, vendors can purchase the best fit ship option for the package by calling the smart purchase shipment API via the `oneClickShipment` operation.

1. Call the [`smartPurchaseShipment`](https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#oneclickshipment) operation to create a shipment. Once a shipment is created, the Shipping API provides operations to manage a shipment.

Here is the recommended workflow for creating a vendor own carrier Direct Fulfillment shipment:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/cc5ff83-Workflow-Edited-Pic.png",
        null,
        "Direct fulfillment shipment workflow"
      ],
      "align": "center"
    }
  ]
}
[/block]

**Note:** When providing package dimensions, note that Amazon Shipping API normalizes dimensions so that length ≥ width ≥ height, per the Service Guide definition. You do not need to presort dimensions, the largest dimension value is assigned to length, the middle to width, and the smallest to height while preserving the units.

## Other important APIs

* Call the [`getTracking`](https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#get-shippingv2tracking) operation to get the current status and tracking history for a purchased shipment.

* Call the [`getShipmentDocuments`](https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#get-shippingv2shipmentsshipmentiddocuments) operation to return documents associated with a package in the shipment.

* Call the [`cancelShipment`](https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#put-shippingv2shipmentsshipmentidcancel) operation to cancel a purchased shipment.

Here is the recommended workflow for managing a shipment. These operations are not available for Direct Fulfillment shipments.

![Managing a shipment workflow](https://m.media-amazon.com/images/G/01/spapi/shipping-use-case-guide/manage-a-shipment-workflow.png)