EstimateLineItemType

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

Description

The EstimateLineItemType endpoint provides the API consumer with access to methods pertaining to estimate line item types and related data objects. The endpoint allows consumers to load estimate line item types , add new estimate line item types , and update estimate line item types .

Methods

URL base/CRM/EstimateLineItemType/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the EstimateLineItemType endpoint.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
    {
        "HttpAction": "Get",
        "MethodName": "GetEstimateLineItemType",
        "Description": "Returns the record for a single 'EstimateLineItemType' given the passed in ID value (see Path).",
        "Path": "/EstimateLineItemType/GetEstimateLineItemType/25032"
    },
    {
        "HttpAction": "Get",
        "MethodName": "GetEstimateLineItemTypes",
        "Description": "Returns all 'EstimateLineItemType' records (see Path).",
        "Path": "/EstimateLineItemType/GetEstimateLineItemTypes"
    },
    {
        "HttpAction": "Post",
        "MethodName": "AddEstimateLineItemType",
        "Description": "Creates the record for a single 'EstimateLineItemType' and returns the EstimateLineItemType object",
        "Format": {
            "Name": "Buried Fiber",
            "Description": "Fiber that is buried",
            "DefaultCostPerUnit": 15,
            "UnitOfMeasure": "Feet"
        }
    },
    {
        "HttpAction": "Post",
        "MethodName": "UpdateEstimateLineItemType",
        "Description": "Updates the record for a single 'EstimateLineItemType' and returns the EstimateLineItemType object",
        "Format": {
            "ID": 1,
            "Name": "Buried Fiber",
            "Description": "Fiber that is buried",
            "DefaultCostPerUnit": 15,
            "UnitOfMeasure": "Feet"
        }
    },
    {
        "HttpAction": "Get",
        "MethodName": "DeleteEstimateLineItemType",
        "Description": "Deletes the record for a single 'EstimateLineItemType' given the passed in ID value (see Path).",
        "Path": "/EstimateLineItemType/DeleteEstimateLineItemType/25032"
    }
]
URL base/CRM/EstimateLineItemType/GetEstimateLineItemType/ID
Action GET
Description Returns a EstimateLineItemType object when given an ID of a valid estimate line item type in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a estimate line item type in the M4 database.
Returns A JSON EstimateLineItemType data object
Sample Return Object
{
     "ID": 1,
     "Name": "Buried Fiber",
     "Description": "Fiber that is buried",
     "DefaultCostPerUnit": 15,
     "UnitOfMeasure": "Feet"
}
URL base/CRM/EstimateLineItemType/GetEstimateLineItemTypes
Action GET
Description Returns a collection of all the EstimateLineItemType objects in the M4 database.
Parameters None
Returns A list of JSON EstimateLineItemType data objects
Sample Return Object
[
     {
          "ID": 1,
          "Name": "Buried Fiber",
          "Description": "Fiber that is buried",
          "DefaultCostPerUnit": 15,
          "UnitOfMeasure": "Feet"
     },
     {
          "ID": 2,
          "Name": "Pole",
          "Description": "pole",
          "DefaultCostPerUnit": 100,
          "UnitOfMeasure": "Each"
     }
]
URL base/CRM/EstimateLineItemType/AddEstimateLineItemType
Action POST
Description Adds the specified EstimateLineItemType object and returns the newly added EstimateLineItemType object.
Parameters
Name Required? Type Description
Name Yes String The name of the estimate line item type.
Description No String The description of the estimate line item type.
DefaultCostPerUnit Yes Decimal The default cost per unit of the estimate line item type.
UnitOfMeasure No String The unit of measure of the estimate line item type.
Sample JSON Package
{
     "Name": "Buried Fiber",
     "Description": "Fiber that is buried",
     "DefaultCostPerUnit": 15,
     "UnitOfMeasure": "Feet"
}
Returns A JSON EstimateLineItemType data object
Sample Return Object
{
     "ID": 1,
     "Name": "Buried Fiber",
     "Description": "Fiber that is buried",
     "DefaultCostPerUnit": 15,
     "UnitOfMeasure": "Feet"
}
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
  • Name: must not be null
  • DefaultCostPerUnit: must not be null
URL base/CRM/EstimateLineItemType/UpdateEstimateLineItemType
Action POST
Description Updates the specified EstimateLineItemType object and returns the newly updated EstimateLineItemType object.
Parameters
Name Required? Type Description
ID Yes Integer The ID of the estimate line item type.
Name Yes String The name of the estimate line item type.
Description No String The description of the estimate line item type.
DefaultCostPerUnit Yes Decimal The default cost per unit of the estimate line item type.
UnitOfMeasure No String The unit of measure of the estimate line item type.
Sample JSON Package
{
     "ID": 1,
     "Name": "Buried Fiber",
     "Description": "Fiber that is buried",
     "DefaultCostPerUnit": 15,
     "UnitOfMeasure": "Feet"
}
Returns A JSON EstimateLineItemType data object
Sample Return Object
{
     "ID": 1,
     "Name": "Buried Fiber",
     "Description": "Fiber that is buried",
     "DefaultCostPerUnit": 15,
     "UnitOfMeasure": "Feet"
}
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
  • Name: must not be null
  • DefaultCostPerUnit: must not be null
URL base/CRM/EstimateLineItemType/DeleteEstimateLineItemType/ID
Action GET
Description Deletes an EstimateLineItemType object when given an ID of a valid estimate line item type in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a estimate line item type in the M4 database.
Returns A JSON data object
Sample Return Object
{
  "Message": "The EstimateLineItemType with ID [55] was deleted successfully."
}

Was this article helpful?

Related Articles