Is it possible to create an Order with publication Sales Channel?

integrationjala
New Member
1 0 0

Is there a way to create a DraftOrder or complete an Order, and setting a specific publication sales channel with graphql?

Something like:

 

 

 

 

mutation draftOrderCreate($items: DraftOrderInput!) {
  draftOrderCreate(input: $items) {
    draftOrder {
      id
      order {
        id
      }
      status
    }
    userErrors {
      field
      message
    }
  }
}

 

 

 

 

And a variable:

 

 

 

 

{
    "items": {
        "email": "123@mail.com",
        "publication": {
                            "id": "gid://shopify/Publication/12345678910",
                            "name": "Some Sales Channel"
        },
        "lineItems": [
            {
                "variantId": "gid://shopify/ProductVariant/10987654321",
                "quantity": 1
            }
        ]
    }
}

 

 

 

 

 

Replies 0 (0)