Hello,
I already have an order and I have the “order_id” how can I add other products to this order in GRAPHQL?
Hello,
I already have an order and I have the “order_id” how can I add other products to this order in GRAPHQL?
Hey @agencep,
Thanks for reaching out.
I’m looking into this and will get back to you shortly.
Best,
RayanP
Hey @agencep,
Thanks for hanging in there.
You could try running the order_add_line_items
mutation. An example of this mutation would look like this:
mutation {
order_add_line_items(
data: {
order_id: "T3JkZXI6MjgwMzY3NDA5"
line_items: [
{
sku: "14563288"
price: "20.00"
quantity: 2
partner_line_item_id: "789779643"
}
{
sku: "145632882"
price: "20.00"
quantity: 2
partner_line_item_id: "7897796432"
}
]
}
) {
request_id
complexity
order {
id
legacy_id
order_number
partner_order_id
shop_name
fulfillment_status
total_price
account_id
line_items(first: 5) {
edges {
node {
id
sku
quantity
product_name
}
}
}
}
}
}
Let me know if this works for you.
Best,
RayanP
Thank you very much, that’s what I’m looking for