Content > Content Models > contentModelsCreate
Commerce APIContentContent ModelscontentModelsCreate
contentModelsCreate
POST:content_models.json

Description

Create one or multiple content models.

Permission bit: "content_models.create"

Topic: Content Models

Arguments

data: [ContentModelCreate!]!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

json: String!

JSON description of the model (as a string)

Example: "{"type": "string"}"

Valid when: json is not empty

Valid when: json's length doesn't exceed 100000 characters


label: String!

Label of the content model for UI

Example: "Ingredients"

Valid when: label is not empty

Valid when: label's length doesn't exceed 250 characters


name: String!

User provided name of the content, must be unique

Example: "ingredients"

Valid when: name is not empty

Valid when: name's length doesn't exceed 50 characters


Result

[ContentModel!]

Preview (typescript)

Loading module