This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Invoice Items in Billomat


Overview

The following operations allow you to work with invoice items. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with invoice items, see Sample configuration

OperationDescription

createInvoiceItem

Creates an item.

getInvoiceItem

Retrieves a specific invoice item by its ID.

listInvoiceItemsRetrieves all the items that belong to a particular invoice.
updateInvoiceItemUpdates the details of the invoice item.

Operation details

This section provides further details on the operations related to invoice items.

Creating an item

The createInvoiceItem operation creates an item.

createInvoiceItem
<billomat.createInvoiceItem>
    <invoiceId>{$ctx:invoiceId}</invoiceId>
    <articleId>{$ctx:articleId}</articleId>
    <unit>{$ctx:unit}</unit>
    <quantity>{$ctx:quantity}</quantity>
    <unitPrice>{$ctx:unitPrice}</unitPrice>
    <taxName>{$ctx:taxName}</taxName>
    <taxRate>{$ctx:taxRate}</taxRate>
    <title>{$ctx:title}</title>
    <description>{$ctx:description}</description>
	<reduction>{$ctx:reduction}</reduction>
</billomat.createInvoiceItem>
Properties
  • invoiceId: The ID of the invoice.
  • articleId: The ID of the article, sets additionally the values from the article on creation.
  • unit: Unit of the item.
  • quantity: Quantity of the item.
  • unitPrice: Price per unit.
  • taxName: Name of the tax.
  • taxRate: Rate of taxation.
  • title: Title of the item.
  • description: Description of the item.
  • reduction: Reduction (absolute or percent: 10/10%).
   Sample request

Following is a sample REST/JSON request that can be handled by the createInvoiceItem operation.

Sample Request for createInvoiceItem
{
    "invoiceId": "354564",
    "articleId": "34343",
    "unit": "2",
    "quantity": "34",
    "unitPrice": "12",
    "taxName": "tax name",
    "taxRate": "23",
    "title": "shirt",
    "description": "gents shirt",
    "reduction": "12",
    "apiUrl": "https://mycompany.billomat.net",
    "apiKey": "735478efc440e219669e243c0fd71840",
    "format":"xml"
}
Related Billomat documentation

http://www.billomat.com/en/api/invoices/items

Retrieving a specific invoice item by its ID

The getInvoiceItem operation retrieves a specific invoice item by its ID.

getInvoiceItem
<billomat.getInvoiceItem>
	<itemId>{$ctx:itemId}</itemId>
</billomat.getInvoiceItem>
Properties
  • itemId: The ID of the item whose details would be retrieved.
   Sample request

Following is a sample REST/JSON request that can be handled by the getInvoiceItem operation.

Sample Request for getInvoiceItem
{
    "itemId": "345465",
    "apiUrl": "https://mycompany.billomat.net",
    "apiKey": "735478efc440e219669e243c0fd71840",
    "format":"xml"
}
Related Billomat documentation

http://www.billomat.com/en/api/invoices/items

Retrieving all the items that belong to a particular invoice

The listInvoiceItems operation retrieves all the items that belong to a particular invoice.

listInvoiceItems
<billomat.listInvoiceItems>
    <invoiceId>{$ctx:invoiceId}</invoiceId>
    <page>{$ctx:page}</page>
    <perPage>{$ctx:perPage}</perPage>
	<orderBy>{$ctx:orderBy}</orderBy>
</billomat.listInvoiceItems>
Properties
  • invoiceId: The ID of the invoice.
  • page: Number of the page to return. Applies for paginated response.
  • perPage: Number of entries to return per page when results are paginated.
  • orderBy: Sorting orders to retrieve invoice items.
   Sample request

Following is a sample REST/JSON request that can be handled by the listInvoiceItems operation.

Sample Request for listInvoiceItems
{
    "invoiceId": "124345",
    "page": "1",
    "perPage": "1",
    "apiUrl": "https://mycompany.billomat.net",
    "apiKey": "735478efc440e219669e243c0fd71840",
    "format":"xml",
    "orderBy":"id+DESC"
}
Related Billomat documentation

http://www.billomat.com/en/api/invoices/items

Updating the details of the invoice item

The updateInvoiceItem operation updates the details of the invoice item.

updateInvoiceItem
<billomat.updateInvoiceItem>
    <articleId>{$ctx:articleId}</articleId>
    <unit>{$ctx:unit}</unit>
    <quantity>{$ctx:quantity}</quantity>
    <unitPrice>{$ctx:unitPrice}</unitPrice>
    <taxName>{$ctx:taxName}</taxName>
    <taxRate>{$ctx:taxRate}</taxRate>
    <title>{$ctx:title}</title>
    <description>{$ctx:description}</description>
    <reduction>{$ctx:reduction}</reduction>
	<itemId>{$ctx:itemId}</itemId>
</billomat.updateInvoiceItem>
Properties
  • articleId: The ID of the article, sets additionally the values from the article on creation.
  • unit: Unit of the item.
  • quantity: Quantity of the item.
  • unitPrice: Price per unit.
  • taxName: Name of the tax.
  • taxRate: Rate of taxation.
  • title: Title of the item.
  • description: Description of the item.
  • reduction: Reduction (absolute or percent: 10/10%).
  • itemId: The ID of the item to update.
   Sample request

Following is a sample REST/JSON request that can be handled by the updateInvoiceItem operation.

Sample Request for updateInvoiceItem
{
    "invoiceId": "354564",
    "articleId": "34343",
    "unit": "2",
    "quantity": "34",
    "unitPrice": "12",
    "taxName": "tax name",
    "taxRate": "23",
    "title": "shirt",
    "description": "gents shirt",
    "reduction": "12",
    "itemId": "232323",
    "apiUrl": "https://mycompany.billomat.net",
    "apiKey": "735478efc440e219669e243c0fd71840",
    "format":"xml"
}
Related Billomat documentation

http://www.billomat.com/en/api/invoices/items

Sample configuration

Following is a sample proxy service that illustrates how to connect to Billomat with the init operation and use the createInvoiceItem operation. The sample request for this proxy can be found in the createInvoiceItem sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="billomat_createInvoiceItem" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiKey" expression="json-eval($.apiKey)"/>
         <property name="invoiceId" expression="json-eval($.invoiceId)"/>
         <property name="articleId" expression="json-eval($.articleId)"/>
         <property name="unit" expression="json-eval($.unit)"/>
         <property name="quantity" expression="json-eval($.quantity)"/>
         <property name="unitPrice" expression="json-eval($.unitPrice)"/>
         <property name="taxName" expression="json-eval($.taxName)"/>
         <property name="taxRate" expression="json-eval($.taxRate)"/>
         <property name="title" expression="json-eval($.title)"/>
         <property name="description" expression="json-eval($.description)"/>
         <property name="reduction" expression="json-eval($.reduction)"/>
         <property name="format" expression="json-eval($.format)"/>
         <billomat.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
			<format>{$ctx:format}</format>
         </billomat.init>
         <billomat.createInvoiceItem>
            <invoiceId>{$ctx:invoiceId}</invoiceId>
            <articleId>{$ctx:articleId}</articleId>
            <unit>{$ctx:unit}</unit>
            <quantity>{$ctx:quantity}</quantity>
            <unitPrice>{$ctx:unitPrice}</unitPrice>
            <taxName>{$ctx:taxName}</taxName>
            <taxRate>{$ctx:taxRate}</taxRate>
            <title>{$ctx:title}</title>
            <description>{$ctx:description}</description>
            <reduction>{$ctx:reduction}</reduction>
         </billomat.createInvoiceItem>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>