create-draft-order
Generate draft orders in Shopify by specifying line items, customer email, and shipping details. Streamline order creation with structured inputs for accuracy and efficiency.
Instructions
Create a draft order
Input Schema
Name | Required | Description | Default |
---|---|---|---|
Yes | Customer email | ||
lineItems | Yes | Line items to add to the order | |
note | No | Optional note for the order | |
shippingAddress | Yes | Shipping address details |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"email": {
"description": "Customer email",
"format": "email",
"type": "string"
},
"lineItems": {
"description": "Line items to add to the order",
"items": {
"additionalProperties": false,
"properties": {
"quantity": {
"type": "number"
},
"variantId": {
"type": "string"
}
},
"required": [
"variantId",
"quantity"
],
"type": "object"
},
"type": "array"
},
"note": {
"description": "Optional note for the order",
"type": "string"
},
"shippingAddress": {
"additionalProperties": false,
"description": "Shipping address details",
"properties": {
"address1": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"province": {
"type": "string"
},
"zip": {
"type": "string"
}
},
"required": [
"address1",
"city",
"province",
"country",
"zip",
"firstName",
"lastName",
"countryCode"
],
"type": "object"
}
},
"required": [
"lineItems",
"email",
"shippingAddress"
],
"type": "object"
}