Assigned Fulfillment Orders
The AssignedFulfillmentOrder resource allows you to retrieve all the fulfillment orders that are assigned to an app at the shop level.
Listing assigned fulfillment orders
Section titled “Listing assigned fulfillment orders”Retrieves a list of fulfillment orders on a shop for a specific app.
var service = new AssignedFulfillmentOrderService(myShopifyUrl, shopAccessToken);
//Optionally filter the list to only those assigned fulfillments with a specific statusvar filterStatus = new AssignedFulfillmentOrderFilter(){ AssignmentStatus = "fulfillment_requested"});
var assignedFulfillments = await service.ListAsync(filterStatus);Cancellation Requests
Section titled “Cancellation Requests”The CancellationRequest resource represents a cancellation request made by the merchant or an order management app to a fulfillment service for a fulfillment order.
Create A Cancellation Request
Section titled “Create A Cancellation Request”Send a cancellation request to the fulfillment service of a fulfillment order.
var service = new CancellationRequestService(myShopifyUrl, shopAccessToken);var fulfillmentOrder = await service.CreateAsync(fulfillmentOrderId, "The customer changed his mind.");Accept A Cancellation Request
Section titled “Accept A Cancellation Request”Accept a cancellation request sent to a fulfillment service for a fulfillment order.
var service = new CancellationRequestService(myShopifyUrl, shopAccessToken);var fulfillmentOrder = await service.AcceptAsync(fulfillmentOrderId, "We had not started any processing yet.");Reject A Cancellation Request
Section titled “Reject A Cancellation Request”Reject a cancellation request sent to a fulfillment service for a fulfillment order.
var service = new CancellationRequestService(myShopifyUrl, shopAccessToken);var fulfillmentOrder = await service.AcceptAsync(fulfillmentOrderId, "We have already sent the shipment out.");Fulfillment Events
Section titled “Fulfillment Events”The FulfillmentEvent resource represents tracking events that belong to a fulfillment of one or more items in an order.
Creates a fulfillment event
Section titled “Creates a fulfillment event”Creates a new FulfillmentEvent on the fulfillment.
var service = new FulfillmentEventService(myShopifyUrl, shopAccessToken);var fulfillmentEvent = new FulfillmentEvent(){ OrderId = 1234532, FulfillmentId = 156185165, Status = "confirmed"};
fulfillmentEvent = await service.CreateAsync(orderId, fulfillmentId, fulfillmentEvent);List fulfillment events
Section titled “List fulfillment events”Retrieves a list of fulfillment events for a specific fulfillment
var service = new FulfillmentEventService(myShopifyUrl, shopAccessToken);var fulfillmentEvents = await service.ListAsync(orderId, fulfillmentId);Get a Fulfillment Event
Section titled “Get a Fulfillment Event”Retrieves a specific fulfillment event
var service = new FulfillmentEventService(myShopifyUrl, shopAccessToken);var fulfillmentEvent = await service.GetAsync(orderId, fulfillmentId, fulfillmentEventId);Delete A Fulfillment Event
Section titled “Delete A Fulfillment Event”var service = new FulfillmentEventService(myShopifyUrl, shopAccessToken);await service.DeleteAsync(orderId, fulfillmentId, fulfillmentEventId);–
Fulfillment Orders
Section titled “Fulfillment Orders”The FulfillmentOrder resource represents either an item or a group of items in an order that are to be fulfilled from the same location. There can be more than one fulfillment order for an order at a given location.
TODO
- Cancel a fulfillment order
- Mark a fulfillment order as incomplete
- Move a fulfillment order to a new location
- Mark the fulfillment order as open
- Reschedule the fulfill_at time of a scheduled fulfillment order
- Retrieve a specific fulfillment order
List Fulfillment Orders
Section titled “List Fulfillment Orders”Retrieves a list of fulfillment orders for a specific order
var service = new FulfillmentOrderService(myShopifyUrl, shopAccessToken);var fulfillmentOrders = await service.ListAsync(orderId);Fulfillment Requests
Section titled “Fulfillment Requests”The FulfillmentRequest resource represents a fulfillment request made by the merchant to a fulfillment service for a fulfillment order.
Create A Fulfillment Request
Section titled “Create A Fulfillment Request”Sends a fulfillment request to the fulfillment service of a fulfillment order
var service = new FulfillmentRequestService(myShopifyUrl, shopAccessToken);
// Optionally, you can request only specific item to fulfilled.var fulfillmentRequest = new FulfillmentRequest(){ FulfillmentRequestOrderLineItems = new List<FulfillmentRequestOrderLineItems>(){}};var fulfillmentOrder = await service.CreateAsync(fulfillmentOrderId, fulfillmentRequest);Accept A Fulfillment Request
Section titled “Accept A Fulfillment Request”Accepts a fulfillment request sent to a fulfillment service for a fulfillment order
var service = new FulfillmentRequestService(myShopifyUrl, shopAccessToken);var fulfillmentOrder = await service.AcceptAsync(fulfillmentOrderId, "Your order will be filled shortly.");Reject A Fulfillment Request
Section titled “Reject A Fulfillment Request”Reject a fulfillment request sent to a fulfillment service for a fulfillment order
var service = new FulfillmentRequestService(myShopifyUrl, shopAccessToken);var fulfillmentOrder = await service.AcceptAsync(fulfillmentOrderId, "Fulfillment services have been suspended for this store.");Fulfillment Services
Section titled “Fulfillment Services”A Fulfillment Service is a third party warehouse that prepares and ships orders on behalf of the store owner. Fulfillment services charge a fee to package and ship items and update product inventory levels. Some well known fulfillment services with Shopify integrations include: Amazon, Shipwire, and Rakuten. When an app registers a new FulfillmentService on a store, Shopify automatically creates a Location that’s associated to that fulfillment service.
Create a Fulfillment Service
Section titled “Create a Fulfillment Service”var service = new FulfillmentServiceService(myShopifyUrl, shopAccessToken);var fulfillmentService = await service.CreateAsync(new FulfillmentServiceEntity(){ Name = "Your Company Name", CallbackUrl = "http://yourcompany.com", InventoryManagement = true, TrackingSupport = true, FulfillmentOrdersOptIn = true, RequiresShippingMethod = true, Format = "json"});List Fulfillment Services
Section titled “List Fulfillment Services”Retrieves a list of fulfillment orders for a specific order
var service = new FulfillmentServiceService(myShopifyUrl, shopAccessToken);// Optional Filtervar filter = new FulfillmentServiceListFilter(){ Scope = "all"};var fulfillmentServices = await service.ListAsync(filter);Get a Fulfillment Service
Section titled “Get a Fulfillment Service”Retrieves a single Fulfillment Service
var service = new FulfillmentServiceService(myShopifyUrl, shopAccessToken);// Optional Filtervar fields = "id,name,email";var fulfillmentService = await service.GetAsync(fulfillmentServiceId, fields);Modify a Fulfillment Service
Section titled “Modify a Fulfillment Service”Update a Fulfillment Service. Not all fields are updatable
var service = new FulfillmentServiceService(myShopifyUrl, shopAccessToken);var fulfillmentService = await service.UpdateAsync(fulfillmentServiceId, fulfillmentServiceEntity);Delete a Fulfillment Service
Section titled “Delete a Fulfillment Service”var service = new FulfillmentServiceService(myShopifyUrl, shopAccessToken);var fulfillmentService = await service.DeleteAsync(fulfillmentServiceId);