Skip to content

List company locations

Open .md

GET/v1/api/store/{team_slug}/setting/location

v1Operation ID v1_public_location_index

Returns all the team's company locations in one list.

By default the list holds current locations only. Send mode=history to include deleted ones and older versions as well.

Company locations are the team's own addresses. Each one can play several parts:

  • Primary location (is_primary): the team's primary billing address. There is always exactly one.
  • Warehouse (hold_stock): a location that holds stock. Turning a location into a warehouse is permanent. How many warehouses a team can have depends on its plan.
  • Default warehouse (is_default_warehouse): the warehouse a new sales order uses when its customer has no default warehouse. Without one, YoPrint uses the first warehouse.
  • Tax nexus (nexus): a place where the team collects sales tax. For US-plan teams with Auto Tax, Auto Tax looks up rates only when the team has a current US location with nexus.

Orders, purchase orders, stock and stock adjustments refer to a location by its id, so editing a location changes it everywhere it is used.

Permission

Any team member can call it. Reading needs no extra permission.

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team

Query parameters

  • modestring

    history also returns deleted and replaced locations. Any other value means current.

    • One of: "current", "history"
    • Default "current"
    • Example current

Request body

This operation takes no request body.

Response

200Successful response.

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You are not allowed to do this. api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only {"message": "Insufficient Permission"}. Other refusals use the error envelope, with unauthorized or user_is_not_authorized.

  • 404Not found. page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. code: null, with a message that starts "No query results for": there is no record with that id.

Notes

  • Pick warehouses with hold_stock: true. The location with is_default_warehouse: true is the default.