V2 Alpha — This endpoint is part of the V2 API preview. Breaking changes may occur.
Overview
Cancel a fulfillment and set the associated line items back to unfulfilled status. This also cancels the fulfillment in Shopify. Only fulfillments for the vendor’s own line items can be cancelled.
Vendor Token Required — This endpoint requires a vendor-scoped JWT token. Merchant tokens will receive a 403 error.
Use Cases
- Order corrections — Cancel a fulfillment if the wrong items were shipped
- Shipping errors — Unfulfill items when a shipment is returned or lost
- Re-fulfillment — Cancel and re-create with correct tracking info
Path Parameters
The line item ID (fulfillment is stored on the line item record).
Response
{
"success": true,
"data": {
"cancelled": true
}
}
Error Responses
{
"success": false,
"error": {
"message": "Fulfillment not found",
"code": "NOT_FOUND"
}
}
{
"success": false,
"error": {
"message": "Shopify fulfillment cancellation failed",
"code": "BAD_GATEWAY"
}
}
Example
curl -X DELETE "https://api.puppetvendors.com/v2/vendor/fulfillments/507f1f77bcf86cd799439015" \
-H "x-access-token: YOUR_VENDOR_JWT_TOKEN"