View a Location by Code and Workspace
get
/primeapi/restapi/location/workspace/{workspaceId}/code/{code}
This endpoint returns locations that meet the following requirements:
- The object has a code that matches the value of the {code} path parameter.
- The object is associated with a workspace with an ID value that matches the value of the {workspaceId} path parameter.
Request
Path Parameters
-
code: string
Code of the location to be found.
-
workspaceId: integer(int64)
Returns the location in the specified workspace.
Response
Supported Media Types
- application/json
200 Response
successful operation
Root Schema : ApiEntityLocation
Type:
Show Source
object
-
addressLine1(optional):
string
Allowed Values:
[ "Length[1-200]" ]
The first line of the address of a location.
This might be the building number and street address. -
addressLine2(optional):
string
Allowed Values:
[ "Length[1-200]" ]
The second line of the address of a location.
This might be a neighborhood or town. -
cityName(optional):
string
Allowed Values:
[ "Length[1-200]" ]
The city name for a location. -
countryCode(optional):
string
Allowed Values:
[ "Length[1-3]" ]
The country for a location. The value is expressed as a three letter code. -
description(optional):
string
Additional details about the location.
-
latitude(optional):
number(double)
The geographical coordinate for the latitude of the location.
The default format for latitude is decimal degrees format, but the format you need to use will depend on your geolocation service. -
link(optional):
string(url)
Read Only:
true
-
locationCode:
string
Allowed Values:
[ "Length[1-60]" ]
The unique identifier for the location. -
locationId:
integer(int64)
The unique identifier for the location.
-
locationName:
string
Allowed Values:
[ "Length[1-255]" ]
A name for the location that your users will understand and recognize. -
longitude(optional):
number(double)
The geographical coordinate for the longitude of the location.
The default format for longitude is decimal degrees format, but the format you need to use will depend on your geolocation service. -
postalCode(optional):
string
Allowed Values:
[ "Length[1-20]" ]
The postal code, post code, or zip code of a location. -
stateCode(optional):
string
Allowed Values:
[ "Length[1-2]" ]
A unique identifier for the state or province. -
stateName(optional):
string
Allowed Values:
[ "Length[1-200]" ]
The state, region, or province of a location. -
updateDate(optional):
string(date-time)
Read Only:
true
Date when the record was last updated. Used for viewing and filtering records, obtained ONLY from GET calls, modified on and after a particular date. Not a part of POST response. -
workspaceId(optional):
integer(int64)
404 Response
The requested location does not exist, or you do not have access to it.