Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create Product Draft

Creates a new draft changeset for a product. Only one draft can exist per product at a time. Optionally schedules automatic publication at a future time.

POST/api/v1/{team_slug}/{app_slug}/products/{product_id}/draft
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
app_slugstringrequired

App slug

team_slugstringrequired

Team slug

product_idstringrequired

Product ID

Request body
requiredapplication/json

Draft changeset and optional publish_at

changesetgithub_com_enadhq_nabbit_internal_pkg_webserver_models.ProductDraftChangesetrequired
Show properties
attributesstring[]
categoriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.DraftCategoryRef[]
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.DraftCategoryRef
idstring
is_main_categoryboolean
orderinteger
collectionsstring[]
descriptionstring
html_descriptionstring
html_short_descriptionstring
imagesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.DraftImageRef[]
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.DraftImageRef
idstring
priorityinteger
meta_descriptionstring
meta_titlestring
namestring
short_descriptionstring
tagsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.DraftTagRef[]
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.DraftTagRef
keystring
orderinteger
publish_atstring
Responses
201

Draft created successfully

datagithub_com_enadhq_nabbit_internal_pkg_webserver_models.ProductDraftrequired
Show properties
app_idstring
changesetgithub_com_enadhq_nabbit_internal_pkg_webserver_models.ProductDraftChangeset
Show properties
attributesstring[]
categoriesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.DraftCategoryRef[]
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.DraftCategoryRef
idstring
is_main_categoryboolean
orderinteger
collectionsstring[]
descriptionstring
html_descriptionstring
html_short_descriptionstring
imagesgithub_com_enadhq_nabbit_internal_pkg_webserver_models.DraftImageRef[]
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.DraftImageRef
idstring
priorityinteger
meta_descriptionstring
meta_titlestring
namestring
short_descriptionstring
tagsgithub_com_enadhq_nabbit_internal_pkg_webserver_models.DraftTagRef[]
Show properties
Array of github_com_enadhq_nabbit_internal_pkg_webserver_models.DraftTagRef
keystring
orderinteger
created_atstring
idstring
product_idstring
publish_atstring | null
updated_atstring | null
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
400

Invalid request (e.g. validation error)

detailsstring[]
messagestring
successbooleanrequired
401

Unauthorized access

detailsstring[]
messagestring
successbooleanrequired
409

A draft already exists for this product

detailsstring[]
messagestring
successbooleanrequired
500

Internal server error

detailsstring[]
messagestring
successbooleanrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v1/string/string/products/string/draft' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "changeset": {
    "attributes": [
      "string"
    ],
    "categories": [
      {
        "id": "string",
        "is_main_category": true,
        "order": 0
      }
    ],
    "collections": [
      "string"
    ],
    "description": "string",
    "html_description": "string",
    "html_short_description": "string",
    "images": [
      {
        "id": "string",
        "priority": 0
      }
    ],
    "meta_description": "string",
    "meta_title": "string",
    "name": "string",
    "short_description": "string",
    "tags": [
      {
        "key": "string",
        "order": 0
      }
    ]
  },
  "publish_at": "string"
}'
Response
{
  "data": {
    "app_id": "string",
    "changeset": {
      "attributes": [
        "string"
      ],
      "categories": [
        {
          "id": "string",
          "is_main_category": true,
          "order": 0
        }
      ],
      "collections": [
        "string"
      ],
      "description": "string",
      "html_description": "string",
      "html_short_description": "string",
      "images": [
        {
          "id": "string",
          "priority": 0
        }
      ],
      "meta_description": "string",
      "meta_title": "string",
      "name": "string",
      "short_description": "string",
      "tags": [
        {
          "key": "string",
          "order": 0
        }
      ]
    },
    "created_at": "string",
    "id": "string",
    "product_id": "string",
    "publish_at": "string",
    "updated_at": "string"
  },
  "details": [
    "string"
  ],
  "success": true
}