Skip to main content

Mutations

See Types for further information regarding complex objects specified in any of our interfaces.

globalPropertyConfigurationCreate​

Create a new global property configuration.

Output​

TypeDescription
GlobalPropertyConfigurationThe created global property configuration.

Example​

mutation {
globalPropertyConfigurationCreate {
id
}
}

globalPropertyConfigurationUpdate​

Update an existing global property configuration.

Arguments​

NameTypeDescription
idString!ID of the global property configuration to update.
nameStringHuman-readable name for this configuration.
aspects[GlobalPropertyConfigurationAspectInput]!New values for the configuration's list of aspects.

Output​

TypeDescription
GlobalPropertyConfigurationThe updated global property configuration.

Example​

mutation {
globalPropertyConfigurationUpdate(id: "00000000-0000-0000-0000-000000000000", aspects: []) {
id
}
}

globalPropertyStateCreate​

Create a new global property state.

Arguments​

NameTypeDescription
bundleIdStringID of a bundle that has shared state.

Output​

TypeDescription
GlobalPropertyStateThe created global property state.

Example​

mutation {
globalPropertyStateCreate(bundleId: "00000000-0000-0000-0000-000000000000") {
id
}
}

globalPropertyStateUpdate​

Update an existing global property state.

Arguments​

NameTypeDescription
idString!ID of the global property state to update.
aspects[GlobalPropertyConfigurationStateInput]!New values for the state's list of aspects.

Output​

TypeDescription
GlobalPropertyStateThe updated global property state.

Example​

mutation {
globalPropertyStateUpdate(
id: "00000000-0000-0000-0000-000000000000"
aspects: [{ name: "text", value: "Happy birthday!" }]
) {
id
}
}

metafieldConfigurationCreate​

Create a new metafield configuration.

Arguments​

NameTypeDescription
nameString!The name of the new configuration.
entityTypeString!The type of entity that the new configuration is for. Supported types: Asset, Integration, Product, Variant, Workflow, WorkflowStep
metafieldTypeString!The type of value that metafields for the new configuration may accept. Supported Types: Boolean, Integer, Text
descriptionStringA description of the new configuration.

Output​

TypeDescription
MetafieldConfigurationThe created metafield configuration.

Example​

mutation {
metafieldConfigurationCreate(
name: "Size"
entityType: "Product"
metafieldType: "Text"
description: "The size of this product"
) {
id
}
}

metafieldConfigurationDelete​

Delete a metafield configuration.

Arguments​

NameTypeDescription
idString!The ID of the configuration to delete.

Output​

TypeDescription
StringThe ID of the deleted configuration.

Example​

mutation {
metafieldConfigurationDelete(id: "00000000-0000-0000-0000-000000000000")
}

metafieldConfigurationUpdate​

Update an existing metafield configuration.

Arguments​

NameTypeDescription
idString!The ID of the configuration to update.
nameStringAn updated name for the configuration.
descriptionStringAn updated description of the configuration.

Output​

TypeDescription
MetafieldConfigurationThe updated configuration.

Example​

mutation {
metafieldConfigurationUpdate(id: "00000000-0000-0000-0000-000000000000", name: "outdated") {
id
}
}

metafieldCreate​

Create a new metafield.

Arguments​

NameTypeDescription
entityIdString!The ID of the entity to add a metafield to.
metafieldConfigurationIdString!The ID of the metafield configuration to use for this metafield.
valueString!The serialized JSON of the value for this metafield.
note

IDs for entities of type WorkflowStep must be formed by combining the ID of the workflow and the step name with an underscore, e.g. for a step aaaabbbb-aaaa-aaaa-aaaa-aaaabbbbcccc inside workflow ddddeeee-dddd-dddd-dddd-ddddeeeeffff the entity ID would be ddddeeee-dddd-dddd-dddd-ddddeeeeffff_aaaabbbb-aaaa-aaaa-aaaa-aaaabbbbcccc.

Output​

TypeDescription
MetafieldThe created metafield.

Example​

mutation {
metafieldCreate(
entityId: "00000000-0000-0000-0000-000000000000"
metafieldConfigurationId: "00000000-0000-0000-0000-000000000000"
value: "\"small\""
) {
id
}
}

metafieldDelete​

Delete a metafield.

Arguments​

NameTypeDescription
idString!The ID of the metafield to delete.

Output​

TypeDescription
StringThe ID of the deleted metafield.

Example​

mutation {
metafieldDelete(id: "00000000-0000-0000-0000-000000000000")
}

metafieldUpdate​

Update an existing metafield.

Arguments​

NameTypeDescription
idString!The ID of the metafield to update.
valueString!The serialized JSON of the new value for the given metafield.

