Estimates BETA

Estimates are used to roll-up line item charges and track miscellaneous charges that are not scoped to a single line item.

List estimates

A collection of estimates

GET /estimates

Response

<?xml version="1.0" encoding="UTF-8"?>
<estimates xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateResponse">
  <estimate>
    <!-- an estimate as below -->
  </estimate>
    <!-- an estimate as below -->
  </estimate>
</estimates>

Get an estimate

GET /estimates/{id}

Responses

<?xml version="1.0" encoding="UTF-8"?>
<estimate xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateResponse"
          xmlns:ac="http://www.decisiv.net/platform_api/0.1/Case/AdditionalCharges">
  <id>1234</id>
  <URL>http://api.decisiv.net/platform_api/estimates/1234</URL>
  <caseURL>http://api.decisiv.net/platform_api/cases/4321</caseURL>
  <itemsURL>http://api.decisiv.net/platform_api/estimates/4321/items</itemsURL>
  <versionsURL>http://api.decisiv.net/platform_api/estimates/4321/versions</versionsURL>
  <digest>ad1e7b41b42c1f2d9fd46f0020b07e11</digest>
  <shopSupplies>5.25</shopSupplies>
  <hazWaste>5.25</hazWaste>
  <freight>5.25</freight>
  <partsTotal>5.25</partsTotal>
  <laborTotal>5.25</laborTotal>
  <coreTotal>5.25</coreTotal>
  <additionalCharges>
    <charge>
      <ac:id>1</ac:id>
      <ac:category>MISC</ac:category>
      <ac:code>CHARGE1234</ac:code>
      <ac:description>Servicing fee</ac:description>
      <ac:amount>5.25</ac:amount>
    </charge>
  </additionalCharges>
  <additionalChargesTotals>
    <total>
      <ac:category>Category One</ac:category>
      <ac:amount>5.25</ac:amount>
    </total>
  </additionalChargesTotals>
  <tax>5.25</tax>
  <total>36.75</total>
  <createdAt>2006-05-04T18:13:51.0</createdAt>
  <updatedAt>2006-05-04T18:13:51.0</updatedAt>
</estimate>

Update an estimate

POST /estimates/{id}

Request

Parameters

Name Condition Description
shopSupplies required total for shop supplies
hazWaste required total for shop hazardous waste disposal
freight required total for freight
tax required total for tax
additionalCharges optional Estimate level miscellaneous charges

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<estimate xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateRequest">
  <shopSupplies>5.25</shopSupplies>
  <hazWaste>5.25</hazWaste>
  <freight>5.25</freight>
  <tax>5.25</tax>
  <additionalCharges>
    <charge>
      <ac:id>1</ac:id>
      <ac:category>MISC</ac:category>
      <ac:code>CHARGE1234</ac:code>
      <ac:description>Servicing fee</ac:description>
      <ac:amount>5.25</ac:amount>
    </charge>
  </additionalCharges>
</estimate>

Response

Status code: 200 A single estimate response as above

Line Items

Line items represent individual charges on an estimate.

List line items

GET /estimates/{id}/items

Response

Status code: 200

<items xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemResponse">
  <item>
    <!-- an item as below -->
  </item>
    <item>
    <!-- an item as below -->
  </item>
</items>

Get line item

GET /estimates/{id}/items/{item_id}

Response

Status code: 200

