PUT /V1/inventory/stocks/{stockId}
curl \
-X PUT https://magento2.winkelstraat.mac/rest/all/V1/inventory/stocks/{stockId} \
-d '{"stock":{"stock_id":42,"name":"string","extension_attributes":{"sales_channels":[{"type":"string","code":"string","extension_attributes":{}}]}}}'
Request examples
{
"stock": {
"stock_id": 42,
"name": "string",
"extension_attributes": {
"sales_channels": [
{
"type": "string",
"code": "string",
"extension_attributes": {}
}
]
}
}
}
Response examples (200)
42
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 (400)
{
"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"
}