Output​

TypeDescription
MetafieldThe updated metafield.

Example​

mutation {
metafieldUpdate(id: "00000000-0000-0000-0000-000000000000", value: "\"medium\"") {
id
}
}

orderCreate​

Create a new order in our system. This will display on the orders page of the relevant partner & fire any configured fulfillment logic as well.

Arguments​

NameTypeDescription
externalIdStringAn identifier used to reference an order in an external order management platform.
internalIdStringAn internal identifier useful for situations where you need additional granularity over order ID when viewing orders in our backend portal.
orderItems[OrderItemInput]A list of OrderItemInput objects.
externalDataExternalDataInputA special metadata object references any additional information that may have been provided by an external system and should be bundled with the order itself
paidBooleanWhether to mark the newly created order as having been paid for by the customer.

Output​

TypeDescription
OrderThe newly created order.

Example​

mutation {
orderCreate(
externalId: "ext-123"
orderItems: [{ amountToOrder: 2, transactionId: "00000000-0000-0000-0000-000000000000" }]
internalId: "int-123"
externalData: { orderNumber: "123" }
) {
id
lineItems {
id
quantity
createdAt
}
}
}

orderCreateSimpleAsync​

Create a new order, without needing to create separate transactions beforehand, by specifying all the information about the order in one request.

Arguments​

NameTypeDescription
bundleOrderSimpleBundleInputIf present, details of the bundle to create and add the line items to.
externalIdStringAn identifier used to reference an order in an external order management platform.
orderItems[OrderSimpleItemInput]!A list of OrderSimpleItemInput items.
orderStatusIdStringThe ID of an order status to assign to the newly created order.
paidBooleanWhether to mark the newly created order as having been paid for by the customer.
tagsStringA string of comma-separated tags.

Output​

TypeDescription
BooleanWhether the request to place the order was made successfully.

Example​

mutation {
orderCreateSimpleAsync(externalId: "ext-123", orderItems: [])
}

orderStatusCreate​

Create an order status.

Arguments​

NameTypeDescription
nameString!The name of the new order status.

Output​

TypeDescription
OrderStatusThe created order status.

Example​

mutation {
orderStatusCreate(name: "Ready") {
id
name
}
}

orderStatusDelete​

Delete an order status.

Arguments​

NameTypeDescription
idString!The ID of the order status.

Output​

TypeDescription
StringThe ID of the deleted order.

Example​

mutation {
orderStatusDelete(id: "00000000-0000-0000-0000-000000000000")
}

orderStatusUpdate​

Update an order status.

Arguments​

NameTypeDescription
idString!The ID of the order status.
nameString!The new name of the order status.

Output​

TypeDescription
OrderStatusThe updated order status.

Example​

mutation {
orderStatusUpdate(id: "00000000-0000-0000-0000-000000000000", name: "Ready") {
id
name
}
}

orderTogglePaid​

Mark or unmark an order as paid.

Arguments​

NameTypeDescription
idString!The ID of the order.

Output​

TypeDescription
OrderThe updated order.

Example​

mutation {
orderTogglePaid(id: "00000000-0000-0000-0000-000000000000") {
id
paid
}
}

processExecutionCreate​

Launch a flow in flight.

Arguments​

| Name | Type | Description | | ------------- | -------- | ------------------------------------------------- | ---------------------------------------------- | | inputs | [String] | The values to feed to the flow's start terminals. | | internalId | | String | A user-supplied ID for the new flow in flight. | | processFlowId | String! | The flow to execute. |

Output​

TypeDescription
ProcessExecutionThe created flow in flight.

Example​

mutation {
processExecutionCreate(processFlowId: "00000000-0000-0000-0000-000000000000", inputs: []) {
id
}
}

processExecutionManualOperationConfirm​

Confirm a manual operation node in a flow in flight.

Arguments​

NameTypeDescription
nodeIdString!ID of the manual operation node.
processExecutionIdString!ID of the flow in flight.

Output​

TypeDescription
ProcessExecutionThe flow in flight.

Example​

mutation {
processExecutionManualOperationConfirm(
processExecutionId: "00000000-0000-0000-0000-000000000000"
nodeId: "00000000-0000-0000-0000-000000000000"
) {
id
}
}

processFlowContextCreate​

Create a new custom flow context.

Arguments​

NameTypeDescription
descriptionStringA human-readable description of the flow context.
inputs[ProcessFlowContextTerminalInput]!Specifications for the start terminals.
nameString!A human-readable name for the flow context.
outputs[ProcessFlowContextTerminalInput]!Specifications for the end terminals.

Output​

TypeDescription
ProcessFlowContextThe created flow context.

Example​