<?xml version="1.0" encoding="UTF-8"?>
<item xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemResponse"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:g="http://www.decisiv.net/platform_api/0.1/Case/GroupedUser"
    xmlns:vmrs="http://www.decisiv.net/platform_api/0.1/Case/VMRS"
    xmlns:ac="http://www.decisiv.net/platform_api/0.1/Case/AdditionalCharges"
    xmlns:eit="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemTypes">
  <id>4321</id>
  <URL>http://api.decisiv.net/platform_api/estimates/1234/items/4321</URL>
  <estimateURL>http://api.decisiv.net/platform_api/estimates/1234</estimateURL>
  <partsURL>http://api.decisiv.net/platform_api/estimates/1234/items/4321/parts</partsURL>
  <code>99-000-1</code>
  <name>Oil Filter - Replace</name>
  <standardOperationNotes>Do it right.</standardOperationNotes>
  <complaint>complaint</complaint>
  <cause>cause</cause>
  <correction>correction</correction>
  <jobCode>123-4</jobCode>
  <priceCode>445589</priceCode>
  <underWarranty>false</underWarranty>
  <billingClassification>billable</billingClassification>
  <soldStatus>sold</soldStatus>
  <approvalGroupTag>1</approvalGroupTag>
  <workStatus>
    <eit:code>start</eit:code>
    <eit:reason>meal</eit:reason>
    <eit:timestamp>2006-05-04T18:13:51.0</eit:timestamp>
    <eit:setByUser>
      <g:id>-1:123</g:id>
    </eit:setByUser>
  </workStatus>
  <assignee>
    <g:id>-1:321</g:id>
  </assignee>
  <labor>
    <eit:total>50.00</eit:total>
    <eit:rate>25.00</eit:rate>
    <eit:hours>2</eit:hours>
    <eit:skillLevel>A</eit:skillLevel>
  </labor>
  <paint>
    <eit:total>50.00</eit:total>
    <eit:rate>25.00</eit:rate>
    <eit:hours>2</eit:hours>
    <eit:skillLevel>A</eit:skillLevel>
  </paint>
  <additionalCharges>
    <charge>
      <ac:id>1</ac:id>
      <ac:category>Category One</ac:category>
      <ac:code>CODE</ac:code>
      <ac:description>Description One</ac:description>
      <ac:amount>10.00</ac:amount>
    </charge>
    <charge>
      <ac:id>2</ac:id>
      <ac:category>Category One</ac:category>
      <ac:code>CODE</ac:code>
      <ac:description>Description Two</ac:description>
      <ac:amount>15.00</ac:amount>
    </charge>
  </additionalCharges>
  <additionalChargesTotals>
    <total>
      <ac:category>Category One</ac:category>
      <ac:amount>25.00</ac:amount>
    </total>
  </additionalChargesTotals>
  <partsTotal>300.00</partsTotal>
  <coreTotal>50.00</coreTotal>
  <total>400.00</total>
  <VMRS>
    <vmrs:code15>05</vmrs:code15>
    <vmrs:code33>555-333-444</vmrs:code33>
    <vmrs:code18>22</vmrs:code18>
    <vmrs:code79>11</vmrs:code79>
  </VMRS>
  <createdAt>2006-05-04T18:13:51.0</createdAt>
  <updatedAt>2006-05-04T18:13:51.0</updatedAt>
</item>

Create a line item

POST /estimates/{estimate_id}/items

To optimize line item creation, multiple items - along with their respective parts - can be included in the request. For this to occur the version 0.2 EstimateItemRequest schema is required. Additionally, the items container node must be used as follows:

<?xml version="1.0" encoding="UTF-8"?>
<items xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemRequest"
    xmlns:g="http://www.decisiv.net/platform_api/0.1/Case/GroupedUser"
    xmlns:vmrs="http://www.decisiv.net/platform_api/0.1/Case/VMRS"
    xmlns:eit="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemTypes"
    xmlns:ac="http://www.decisiv.net/platform_api/0.1/Case/AdditionalCharges>
  <item>
    <!-- item content -->
  </item>
  <item>
    <!-- item content -->
  </item>
 </items>

Request

Parameters

Item

Name Condition Description
code required a code that identifies the item
name required name or description
standardOperationNotes optional notes viewable by the service provider
complaint optional description of complaint
cause optional description of cause
correction optional description of correction
jobCode optional job segment code
priceCode optional labor price code
workStatus optional WorkStatus
assignee optional current assigned user
soldStatus optional sold, not sold, deferred
underWarranty optional flag for warranty item
billingClassification optional category for item: billable, policy, warranty
labor optional Labor
paint optional Paint
additionalCharges optional AdditionalCharge
vmrs optional VMRS
approvalGroupTag optional a tag to use for grouping line items for approval
parts optional Part

WorkStatus

Name Condition Description
code required start, stop, complete
reason optional reason for last status change
timestamp optional timestamp of last status change
setByUser optional user responsible for last status change

Labor

Name Condition Description
total optional total field does not need to be populated. Value entered will be ignored
rate optional labor rate
hours optional labor time in hours
fixedLaborTotal optional Setting the Fixed Labor Total will override the Labor calculation of Time/Rate and be used as the fixed labor cost for the operation.
skillLevel optional skill level used to determine rate
shopReportedHours optional actual labor hours reported by the shop
shopReportedTotal optional actual labor total reported by the shop

AdditionalCharge

Name Condition Description
id optional ID for an existing charge
category required name of a predefined additional charge category
code optional a code for this additional charge
description required the description of this additional charge
amount required the amount of this additional charge

Paint

Name Condition Description
total optional paint total
rate optional paint rate
hours optional paint time in hours
skillLevel optional skill level used to determine rate

VMRS

Name Condition Description
code15 optional vmrs code 15
code14 optional vmrs code 14
code18 optional vmrs code 18
code79 optional vmrs code 79
code33 optional vmrs code 33

