Discussing APIs and development related to customers, discounts, and order management.
Hi,
I have all read_orders,read_draft_orders, read_all_orders scopes, but when I try to get an order that is archieved after fulfilled, it retrun empty product.
I try to call by this
static async getOrderById(session: Session, orderId: string): Promise<Record<string, unknown>> { const client = new shopify.clients.Rest({ session: session }); const result = await client.get({ path: `orders.json?name=${orderId}&status=any`, }); const order = (result.body as Record<string, unknown>).orders as Record<string, unknown>; return order; }