FeatureType

  • 15.5
This article is may not be up to date with the latest stable release of M4.

Description

The FeatureType endpoint provides the API consumer with access to methods pertaining to service feature types and related data objects. The endpoint allows consumers to load feature types , add new feature types , and update feature types .

Methods

URL base/Billing/FeatureType/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the FeatureType endpoint.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
    {
        "HttpAction": "Post",
        "MethodName": "AddServiceFeatureType",
        "Description": "Adds the record for a single feature type given the passed in fields. FeatureType is required.",
        "Format": {
            "FeatureType": "type name",
            "FeatureDescription": "type description is optional",
            "Cost": 47.52
        }
    },
    {
        "HttpAction": "Get",
        "MethodName": "DeleteServiceFeatureType",
        "Description": "Deletes the record for a single feature type given the passed in ID value (see Path)",
        "Path": "[API URL]/FeatureType/DeleteServiceFeatureType/25032"
    },
    {
        "HttpAction": "Get",
        "MethodName": "GetServiceFeatureTypes",
        "Description": "Returns the list of all feature types in the database.",
        "Path": "[API URL]/FeatureType/GetServiceFeatureTypes"
    },
    {
        "HttpAction": "Get",
        "MethodName": "GetServiceFeatureType",
        "Description": "Returns the record for a single feature type given the passed in ID value (see Path)",
        "Path": "[API URL]/FeatureType/GetServiceFeatureType/25032"
    },
    {
        "HttpAction": "Post",
        "MethodName": "UpdateServiceFeatureType",
        "Description": "Updates the record for a single feature type given the passed in fields. ID and FeatureType are required.",
        "Format": {
            "ID": 805,
            "FeatureType": "type name",
            "FeatureDescription": "type description is optional",
            "Cost": 33.57
        }
    }
]
URL base/Billing/FeatureType/GetServiceFeatureType/ID
Action GET
Description Returns a FeatureType object when given an ID of a valid feature type in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a feature type in the M4 database.
Returns A JSON FeatureType data object
Sample Return Object
{
    "ID": 103,
    "FeatureType": "name1",
    "FeatureDescription": null,
    "Cost": null
}
URL base/Billing/FeatureType/GetServiceFeatureTypes
Action GET
Description Returns a collection of all the FeatureType objects in the M4 database.
Parameters None
Returns A list of JSON FeatureType data objects
Sample Return Object
[
	{
	    "ID": 103,
	    "FeatureType": "name1",
	    "FeatureDescription": null,
	    "Cost": null
	},
	{
	    "ID": 104,
	    "FeatureType": "name2",
	    "FeatureDescription": null,
	    "Cost": null
	}
]
URL base/Billing/FeatureType/AddServiceFeatureType
Action POST
Description Adds the specified FeatureType object and returns the newly added FeatureType object.
Parameters
Name Required? Type Description
FeatureType Yes String The name of the feature type.
FeatureDescription No String The description of the feature type.
Cost No Decimal The cost of the feature type.
Sample JSON Package
{
    "FeatureType": "name1",
    "FeatureDescription": null,
    "Cost": null
}
Returns A JSON FeatureType data object
Sample Return Object
{
    "ID": 103,
    "FeatureType": "name1",
    "FeatureDescription": null,
    "Cost": null
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • FeatureType: must not be null
URL base/Billing/FeatureType/UpdateServiceFeatureType
Action POST
Description Updates the specified FeatureType object and returns the newly updated FeatureType object.
Parameters
Name Required? Type Description
ID Yes Integer The ID of the feature type.
FeatureType Yes String The name of the feature type.
FeatureDescription No String The description of the feature type.
Cost No Decimal The cost of the feature type.
Sample JSON Package
{
    "ID": 103,
    "FeatureType": "name1",
    "FeatureDescription": null,
    "Cost": null
}
Returns A JSON FeatureType data object
Sample Return Object
{
    "ID": 103,
    "FeatureType": "name1",
    "FeatureDescription": null,
    "Cost": null
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • ID: must not be null
  • FeatureType: must not be null
URL base/Billing/FeatureType/DeleteServiceFeatureType/ID
Action GET
Description Deletes a FeatureType object when given an ID of a valid feature type in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a feature type in the M4 database.
Returns A JSON data object
Sample Return Object
{
  "Message": "The FeatureType with ID [55] was deleted successfully."
}

Was this article helpful?

Related Articles