Untitled Page
API Overview
Example
Customers  
Companies  
Technicians  
Technician Groups  
Tickets  
Ticket History  
Ticket Attachments  
Billing Line Items  
Billing Invoices  
Time Tracking  
Knowledge Base Articles  
Scheduling  
Asset Managements  
 
get_line_items
Input Variable Input Value Description
tid Integer value Ticket ID number. You may also use * as a wildcard.
id String value The ID number of a line item entry.
uid String value A valid technician ID to limit the returned values by. This will be the technician that created the line item entry.
cid String value A valid customer ID to limit the returned values by. This will be the customer associated with the line item entry.
keyword String value All or part of a word to search by.
start_tid String value The first line item ID to return. The returned records will start with this value and go to the last record, unless you include the end_tid and/or count variables. Example: If you include start_tid=45 in your request, only line items with an ID of 45 or higher will be returned.
end_tid String value The last line item ID to return. The returned records will end at this value, unless you include the count variable. Example: If you include end_tid=45 in your request, all records from 1 to 45 will be returned. If you were to also include "count=5", only the first 5 records would be returned.
start_cid String value This can be a single letter or the first few letters of a customer ID. The returned records will have a customer ID that starts with this value and go to the last record, unless you include the end_cid and/or count variables. Example: If you include start_cid=j in your request, only line items with a customer ID starting with j or later in the alphabet will be returned.
end_cid String value This can be a single letter or the first few letters of a customer ID. The returned records will stop at line items that have a customer ID that starts with this value. It can be used in conjunction with start_cid or alone. When used alone the returned records will start with first record in the database. Example: If you include end_cid=j in your request, only line items with a customer ID starting with j or earlier in the alphabet will be returned.
start_date String value as date/time The first line item date/time to return. The returned records will start with this value and go to the last record, unless you include the end_date and/or count variables. Example: If you include start_date=2/1/2014 00:00:00 in your request, only line items with a date of 2/1/2014 00:00:00 or later will be returned.
end_date String value The last line item date/time to return. The returned records will end with this value. Example: If you include end_date=2/1/2014 00:00:00 in your request, only line items with a date of 2/1/2014 00:00:00 or earlier will be returned.
count Integer value This would be the number of records to return.
count_only String value Defines whether or not to return only the number of records. This is used in conjunction with the "page" variable or just to get the total number of records. Accepted values are "N" and "Y" (without the quotes). The default value is "N", and if this variable is excluded the detailed data is returned.
page Integer value This would be the number of the "page" of records to return. You must use a wildcard like "id=*" or "tid=*" to get paged records, and you must also include the "count" variable". Example: &id=*&count=10&page=1.
order String value Defines the sort order of the returned records. You will need to examine the database to determine the exact field names to sort by. You may also include " ASC" (ascending) and " DESC" (descending) in the value for the sort direction (note the precedding blank space). For example, to sort by ID in descending order you would include the following in the URL: &order=ID DESC. You can optionally include the "order_direction" variable separately.
order_direction String value Defines the sort order direction of the returned records. Accepted values are "ASC" (ascending) and "DESC" (descending). The default value is "ASC". For example, to sort by ID in descending order you would include the following in the URL: &order=ID&order_direction=DESC.

Output Variable URL Encoded Description
id No Unique ID of the database record.
customer_id Yes The customer ID associated with the line item.
ticket_id No The ticket ID associated with the line item.
invoice_id No THe invoice ID associated with the line item.
date No The date/time the line item was created.
title No The title of the line item.
category No The category of the line item.
bill_by_time No Denotes whether the duration is a time value.
bill_by_quantity No Denotes whether the duration is a quantity.
duration No The time or quantity applied to the line item.
time_unit No The unit of time for the duration. Possible return values are "Minutes", "Hours" or "Days" (without the quotes).
cost No The cost for the line item.
status No The invoice status of the line item. Possible return values are "SAVED" and "INVOICED".
entered_by No The technician ID of the technician that created the line item.
Example Usage
http://localhost/API/default.aspx?key=your key here&action=get_line_items&tid=*
Example Response
XML:
<?xml version="1.0"?>
<lineitems>
	<item>
		<id>10</id>
		<customer_id>demo</customer_id>
		<ticket_id>500</ticket_id>
		<invoice_id>37</invoice_id>
		<date>4/18/2014 5:50:37 PM</date>
		<title>new+line+item</title>
		<category></category>
		<bill_by_time></bill_by_time>
		<bill_by_quantity></bill_by_quantity>
		<duration>0</duration>
		<time_unit></time_unit>
		<cost></cost>
		<status>INVOICED</status>
		<entered_by>guest</entered_by>
	</item>
</lineitems>
JSON:
{
	"lineitems": [
		{
			"id" : "10",
			"customer_id" : "demo",
			"ticket_id" : "500",
			"invoice_id" : "37",
			"date" : "4/18/2014 5:50:37 PM",
			"title" : "new+line+item",
			"category" : "",
			"bill_by_time" : "",
			"bill_by_quantity" : "",
			"duration" : "0",
			"time_unit" : "",
			"cost" : "",
			"status" : "INVOICED",
			"entered_by" : "guest"
		}
	]
}
URL DELIMITED:
id=10&customer_id=demo&ticket_id=500&invoice_id=37
&date=4/18/2014 5:50:37 PM&title=new+line+item&category=
&bill_by_time=&bill_by_quantity=&duration=0&time_unit=
&cost=&status=INVOICED&entered_by=guest