Skip to content

Creation of discussion posts

Request

Allows the creation of multiple discussion posts at once. The limit of items per request is defined to 100.

Discussions can be created for: products, articles, and pages. Requires "discussion" module to be active.

Request is processing all the items. If there are some errors in item definitions, only these items are skipped and summarized in response errors. Valid items are processed even if some error items are skipped.

If at least one item is processed successfully, the response code is 201. If all the items contain errors, the response code is 400. If basic validation of items fails, the response code is 422 and the request is not processed.

Security
shoptetAccessToken or shoptetPrivateApiToken
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataArray of objects, <= 100 itemsrequired
curl -i -X POST \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discussions-posts \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": [
      {
        "parentId": 1,
        "productGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
        "articleId": 2,
        "pageId": 3,
        "customerGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
        "name": "John Doe",
        "email": "john.doe@example.com",
        "title": "Some title",
        "content": "Some content",
        "creationDate": "2018-05-29T09:02:27+0200",
        "authorized": true
      }
    ]
  }'

Responses

Created

Bodyapplication/json
dataobject or null
errorsArray of objects or null(Errors)
metadataobject(Metadata)
Response
{ "data": {}, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }