ProductInvoiceItem
Version: 1.33
ProductInvoiceItem is a charge for a Product that appears on the Invoice. An Invoice may or may not have one (1) or more ProductInvoiceItem on it, depending on whether or not there are any products purchased in the last billing period.
ProductInvoiceItem can be queried directly or through the Invoice. Each ProductInvoiceItem includes at least one InvoiceItemCharge.
Product Invoice Items are one of six types of Invoice Items:
-
AdditionalFeeInvoiceItem
-
AdjustmentInvoiceItem
-
ProductInvoiceItem
-
ServiceInvoiceItem
-
TaxInvoiceItem
-
UsageInvoiceItem
Parameters
Each ProductInvoiceItem shown from the query shows information for a number of elements in the entity. The following table shows the elements, details of the elements, and brief descriptions.
Element Name | Element Type | Field Length | Description |
---|---|---|---|
queryScope |
QueryScope |
- - |
Whether default query results are overridden by QueryScope resulting in SHALLOW or DEEP query results. Refer to QueryScope for details. |
eid |
Long |
System Generated |
System generated unique identity number assigned to all entities in Gotransverse. |
invoiceItemCharges |
Sequence of InvoiceItemCharges |
- - |
Each item charged (Product on a customer's Order) can have multiple charges for example Price, Tax, and so forth. |
quantity |
Int |
As needed |
For non-serialized subscription or one-time Products, which can be purchased in quantities of one or more; this is the number of subscriptions (for example, |
unitAmount |
Decimal |
As needed |
Cost of one item. |
totalAmount |
Decimal |
As needed |
Cost of all the items. If there is only one item this amount is the same as unitAmount. |
description |
String |
255 |
A description of the Invoice Item. |
taxable |
Boolean |
Shows either: "true" (Yes) or "false (No) |
Is the item taxable or not? YES, the item IS taxable. NO, the item is NOT taxable. |
proratedPercentage |
Decimal |
As needed |
Not used at this time. |
chargeStartDate |
dateTime |
Refer to Data Types for dateTime formats. |
The date and time the charges started. |
chargeEndDate |
dateTime |
Refer to Data Types for dateTime formats. |
The date and time the charges ended. |
lineItemType |
String |
255 |
Not used at this time. |
The dateTime format: yyyy-mm-ddThh:mm:ss.sss-06:00 The GMT offset is 6 hours. For example, 2011-01-28T16:17:22.234-06:00. Refer to Data Types for further information and for a list of dateTime formats accepted by Gotransverse.
Entity ProductInvoiceItems
The entity ProductInvoiceItems enables you to see multiple entries of the entity ProductInvoiceItems.
Element Name | Element Type | Field Length | Description |
---|---|---|---|
pageNumber |
Integer |
as needed |
Shows the current page number. |
pageSize |
Integer |
as needed |
Shows the page size. |
totalElements |
Long |
as needed |
Shows the total number of items found. |
elementCount |
Integer |
as needed |
Shows the current count of the item in the number of items that were found. |
totalPages |
Integer |
as needed |
Shows the total number of pages. |
invoiceItem |
ProductInvoiceItem |
- - |
Shows the list of ProductInvoiceItems. |
Entity InvoiceItems
The entity InvoiceItems enables you to see multiple entries of all the entities in InvoiceItems.
Element Name | Element Type | Field Length |
Description |
---|---|---|---|
pageNumber |
Integer |
as needed |
Shows the current page number. |
pageSize |
Integer |
as needed |
Shows the page size. |
totalElements |
Long |
as needed |
Shows the total number of items found. |
elementCount |
Integer |
as needed |
Shows the current count of the item in the number of items that were found. |
totalPages |
Integer |
as needed |
Shows the total number of pages. |
invoiceItem |
Includes: AdditionalFeeInvoiceItem AdjustmentInvoiceItem ProductInvoiceItem ServiceInvoiceItem TaxInvoiceItem UsageInvoiceItem |
- - |
Shows the list of InvoiceItems. |
Information for the related entities:
-
Entity ProductInvoiceItems
-
Entity InvoiceItems
Query a ProductInvoiceItem
Query Key Information for SOAP and REST
Querying to see ProductInvoiceItems needs to include one of the following parameters. If you do not know the value for the parameter, query separately to learn the value.
Query Key | Value | Definition | |
---|---|---|---|
eid |
Long |
The eid number of the ProductInvoiceItem. |
|
invoiceEid |
Long |
The eid number of the Invoice. |
|
invoiceNum |
String |
The unique number of the Invoice itself. |
Query to Use | Query for | Parameter Name and Value | Returns |
---|---|---|---|
SimpleDataQuery |
ProductInvoiceItem |
<parameter name><parameter value> |
List of your ProductInvoiceItems for that parameter and value. |
SOAP Example Queries and Responses
SOAP Query and Response of ProductInvoiceItem Using Parameter InvoiceNum
In the following example SOAP query, the parameter of invoiceNum was used. The Invoice Number (in this example "80"), was learned through a previous query on Invoice.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.tractbilling.com/billing/1_31/service"> <soapenv:Header/> <soapenv:Body> <ser:query> <ser:queryRequest> <dom:simpleDataQuery> <dom:type>ProductInvoiceItem</dom:type> <dom:whereClause clause="invoiceNum eq '3' "/> </dom:simpleDataQuery> </ser:queryRequest> </ser:query> </soapenv:Body> </soapenv:Envelope>
This was the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:queryResponse xmlns="http://www.tractbilling.com/billing/1_31/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:return successful="true"> <productInvoiceItems pageNumber="1" pageSize="50" totalElements="2" elementCount="2" totalPages="1"> <productInvoiceItem xsi:type="ServiceInvoiceItem" quantity="1" unitAmount="100.00" totalAmount="100.00" description="000 Basic Subscription" taxable="false" proratedPercentage="100.00000" chargeStartDate="2014-08-01T00:00:00.000-05:00" chargeEndDate="2014-08-02T00:00:00.000-05:00" lineItemType="Product Sale" eid="10194" queryScope="SHALLOW" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> <service eid="17390" queryScope="EID"/> </productInvoiceItem> <productInvoiceItem xsi:type="ServiceInvoiceItem" quantity="1" unitAmount="100.00" totalAmount="100.00" description="000 Basic Subscription" taxable="false" proratedPercentage="100.00000" chargeStartDate="2014-08-02T00:00:00.000-05:00" chargeEndDate="2014-08-03T00:00:00.000-05:00" lineItemType="Product Sale" eid="10196" queryScope="SHALLOW" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> <service eid="17390" queryScope="EID"/> </productInvoiceItem> </productInvoiceItems> </ns2:return> </ns2:queryResponse> </soap:Body> </soap:Envelope>
SOAP Query and Response of InvoiceItem Using Parameter InvoiceNum
In the following example SOAP query, the parameter of invoiceNum was used. The Invoice Number (in this example "111439627"), was learned through a previous query on Invoice.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:query xmlns="http://www.tractbilling.com/billing/1_31/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:queryRequest> <simpleDataQuery startIndex="0" size="50"> <type>InvoiceItem</type> <parameter parameter="invoiceNum" parameterValue="111439627"/> </simpleDataQuery> </ns2:queryRequest> </ns2:query> </soap:Body> </soap:Envelope>
This was the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:queryResponse xmlns="http://www.tractbilling.com/billing/1_31/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_31/service"> <ns2:return successful="true"> <invoiceItems pageNumber="1" pageSize="50" totalElements="3" elementCount="3" totalPages="1"> <invoiceItem quantity="1" unitAmount="0.99000" totalAmount="0.99000" taxable="false" proratedPercentage="100.00000" chargeStartDate="2012-01-06T12:08:15-06:00" chargeEndDate="2012-02-01T00:00:00-06:00" lineItemType="Product Sale" eid="317427"> <invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </invoiceItem> <invoiceItem quantity="5" unitAmount="0.99000" totalAmount="4.95000" taxable="false" proratedPercentage="100.00000" chargeStartDate="2012-01-06T12:08:15-06:00" chargeEndDate="2012-02-01T00:00:00-06:00" lineItemType="Product Sale" eid="317427"> <invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </invoiceItem> <invoiceItem quantity="5" unitAmount="0.99000" totalAmount="4.95000" taxable="false" proratedPercentage="100.00000" chargeStartDate="2012-02-01T00:00:00-06:00" chargeEndDate="2012-03-01T00:00:00-06:00" lineItemType="Product Sale" eid="317427"> <invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </invoiceItem> </invoiceItems> </ns2:return> </ns2:queryResponse> </soap:Body> </soap:Envelope>
REST Mount Point and Parameters
Query
-
GET https://my.tractbilling.com/t/s/r/1.33/productInvoiceItems/<eid>
-
GET https://my.tractbilling.com/t/s/r/1.33/productInvoiceItems?eid=<eid>
-
GET https://my.tractbilling.com/t/s/r/1.33/productInvoiceItems?invoiceNum=<invoiceNum>
-
GET https://my.tractbilling.com/t/s/r/1.33/productInvoiceItems?invoiceEid=<invoiceEid>
To see all six types of Invoice Items use the following mount points:
Query
-
GET https://my.tractbilling.com/t/s/r/1.33/invoiceItems/<eid>
-
GET https://my.tractbilling.com/t/s/r/1.33/invoiceItems?eid=<eid>
-
GET https://my.tractbilling.com/t/s/r/1.33/invoiceItems?invoiceNum=<invoiceNum>
-
GET https://my.tractbilling.com/t/s/r/1.33/invoiceItems?invoiceEid=<invoiceEid>
REST Example Queries and Responses
REST Query and Response of ProductInvoiceItem Using Parameter InvoiceNum
In the following example REST query, the parameter of invoiceNum was used. The Invoice Number (in this example "3"), was learned through a previous query on Invoice.
-
GET https://my.tractbilling.com/t/s/r/1.33/productInvoiceItems?invoiceNum=3
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <productInvoiceItems xmlns:ns2="http://www.tractbilling.com/billing/1_31/domain" pageNumber="1" pageSize="50" totalElements="2" elementCount="2" totalPages="1"> <productInvoiceItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:InvoiceItem" quantity="1" unitAmount="100.00" totalAmount="100.00" description="000 Basic Subscription" taxable="false" proratedPercentage="100.00000" chargeStartDate="2014-08-01T00:00:00.000-05:00" chargeEndDate="2014-08-02T00:00:00.000-05:00" lineItemType="Product Sale" eid="10194" queryScope="SHALLOW"> <ns2:invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </productInvoiceItem> <productInvoiceItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:InvoiceItem" quantity="1" unitAmount="100.00" totalAmount="100.00" description="000 Basic Subscription" taxable="false" proratedPercentage="100.00000" chargeStartDate="2014-08-02T00:00:00.000-05:00" chargeEndDate="2014-08-03T00:00:00.000-05:00" lineItemType="Product Sale" eid="10196" queryScope="SHALLOW"> <ns2:invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </productInvoiceItem> </productInvoiceItems>
REST Query and Response of InvoiceItem Using Parameter InvoiceNum
In the following example REST query, the parameter of invoiceNum was used. The Invoice Number (in this example "111439627"), was learned through a previous query on Invoice.
-
GET https://my.tractbilling.com/t/s/r/1.33/invoiceItems?invoiceNum=111439627
This was the response (line breaks and formatting added for ease of reading):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <invoiceItems xmlns:ns2="http://www.tractbilling.com/billing/1_31/domain" pageNumber="1" pageSize="50" totalElements="3" elementCount="3" totalPages="1"> <ns2:invoiceItem quantity="1" unitAmount="0.99000" totalAmount="0.99000" taxable="false" proratedPercentage="100.00000" chargeStartDate="2012-01-06T12:08:15-06:00" chargeEndDate="2012-02-01T00:00:00-06:00" lineItemType="Product Sale" eid="317427"> <ns2:invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </ns2:invoiceItem> <ns2:invoiceItem quantity="5" unitAmount="0.99000" totalAmount="4.95000" taxable="false" proratedPercentage="100.00000" chargeStartDate="2012-01-06T12:08:15-06:00" chargeEndDate="2012-02-01T00:00:00-06:00" lineItemType="Product Sale" eid="317427"> <ns2:invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </ns2:invoiceItem> <ns2:invoiceItem quantity="5" unitAmount="0.99000" totalAmount="4.95000" taxable="false" proratedPercentage="100.00000" chargeStartDate="2012-02-01T00:00:00-06:00" chargeEndDate="2012-03-01T00:00:00-06:00" lineItemType="Product Sale" eid="317427"> <ns2:invoiceItemCharges pageNumber="1" pageSize="50" totalElements="0" elementCount="0" totalPages="0"/> </ns2:invoiceItem> </invoiceItems>