This endpoint allows a user to purchase and create a shipment under his/her shipper account.

Log in to see full request history
curl -X POST \ https://sandbox.api.mothership.com/beta/shipments \ -H 'Authorization: Bearer {YOUR_API_TOKEN}' \ -H 'Content-Type: application/json' \ -d '{ "quoteId": "-LaLqLBycik7COnRuq5P", "rateId": "G6EMET" }'
{ "data": { "id": "72I2W1", "createdAt": "2019-03-19T17:03:24.542Z", "status": "Unallocated", "price": 79, "earliestPickupDate": "2019-03-19T17:15:55.000Z", "estimatedDeliveryDate": "2019-03-20T05:00:55.000Z", "freight": [ { "quantity": 2, "type": "Pallet", "weight": 50, "length": 48, "width": 42, "height": 46, "description": "T-shirts" } ], "pickup": { "placeId": "ChIJywjU6WG_woAR3NrWwrEH_3M", "name": "Griffith Observatory", "street": "2800 East Observatory Road", "city": "Los Angeles", "state": "CA", "zip": "90027", "accessorials": [ "liftgate" ], "phoneNumber": "+15555555555", "openTime": "1000", "closeTime": "2200", "emails": [ "logistics@mothership.com" ] }, "delivery": { "placeId": "ChIJsXqcyjy5woARNz6sOh0ZmwA", "name": "LACMA", "street": "5905 Wilshire Boulevard", "city": "Los Angeles", "state": "CA", "zip": "90036", "accessorials": [ "liftgate", "residential" ], "phoneNumber": "+15555555555", "openTime": "1000", "closeTime": "2200", "emails": [] } } }

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.

Body Params

Quote ID to purchase and Selected Rate

string
required

Quote ID, acquired from the Create Quote endpoint, to purchase and convert into a shipment

string
required

Represents the ID of the desired rate to purchase, which must be any one of the returned rates in the quote object corresponding with the given quoteId

Responses

Language
Credentials
URL
Click Try It! to start a request and see the response here! Or choose an example:
application/json