Skip to content

Insert of article

Request

Creates a new article.

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/articles \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "title": "Test",
      "language": "cs",
      "defaultSectionId": 682,
      "sectionIds": [
        682
      ],
      "indexName": "test",
      "redirectUrl": "https://www.someurl.com",
      "content": "<p>Content of the article</p>",
      "metaTitle": "Test article",
      "metaKeywords": "test",
      "metaDescription": "Test article",
      "publishDate": "2018-05-29T09:02:27",
      "visible": true,
      "access": "logged-in",
      "sourceImageName": "image.png",
      "sourceOgImageName": "image.png"
    }
  }'

Responses

Created

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