Shops > Workflows > workflowsCreate
Commerce APIShopsWorkflowsworkflowsCreate
workflowsCreate
POST:workflows.json

Description

Create one or multiple workflow endpoints.

Permission bit: "workflows.create"

Topic: Workflows

Arguments

data: [WorkflowCreate!]!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

api_key_id: String

API Key to use for API calls

Example: "ke_EQzGqWoY"

Valid when: api_key_id matches regexp pattern: ^ke_


description: String

Description of the workflow

Valid when: description's length doesn't exceed 4096 characters


enabled: Boolean

Whether this workflow is enabled or not

Example: true


name: String!

Name of the workflow

Example: "Tag orders"

Valid when: name is not empty

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


script: String

A script to execute for the workflow (JavaScript)

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


trigger: String

A trigger

Example: "product.created"

Valid when: trigger's length doesn't exceed 200 characters


Result

[Workflow!]

Preview (typescript)

Loading module