I want to get all fulfillmentOrders of an order using rest api as below in NestJS application:
async getFulfillmentOrders(orderId: string) {
const res = await this.shopify.rest.FulfillmentOrder.all({
session: this.getSession(),
order_id: orderId,
});
return res?.fulfillment_orders;
}
the response contains an object that has a field called data with an empty array value and has headers field.
when I paste url of the order in route with /fulfillment_orders.json it returns the expected fulfillment orders. but with calling rest api returns the mentioned data.