Discussing APIs and development related to customers, discounts, and order management.
Hello,
I have created an order with 2 shipping fees. I have updated the order and removed the first shipping fee. Everything is ok on the shopify web site, only the second shipping fee is applied, but the Admin Order Rest API return both shipping fees as active in shipping_lines array, and total_shipping_price_set returns the sum of the both shipping fees, even the removed one.
Do you know why, and how I can identified in the API if a shipping is active or not?
Thanks in advance
Eric
Hi Eric,
This is Chuck from Simplio.
Unfortunately, it is not possible to retrieve it from the Admin Order REST API, but you can properly retrieve it from the GraphQL API:
$graphqlStringTemplate = '
order:
order(id: "gid://shopify/Order/{order_id}") {
shippingLines(first: 2,includeRemovals: true){
edges {
node {
id
isRemoved
}
}
}
}
';