Push Resource Locations REST API
You can send Resource locations to Service Board from outside the Max platform. The operation retrieves a list of Resources with locations sent from customer sites. Locations are stored in the Current Location field of the relevant Resource record, and the value in the Current Location Reported On field is used as the current time for the Resource.
* 
You must have the Service Board Integration role to call this API.
Parameter
Description
Required
resources
List of Resource info, including all Resource location information.
Yes
resourceId
External ID for Service Board Resource, which is the record ID for the relevant Salesforce Technician/Equipment record.
Yes
reportedOn
Reported date and time in milliseconds. If not specified, this value defaults to the current time on Service Board.
No
latitude
Latitude of the location.
Yes
longitude
Longitude of the location.
Yes
addressInfo
Detailed street address of the location.
No
Input Example
Following is an example POST request to call the operation.
POST https://<tenant_hostname>/resource/push_locations

{
"resources": [{
"resourceId":"a1a0b000004tFcVAAU",
"reportedOn":"1566491419937",
"latitude":"22.8283",
"longitude":"108.3120",
"addressInfo":"4450 Rosewood Dr #200, Pleasanton, CA 94588"
},{
"resourceId":"a1a0b000004tFc8AAE",
"reportedOn":"1569491419937",
"latitude":"22.8151",
"longitude":"108.3876"
},{
"resourceId":"a1a0b000004tFcYAUB",
"latitude":"22.63203",
"longitude":"107.91499"
}
]
}
Response Example
The response is a JSON representation of the result of the operation.
{"status":"Success","total":3,"success":3,"failed":0,"message":"All locations were sent."}
Name
Description
status
Final operation status. Success means that all locations are successfully sent and Failed means the resources parameter was unspecified or is an empty list.
total
The total number of locations.
success
The number of locations successfully sent and saved to Service Board.
failed
The number of locations sent to Service Board but not properly saved.
message
No resources specified when the status value is failed or All locations were sent when the status value is success.
* 
Resources in failed status are logged for troubleshooting.
Calling the Operation From Outside the Max Platform
Before you call this operation from outside the Max platform, you must first retrieve the OAuth token, with which you then invoke the operation. For more information, see Calling Protected Resources From Outside the Max Platform.
For more information:
Was this helpful?