application/json
POST
/V1/inventory/source-selection-algorithm-result
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/inventory/source-selection-algorithm-result' \
--header "Content-Type: application/json" \
--data '{"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"}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/inventory/source-selection-algorithm-result' \
--header "Content-Type: application/xml"
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"
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<inventoryRequest>
<stock-id type="integer">42</stock-id>
<items type="array">
<item>
<sku>string</sku>
<qty type="float">42.0</qty>
<extension-attributes>
</extension-attributes>
</item>
</items>
<extension-attributes>
<destination-address>
<country>string</country>
<postcode>string</postcode>
<street>string</street>
<region>string</region>
<city>string</city>
</destination-address>
</extension-attributes>
</inventoryRequest>
<algorithmCode>string</algorithmCode>
</root>
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 (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<source-selection-items type="array">
<source-selection-item>
<source-code>string</source-code>
<sku>string</sku>
<qty-to-deduct type="float">42.0</qty-to-deduct>
<qty-available type="float">42.0</qty-available>
<extension-attributes>
</extension-attributes>
</source-selection-item>
</source-selection-items>
<shippable type="boolean">true</shippable>
<extension-attributes>
</extension-attributes>
</root>
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 (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
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"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>