EstimateStatus

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

Description

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

Methods

URL base/CRM/EstimateStatus/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the EstimateStatus endpoint.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
    {
        "HttpAction": "Get",
        "MethodName": "GetEstimateStatus",
        "Description": "Returns the record for a single 'EstimateStatus' given the passed in ID value (see Path).",
        "Path": "/EstimateStatus/GetEstimateStatus/25032"
    },
    {
        "HttpAction": "Get",
        "MethodName": "GetEstimateStatuses",
        "Description": "Returns all the 'EstimateStatus' records.",
        "Path": "/EstimateStatus/GetEstimateStatuses"
    },
    {
        "HttpAction": "Post",
        "MethodName": "AddEstimateStatus",
        "Description": "Creates the record for a single 'EstimateStatus' and returns the EstimateStatus object",
        "Format": {
            "Name": "Open",
            "Description": "open status"
        }
    },
    {
        "HttpAction": "Post",
        "MethodName": "UpdateEstimateStatus",
        "Description": "Updates the record for a single 'EstimateStatus' and returns the EstimateStatus object",
        "Format": {
            "ID": 1,
            "Name": "Open",
            "Description": "open status"
        }
    },
    {
        "HttpAction": "Get",
        "MethodName": "DeleteEstimateStatus",
        "Description": "Deletes the record for a single 'EstimateStatus' given the passed in ID value (see Path).",
        "Path": "/EstimateStatus/DeleteEstimateStatus/25032"
    }
]
URL base/CRM/EstimateStatus/GetEstimateStatus/ID
Action GET
Description Returns a EstimateStatus object when given an ID of a valid estimate status in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a estimate status in the M4 database.
Returns A JSON EstimateStatus data object
Sample Return Object
{
     "ID": 1,
     "Name": "Open",
     "Description": "open status"
}
URL base/CRM/EstimateStatus/GetEstimateStatuses
Action GET
Description Returns a collection of all the EstimateStatus objects in the M4 database.
Parameters None
Returns A list of JSON EstimateStatus data objects
Sample Return Object
[
     {
          "ID": 1,
          "Name": "Open",
          "Description": "open status"
     },
     {
          "ID": 2,
          "Name": "Closed",
          "Description": "closed status"
     }
]
URL base/CRM/EstimateStatus/AddEstimateStatus
Action POST
Description Adds the specified EstimateStatus object and returns the newly added EstimateStatus object.
Parameters
Name Required? Type Description
Name Yes String The name of the estimate status.
Description No String The description of the estimate status.
Sample JSON Package
{
     "Name": "Open",
     "Description": "open status"
}
Returns A JSON EstimateStatus data object
Sample Return Object
{
     "ID": 1,
     "Name": "Open",
     "Description": "open status"
}
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
URL base/CRM/EstimateStatus/UpdateEstimateStatus
Action POST
Description Updates the specified EstimateStatus object and returns the newly updated EstimateStatus object.
Parameters
Name Required? Type Description
ID Yes Integer The ID of the estimate status.
Name Yes String The name of the estimate status.
Description No String The description of the estimate status.
Sample JSON Package
{
     "ID": 1,
     "Name": "Open",
     "Description": "open status"
}
Returns A JSON EstimateStatus data object
Sample Return Object
{
     "ID": 1,
     "Name": "Open",
     "Description": "open status"
}
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
URL base/CRM/EstimateStatus/DeleteEstimateStatus/ID
Action GET
Description Deletes a EstimateStatus object when given an ID of a valid estimate status in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a estimate status in the M4 database.
Returns A JSON data object
Sample Return Object
{
  "Message": "The EstimateStatus with ID [55] was deleted successfully."
}

Was this article helpful?

Related Articles