POST /V1/coupons
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/coupons \
-d '{"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
{
"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": {}
}
}
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 (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 (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 (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}