Create draft order and add products - AdminAPI, graphQL

chrisbmac
New Member
1 0 0

I am trying to create a test order. I have been reading, but do not understand how to add products to my draft order. Also from what I understand I need to create a draft order, check if it was successful and then complete the draft order which then turns it into an actual order?

So here the my draft order creation mutation:

mutation draftOrderCreate {
draftOrderCreate(input: {email: "abc123@hotmail.com"}) {
draftOrder {
id
order {
id
}
status

}

userErrors {
field
message
}
}
}

 

0 Likes