Cancel Fulfillment

Cancels a specific fulfillment for an order. This action marks the fulfillment as canceled, stopping any further processing or shipping operations.

🔒

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

📘

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

📘

Success Response

FieldTypeDescriptionExample
codestring"success"Response status code
messagestringDescriptive message of the response
data.fulfillmentobjectfulfillmentfulfillment details

Fulfillment Object Structure

ParameterTypeExampleDescription
idstringful_123456Unique identifier for the fulfillment
order_idstringord_123456ID of the associated order
statusstringsuccessStatus of the fulfillment creation
created_atstring2023-06-01T00:00:00ZCreation time (ISO 8601 format)
updated_atstring2023-06-01T00:00:00ZLast modified time (ISO 8601 format)
tracking_companystringUPSShipping carrier name
tracking_numberstringUPS123456789Tracking number
tracking_company_codestringupsShipping carrier code
line_itemsarray of objects[ {...}, {...} ]List of fulfilled line items

Fulfilled Line Item Object Structure

ParameterTypeExampleDescription
idstringli_123456Line item ID
product_idstringprod_123456Product ID
product_titlestringPremium T-ShirtProduct name
variant_idstringvar_123456Variant ID
variant_titlestringBlue, Size MVariant title
quantityuint322Quantity fulfilled
notestringFragile itemMerchant or customer note
imageobject{...}Product image details
pricestring19.99Product price
compare_at_pricestring29.99Original price (if on sale)
total_pricestring39.98Total price for quantity
fulfillment_statusstringfulfilledFulfillment status
skustringTSKU123Stock Keeping Unit
weightstring0.5Product weight
weight_unitstringkgWeight unit
vendorstringClothing Co.Product vendor
product_urlstringhttps://example.com/products/premium-tshirtProduct page URL
created_atstring2023-05-01T00:00:00ZLine item creation time
updated_atstring2023-06-01T00:00:00ZLine item last update time
optionsarray of objects[ {...} ]Product variant options
taxablebooleantrueWhether item is taxable
requires_shippingbooleantrueWhether item requires shipping
spustringSPU123Standard Product Unit
product_tagsstringnew, bestsellerProduct tags
refund_quantity_totaluint320Total refunded quantity
ship_quantityuint322Quantity shipped
custombooleanfalseWhether item is custom
trunk_pricestring0.0Trunk price (if applicable)
discount_applicationsstring[]Discount applications
tax_pricestring3.20Tax amount
duty_pricestring0.0Duty cost
tracking_urlstringhttps://www.ups.com/track?tracknum=123456789Tracking URL
phone_numberstring+1-800-123-4567Contact phone number

Image Object Structure

ParameterTypeExampleDescription
srcstringhttps://example.com/product-image.jpgImage URL
widthint32800Image width in pixels
heightint32800Image height in pixels
altstringProduct imageImage alt text

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

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