Part

Name Condition Description
partNumber required part number/identifier
name required part name
quantity required quantity of part
quantityShipped optional quantity of part that has shipped
quantityBackorderd optional quantity of part that is on backorder
unitPrice required per unit part price
coreQuantity required core quantity of part
corePrice required per unit core price

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<item xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemRequest"
    xmlns:g="http://www.decisiv.net/platform_api/0.1/Case/GroupedUser"
    xmlns:vmrs="http://www.decisiv.net/platform_api/0.1/Case/VMRS"
    xmlns:eit="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemTypes"
    xmlns:ac="http://www.decisiv.net/platform_api/0.1/Case/AdditionalCharges>
  <code>99-000-1</code>
  <name>Oil Filter - Replace</name>
  <standardOperationNotes>Do it right.</standardOperationNotes>
  <complaint>complaint</complaint>
  <cause>cause</cause>
  <correction>correction</correction>
  <underWarranty>false</underWarranty>
  <billingClassification>billable</billingClassification>
  <soldStatus>sold</soldStatus>
  <workStatus>
    <eit:code>start</eit:code>
    <eit:reason>meal</eit:reason>
    <eit:timestamp>2006-05-04T18:13:51.0</eit:timestamp>
    <eit:setByUser>
      <g:id>-1:123</g:id>
    </eit:setByUser>
  </workStatus>
  <assignee>
    <g:id>-1:321</g:id>
  </assignee>
  <labor>
    <eit:total>50.00</eit:total>
    <eit:rate>25.00</eit:rate>
    <eit:hours>2</eit:hours>
  </labor>
  <additionalCharges>
    <charge>
      <ac:category>Category</ac:category>
      <ac:code>CODE</ac:code>
      <ac:description>Description</ac:description>
      <ac:amount>10.00</ac:amount>
    </charge>
  </additionalCharges>
  <vmrs>
    <vmrs:code14>07</vmrs:code14>
    <vmrs:code15>05</vmrs:code15>
    <vmrs:code33>555-333-444</vmrs:code33>
    <vmrs:code18>22</vmrs:code18>
    <vmrs:code79>11</vmrs:code79>
  </vmrs>
  <approvalGroupTag>1</approvalGroupTag>
  <part>
    <eip:name>Filter</eip:name>
    <eip:partNumber>8675309</eip:partNumber>
    <eip:quantity>2</eip:quantity>
    <eip:quantityShipped>2</eip:quantityShipped>
    <eip:quantityBackordered>0</eip:quantityBackordered>
    <eip:unitPrice>0.25</eip:unitPrice>
    <eip:coreQuantity>2</eip:coreQuantity>
    <eip:unitCorePrice>0.05</eip:unitCorePrice>
  </part>

</item>

Response

Status code: 201 - 200 update

A the created line items as above

Update a line item

POST /estimates/{estimate_id}/items/{item_id}

Response

Status code: 200

A single line item as above

Delete a line item

DELETE /estimates/{estimate_id}/items/{item_id}

Response

HTTP codes 200, 202 or 204 indicate success

List estimate versions

GET /estimates/{id}/versions

Response

Status code: 200

<versions
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:g="http://www.decisiv.net/platform_api/0.1/Case/GroupedUser"
  xmlns:vmrs="http://www.decisiv.net/platform_api/0.1/Case/VMRS"
  xmlns:ei="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemRequest"
  xmlns:eit="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemTypes"
  xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateVersionResponse">
  <version>
    <!-- an estimate version as listed below -->
  </version>
</versions>

Get a estimate version

GET /estimates/{id}/versions/{version_id}

Response

Status code: 200

