application/json
PUT
/V1/coupons/{couponId}
cURL (application/json)
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/coupons/{couponId}' \
--header "Content-Type: application/json" \
--data '{"coupon":{"coupon_id":42,"rule_id":42,"code":"string","usage_limit":42,"usage_per_customer":42,"times_used":42,"expiration_date":"string","is_primary":true,"created_at":"string","type":42,"extension_attributes":{}}}'
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/coupons/{couponId}' \
--header "Content-Type: application/xml"
Request examples
{
"coupon": {
"coupon_id": 42,
"rule_id": 42,
"code": "string",
"usage_limit": 42,
"usage_per_customer": 42,
"times_used": 42,
"expiration_date": "string",
"is_primary": true,
"created_at": "string",
"type": 42,
"extension_attributes": {}
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<coupon>
<coupon-id type="integer">42</coupon-id>
<rule-id type="integer">42</rule-id>
<code>string</code>
<usage-limit type="integer">42</usage-limit>
<usage-per-customer type="integer">42</usage-per-customer>
<times-used type="integer">42</times-used>
<expiration-date>string</expiration-date>
<is-primary type="boolean">true</is-primary>
<created-at>string</created-at>
<type type="integer">42</type>
<extension-attributes>
</extension-attributes>
</coupon>
</root>
Response examples (200)
{
"coupon_id": 42,
"rule_id": 42,
"code": "string",
"usage_limit": 42,
"usage_per_customer": 42,
"times_used": 42,
"expiration_date": "string",
"is_primary": true,
"created_at": "string",
"type": 42,
"extension_attributes": {}
}
Response examples (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<coupon-id type="integer">42</coupon-id>
<rule-id type="integer">42</rule-id>
<code>string</code>
<usage-limit type="integer">42</usage-limit>
<usage-per-customer type="integer">42</usage-per-customer>
<times-used type="integer">42</times-used>
<expiration-date>string</expiration-date>
<is-primary type="boolean">true</is-primary>
<created-at>string</created-at>
<type type="integer">42</type>
<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 (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 (400)
<?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 (500)
{
"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 (500)
<?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>