Update downloadable link of the given product (link type and its resources cannot be changed)
application/json
PUT
/V1/products/{sku}/downloadable-links/{id}
cURL (application/json)
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/products/{sku}/downloadable-links/{id}' \
--header "Content-Type: application/json" \
--data '{"link":{"id":42,"title":"string","sort_order":42,"is_shareable":42,"price":42.0,"number_of_downloads":42,"link_type":"string","link_file":"string","link_file_content":{"file_data":"string","name":"string","extension_attributes":{}},"link_url":"string","sample_type":"string","sample_file":"string","sample_file_content":{"file_data":"string","name":"string","extension_attributes":{}},"sample_url":"string","extension_attributes":{}},"isGlobalScopeContent":true}'
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/products/{sku}/downloadable-links/{id}' \
--header "Content-Type: application/xml"
Request examples
{
"link": {
"id": 42,
"title": "string",
"sort_order": 42,
"is_shareable": 42,
"price": 42.0,
"number_of_downloads": 42,
"link_type": "string",
"link_file": "string",
"link_file_content": {
"file_data": "string",
"name": "string",
"extension_attributes": {}
},
"link_url": "string",
"sample_type": "string",
"sample_file": "string",
"sample_file_content": {
"file_data": "string",
"name": "string",
"extension_attributes": {}
},
"sample_url": "string",
"extension_attributes": {}
},
"isGlobalScopeContent": true
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<link>
<id type="integer">42</id>
<title>string</title>
<sort-order type="integer">42</sort-order>
<is-shareable type="integer">42</is-shareable>
<price type="float">42.0</price>
<number-of-downloads type="integer">42</number-of-downloads>
<link-type>string</link-type>
<link-file>string</link-file>
<link-file-content>
<file-data>string</file-data>
<name>string</name>
<extension-attributes>
</extension-attributes>
</link-file-content>
<link-url>string</link-url>
<sample-type>string</sample-type>
<sample-file>string</sample-file>
<sample-file-content>
<file-data>string</file-data>
<name>string</name>
<extension-attributes>
</extension-attributes>
</sample-file-content>
<sample-url>string</sample-url>
<extension-attributes>
</extension-attributes>
</link>
<isGlobalScopeContent type="boolean">true</isGlobalScopeContent>
</root>
Response examples (200)
42
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 (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>