Saved Locations
A saved location object includes location details, notes, client information (if applicable), and work order counts. To manage saved locations from the Field Nation platform, click MANAGE > Locations.
Location Object
Parameter | Type | Example | Mapping/Notes |
---|---|---|---|
id | integer | "id": 16267 | Saved Location ID. |
name | string | "name": "Saved Location Example" | Location Identifier. Used in the "Search for a saved location" field. This can be different from "Location name" (display_name).
Example
|
display_name | string | "display_name": "ABC Corp" | Work Order > Location name.
Example
|
address1 | string | "address1":"123 Main Street" | Location > Street Address. |
address2 | string | "address2":"Building 4C" | Location > Address 2. |
city | string | "city":"Phoenix" | Location > City. |
state | string | "state":"AZ" | Location > State. |
zip | string | "zip":"85001" | Location > Zip. |
country | string | "country":"US" | Location > Country. Refer to Country Codes for a list of codes. |
type | object | "type":{} | Location > Type (id, name).
Options
1 = Commercial |
contact | object | "contact": {} | Location Contact (name, email, phone, phone_ext). Optional. |
group | object | "group": {} | Location Group. Optional. |
active | boolean | "active": true | Location Status. true or false. |
client | object | "client": {} | Location Client (id, name). Optional. |
geo | object | "geo": {} | Location Latitude/Longitude. Read-only. |
time_zone | object | "time_zone": {} | Location Time Zone. Read-only. |
notes | array | "notes": {} | Location Notes. Optional. For a private note, set private = true. |
attributes | array | "attributes": {} | Location Attributes. Optional. |
workorders | object | "workorders": {} | Paginated list of work order details. Read-only. Does not return the entire work order object. |
Examples
Note: Location parameters will vary depending on whether you Get Location by ID or Get Saved Locations by Company.
Saved Location Object by ID
{
"id":16325,
"name":"New Saved Location",
"company":{
"id":183,
"name":"Your Company Name"
},
"display_name":"ABC Corp",
"address1":"123 Main Street",
"address2":"Building 4C",
"city":"Phoenix",
"state":"AZ",
"zip":"85001",
"country":"US",
"type": {
"id": 1,
"name": "Commercial"
},
"contact":{
"name":"Office Manager",
"email":"mgr@mail.com",
"phone":"+1 480-555-1234",
"phone_ext":""
},
"group":{
"id":52,
"name":"AZ Locations"
},
"active":true,
"location_notes":"note 1",
"client":{
"id":188,
"name":"Main Street Shipping"
},
"geo":{
"latitude":33.4486,
"longitude":-112.073
},
"time_zone":{
"id":12,
"name":"America/Phoenix",
"offset":-7
},
"notes":[
{
"id":0,
"text":"note 1",
"private":false,
"created":false,
"user":false
}
],
"attributes":[
{
"id":"4",
"name":"Service ID",
"value":"00123A"
}
],
"workorders":{
"actions":[],
"metadata":{
"total":1,
"page":1,
"pages":1,
"per_page":25,
"columns":"id:175,title:175,status:175,assignee:175,schedule:175,project:175,actions:175,correlation_id:175",
"view":"list",
"sort":"",
"order":"asc",
"list":"workorders_all",
"available_columns":[],
"available_filters":[]
},
"params":[],
"lists":[],
"f_location_ids":16325,
"fs_location_ids":true,
"results":[
{
"id":1731,
"highlight_pending_increases":{
"row_background":false,
"status_label":false
},
"role":{
"role":"buyer",
"sub_roles":[
],
"status_id":1,
"company_id":"183"
},
"eta":{
"user":{
"id":0
},
"task":{
"id":9171
},
"start":{
"local":{
"date":"2018-11-06",
"time":"08:00:00"
},
"utc":"2018-11-06 15:00:00"
},
"end":{
"local":{
"date":"2018-11-06",
"time":"09:00:00"
},
"utc":"2018-11-06 16:00:00"
},
"hour_estimate":0,
"notes":"",
"status":{
"name":"unconfirmed",
"updated":{
"utc":"",
"local":{
"date":"",
"time":""
}
}
},
"mode":"between",
"actions":[],
"on_my_way_are_you_sure":24
},
"schedule":{
"work_order_id":1731,
"service_window":{
"mode":"between",
"start":{
"local":{
"date":"2018-11-06",
"time":"08:00:00"
},
"utc":"2018-11-06 15:00:00"
},
"end":{
"local":{
"date":"2018-11-06",
"time":"09:00:00"
},
"utc":"2018-11-06 16:00:00"
}
},
"time_zone":{
"id":12,
"name":"America/Phoenix",
"offset":-1,
"short":"MST"
},
"status_id":1,
"company_id":183,
"today_tomorrow":"Today",
"correlation_id":"791540062ddbbba5e4fd0a1a13b9bc71aa864d0a",
"actions":[
"edit"
]
},
"work_order_id":1731,
"project":{
"id":238,
"name":"Alarm System Upgrade"
},
"problems":{
"metadata":{
"total":0,
"per_page":1,
"page":1,
"pages":1
},
"correlation_id":"a4096b859e95076f6268687a125402cb8495d89c",
"actions":[
],
"types":[
],
"results":[
]
},
"status":{
"id":1,
"name":"Draft",
"display":"Draft",
"is_routed":false,
"code":"",
"delay":0,
"ncns":false,
"sub_status":"",
"confirmed":true,
"correlation_id":"d05e531dc04277f6927a68e16bf9a7bc1d41a7e5"
},
"assignee":{
"user":{
"id":0,
"first_name":"",
"last_name":"",
"country":"",
"cell":"",
"phone":"",
"thumbnail":"/images/missing-profile.png"
},
"status_id":1,
"work_order_id":1731,
"in_confirmation_window":false,
"actions":[
]
},
"actions":[
"search-provider",
"messaging",
"history",
"support_tickets",
"copy",
"overview",
"show_client_name",
"show_client_request",
"show_project_name",
"show_template_name",
"show_integration",
"show_service_contract",
"show_networks",
"create_template",
"edit",
"apply_tags",
"delete",
"set_network"
],
"correlation_id":"20754b3392c5ffd926da55fe57793c36bd20b931",
"w2":false,
"bundle":{
"id":0,
"metadata":{
"total":0,
"per_page":0
},
"results":[
],
"actions":[
]
},
"title":"Fix Copier on 4th Floor",
"workflow_cancel":{
"metadata":{
"total":3,
"pages":1,
"per_page":3,
"page":1
},
"results":[
"Need complete model to validate cancelation requirements, missing: time_logs",
"Need complete model to validate cancelation requirements, missing: attachments",
"Work order must be in the published, routed or assigned status"
],
"status":"invalid"
}
}
],
"tags":[
{
"id":1011,
"label":"Add Tag",
"hex_color":"#F67B1E",
"valid_statuses":[
"created",
"published"
],
"types":[
"custom_company",
"for_providers_only",
"show_in_dashboard"
],
"actions":[
"edit"
]
},
{
"id":1010,
"label":"Custom Tag2",
"hex_color":"#453E39",
"valid_statuses":[
"paid",
"canceled"
],
"types":[
"custom_company",
"for_providers_only",
"show_in_dashboard"
],
"actions":[
"edit"
]
},
{
"id":1008,
"label":"Hidden Tag",
"hex_color":"#1E22F6",
"valid_statuses":[
"routed",
"assigned",
"workdone"
],
"types":[
"custom_company",
"hide_from_provider",
"show_in_dashboard"
],
"actions":[
"edit"
]
},
{
"id":1009,
"label":"Provider Edit",
"hex_color":"#1A8018",
"valid_statuses":[
"workdone",
"approved"
],
"types":[
"custom_company",
"provider_can_edit",
"for_providers_only",
"show_in_dashboard"
],
"actions":[
"edit"
]
}
],
"custom_fields":[
{
"id":139,
"name":"Conditional Provider Field",
"tip":"Only display if Parent = Yes.",
"type":"text",
"role":"assigned_provider",
"dependency":{
"id":138,
"value":"Yes",
"operator":"equals"
},
"options":[
],
"flags":[
"seen_by_provider"
]
},
{
"id":141,
"name":"Custom Buyer Field",
"tip":"Custom Field example.",
"type":"text",
"role":"buyer",
"dependency":{
"id":0,
"value":"",
"operator":"equals"
},
"options":[
],
"flags":[
"shown_in_header",
"admin_edit_only",
"seen_by_provider",
"visible_to_clients"
]
},
{
"id":129,
"name":"Internal Buyer Field",
"tip":"Custom field example.",
"type":"numeric",
"role":"buyer",
"dependency":{
"id":0,
"value":"",
"operator":"equals"
},
"options":[
],
"flags":[
"show_in_available",
"unique",
"shown_in_header",
"internal_id",
"seen_by_provider",
"included_in_alerts",
"client_request_required",
"client_request_use_for",
"visible_to_clients"
]
},
{
"id":138,
"name":"Provider Field (Parent)",
"tip":"Example provider field.",
"type":"predefined",
"role":"assigned_provider",
"dependency":{
"id":0,
"value":"",
"operator":"equals"
},
"options":[
"Yes",
"No",
""
],
"flags":[
"seen_by_provider",
"included_in_alerts"
]
}
],
"search_text":"Search by title, keywords, work order id, provider, client etc.",
"correlation_id":"work_orders"
},
"actions":[
"edit"
]
}
Saved Location Response by Company
{
"actions": [],
"metadata": {
"total": 2,
"page": 1,
"pages": 1,
"per_page": 25,
"columns": "location_id:100,name:280,client_id:175,notes:260,location:190,type:175,status:100,work_orders:130,providers:130",
"view": "list",
"sort": "group_id",
"order": "asc",
"available_columns": [],
"available_filters": []
},
"params": [],
"results": [
{
"id": 16323,
"location_id": "16323",
"client_id": "188",
"client_name": "Main Street Shipping",
"name": "Default 2",
"group_id": "52",
"group_name": "AZ Locations",
"type": "Commercial",
"type_id": "1",
"notes": [
{
"id": 0,
"text": "Custom Note",
"private": 0
}
],
"address1": "123 Industrial Ave",
"address2": "",
"city": "Phoenix",
"state": "AZ",
"zip": "85005",
"country": "US",
"workorders": "0",
"providers": "0",
"status": "1"
},
{
"id": 16325,
"location_id": "16325",
"client_id": "188",
"client_name": "Main Street Shipping",
"name": "New Saved Location",
"group_id": "52",
"group_name": "AZ Locations",
"type": "",
"type_id": "0",
"notes": [
{
"id": 0,
"text": "note 1",
"private": 0
}
],
"address1": "123 Main Street",
"address2": "Building 4C",
"city": "Phoenix",
"state": "AZ",
"zip": "85001",
"country": "US",
"workorders": "5",
"providers": "0",
"status": "1"
}
],
"correlation_id": "locations"
}