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 Stock Adjustment Line Items in TradeGecko
The
operation creates a new stock adjustment line item.createStockAdjustmentLine
createStockAdjustmentLineItem
<tradegecko.createStockAdjustmentLineItem> <stockAdjustmentId>{$ctx:stockAdjustmentId}</stockAdjustmentId> <stockAdjustmentLineItemId>{$ctx:stockAdjustmentLineItemId}</stockAdjustmentLineItemId> <variantId>{$ctx:variantId}</variantId> <quantity>{$ctx:quantity}</quantity> <position>{$ctx:position}</position> </tradegecko.createStockAdjustmentLineItem>
Properties
The ID of the parent stock adjustment.stockAdjustmentId:
Required - The line item ID to be changed.stockAdjustmentLineItemId:
The variant ID for the line item.variantId:
The quantity for the stock line item.quantity:
The position of the line item.position:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.createStockAdjustmentLineItem
Sample Request for createStockAdjustmentLineItem
{ "apiUrl":"https://api.tradegecko.com", "accessToken":"999317c11a0dfaabc10ca6fb691ff49a067c6fba602f1a0c989648964bed2783", "stockAdjustmentId" : "49522", "stockAdjustmentLineItemId" : "313741", "variantId" : "2972234", "quantity" : "2", "position" : "3" }
Related TradeGecko documentation
http://developer.tradegecko.com/api/stock-adjustment-line-item/
Sample configuration
Following is a sample proxy service that illustrates how to connect to TradeGecko with the init
operation and use the createStockAdjustmentLineItem
operation. The sample request for this proxy can be found in createStockAdjustmentLineItem sample request.
Sample Proxy
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="tradegecko_createStockAdjustmentLineItem" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property expression="json-eval($.apiUrl)" name="apiUrl" /> <property expression="json-eval($.accessToken)" name="accessToken" /> <property expression="json-eval($.stockAdjustmentId)" name="stockAdjustmentId"/> <property expression="json-eval($.stockAdjustmentLineItemId)" name="stockAdjustmentLineItemId"/> <property expression="json-eval($.variantId)" name="variantId"/> <property expression="json-eval($.quantity)" name="quantity"/> <property expression="json-eval($.position)" name="position"/> <tradegecko.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <accessToken>{$ctx:accessToken}</accessToken> </tradegecko.init> <tradegecko.createStockAdjustmentLineItem> <stockAdjustmentId>{$ctx:stockAdjustmentId}</stockAdjustmentId> <stockAdjustmentLineItemId>{$ctx:stockAdjustmentLineItemId}</stockAdjustmentLineItemId> <variantId>{$ctx:variantId}</variantId> <quantity>{$ctx:quantity}</quantity> <position>{$ctx:position}</position> </tradegecko.createStockAdjustmentLineItem> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>