Getting Locations

Every location is assigned a verifiable place ID, which can be retrieved from the Places API. Place IDs for pickup and delivery locations are necessary to purchase a shipment.

In this example, we'll be shipping freight from Griffith Observatory to the LA County Museum of Art.

  • Griffith Observatory:2800 East Observatory Road, Los Angeles, CA 90027
  • LACMA: 5905 Wilshire Boulevard, Los Angeles, CA 90036

To request the place IDs associated with those addresses, we'll need to make two requests to the GET /places endpoint. The endpoint accepts the following query parameters.

  • street
  • city
  • state
  • zip

Let's put all of this together into an authenticated cURL request.

curl -X GET \
  'https://sandbox.api.mothership.com/beta/places/?street=5905%20Wilshire%20Boulevard&city=Los%20Angeles&state=CA&zip=90036' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'

From the responses, we can confirm that these are shippable locations with Place IDs (ChIJywjU6WG_woAR3NrWwrEH_3M and ChIJsXqcyjy5woARNz6sOh0ZmwA).


What’s Next

We have our locations - now we need to get a quote using those locations.