<?xml version="1.0" encoding="UTF-8"?>
<version xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:g="http://www.decisiv.net/platform_api/0.1/Case/GroupedUser"
  xmlns:vmrs="http://www.decisiv.net/platform_api/0.1/Case/VMRS"
  xmlns:eit="http://www.decisiv.net/platform_api/0.1/Case/EstimateItemTypes"
  xmlns:ac="http://www.decisiv.net/platform_api/0.1/Case/AdditionalCharges"
  xmlns="http://www.decisiv.net/platform_api/0.1/Case/EstimateVersionResponse">
  <id>1234</id>
  <URL>http://api.decisiv.net/platform_api/estimate_versions/1234</URL>
  <estimateURL>http://api.decisiv.net/platform_api/estimates/4321</estimateURL>
  <version>1</version>
  <digest>ad1e7b41b42c1f2d9fd46f0020b07e11</digest>
  <items>
    <item>
      <id>4321</id>
      <code>99-000-1</code>
      <name>Oil Filter - Replace</name>
      <standardOperationNotes>Do it right.</standardOperationNotes>
      <complaint>complaint</complaint>
      <cause>cause</cause>
      <correction>correction</correction>
      <jobCode>123-4</jobCode>
      <priceCode>445589</priceCode>
      <underWarranty>false</underWarranty>
      <billingClassification>billable</billingClassification>
      <approvalGroupTag>1</approvalGroupTag>
      <approvalStatus>
        <eit:name>approved</eit:name>
        <eit:reason xsi:nil="true"/>
        <eit:reason_description xsi:nil="true"/>
        <eit:reviewedBy>
          <g:id>123</g:id>
          <g:URL></g:URL>
          <g:name>Test User</g:name>
        </eit:reviewedBy>
        <eit:reviewedAt>2006-05-04T18:13:51.0</eit:reviewedAt>
        <eit:customerReviewed>true</eit:customerReviewed>
      </approvalStatus>
      <soldStatus>sold</soldStatus>
      <labor>
        <eit:total>50.00</eit:total>
        <eit:rate>25.00</eit:rate>
        <eit:hours>2</eit:hours>
        <eit:skillLevel>A</eit:skillLevel>
      </labor>
      <paint>
        <eit:total>50.00</eit:total>
        <eit:rate>25.00</eit:rate>
        <eit:hours>2</eit:hours>
        <eit:skillLevel>A</eit:skillLevel>
      </paint>
      <additionalCharges>
        <charge>
          <ac:id>1</ac:id>
          <ac:category>Category One</ac:category>
          <ac:code>CODE</ac:code>
          <ac:description>Description One</ac:description>
          <ac:amount>10.00</ac:amount>
        </charge>
        <charge>
          <ac:id>2</ac:id>
          <ac:category>Category One</ac:category>
          <ac:code>CODE</ac:code>
          <ac:description>Description Two</ac:description>
          <ac:amount>15.00</ac:amount>
        </charge>
      </additionalCharges>
      <additionalChargesTotals>
        <total>
          <ac:category>Category One</ac:category>
          <ac:amount>25.00</ac:amount>
        </total>
      </additionalChargesTotals>
      <vmrs xsi:nil="true"/>
      <parts>
        <part>
          <id>5678</id>
          <name>Filter</name>
          <partNumber>8675309</partNumber>
          <quantity>2</quantity>
          <quantityShipped>2</quantityShipped>
          <quantityBackordered>0</quantityBackordered>
          <unitPrice>0.25</unitPrice>
          <coreQuantity>2</coreQuantity>
          <unitCorePrice>0.05</unitCorePrice>
          <totalPrice>0.50</totalPrice>
        </part>
      </parts>
      <partsTotal>300.00</partsTotal>
      <coreTotal>50.00</coreTotal>
      <total>400.00</total>
    </item>
  </items>
  <etr>2015-12-11T06:34:43Z</etr>
  <shopSupplies>5.25</shopSupplies>
  <hazWaste>5.25</hazWaste>
  <freight>5.25</freight>
  <partsTotal>5.25</partsTotal>
  <laborTotal>5.25</laborTotal>
  <coreTotal>5.25</coreTotal>
  <additionalChargesTotals>
    <total>
      <ac:category>Category One</ac:category>
      <ac:amount>25.00</ac:amount>
    </total>
  </additionalChargesTotals>
  <tax>5.25</tax>
  <total>36.75</total>
  <createdAt>2015-12-11T06:34:28Z</createdAt>
  <updatedAt>2015-12-11T06:34:36Z</updatedAt>
</version>

Create an estimate version

Create

POST /estimates/{estimate_id}/versions

Parameters will be added in the near term to extend the functionality of this action.

A PDF representation the estimate can be optionally uploaded when creating new version. If provided, it will be used for customer viewing in place of the Decisiv generated PDF in the Case application.

Example request

Assumes you have a file in the same directory named estimate_version.pdf.

$ curl -v \
  -XPOST \
  -H 'Authorization: Bearer {bearer token}' \
  -F "file=@estimate_version.pdf;filename=some_other_name.pdf" \
  http://www.decisiv.net/platform_api/estimates/{estimate_id}/versions

Request

Headers

Content-Type: multipart/form-data

Required Parameters

Name Value
file See below.

File

  • Content-Disposition: form-data; name=“file”; filename=“{filename}”
  • The body of the request is the appropriately encoded file contents.

Update an estimate version

POST /estimates/{estimate_id}/versions/{version_id}

Request

Parameters

All the params are optional, but if used they need the following fields:

Item

