GET POST | /InventoryLocation/InventoryLocationGet | Gets information on existing inventory locations | Uses your API Key and some Filters in an array format and returns the search results using the given filters.
Optionally, you can use ReturnTopNRecords to limit the number of the results to the specified number (omit, or add ReturnTopNRecords = -1 to get all the available results). The ReturnTopNRecords chooses the top records in a InventoryLocationID descending order.
A. Get all the existing locations (as mvInventoryLocation objects).
Value: {}
Response: {
"mvInventoryLocations": [
{
"InventoryLocationID": 3409,
"InventoryLocationName": "Dropshipping",
"InventoryLocationAbbreviation": "Dr-Sh",
"InventoryLocationAddress": "",
"InventoryLocationCurrencyCode": "USD"
},
{
"InventoryLocationID": 3408,
"InventoryLocationName": "xss",
"InventoryLocationAbbreviation": "xss",
"InventoryLocationAddress": "",
"InventoryLocationCurrencyCode": ""
},
{
"InventoryLocationID": 3407,
"InventoryLocationName": "van1",
"InventoryLocationAbbreviation": "van1",
"InventoryLocationAddress": "",
"InventoryLocationCurrencyCode": "EUR"
},
{
"InventoryLocationID": 3406,
"InventoryLocationName": "outlet 1",
"InventoryLocationAbbreviation": "OL1",
"InventoryLocationAddress": "",
"InventoryLocationCurrencyCode": "EUR"
},
{
"InventoryLocationID": 3405,
"InventoryLocationName": "location",
"InventoryLocationAbbreviation": "loca",
"InventoryLocationAddress": "",
"InventoryLocationCurrencyCode": "EUR"
}
],
"ResponseStatus": {
"ErrorCode": "0"
}
}
B.
Returns the first 2 mvInventoryLocation objects whose ID is greater than 3406 and whose address is empty.
We can add two Filters by using the AndOr operator as shown below:
Value: {
"Filters": [
{
"FieldName": "InventoryLocationAddress",
"SearchOperator": "Equals",
"SearchValue": ""
},
{
"AndOr": "And",
"FieldName": "InventoryLocationID",
"SearchOperator": "GreaterThan",
"SearchValue": 3406
}
],
"ReturnTopNRecords": 2
}
Response: {
"mvInventoryLocations": [
{
"InventoryLocationID": 3409,
"InventoryLocationName": "Dropshipping",
"InventoryLocationAbbreviation": "Dr-Sh",
"InventoryLocationAddress": "",
"InventoryLocationCurrencyCode": "USD"
},
{
"InventoryLocationID": 3408,
"InventoryLocationName": "xss",
"InventoryLocationAbbreviation": "xss",
"InventoryLocationAddress": "",
"InventoryLocationCurrencyCode": ""
} ],
"ResponseStatus": {
"ErrorCode": "0"
}
}
|
---|