Skip to content

Locations

Location data

Attribute Value type Description
uuid str Location UUID
title str Title
alive bool Is the Location active(alive) or deleted
is_hidden bool Is the Location hidden from the smartplan dashboard
initial bool This is default 'initial' location for the account *

* New field: This is True if this is the location that is created automatically when the account is created. If so, the 'title' will be the same as the account, unless edited.

Endpoint: locations/

GET https://api.smartplanapp.io/v2/accounts/UUID/locations/

Returns all locations for the specified account.

Limited to 50 objects per page. In the response dataset; 'total_count' will be the total number of available objects. To fetch the next 'page' you can use the url in the 'next' param. Likewise you can use the url in the 'previous' for the previous 50 objects.

Available filters

Use simple GET params for the filters.

  • is_hidden (True/False) If True only returns hidden locations; If False - only returns not-hidden locations. Returns all locations by default.
Example response:
response = {
  'total_count': 3,
  'next': None,
  'previous': None,
  'results': [
    {'uuid': '1234-1234-1234',
     'title': 'Warehouse',
     'alive': True,
     'is_hidden': False}, 
    {'uuid': '1234-1234-1234',
     'title': 'Shop no. 2',
     'alive': True,
     'is_hidden': False}, 
    {'uuid': '1234-1234-1234',
     'title': 'Shop no. 3',
     'alive': True,
     'is_hidden': False}
  ]
}

Endpoint: locations/UUID/

GET https://api.smartplanapp.io/v2/accounts/UUID/locations/UUID/

Returns the data for the specified location

Example response:
response = {
  'results': {
    'uuid': '1234-1234-1234',
    'title': 'Warehouse',
    'alive': True,
    'is_hidden': False
  }
}