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
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discussions-posts
- https://api.myshoptet.comhttps://api.myshoptet.com/api/discussions-posts
- shoptetAccessToken
- shoptetPrivateApiToken
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
}
]
}'Response
{ "data": {}, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }