Skip to main content

Create a expedition

Guide to creating, managing, and cancelling expeditions in Mailship. Detailed steps for efficient expedition handling.

Updated over a year ago

Creating an expedition in Mailship involves sending a POST request to the https://app.mailship.eu/api/expedition endpoint with a JSON payload that includes various details about the expedition. This article provides a detailed guide on how to create an expedition using the Mailship API.

Required Fields

The following fields are required in the JSON payload:

  • eshop: The UUID of the Eshop to which this expedition belongs.

  • warehouse: The UUID of the Warehouse that belongs to this expedition.

  • wms: The UUID of the WMS that belongs to this expedition.

  • orderNumber: The order number. This should be a string of 32 characters or less, and can include alphanumeric characters, underscores, slashes, and hyphens.

  • carrier: The UUID of the Carrier.

  • carrierService: The UUID of the CarrierService.

  • value: The value of the whole expedition. This should be a float between 0 and 1,000,000.

  • currency: The ISO currency code.

  • items: An array of items in the expedition.

Each item in the items array must include the product (the UUID of the Inbound that belongs to the inbound item) and expedition (the UUID of the Expedition that belongs to the expedition item) fields. It can also include optional fields such as book, lot, lifo, ref1, ref2, and ref3.


​

Optional Fields

The payload can also include a variety of optional fields, such as:

  • partner: The UUID of the Partner.

  • note: A note about the expedition.

  • billingFirstName, billingLastName, billingDegree, etc.: Information about the billing address.

  • differentDeliveryAddress: A boolean indicating whether the delivery address is different from the billing address.

  • deliveryFirstName, deliveryLastName, deliveryDegree, etc.: Information about the delivery address if it's different from the billing address.

  • requiredExpeditionDate: The required date of delivery.

  • carrierNote: A note for the carrier.

  • trackingNumber, trackingUrl, externalTrackingNumber, externalPackageNumber: Information about tracking the expedition.

  • packagesCount: The number of packages in the expedition.

  • fragile: A boolean indicating whether the expedition is fragile.

  • cod, codValue, codCurrency, codVariableSymbol: Information about cash on delivery if applicable.

  • customerGroup: The customer group.

  • eshopOrderDate: The date the order was placed on the eshop.


Example Payload


Here is an example of a JSON payload for creating an expedition:

{
"eshop": "uuid-of-eshop",
"warehouse": "uuid-of-warehouse",
"wms": "uuid-of-wms",
"orderNumber": "123456",
"carrier": "uuid-of-carrier",
"carrierService": "uuid-of-carrier-service",
"value": 100.0,
"currency": "USD",
"items": [
{
"product": "uuid-of-product",
"expedition": "uuid-of-expedition"
}
]
}

Steps After Creating an Expedition

After creating an expedition, it is necessary to call the Send Expedition to WMS endpoint. If this step is not taken, the expedition will remain in a 'ON-HOLD' state and will not be sent for processing to the warehouse management system.

Creating an Expedition with the 'waitBeforeProcessing' Flag

You can create an expedition with the "waitBeforeProcessing": true flag. Such an expedition needs to be confirmed by the Process Expedition to WMS endpoint before it can be processed. This approach is recommended for expeditions that are waiting for payment. Once the expedition is paid for, it can be released for processing. If not, the expedition can, for example, be cancelled.


​
​

Did this answer your question?