Location

Endpoints relating to Location objects

List of location objects

Returns a list of location objects in the network.

Request
query Parameters
page
integer >= 1
Default: 1

Page number of the page to retrieve

Example: page=1
per
integer [ 1 .. 100 ]
Default: 20

Count of items in each page. Should be between 1 and 100 (inclusive)

Example: per=20
f.ref
string

The ref for the location.

f.company_ref
string

The ref for a company.

f.company.id
string

The id for a company.

f.contact.id
string

The id for a contact at this location.

f.metadata.YOUR_METADATA_KEY
string

Only return locations that have a specific metadata key-value pair. Multiple metadata filters can be added to a single query. If there are multiple metadata filters each with the same metadata key, then the filter will return locations matching any of the specified metadata values for that metadata key.

Responses
200

collection of locations

Response Schema: application/json
_object
string
self
string
version
integer
object
_object
string
prev
string or null
next
string or null
total_count
integer
Array of objects (Location)
400

error

get/network/locations
Response samples
application/json

Success

{}

Create and return a new location

Request
Request Body schema: application/json
required
name
required
string

Name of the location

company_id
required
string

The id of the company entity to create this location for

required
object (AddressForRequestBody)
street_address
string
street_address2
string
city
string
state
string
country_code
string
zip
string
unlocode
string
contact_ids
Array of strings

Array of contact id's to assign to this location

ref
string

Not required. The ref that will be created for the new location

metadata
object

Optional metadata to add to a location. Keys must be strings and values should be arrays of strings.

Responses
200

The created location

Response Schema: application/json
_object
string
self
string
version
integer
object (Location)
_object
string

Type of the object. Always /network/location for this object.

id
string <string>

Unique identifier for the location

metadata
object (Metadata)

Set of custom key-values specific to the object. The keys are strings and values are arrays of strings. The set of valid keys is always the consignee's list of keys, even if call was made by a different party.

name
string
object (Address)
editable
boolean
object (GenericObjectRef)
object (GenericObjectRef)
ref
string
400

error

post/network/locations
Request samples
application/json
{
  • "name": "Zoomit",
  • "company_id": "xyz_123_ABC",
  • "address": {
    • "street_address": "1641 Settlers Lane",
    • "street_address2": "STE 2918",
    • "city": "Albany",
    • "state": "MN",
    • "country_code": "US",
    • "zip": "56307",
    • "unlocode": "USAL2"
    },
  • "contact_ids": [
    • "asdlkfaiowejfa",
    • "398qehfiaiurh",
    • "yfhvalnertughv"
    ],
  • "ref": "zoomit-management-co",
  • "metadata": {
    • "color": [
      • "blue",
      • "green"
      ]
    }
}
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/network/location",
    • "id": "abdef123",
    • "metadata": { },
    • "name": "Zoomit",
    • "address": {
      • "_object": "/address",
      • "street_address": "1641 Settlers Lane",
      • "street_address2": "STE 2918",
      • "city": "Los Angeles",
      • "state": "CA",
      • "country": "United States of America",
      • "country_code": "US",
      • "zip": "56307",
      • "unlocode": "USLAX",
      • "timezone": "America/Los_Angeles",
      • "ref": "zoomit-management-co"
      },
    • "editable": true,
    • "contacts": {},
    • "company": {}
    }
}

Retrieve a location by id

Retrieves the details of a single location

Request
path Parameters
id
required
string

The unique id for the requested location

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object (Location)
_object
string

Type of the object. Always /network/location for this object.

id
string <string>

Unique identifier for the location

metadata
object (Metadata)

Set of custom key-values specific to the object. The keys are strings and values are arrays of strings. The set of valid keys is always the consignee's list of keys, even if call was made by a different party.

name
string
object (Address)
editable
boolean
object (GenericObjectRef)
object (GenericObjectRef)
ref
string
400

error

get/network/locations/{id}
Response samples
application/json
{}

Update a network location

Request
path Parameters
id
required
string

The unique id for the requested location

Request Body schema: application/json
required
name
string

New name of the location

object (AddressForRequestBody)
street_address
string
street_address2
string
city
string
state
string
country_code
string
zip
string
unlocode
string
contact_ids
Array of strings

If a value for contact_ids is specified, the array specified will replace all the existing contacts at the location

ref
string

The new ref for the location

metadata
object

Metadata to replace existing metadata. Keys must be strings and values should be arrays.

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object (Location)
_object
string

Type of the object. Always /network/location for this object.

id
string <string>

Unique identifier for the location

metadata
object (Metadata)

Set of custom key-values specific to the object. The keys are strings and values are arrays of strings. The set of valid keys is always the consignee's list of keys, even if call was made by a different party.

name
string
object (Address)
editable
boolean
object (GenericObjectRef)
object (GenericObjectRef)
ref
string
400

error

patch/network/locations/{id}
Request samples
application/json
{
  • "name": "Zoomit V2",
  • "address": {
    • "street_address": "1641 Settlers Lane",
    • "street_address2": "STE 2918",
    • "city": "Albany",
    • "state": "MN",
    • "country_code": "US",
    • "zip": "56307",
    • "unlocode": "USAL2"
    },
  • "contact_ids": [
    • "asdlkfaiowejfa",
    • "398qehfiaiurh",
    • "yfhvalnertughv"
    ],
  • "ref": "zoomit-management-co",
  • "metadata": {
    • "color": [
      • "blue",
      • "green"
      ]
    }
}
Response samples
application/json

Success

{}