Feature

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

Description

The Feature endpoint provides the API consumer with access to methods pertaining to features and related data objects. The methods allow consumers to pull data and add, update, and delete features.

Methods

URL base/Billing/Feature/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the Feature controller.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
  {
    "HttpAction": "Get",
    "MethodName": "GetServiceFeature",
    "Description": "Returns the record for a single service feature given the passed in ID value (see Path).",
    "Path": "/Feature/GetServiceFeature/25032"
  },
  {
    "HttpAction": "Get",
    "MethodName": "GetServiceFeaturesByService",
    "Description": "Returns a list of feature records in the system that are assigned to a specific service via the passed in ID value (see Path).",
    "Path": "/Feature/GetServiceFeaturesByService/25032"
  }
]
URL base/Billing/Feature/GetServiceFeature/ID
Action GET
Description Returns a Service Feature object when given an ID of a valid customer service feature in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a customer service feature in the M4 database.
Returns A JSON Service Feature data object
Sample Return Object
{
  "ID": 11191,
  "FeatureTypeID": 113,
  "CustomerServiceID": 30881,
  "Quantity": 0,
  "TicketID": 10,
  "StatusID": 1,
  "SourceTable": "",
  "SourceID": null,
  "ConnectDate": "2017-01-10T13:31:34.027",
  "DisconnectDate": "2017-01-11T13:31:34.027"
}
URL base/Billing/Feature/GetServiceFeaturesByService/ID
Action GET
Description Returns a list of Service Feature objects when given an ID of a valid customer service in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a customer service in the M4 database.
Returns JSON Service data objects
Sample Return Object
[
  {
    "ID": 6,
    "FeatureTypeID": null,
    "CustomerServiceID": 19,
    "Quantity": 0,
    "TicketID": null,
    "StatusID": 1,
    "SourceTable": "",
    "SourceID": null,
    "ConnectDate": "2017-02-06T09:42:46.29",
    "DisconnectDate": null
  },
  {
    "ID": 7,
    "FeatureTypeID": null,
    "CustomerServiceID": 19,
    "Quantity": 0,
    "TicketID": null,
    "StatusID": 1,
    "SourceTable": "b88992e8-7add-47a7-a21d-a9be71f16cae",
    "SourceID": 47859,
    "ConnectDate": "2017-02-06T09:42:46.293",
    "DisconnectDate": null
  }
]
URL base/Billing/Feature/GetFeatureBySourceID
Action POST
Description Returns a Service Feature object when given a SourceID and SourceTable of a valid customer service feature in the M4 database.
Parameters
Name Required? Type Description
SourceID Yes Integer An integer value representing the SourceID of a customer service feature in the M4 database. Used in conjunction with the SourceTable
SourceTable Yes String An integer value representing the SourceTable name of a customer service feature in the M4 database. Used in conjunction with the SourceID
Sample JSON Package
{
      "SourceID": 12121,
      "SourceTable": "Example"
}
Returns A JSON Service Feature data object
Sample Return Object
{
  "ID": 11191,
  "FeatureTypeID": 113,
  "CustomerServiceID": 30881,
  "Quantity": 0,
  "TicketID": 10,
  "StatusID": 1,
  "SourceTable": "Example",
  "SourceID": 12121,
  "ConnectDate": "2017-01-10T13:31:34.027",
  "DisconnectDate": "2017-01-11T13:31:34.027"
}
URL base/Billing/Feature/AddServiceFeature
Action POST
Description Returns the Service Feature object just added to the M4 database.
Parameters
Name Required? Type Description
CustomerServiceID Yes Integer The ID of a customer service in the M4 database.
ConnectDate Yes DateTime
FeatureTypeID No Integer The ID of a Service Feature type in the M4 database.
Quantity No Integer
TicketID No Integer The ID of a ticket in the M4 database.
StatusID No Integer The Status ID from the (Customer) Feature Status table.
SourceTable No String The Source Table referenced by the Source ID.
SourceID No Integer The Source ID from the Source table.
Sample JSON Package
{
      "CustomerServiceID": 975,
      "ConnectDate": "2016-12-13T11:19:23.777088-05:00",
      "FeatureTypeID": 1,
      "Quantity": 100,
      "TicketID": null,
      "StatusID": 1,
      "SourceTable": "ClientTable",
      "SourceID": 4758
}
Returns A JSON Customer Service data object
Sample Return Object
{
  "ID": 283,
  "FeatureTypeID": 1,
  "CustomerServiceID": 975,
  "Quantity": 100,
  "TicketID": null,
  "StatusID": 1,
  "SourceTable": "ClientTable",
  "SourceID": 4758,
  "ConnectDate": "2016-12-13T11:19:23.777",
  "DisconnectDate": null
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • CustomerServiceID:
    • The ID of the associated customer service to which the feature belongs.
    • The CustomerServiceID must already exist in the database.
    • CustomerServiceID must be greater than 0.
  • ConnectDate: the date the service was connected/turned on.
  • Quantity: must be greater than 0.
  • FeatureTypeID:
    • The ID of the associated feature type.
    • The FeatureTypeID must already exist in the database.
    • FeatureTypeID must be greater than 0.
  • TicketID:
    • The ID of the associated ticket.
    • The TicketID must already exist in the database.
    • TicketID must be greater than 0.
  • StatusID:
    • The ID of the associated service status.
    • The StatusID must already exist in the database.
    • StatusID must be greater than 0.
  • SourceID/SourceTable:
    • The SourceID and SourceTable fields are fields that work in tandem. Both can be ignored (by setting the value to null) or both can be specified.
    • If SourceID is specified, SourceTable must be specified. If SourceTable is specified, SourceID must be specified.
    • There is a unique constraint on the SourceID/SourceTable fields in the database. At most, only 1 record can be returned for a given SourceID/SourceTable combination.
    • Leading/trailing spaces are ignored in the SourceTable parameter.
URL base/Billing/Feature/UpdateServiceFeature
Action POST
Description Returns the Service Feature object updated the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer The ID of a service feature in the M4 database.
FeatureTypeID No Integer The ID of a Service Feature type in the M4 database.
Quantity No Integer
TicketID No Integer The ID of a ticket in the M4 database.
StatusID No Integer The Status ID from the (Customer) Feature Status table.
SourceTable No String The Source Table referenced by the Source ID.
SourceID No Integer The Source ID from the Source table.
Sample JSON Package
{
  "ID": 283,
  "FeatureTypeID": 1,
  "CustomerServiceID": 975,
  "Quantity": 200,
  "TicketID": null,
  "StatusID": 2,
  "SourceTable": "ClientTable",
  "SourceID": 4758,
  "DisconnectDate": null
}
Returns A JSON Customer Service data object
Sample Return Object
{
  "ID": 283,
  "FeatureTypeID": 1,
  "CustomerServiceID": 975,
  "Quantity": 200,
  "TicketID": null,
  "StatusID": 2,
  "SourceTable": "ClientTable",
  "SourceID": 4758,
  "ConnectDate": "2016-12-13T11:19:23.777",
  "DisconnectDate": null
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • ID:
    • The ID of the service feature to be updated.
    • CustomerServiceID must be greater than 0.
  • Quantity: must be greater than 0.
  • FeatureTypeID:
    • The ID of the associated feature type.
    • The FeatureTypeID must already exist in the database.
    • FeatureTypeID must be greater than 0.
  • TicketID:
    • The ID of the associated ticket.
    • The TicketID must already exist in the database.
    • TicketID must be greater than 0.
  • StatusID:
    • The ID of the associated service status.
    • The StatusID must already exist in the database.
    • StatusID must be greater than 0.
  • SourceID/SourceTable:
    • The SourceID and SourceTable fields are fields that work in tandem. Both can be ignored (by setting the value to null) or both can be specified.
    • If SourceID is specified, SourceTable must be specified. If SourceTable is specified, SourceID must be specified.
    • There is a unique constraint on the SourceID/SourceTable fields in the database. At most, only 1 record can be returned for a given SourceID/SourceTable combination.
    • Leading/trailing spaces are ignored in the SourceTable parameter.
URL base/Billing/Feature/RemoveServiceFeature
Action POST
Description Disconnects a Service Feature from a Customer Service and all associated linkages.
Parameters
Name Required? Type Description
ID Yes Integer The ID of a valid service feature
DisconnectDate Yes DateTime The date the service feature was disconnected
Sample JSON Package
{
      "ID": 175,
      "DisconnectDate": "2016-11-22T10:15:31.4059204-05:00"
}
Returns A JSON object with a message either the confirming the deletion or notifying the user of an invalid ID.
Sample Return Object
"The service feature with ID [175] was disconnected successfully."
Business Rules
  • ID: represents the ID of the service feature to be disconnected. Must be greater than 0.
  • DisconnectDate: the date the service feature was disconnected/turned off.
URL base/Billing/Feature/ReactivateServiceFeature
Action POST
Description Reactivates (reconnects) a service feature that has been disconnected.
Parameters
Name Required? Type Description
ID Yes Integer The ID of a Service Feature in the M4 database.
ConnectDate No DateTime The ConnectDate of a Service Feature in the M4 database.
Sample JSON Package
{
      "ID": 15359,
      "ConnectDate": 1/1/2018 16:05:07
}
Returns A JSON message data object
Sample Return Object
{
    "Message": "The service feature with ID [15359] was reactivated successfully."
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

ID:
  • The ID must be a valid service feature in the database.
  • The service feature must already be disconnected (i.e. not currently connected).
Duplicate Fields:
  • Reactivation of a service feature must maintain the requirement for a unique SourceID/SourceTable combination.

Was this article helpful?

Related Articles