The createStockAdjustmentLine
operation creates a new stock adjustment line item.
Code Block |
---|
language | xml |
---|
title | 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
stockAdjustmentId:
The ID of the parent stock adjustment.stockAdjustmentLineItemId:
Required - The line item ID to be changed.variantId:
The variant ID for the line item.quantity:
The quantity for the stock line item.position:
The position of the line item.
Sample requestFollowing is a sample REST/JSON request that can be handled by the createStockAdjustmentLineItem
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for createStockAdjustmentLineItem |
---|
|
{
"apiUrl":"https://api.tradegecko.com",
"accessToken":"999317c11a0dfaabc10ca6fb691ff49a067c6fba602f1a0c989648964bed2783",
"stockAdjustmentId" : "49522",
"stockAdjustmentLineItemId" : "313741",
"variantId" : "2972234",
"quantity" : "2",
"position" : "3"
} |
http://developer.tradegecko.com/api/stock-adjustment-line-item/
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configurationFollowing 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.
Code Block |
---|
language | xml |
---|
title | 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> |