Asset Locations
When managing IT assets, it's important to keep track of their physical location. In Zendesk, locations are defined and then associated with asset records as a lookup relationship field. This allows agents to see and manage an asset’s location in the asset record and use asset location data in tickets and asset assignment.
You can create up to 10,000 locations.
JSON format
ITAM Asset Locations are represented as JSON objects with the following properties:
| Name | Type | Read-only | Mandatory | Description |
|---|---|---|---|---|
| created_at | string | true | false | The time the location record was added |
| external_id | string | false | false | An id you can use to connect a location to external data |
| id | string | true | false | Automatically assigned upon creation |
| name | string | false | true | Display name for the location |
| updated_at | string | true | false | The time of the location's last update |
| url | string | true | false | Direct link to the specific location |
List Asset Locations
GET /api/v2/it_asset_management/locations
Lists all locations.
Pagination
- Cursor pagination only.
Allowed For
- Agents
Code Samples
Curl
curl --request GET https://example.zendesk.com/api/v2/it_asset_management/locations \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/locations"method := "GET"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/it_asset_management/locations").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/it_asset_management/locations',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/locations"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("GET",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/locations")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Get locations
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations.json \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"links": {"next": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations.json?page%5Bafter%5D=eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsT00wUkxVMWRYTTFSWk1WWTFWRlJVVUZSQ1FnIn0","prev": null},"locations": [{"created_at": "2025-12-02T16:34:42Z","external_id": null,"id": "01KBFYN3WBM7201APTQ07SW036","name": "Miami Office","updated_at": "2025-12-02T16:34:42Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations/01KBFYN3WBM7201APTQ07SW036.json"},{"created_at": "2025-12-02T16:34:42Z","external_id": null,"id": "01KBFYN3DKSWW3TY1V5TTTPTBB","name": "San Francisco Office","updated_at": "2025-12-02T16:34:42Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations/01KBFYN3DKSWW3TY1V5TTTPTBB.json"}],"meta": {"after_cursor": "eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsT00wUkxVMWRYTTFSWk1WWTFWRlJVVUZSQ1FnIn0","before_cursor": null,"has_more": true}}
Show Asset Location
GET /api/v2/it_asset_management/locations/{location_id}
Returns the location with the specified id.
Allowed For
- Agents
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| location_id | string | Path | true | The id of the location |
Code Samples
Curl
curl --request GET https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68 \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68"method := "GET"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("GET",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Get location by id
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations/{location_id}.json \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"location": {"created_at": "2025-11-06T05:39:35Z","external_id": null,"id": "01KBFYA07WHH5R0HF94PNW1XFV","name": "San Francisco Office","updated_at": "2025-12-02T09:29:26Z"}}
Create Asset Location
POST /api/v2/it_asset_management/locations
Creates a location.
Allowed For
- Admins
Example body
{"location": {"external_id": "NASH3F","name": "Nashville Office - 3rd floor"}}
Code Samples
Curl
curl --request POST https://example.zendesk.com/api/v2/it_asset_management/locations \--header "Content-Type: application/json" \-u {email_address}/token:{api_token} \--data-raw '{"location": {"external_id": "NASH3F","name": "Nashville Office - 3rd floor"}}'
Go
import ("fmt""io""net/http""strings")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/locations"method := "POST"payload := strings.NewReader(`{"location": {"external_id": "NASH3F","name": "Nashville Office - 3rd floor"}}`)req, err := http.NewRequest(method, url, payload)if err != nil {fmt.Println(err)return}req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/it_asset_management/locations").newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""{\"location\": {\"external_id\": \"NASH3F\",\"name\": \"Nashville Office - 3rd floor\"}}""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("POST", body).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var data = JSON.stringify({"location": {"external_id": "NASH3F","name": "Nashville Office - 3rd floor"}});var config = {method: 'POST',url: 'https://example.zendesk.com/api/v2/it_asset_management/locations',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},data : data,};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsimport jsonfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/locations"payload = json.loads("""{"location": {"external_id": "NASH3F","name": "Nashville Office - 3rd floor"}}""")headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("POST",url,auth=auth,headers=headers,json=payload)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/locations")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.body = %q({"location": {"external_id": "NASH3F","name": "Nashville Office - 3rd floor"}})email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Create location
For clarity, the example places the JSON in a separate file and imports it into the cURL statement
my_location.json
{"location": {"name": "San Francisco Office"}}
curl - Create location snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations.json \-d @my_location.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST
Example response(s)
201 Created
// Status 201 Created{"location": {"created_at": "2025-11-06T05:39:35Z","external_id": null,"id": "01KBFYA07WHH5R0HF94PNW1XFV","name": "San Francisco Office","updated_at": "2025-12-02T09:29:26Z"}}
Update Asset Location
PATCH /api/v2/it_asset_management/locations/{location_id}
Updates an existing location.
Allowed For
- Admins
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| location_id | string | Path | true | The id of the location |
Code Samples
Curl
curl --request PATCH https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68 \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68"method := "PATCH"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68").newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("PATCH", body).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'PATCH',url: 'https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("PATCH",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68")request = Net::HTTP::Patch.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Update location by id
For clarity, the example places the JSON in a separate file and imports it into the cURL statement
updated_location.json
{"location": {"name": "Updated Office Location",}}
curl - Update location by id snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations/{location_id}.json \-d @updated_location.json \-H "Content-Type: application/json" -X PATCH \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"location": {"created_at": "2025-11-06T05:39:35Z","external_id": null,"id": "01KBFYA07WHH5R0HF94PNW1XFV","name": "San Francisco Office","updated_at": "2025-12-02T09:29:26Z"}}
Delete Asset Location
DELETE /api/v2/it_asset_management/locations/{location_id}
Deletes a location with the specified id.
Allowed For
- Admins
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| location_id | string | Path | true | The id of the location |
Code Samples
Curl
curl --request DELETE https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68 \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68"method := "DELETE"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("DELETE", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'DELETE',url: 'https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("DELETE",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/locations/01KBFXPX2QFYZSSC1TMF3Q6T68")request = Net::HTTP::Delete.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Delete location by id
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/locations/{location_id}.json \-X DELETE \-v -u {email_address}/token:{api_token}
Example response(s)
204 No Content
// Status 204 No Contentnull