API referenceShipments
Create a shipment
Purchases a quoted rate and creates the shipment under your shipper account.
POST
/ shipmentshttps:/ / sandbox.api.mothership.com/ betaReads your token from
$MOTHERSHIP_API_TOKENResponse
Hover a key to see what it means. Click it to jump to the field.
Purchasing a shipment will use the default payment source that the user's organization has on file. The payment source can be changed by logging in to the customer dashboard and updating the payment information in the organization's settings.
If the quote is missing details needed for purchase, the request fails with QUOTE_NOT_PURCHASABLE and metadata.invalidFieldsRequiredForPurchase lists them. A payment problem fails with 402 PAYMENT_FAILED. See Error handling.