ICAvailable(SourceModule=String, SourceID=Number, LineID=Number, DocumentClass=String[, QuantitySupplied=Number, CustomerCode=String, UOMCode=String, QuantityOrdered=Number], AfterLines=Number): Object
IC Available Web Service Action returns the availability of stock.
ICAvailable function syntax has these named arguments:
Parameter |
Description |
SourceModule |
Required. Module requesting the stock availability. |
SourceID |
Required. The document ID within the source module. |
LineID |
Required. The document Line number. |
DocumentClass |
Required. The class of document requesting the availability. |
QuantitySupplied |
Optional. The number supplied. |
CustomerCode |
Optional. The document customer code. Used to determine if back ordering is acceptable. |
UOMCode |
Optional The product UOM code. |
QuantityOrdered |
Optional. The number ordered. |
AfterLines |
Required. This is made up of:
|
A sample request is:
{
"SourceModule":"IN",
"SourceID":-1,
"DocumentClass": "I",
"LineID":-1,
"QuantitySupplied":0,
"AfterLines":
[{"LineID":-1,"LineType":"A", "ProductCode":"BEDSUITE", "LocationCode":"CHCH", "QuantitySupplied":2}
]
}
The Results response returned contains an array of lines with the following:
Field |
Description |
LineID |
Response line ID. |
ProductCode |
Product code. |
LocationCode |
Location of the product. |
QuantitySupplied |
Quantity of the product supplied. |
QuantityAvailable |
Quantity of the product available at the location. |
Message |
Any message returned regarding product quantities. |
A sample response is:
{
"Results": [{
"LineID": 2461,
"ProductCode": "1.8MWARDROBE",
"LocationCode": "CHCH",
"QuantitySupplied": 17,
"QuantityAvailable": 2,
"Message": "Insufficient Product '1.8MWARDROBE'"
}]
}
See Web Service Functions for sample code to access Web Services.