Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Current »

3.0.0 3.35.0

The Account Location REST API is used to manage individual locations associated with an account. Account locations are always associated with an account and therefore are accessed starting from the account URL.

To retrieve a list of all locations for a specific account, use the REST Standard REST APIs Account Locations REST API

Resource URL Summary

Retrieve the details of a Location for a specific Account

GET /seiapi/v3/trans/Account/${AccountNum}/Location/${LocationID}

Insert or Update the details of a Location for a specific Account

PUT /seiapi/v3/trans/Account/${AccountNum}/Location/${LocationID}

Retrieve the Service History for a Location matching search criteria

POST /seiapi/v3/trans/Account/${AccountNum}/Location/${LocationID}/History?start=${start}&limit=${limit}

Delete a Location for a specific Account

DELETE /seiapi/v3/trans/Account/${AccountNum}/Location/${LocationID}

API Specific Parameters

HTTP Headers

This API uses the default ServiceMobility HTTP Headers.

Query Parameters

ParameterDescription
limit

Identifies the maximum number of objects to be returned.

startIdentifies the number of objects to be skipped. This is used for pagination and allows skipping previously returned objects.



API Specifics

Retrieve the details of a Location for a specific Account

This REST API will return a Location with the specified ID, for the Account with the specified ID. The Location with the specified ID and the Account with the specified ID must already exist in the system.

URL

GET /seiapi/v3/trans/Account/${AccountID}/Location/${LocationID}

HTTP Request Body

This request does not require a request body. 

HTTP Response

On success, an HTTP response code of 200 will be returned, and the response body will contain an REST Object Definitions Account Location Related Objects Account Location ObjectOtherwise, on error, the response body will contain a descriptive reason for the error. 

JSON Format
{
    "Address": {
        "AddrLine1": "", 
        "AddrLine2": "", 
        "AddrLine3": "", 
        "AddrLine4": "",
        "AddrType": "", 
        "City": "", 
        "Country": "", 
        "Intersection" : "",
        "Lat" : "",
        "Lon" : "",
        "Region": "", 
        "Zip": ""
    }, 
    "Contacts": [
        {
            "Email": "", 
            "FirstName": "", 
            "IsPrimary": true, 
            "LastName": "", 
            "Phones": [
                {
                    "PhoneNum": "", 
                    "PhoneType": ""
                }
            ]
        }
    ], 
	"Edited": false,
    "Email": "", 
	"Integrations": {
		"Financial": {
			"ID": "",
			"Extensions": {
				"": ""
			}
		}
	},
	"IsActive": true,
    "LanguageID": "", 
    "LocationNum": "", 
    "Name": "", 
    "Notes" : "",
    "POReq": false, 
    "ServiceAreaID": "",
    "SigReq": true, 
    "StorageLocationID": ""
}

Insert or Update the details of a Location for a specific Account

This REST API will insert a new Location with the specified ID, for the Account with the specified ID, into the system, if a Location with the specified ID does not already exist in the system for the Account with the specified ID.

If, however, the Location with the specified ID, for the Account with the specified ID, does already exist in the system, then this REST API will update (i.e. replace) the already existing Location with the specified ID, for the Account with the specified ID, with the details of the Location supplied in the HTTP Request Body.

URL

PUT /seiapi/v3/trans/Account/${AccountID}/Location/${LocationID}

HTTP Request Body

The HTTP request body must contain a valid REST Object Definitions Account Location Related Objects Account Location Object

HTTP Response

On success the API will return an HTTP response code of 200. 

Retrieve the Service History for a Location matching search criteria

The Account Location Service History REST API provides the technician with the ability to retrieve service history for a specified account location from an external system.

This REST API will return the collection of zero or more Work Order Objects

Before the Account Location Service History API can be used for a given entity, it will be necessary to use the REST Configuration REST APIs Entity System Configuration REST API to update the entity's REST Object Definitions Configuration Related Objects Entity System Configuration Object and configure the RestApi.SiteHistory property, to define the REST Endpoint URI of an API that implements the Account Location History REST API Interface.

URL

POST /seiapi/v3/trans/Account/${AccountNum}/Location/${LocationID}/History?start=${start}&limit=${limit}

HTTP Request Body

The HTTP request body must contain a valid Account Location Service History Request Object.

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will contain a JSON array of one or more REST Object Definitions Work Order Activity Related Objects Work Order Object definitions.

[
	{
		// Work Order Object
	},
	{
		// Work Order Object
	},
	{
		// etc., as required
	}
]

Delete a Location for a specific Account

This REST API will delete a Location with the specified ID, for the Account with the specified ID, from the system. The Location with the specified ID and the Account with the specified ID must already exist in the system.

URL

DELETE /seiapi/v3/trans/Account/${AccountID}/Location/${LocationID}

HTTP Request Body

This request does not require a request body. 

HTTP Response

On success an HTTP response code of 200 will be returned. The system will return HTTP response code 410 in case of non-existent REST Object Definitions Account Location Related Objects Account Location Object.

  • No labels