Update a product

PATCH /Api/Products/{id}

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

Path parameters

  • id integer(int32) Required

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.

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

    Minimum length is 1.

  • Additional properties are NOT allowed

Responses

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • type string | null
    • title string | null
    • status integer(int32) | null
    • detail string | null
    • instance string | null
    • Additional properties:
  • 204

    No Content

  • 401

    Unauthorized

  • 403

    Forbidden

PATCH /Api/Products/{id}
curl \
 -X PATCH https://app.lovassy.hu/Api/Products/{id} \
 -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 PATCH https://app.lovassy.hu/Api/Products/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: text/json"
curl \
 -X PATCH https://app.lovassy.hu/Api/Products/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/*+json"
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 (404)
{
  "type": "string",
  "title": "string",
  "status": 42,
  "detail": "string",
  "instance": "string"
}