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.3-beta/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.3-beta/Case/EstimateItemResponse"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:ct="http://www.decisiv.net/platform_api/0.3-beta/Case/CaseTypes"
  xmlns:s="http://www.decisiv.net/platform_api/0.3-beta/Case/Salesman"
  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:ac="http://www.decisiv.net/platform_api/0.2/Case/AdditionalCharges"
  xmlns:eit="http://www.decisiv.net/platform_api/0.2/Case/EstimateItemTypes"
  xmlns:eip="http://www.decisiv.net/platform_api/0.3-beta/Case/EstimateItemPartResponse">
  <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>
  <parts>
    <part>
        <eip:id>5678</eip:id>
        <eip:URL>http://api.decisiv.net/platform_api/estimates/1234/items/4321/parts/5678</eip:URL>
        <eip:itemURL>http://api.decisiv.net/platform_api/estimates/1234/items/4321</eip:itemURL>
        <eip:name>Filter</eip:name>
        <eip:partNumber>part0</eip:partNumber>
        <eip:quantity>2.0</eip:quantity>
        <eip:quantityShipped>2</eip:quantityShipped>
        <eip:quantityBackordered>0</eip:quantityBackordered>
        <eip:unitPrice>0.25</eip:unitPrice>
        <eip:coreQuantity>2.0</eip:coreQuantity>
        <eip:unitCorePrice>0.05</eip:unitCorePrice>
        <eip:totalPrice>0.60</eip:totalPrice>
        <eip:salesman>
            <s:id>id0</s:id>
            <s:name>name0</s:name>
        </eip:salesman>
        <eip:source>source0</eip:source>
        <eip:createdAt>2020-10-29T13:07:03+00:00</eip:createdAt>
        <eip:updatedAt>2020-10-29T13:07:03+00:00</eip:updatedAt>
    </part>
  </parts>
</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.3-beta/Case/EstimateItemRequest"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:ct="http://www.decisiv.net/platform_api/0.3-beta/Case/CaseTypes"
  xmlns:s="http://www.decisiv.net/platform_api/0.3-beta/Case/Salesman"
  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:ac="http://www.decisiv.net/platform_api/0.2/Case/AdditionalCharges"
  xmlns:e="http://www.decisiv.net/platform_api/0.3-betaa/Case/EstimateItemRequest"
  xmlns:eit="http://www.decisiv.net/platform_api/0.2/Case/EstimateItemTypes"
  xmlns:eip="http://www.decisiv.net/platform_api/0.3-beta/Case/EstimateItemPartRequest">
  <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
fixedPriceTotal optional fixed price override for an item
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, somplete
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 labor total
rate optional labor rate
hours optional labor time in hours
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
source optional source name
salesman optional Salesman

Salesman

Name Condition Description
id required salesman identifier

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<item xmlns="http://www.decisiv.net/platform_api/0.3-beta/Case/EstimateItemRequest"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:ct="http://www.decisiv.net/platform_api/0.3-beta/Case/CaseTypes"
  xmlns:s="http://www.decisiv.net/platform_api/0.3-beta/Case/Salesman"
  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:ac="http://www.decisiv.net/platform_api/0.2/Case/AdditionalCharges"
  xmlns:e="http://www.decisiv.net/platform_api/0.3-betaa/Case/EstimateItemRequest"
  xmlns:eit="http://www.decisiv.net/platform_api/0.2/Case/EstimateItemTypes"
  xmlns:eip="http://www.decisiv.net/platform_api/0.3-beta/Case/EstimateItemPartRequest">
  <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>
    <eip:salesman>
      <s:id>id0</s:id>
    </eip:salesman>
    <eip:source>source0</eip:source>
  </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