Create a new product

POST /Api/Products

Requires verified email; Requires one of the following permissions: Shop.CreateProduct; Requires the following features to be enabled: Shop

Body

  • name string Required

    Minimum length is 1, maximum length is 255.

  • description string Required

    Minimum length is 1, maximum length is 255.

  • richTextContent string Required

    Minimum length is 1.

  • visible boolean Required
  • qrCodeActivated boolean Required
  • qrCodes array[integer(int32)] Required
  • price integer(int32) Required

    Minimum value is 0.

  • quantity integer(int32) Required

    Minimum value is 0.

  • userLimited boolean Required
  • userLimit integer(int32) Required

    Minimum value is 0.

  • inputs array[object] Required
    Hide inputs attributes Show inputs attributes object
    • type string Required

      Minimum length is 1.

    • key string Required

      Minimum length is 1. Format should match the following pattern: ^[a-zA-Z][a-zA-Z0-9_]*$.

    • label string Required

      Minimum length is 1, maximum length is 255.

    • Additional properties are NOT allowed
  • notifiedEmails array[string(email)] Required
  • thumbnailUrl string Required

    Minimum length is 1.

  • Additional properties are NOT allowed

Body

  • name string Required

    Minimum length is 1, maximum length is 255.

  • description string Required

    Minimum length is 1, maximum length is 255.

  • richTextContent string Required

    Minimum length is 1.

  • visible boolean Required
  • qrCodeActivated boolean Required
  • qrCodes array[integer(int32)] Required
  • price integer(int32) Required

    Minimum value is 0.

  • quantity integer(int32) Required

    Minimum value is 0.

  • userLimited boolean Required
  • userLimit integer(int32) Required

    Minimum value is 0.

  • inputs array[object] Required
    Hide inputs attributes Show inputs attributes object
    • type string Required

      Minimum length is 1.

    • key string Required

      Minimum length is 1. Format should match the following pattern: ^[a-zA-Z][a-zA-Z0-9_]*$.

    • label string Required

      Minimum length is 1, maximum length is 255.

    • Additional properties are NOT allowed
  • notifiedEmails array[string(email)] Required
  • thumbnailUrl string Required

    Minimum length is 1.

  • Additional properties are NOT allowed

Body

  • name string Required

    Minimum length is 1, maximum length is 255.

  • description string Required

    Minimum length is 1, maximum length is 255.

  • richTextContent string Required

    Minimum length is 1.

  • visible boolean Required
  • qrCodeActivated boolean Required
  • qrCodes array[integer(int32)] Required
  • price integer(int32) Required

    Minimum value is 0.

  • quantity integer(int32) Required

    Minimum value is 0.

  • userLimited boolean Required
  • userLimit integer(int32) Required

    Minimum value is 0.

  • inputs array[object] Required
    Hide inputs attributes Show inputs attributes object
    • type string Required

      Minimum length is 1.

    • key string Required

      Minimum length is 1. Format should match the following pattern: ^[a-zA-Z][a-zA-Z0-9_]*$.

    • label string Required

      Minimum length is 1, maximum length is 255.

    • Additional properties are NOT allowed
  • notifiedEmails array[string(email)] Required
  • thumbnailUrl string Required

    Minimum length is 1.

  • Additional properties are NOT allowed

Responses

  • 201 application/json

    Created

    Hide response attributes Show response attributes object
    • id integer(int32)
    • name string | null
    • description string | null
    • richTextContent string | null
    • visible boolean
    • qrCodeActivated boolean
    • qrCodes array[integer(int32)] | null
    • price integer(int32)
    • quantity integer(int32)
    • userLimited boolean
    • userLimit integer(int32)
    • inputs array[object] | null
      Hide inputs attributes Show inputs attributes object
      • type string | null
      • key string | null
      • label string | null
      • Additional properties are NOT allowed
    • notifiedEmails array[string] | null
    • thumbnailUrl string | null
    • Additional properties are NOT allowed
  • 401

    Unauthorized

  • 403

    Forbidden

curl \
 -X POST https://app.lovassy.hu/Api/Products \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","description":"string","richTextContent":"string","visible":true,"qrCodeActivated":true,"qrCodes":[42],"price":42,"quantity":42,"userLimited":true,"userLimit":42,"inputs":[{"type":"string","key":"string","label":"string"}],"notifiedEmails":["hello@example.com"],"thumbnailUrl":"string"}'
curl \
 -X POST https://app.lovassy.hu/Api/Products \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: text/json"
curl \
 -X POST https://app.lovassy.hu/Api/Products \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/*+json"
Request example
{
  "name": "string",
  "description": "string",
  "richTextContent": "string",
  "visible": true,
  "qrCodeActivated": true,
  "qrCodes": [
    42
  ],
  "price": 42,
  "quantity": 42,
  "userLimited": true,
  "userLimit": 42,
  "inputs": [
    {
      "type": "string",
      "key": "string",
      "label": "string"
    }
  ],
  "notifiedEmails": [
    "hello@example.com"
  ],
  "thumbnailUrl": "string"
}
Request examples
{
  "name": "string",
  "description": "string",
  "richTextContent": "string",
  "visible": true,
  "qrCodeActivated": true,
  "qrCodes": [
    42
  ],
  "price": 42,
  "quantity": 42,
  "userLimited": true,
  "userLimit": 42,
  "inputs": [
    {
      "type": "string",
      "key": "string",
      "label": "string"
    }
  ],
  "notifiedEmails": [
    "hello@example.com"
  ],
  "thumbnailUrl": "string"
}
Request examples
{
  "name": "string",
  "description": "string",
  "richTextContent": "string",
  "visible": true,
  "qrCodeActivated": true,
  "qrCodes": [
    42
  ],
  "price": 42,
  "quantity": 42,
  "userLimited": true,
  "userLimit": 42,
  "inputs": [
    {
      "type": "string",
      "key": "string",
      "label": "string"
    }
  ],
  "notifiedEmails": [
    "hello@example.com"
  ],
  "thumbnailUrl": "string"
}
Response examples (201)
{
  "id": 42,
  "name": "string",
  "description": "string",
  "richTextContent": "string",
  "visible": true,
  "qrCodeActivated": true,
  "qrCodes": [
    42
  ],
  "price": 42,
  "quantity": 42,
  "userLimited": true,
  "userLimit": 42,
  "inputs": [
    {
      "type": "string",
      "key": "string",
      "label": "string"
    }
  ],
  "notifiedEmails": [
    "string"
  ],
  "thumbnailUrl": "string"
}