Hello
I am working on public app and i want to create draft order with change item price with the help of graphql API but not able to figure out how i will do. Please any one let me know complete process of creating draft order by mutation in graphql. below is some example code.
mutation {
draftOrderCreate(
input: {
email: "test@gmail.com"
lineItems: {
appliedDiscount: {
amount: 20
description: "test des"
title : "Test two"
value: 10
valueType: FIXED_AMOUNT
}
customAttributes: {
key: "payment"
value: "partial"
}
quantity: 2
weight : {
unit: GRAMS
value: 10
}
}
localizationExtensions: {
key: SHIPPING_CREDENTIAL_BR
value: "test"
}
metafields: {
description: "test"
key: "orde_id"
namespace: "prt"
type: "test"
value: "drt"
}
paymentTerms: {
paymentSchedules: {
dueAt: "2022-12-17T15:50:00Z"
issuedAt: "2022-12-15T15:50:00Z"
}
}
privateMetafields: {
key: "Test"
namespace: "dftrt"
valueInput: {
value: "testd"
valueType: STRING
}
}
purchasingEntity: {
customerId: "gid://shopify/Customer/6453791457508"
purchasingCompany: {
companyContactId: "gid://shopify/companies/63373540"
companyId: "gid://shopify/companies/63373540"
companyLocationId: "gid://shopify/locations/63570148"
}
}
shippingAddress: {
address1: "sdsd"
address2: "sadsd"
city: "karnal"
company: "desonomate"
country: "India"
countryCode: IN
firstName: "Vinod"
lastName: "Kumar"
phone: "+919865326598"
province: "Haryana"
provinceCode: "HR"
zip: "132157"
}
shippingLine: {
price: 50
shippingRateHandle: "FEDS"
title: "fedex"
}
}
) {
userErrors {
field
message
}
}
}