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 Line Items in TradeGecko
The
operation creates a new invoice line item.createInvoiceLineItem
createInvoiceLineItem
<tradegecko.createInvoiceLineItem> <quantity>{$ctx:quantity}</quantity> <position>{$ctx:position}</position> <invoiceId>{$ctx:invoiceId}</invoiceId> <orderLineItemId>{$ctx:orderLineItemId}</orderLineItemId> <ledgerAccountId>{$ctx:ledgerAccountId}</ledgerAccountId> </tradegecko.createInvoiceLineItem>
Properties
The quantity for the line item.quantity:
The position of the line item on the invoice.position:
Required - The ID of the invoice to add the line item to.InvoiceId:
The ID of the line item to add.orderLineItemId:
The ID of the ledger account related to the invoice.ledgerAccountId:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.createInvoiceLineItem
Sample Request for createInvoiceLineItem
{ "apiUrl":"https://api.tradegecko.com", "accessToken":"999317c11a0dfaabc10ca6fb691ff49a067c6fba602f1a0c989648964bed2783", "quantity" : "0.1", "position" : "1", "invoiceId" : "355172", "orderLineItemId" : "1485642", "ledgerAccountId" : "54321" }
Related TradeGecko documentation
http://developer.tradegecko.com/api/invoice-line-item/
Sample configuration
Following is a sample proxy service that illustrates how to connect to TradeGecko with the init
operation and use the createInvoiceLineItem
operation. The sample request for this proxy can be found in createInvoiceLineItem sample request.
Sample Proxy
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="tradegecko_createInvoiceLineItem" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="quantity" expression="json-eval($.quantity)"/> <property name="position" expression="json-eval($.position)"/> <property name="invoiceId" expression="json-eval($.invoiceId)"/> <property name="orderLineItemId" expression="json-eval($.orderLineItemId)"/> <property name="ledgerAccountId" expression="json-eval($.ledgerAccountId)"/> <tradegecko.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <accessToken>{$ctx:accessToken}</accessToken> </tradegecko.init> <tradegecko.createInvoiceLineItem> <quantity>{$ctx:quantity}</quantity> <position>{$ctx:position}</position> <invoiceId>{$ctx:invoiceId}</invoiceId> <orderLineItemId>{$ctx:orderLineItemId}</orderLineItemId> <ledgerAccountId>{$ctx:ledgerAccountId}</ledgerAccountId> </tradegecko.createInvoiceLineItem> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>