Post v1 inventory sourceselectionalgorithmresult
Body
-
Request products in a given Qty and StockId
POST /V1/inventory/source-selection-algorithm-result
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/inventory/source-selection-algorithm-result \
-d '{"inventoryRequest":{"stock_id":42,"items":[{"sku":"string","qty":42.0,"extension_attributes":{}}],"extension_attributes":{"destination_address":{"country":"string","postcode":"string","street":"string","region":"string","city":"string"}}},"algorithmCode":"string"}'
Request examples
{
"inventoryRequest": {
"stock_id": 42,
"items": [
{
"sku": "string",
"qty": 42.0,
"extension_attributes": {}
}
],
"extension_attributes": {
"destination_address": {
"country": "string",
"postcode": "string",
"street": "string",
"region": "string",
"city": "string"
}
}
},
"algorithmCode": "string"
}
Response examples (200)
{
"source_selection_items": [
{
"source_code": "string",
"sku": "string",
"qty_to_deduct": 42.0,
"qty_available": 42.0,
"extension_attributes": {}
}
],
"shippable": true,
"extension_attributes": {}
}
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}