Create Fulfillment

Create a fulfillment for specific order items and updates their shipping details.

🔒

Requires write_order access scope. More access scope

The Create Fulfillment API creates a fulfillment for specific order items and updates their shipping details.

This API is especially useful for:

  1. Managing the fulfillment process for order line items.
  2. Updating tracking details for shipments.
  3. Splitting or combining order items for different fulfillments.

Request Parameters

Public Request Parameters

📘

Path Parameters

FieldTypeRequiredDescription
order_idstringYesOrder's unique identifier.

Body Parameters

ParameterTypeRequiredDescriptionExample
fulfillmentobjectYesFulfillment details object{...}
fulfillment. line_itemsarray of objectsYesList of line items to be fulfilled[ {...}, {...} ]
fulfillment. line_items[0]. idstringYesThe order's line item IDli_123456
fulfillment. line_items[0]. ship_quantityint32NoThe quantity to ship (0 means all available quantity)2
fulfillment. tracking_numberstringYesTracking number for the shipmentUPS123456789
fulfillment. tracking_companystringNoName of the shipping carrierUPS
fulfillment. tracking_company_codestringNoShipping carrier codeups
fulfillment. tracking_urlstringNoURL to track the shipmenthttps://www.ups.com/track?tracknum=123456789
fulfillment. phone_numberstringNoContact phone number for the shipment+1-800-123-4567

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!