Skip to content

Discount coupons template insertion

Request

Security
shoptetAccessToken or shoptetPrivateApiToken
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discount-coupons/templates \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "title": "product",
      "customerGroupId": 1,
      "categoryGuids": [
        "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed"
      ],
      "brands": [
        "citizen"
      ],
      "productFlags": [
        {
          "code": "akademiks",
          "condition": "required"
        }
      ],
      "productSelectionMode": "specificProducts",
      "productGuids": [
        "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed"
      ]
    }
  }'

Responses

Created

Bodyapplication/json
dataobject
errorsArray of objects or null(Errors)
metadataobject(Metadata)
Response
{ "data": { "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed", "title": "Luxury goods", "customerGroup": {}, "categories": [], "brands": [], "productFlags": [], "productSelectionMode": "parameters", "products": [] }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }