I use shopify API and ShopifSharp c# library(https://github.com/nozzlegear/ShopifySharp). I manually create orders and give it status “fulfilled”. Now I just want to give this orders , but I get Count = .
My code is simple:
var service = new OrderService(product.ShopifyShopName, shopifyAccessToken);
IEnumerable<Order> orders = await service.ListAsync(); // count = 0
var paidOrders = orders.Where(x => x.FulfillmentStatus.Equals("fulfilled"));
It retrieves orders when they have status “unfulfilled” but why? I use development store for this objectives
2
Answers
By default Shopify retrieves a list of orders (OPEN Orders by default, use status=any for all orders).
For more info please look at here: https://help.shopify.com/api/reference/order#index
Don’t try to change the status directly in the order, instead use Fulfillment Admin API after you create the order. So with this API you can change the fulfillment status of the order, and after that you can retrieve the fulfilled orders correctly.