mutation {
processFlowContextCreate(name: "my-new-context", inputs: [], outputs: []) {
id
}
}

processFlowContextDelete​

Delete a custom flow context.

Arguments​

NameTypeDescription
idString!The ID of the flow context to delete.

Output​

TypeDescription
StringThe ID of the deleted flow context.

Example​

mutation {
processFlowContextDelete(id: "00000000-0000-0000-0000-000000000000")
}

processFlowContextUpdate​

Update an existing custom flow context.

Arguments​

NameTypeDescription
descriptionStringA human-readable description of the flow context.
idString!The ID of the flow context to update.
inputs[ProcessFlowContextTerminalInput]!Specifications for the start terminals.
nameString!A human-readable name for the flow context.
outputs[ProcessFlowContextTerminalInput]!Specifications for the end terminals.

Output​

TypeDescription
ProcessFlowContextThe updated flow context.

Example​

mutation {
processFlowContextUpdate(
id: "00000000-0000-0000-0000-000000000000"
name: "my-updated-context"
inputs: []
outputs: []
) {
id
}
}

processFlowCreate​

Create a new flow.

Arguments​

NameTypeDescription
entityIdStringAn optional ID that may be used for conditional operation.
entityTypeStringThe type of entity that owns this flow's entityId.
nameStringA human-readable name for the flow.
processFlowContextIdString!The flow context of this flow.

Output​

TypeDescription
ProcessFlowThe created flow.

Example​

mutation {
processFlowCreate(processFlowContextId: "00000000-0000-0000-0000-000000000000", name: "my-flow") {
id
}
}

processFlowDelete​

Delete a flow.

Arguments​

NameTypeDescription
idString!The ID of the flow to delete.

Output​

TypeDescription
StringThe ID of the deleted flow.

Example​

mutation {
processFlowDelete(id: "00000000-0000-0000-0000-000000000000")
}

processFlowUpdate​

Update an existing flow.

Arguments​

NameTypeDescription
edges[ProcessFlowEdgeInput]!The edges of the flow.
entityIdStringAn optional ID that may be used for conditional operation.
entityTypeStringThe type of entity that owns this flow's entityId.
idString!The ID of the flow to update.
nameStringA human-readable name for the flow.
nodes[ProcessFlowNodeInput]!The nodes of the flow.

Output​

TypeDescription
ProcessFlowThe updated flow.

Example​

mutation {
processFlowUpdate(id: "00000000-0000-0000-0000-000000000000", nodes: [], edges: [], name: "my-updated-flow") {
id
}
}

tagCreate​

Create a new tag.

Arguments​

NameTypeDescription
entityIdString!The ID of the entity to tag.
entityTypeString!The type of entity to tag. Supported types: Asset, Integration, Product, Variant, Workflow, WorkflowStep
nameString!The name of the tag.
note

IDs for entities of type WorkflowStep must be formed by combining the ID of the workflow and the step name with an underscore, e.g. for a step aaaabbbb-aaaa-aaaa-aaaa-aaaabbbbcccc inside workflow ddddeeee-dddd-dddd-dddd-ddddeeeeffff the entity ID would be ddddeeee-dddd-dddd-dddd-ddddeeeeffff_aaaabbbb-aaaa-aaaa-aaaa-aaaabbbbcccc.

Output​

TypeDescription
TagThe created tag.

Example​

mutation {
tagCreate(entityId: "00000000-0000-0000-0000-000000000000", entityType: "Product", name: "t-shirt") {
id
}
}

tagDelete​

Delete a tag.

Arguments​

NameTypeDescription
idString!The ID of the tag to delete.

Output​

TypeDescription
StringThe ID of the deleted tag.

Example​

mutation {
tagDelete(id: "00000000-0000-0000-0000-000000000000")
}

transactionCreate​

Create a new transaction.

Arguments​

NameTypeDescription
integrationProductIdStringID of the integration product to use.
bulkBooleanWhether this is a bulk transaction.

Output​

TypeDescription
TransactionThe newly created transaction.

Example​

mutation {
transactionCreate(integrationProductId: "00000000-0000-0000-0000-000000000000", bulk: false) {
id
}
}

transactionUpdate​

Updates an existing transaction.

Arguments​

NameTypeDescription
designNameStringA name to save against the transaction.
idString!The ID of the transaction to update.
quantityIntThe quantity of the transaction.
workflowIdStringThe ID of the workflow used by this transaction.
workflowStateStringThe new state of the transaction.

Output​

TypeDescription
TransactionThe updated transaction.

Example​

mutation {
transactionUpdate(id: "00000000-0000-0000-0000-000000000000", workflowId: "00000000-0000-0000-0000-000000000000") {
id
}
}