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 68 Next »

3.33.0

The Asset Model Number Verification REST API Interface defines the REST API interface which customers will need to implement if they would like ServiceMobility to validate model number for a specific asset via their own systems.

By implementing an API which matches the Asset Model Number Verification REST API Interface, customers can configure ServiceMobility (via the Entity System Configuration object) so that requests to validate model number for a specific asset via the Asset Model Number Verification REST API are passed through to their system.

Before the Asset Model Number Verification REST 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.AssetModels property, to define the REST Endpoint URI of an API that implements the Asset Model Number Verification REST API Interface.

On this page:

Related pages:


Resource URL Summary

Verify model number for a specified asset

POST <REST Endpoint URI>

HTTP Headers

ServiceMobility will set both of the Standard HTTP Headers when calling this REST API Interface.

That is:

  • The Content-Type header will be set to application/json; and
  • The x-access-token header will be set to the JWT that was used in the call to the API that triggered ServiceMobility to call the configured endpoint that implements this interface.

The x-access-token header will either be the JWT issued by ServiceMobility, or by the endpoint that implements the Authentication REST API Interface that ServiceMobility has been configured to use.

Implementations of this interface may evaluate the JWT supplied, if required, but please note that ServiceMobility will have already authenticated the JWT in the initial API call before passing the call on to the configured endpoint.


API Specifics

Verify model number for a specified asset

This REST API must return the details of model number verification, based on the specified REST Object Definitions Work Order Activity Related Objects Asset Object.

URL

POST <REST Endpoint URI>

HTTP Request Body

The HTTP request body must contain a valid REST Object Definitions Work Order Activity Related Objects Asset Object

Error rendering macro 'excerpt-include' : No link could be created for 'REST Object Definitions Work Order Activity Related Objects Appointment Search Object'.

HTTP Response

Response Codes

HTTP CodeDescription
200OK. The verification for model number was successful.
400

Bad Request. The server could not understand the request due to invalid data in the request. Asset Model Number Verification API will return following JSON response object.

Response Object Formats

JSON Format
{
	"type": "",
	"title": "",
	"status": 200,
	"data": [
		{
			//Asset Object
		},
		{
			//Asset Object
		}
	],
	"detail": "",
	"invalidParams": [
		{
			"name": "",
			"reason": "",
			"path": "",
			"value": ""
		}
	]
}

Response Object Properties

PropertyTypeDescription
typestringWhen the REST API response is an error, specifies a URI to a description of the error type, to help developers with debugging errors.
titlestringWhen the REST API response is an error, specifies a short, human-readable summary of the problem type.
statusintegerSpecifies the HTTP status code of the response (both for success and error).
datacollectionThis collection of REST Object Definitions Work Order Activity Related Objects Asset Object provides recommendation/additional information for model numbers of a specified asset.
detailstringWhen the REST API response is an error, specifies a human-readable explanation specific to the occurrence of the problem. This field may not always be present.
invalidParamscollection

When the REST API response is an error, specifies an array, containing a list of objects, where each object describes specific parameters that were invalid in the request that caused the error. This field may not always be present.

Each object in the array has a format as shown above, with the following properties:

PropertyTypeDescription
namestring

The name of the invalid parameter.

reasonstring

A human-readable explanation of why the parameter was invalid.

pathstringThe JSON path of the invalid parameter.
valuestringThe value of the invalid parameter.
401Invalid Logon.
500Server error. An error occurred while processing the request. The HTTP response body should have more details as to the possible cause.

On success, an HTTP response code of 200 must be returned, and the response body must contain a valid response body that is the same as would be returned from the REST Standard REST APIs Assets REST API.

ServiceMobility will return the response code (and response body, if present) as the response to the initiating REST Standard REST APIs Assets REST API call.

  • No labels