Body
-
CouponGenerationSpecInterface
POST /V1/coupons/generate
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/coupons/generate \
-d '{"couponSpec":{"rule_id":42,"format":"string","quantity":42,"length":42,"prefix":"string","suffix":"string","delimiter_at_every":42,"delimiter":"string","extension_attributes":{}}}'
Request examples
{
"couponSpec": {
"rule_id": 42,
"format": "string",
"quantity": 42,
"length": 42,
"prefix": "string",
"suffix": "string",
"delimiter_at_every": 42,
"delimiter": "string",
"extension_attributes": {}
}
}
Response examples (200)
[
"string"
]
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 (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"
}