Cancel Fulfillment

🔒

Requires write_order access scope. More access scope

The Cancel Fulfillment API cancels a specific fulfillment for an order. This action marks the fulfillment as canceled, stopping any further processing or shipping operations.

This API is especially useful for:

  1. Canceling shipments or fulfillments that are no longer needed.
  2. Managing order updates during the fulfillment process.
  3. Ensuring inventory or shipping workflows are correctly adjusted.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

ParameterTypeRequiredExampleDescription
order_idstringYes633130-00000012Unique identifier for the order.
fulfillment_idstringYes49a731b0-1b7e-47c3-94d9-6d688f36201eUnique identifier for the fulfillment.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

FieldTypeExampleDescription
fulfillmentobject-Fulfillment details.
fulfillment.idstring51c7dd5d-8f49-40c3-b2c1-5dfdeef9946dUnique ID of the fulfillment.
fulfillment.order_idstring633130-00000007Order ID associated with the fulfillment.
fulfillment.statusstringshippedStatus of the fulfillment (shipped, pending, etc.).
fulfillment.tracking_companystring燕文物流Name of the shipping company.
fulfillment.tracking_numberstring11111111111Tracking number for the shipment.
fulfillment.tracking_company_codestringDJ-11343Code of the shipping company.
fulfillment.tracking_urlstringhttps://tracking.example.comURL for tracking the shipment.
fulfillment.created_atstring2024-04-22T08:37:12ZTimestamp of creation in ISO-8601 format.
fulfillment.updated_atstring2024-04-22T08:37:12ZTimestamp of the last update in ISO-8601 format.
fulfillment.line_itemsarray of objects-List of fulfilled line items.
fulfillment.line_items[].idstringed8af005-1f4e-42d1-859d-99b0fd420781Line item ID.
fulfillment.line_items[].product_idstringa1a88be0-a1d4-47e4-a2f2-ba6e131cf447Product ID.
fulfillment.line_items[].variant_idstringa7175820-36b3-4fc6-9baf-51e3035242baVariant ID of the product.
fulfillment.line_items[].variant_titlestringL-blue-TTitle of the product variant.
fulfillment.line_items[].product_titlestringshirtTitle of the product.
fulfillment.line_items[].product_handlestringshirtHandle of the product.
fulfillment.line_items[].quantityinteger1Quantity of the product fulfilled.
fulfillment.line_items[].notestringSpecial instructionsNote associated with the line item.
fulfillment.line_items[].fulfillment_statusstringshippedFulfillment status for the line item.
fulfillment.line_items[].skustringT-M-L-blue-T-A001008SKU of the product.
fulfillment.line_items[].weight_unitstringkgUnit for the weight of the product.
fulfillment.line_items[].weightstring1.10Weight of the product.
fulfillment.line_items[].vendorstringshoplazzaVendor or supplier of the product.
fulfillment.line_items[].product_urlstring/products/shirtURL of the product page.
fulfillment.line_items[].imagestring//cdn.shoplazza.com/image.jpgURL of the product image.
fulfillment.line_items[].pricestring81.00Price of the product per unit.
fulfillment.line_items[].totalstring81.00Total price for the fulfilled quantity.
fulfillment.line_items[].compare_at_pricestring97.00Original (compare at) price of the product.
fulfillment.line_items[].propertiesarray of objects[{ "name": "size", "value": "L" }]Custom properties of the line item.
fulfillment.line_items[].refund_quantityinteger0Quantity refunded from this line item.
fulfillment.line_items[].refund_totalstring0.00Total refunded amount for this line item.
fulfillment.line_items[].taxablebooleantrueIndicates whether the product is taxable.
fulfillment.line_items[].requires_shippingbooleantrueIndicates if shipping is required for the product.
fulfillment.line_items[].shipping_quantityinteger1Quantity being shipped in this fulfillment.

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "invalid line_item id"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
404Record not foundprovided order_id and fulfillment_id is not existing{"errors": ["Record not found"]}

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!