Name Condition Description
id required the Line item ID
digest optional A random string used for digest

Approval Status

Name Condition Description
name required Approval name (approved, on hold…)
reason optional Reason for the approval status
reasonDescription optional Description for reason of approval

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<version xmlns="http://www.decisiv.net/platform_api/0.2/Case/EstimateVersionRequest"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:eit="http://www.decisiv.net/platform_api/0.2/Case/EstimateItemTypes"
  xsi:schemaLocation="http://www.decisiv.net/platform_api/0.2/Case/EstimateVersionRequest">
  <digest>ad1e7b41b42c1f2d9fd46f0020b07e11</digest>
  <items>
    <item>
      <id>1234</id>
      <approvalStatus>
        <eit:name>approved</eit:name>
        <eit:reason>parts cost</eit:reason>
        <eit:reasonDescription>too much $$$$</eit:reasonDescription>
      </approvalStatus>
    </item>
  </items>
</version>

Example response

Status code: 200

<version
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:eit="http://www.decisiv.net/platform_api/0.2/Case/EstimateItemTypes"
  xmlns:ac="http://www.decisiv.net/platform_api/0.2/Case/AdditionalCharges"
  xmlns:g="http://www.decisiv.net/platform_api/0.2/Case/GroupedUser"
  xmlns:vmrs="http://www.decisiv.net/platform_api/0.2/Case/VMRS"
  xmlns="http://www.decisiv.net/platform_api/0.2/Case/EstimateVersionResponse">
    <id>33333</id>
    <URL>http://pricing.decisiv.test/platform_api/estimates/678901/versions/33333</URL>
    <estimateId>678901</estimateId>
    <estimateURL>http://pricing.decisiv.test/platform_api/estimates/678901</estimateURL>
    <digest xsi:nil="true"/>
    <version>1</version>
    <items>
        <item>
            <id>1234</id>
            <itemURL>http://decisiv.net/platform_api/estimates/678901/items/7629797</itemURL>
            <itemId>7629797</itemId>
            <code>99-000-1</code>
            <name>Oil Filter - Replace</name>
            <standardOperationNotes>Do it right.</standardOperationNotes>
            <complaint>complaint</complaint>
            <cause>cause</cause>
            <correction>correction</correction>
            <jobCode>123-4</jobCode>
            <priceCode>445589</priceCode>
            <underWarranty>false</underWarranty>
            <billingClassification>billable</billingClassification>
            <approvalGroupTag>1</approvalGroupTag>
            <approvalStatus>
                <eit:name>approved</eit:name>
                <eit:reason>parts cost</eit:reason>
                <eit:reasonDescription>too much $$$$</eit:reasonDescription>
                <eit:reviewedBy>
                    <g:id>373954</g:id>
                    <g:URL></g:URL>
                    <g:name>John Doe</g:name>
                </eit:reviewedBy>
                <eit:reviewedAt>2023-10-10T21:42:04+00:00</eit:reviewedAt>
                <eit:customerReviewed>true</eit:customerReviewed>
            </approvalStatus>
            <soldStatus>sold</soldStatus>
            <labor>
                <eit:total>20.00</eit:total>
                <eit:rate>10.00</eit:rate>
                <eit:hours>2.00</eit:hours>
                <eit:skillLevel>A</eit:skillLevel>
                <eit:shopReportedHours>2.75</eit:shopReportedHours>
                <eit:shopReportedTotal>100.00</eit:shopReportedTotal>
            </labor>
            <paint>
                <eit:total>0.00</eit:total>
            </paint>
            <additionalCharges xsi:nil="true"/>
            <additionalChargesTotals xsi:nil="true"/>
            <vmrs>
                <vmrs:code15 xsi:nil="true"/>
                <vmrs:code18 xsi:nil="true"/>
                <vmrs:code33 xsi:nil="true"/>
                <vmrs:code79 xsi:nil="true"/>
            </vmrs>
            <parts xsi:nil="true"/>
            <partsTotal>0.00</partsTotal>
            <coreTotal>0.00</coreTotal>
            <total>20.00</total>
        </item>
    </items>
    <etr xsi:nil="true"/>
    <shopSupplies>0.0</shopSupplies>
    <hazWaste>0.0</hazWaste>
    <freight>0.0</freight>
    <partsTotal>0.0</partsTotal>
    <laborTotal>20.0</laborTotal>
    <coreTotal>0.0</coreTotal>
    <additionalCharges xsi:nil="true"/>
    <additionalChargesTotals xsi:nil="true"/>
    <tax>0.0</tax>
    <total>20.0</total>
    <createdAt>2023-10-10T21:06:56Z</createdAt>
</version>