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.
Operation | Description |
---|---|
Creates an item. | |
getInvoiceItem | Retrieves a specific invoice item by its ID. |
listInvoiceItems | Retrieves all the items that belong to a particular invoice. |
updateInvoiceItem | Updates the details of the invoice item. |
Operation details
This section provides further details on the operations related to invoice items.
Creating an item
The
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
The ID of the invoice.invoiceId:
The ID of the article, sets additionally the values from the article on creation.articleId:
Unit of the item.unit:
Quantity of the item.quantity:
Price per unit.unitPrice:
Name of the tax.taxName:
Rate of taxation.taxRate:
Title of the item.title:
Description of the item.description:
Reduction (absolute or percent: 10/10%).reduction:
Sample request
Following is a sample REST/JSON request that can be handled by the createInvoiceItem
operation.
{ "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
operation retrieves a specific invoice item by its ID.getInvoiceItem
<billomat.getInvoiceItem> <itemId>{$ctx:itemId}</itemId> </billomat.getInvoiceItem>
Properties
The ID of the item whose details would be retrieved.itemId:
Sample request
Following is a sample REST/JSON request that can be handled by the getInvoiceItem
operation.
{ "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
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
The ID of the invoice.invoiceId:
Number of the page to return. Applies for paginated response.page:
Number of entries to return per page when results are paginated.perPage:
Sorting orders to retrieve invoice items.orderBy:
Sample request
Following is a sample REST/JSON request that can be handled by the listInvoiceItems
operation.
{ "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
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
The ID of the article, sets additionally the values from the article on creation.articleId:
Unit of the item.unit:
Quantity of the item.quantity:
Price per unit.unitPrice:
Name of the tax.taxName:
Rate of taxation.taxRate:
Title of the item.title:
Description of the item.description:
Reduction (absolute or percent: 10/10%).reduction:
The ID of the item to update.itemId:
Sample request
Following is a sample REST/JSON request that can be handled by the updateInvoiceItem
operation.
{ "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.
<?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>