🔒
The Create Fulfillment API creates a fulfillment for specific order items and updates their shipping details.
This API is especially useful for:
- Managing the fulfillment process for order line items.
- Updating tracking details for shipments.
- Splitting or combining order items for different fulfillments.
📘
| Field | Type | Required | Description | |
|---|
order_id | string | Yes | Order's unique identifier. | |
| Parameter | Type | Required | Description | Example |
|---|
fulfillment | object | Yes | Fulfillment details object | {...} |
fulfillment. line_items | array of objects | Yes | List of line items to be fulfilled | [ {...}, {...} ] |
fulfillment. line_items[0]. id | string | Yes | The order's line item ID | li_123456 |
fulfillment. line_items[0]. ship_quantity | int32 | No | The quantity to ship (0 means all available quantity) | 2 |
fulfillment. tracking_number | string | Yes | Tracking number for the shipment | UPS123456789 |
fulfillment. tracking_company | string | No | Name of the shipping carrier | UPS |
fulfillment. tracking_company_code | string | No | Shipping carrier code | ups |
fulfillment. tracking_url | string | No | URL to track the shipment | https://www.ups.com/track?tracknum=123456789 |
fulfillment. phone_number | string | No | Contact phone number for the shipment | +1-800-123-4567 |
📘
| Field | Type | Description | Example |
|---|
code | string | "success" | Response status code |
message | string | | Descriptive message of the response |
data.fulfillment | object | fulfillment | fulfillment details |
| Parameter | Type | Example | Description |
|---|
id | string | ful_123456 | Unique identifier for the fulfillment |
order_id | string | ord_123456 | ID of the associated order |
status | string | success | Status of the fulfillment creation |
created_at | string | 2023-06-01T00:00:00Z | Creation time (ISO 8601 format) |
updated_at | string | 2023-06-01T00:00:00Z | Last modified time (ISO 8601 format) |
tracking_company | string | UPS | Shipping carrier name |
tracking_number | string | UPS123456789 | Tracking number |
tracking_company_code | string | ups | Shipping carrier code |
line_items | array of objects | [ {...}, {...} ] | List of fulfilled line items |
| Parameter | Type | Example | Description |
|---|
id | string | li_123456 | Line item ID |
product_id | string | prod_123456 | Product ID |
product_title | string | Premium T-Shirt | Product name |
variant_id | string | var_123456 | Variant ID |
variant_title | string | Blue, Size M | Variant title |
quantity | uint32 | 2 | Quantity fulfilled |
note | string | Fragile item | Merchant or customer note |
image | object | {...} | Product image details |
price | string | 19.99 | Product price |
compare_at_price | string | 29.99 | Original price (if on sale) |
total_price | string | 39.98 | Total price for quantity |
fulfillment_status | string | fulfilled | Fulfillment status |
sku | string | TSKU123 | Stock Keeping Unit |
weight | string | 0.5 | Product weight |
weight_unit | string | kg | Weight unit |
vendor | string | Clothing Co. | Product vendor |
product_url | string | https://example.com/products/premium-tshirt | Product page URL |
created_at | string | 2023-05-01T00:00:00Z | Line item creation time |
updated_at | string | 2023-06-01T00:00:00Z | Line item last update time |
options | array of objects | [ {...} ] | Product variant options |
taxable | boolean | true | Whether item is taxable |
requires_shipping | boolean | true | Whether item requires shipping |
spu | string | SPU123 | Standard Product Unit |
product_tags | string | new, bestseller | Product tags |
refund_quantity_total | uint32 | 0 | Total refunded quantity |
ship_quantity | uint32 | 2 | Quantity shipped |
custom | boolean | false | Whether item is custom |
trunk_price | string | 0.0 | Trunk price (if applicable) |
discount_applications | string | [] | Discount applications |
tax_price | string | 3.20 | Tax amount |
duty_price | string | 0.0 | Duty cost |
tracking_url | string | https://www.ups.com/track?tracknum=123456789 | Tracking URL |
phone_number | string | +1-800-123-4567 | Contact phone number |
| Parameter | Type | Example | Description |
|---|
src | string | https://example.com/product-image.jpg | Image URL |
width | int32 | 800 | Image width in pixels |
height | int32 | 800 | Image height in pixels |
alt | string | Product image | Image alt text |
| Field | Type | Example | Description |
|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |