AfterShip Shipping Common Scenario
This documentation outlines various common scenarios for using the Commerce API to import data, facilitating seamless integration with AfterShip Shipping.
Please be sure to reach out to the AfterShip support team or contact your customer success manager to activate your store ID for AfterShip Shipping usage.
Creating Shipping Label
You can create the shipping label for the orders imported via Commerce API.
Prerequisites
1. Ship from locations
Please use this page to set up the default ship-from location for AfterShip Shipping.
2. Package, Service, Package size
Please make use of the automation rules to allow the AfterShip Shipping system to automatically determine the value of the package, service, and package size. You can configure these automation rules here.
Specific Required Fields for creating the order
Field | Description | Sample |
---|---|---|
id | The unique identifier of the order. For most of the case it should be the same as the order ID of your system. | CM1011 |
number | The order name | CM1011 |
currency | The currency of the order | USD |
status | The status of the order | open |
order_total | The total price of the order | 9.5 |
items | Items of order | - |
items.*.id | A unique identifier for the line item in your system | 9716591689898 |
items.*.product_title | The title of the product | Mobile Phone Case |
items.*.quantity | The number of items that have been purchased | 1 |
items.*.origin_country_region | The origin country of this product | HKG |
items.*.unit_price | The price of the item before discounts and taxes applied | 5 |
items.*.unit_weight | The item's weight | - |
items.*.unit_weight.unit | The weight unit | lb |
items.*.unit_weight.value | The weight value | 10 |
shipping_address | Shipping address object | - |
shipping_address.first_name | The customer's first name | John |
shipping_address.last_name | The customer's last name | Doe |
shipping_address.street_1 | The customer's mailing address | 28292 Daugherty Orchard |
shipping_address.city | The customer's city, town, or village | Sacramento |
shipping_address.state | The customer's region name. Typically a province, a state, or a prefecture | CA |
shipping_address.country_region | The customer's country or region | USA |
shipping_address.postal_code | The customer's postal code, also known as zip, postcode, Eircode, etc | 94209 |
shipping_address.email | The unique email address of the customer | [email protected] |
Here is a sample request for creating orders, along with the payload required to use AfterShip Shipping:
preparing...
After successfully importing the orders, you can proceed to manage the imported orders and create labels in AfterShip Shipping admin dashboard here.
Please be aware that some carriers might demand additional fields to generate labels. If you encounter issues creating labels for imported orders, do not hesitate to contact us for support.