Complete Fulfillment

🔒

Requires write_order access scope. More access scope

The Complete Fulfillment API marks a specific fulfillment as complete. If the fulfillment status is already finished, the API retrieves and returns the fulfillment details instead.

This API is especially useful for:

  1. Ensuring the completion of a fulfillment.
  2. Fetching fulfillment details when the fulfillment status is already finished.
  3. Handling edge cases where fulfillment completion fails initially.

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

Field Type Description Example
fulfillmentobjectFulfillment details.-
fulfillment.
id
stringUnique ID of the fulfillment.51c7dd5d-8f49-40c3-b2c1-5dfdeef9946d
fulfillment.
order_id
stringOrder ID associated with the fulfillment.633130-00000007
fulfillment.
status
stringStatus of the fulfillment (shipped, pending, etc.).shipped
fulfillment.
tracking_company
stringName of the shipping company.燕文物流
fulfillment.
tracking_number
stringTracking number for the shipment.11111111111
fulfillment.
tracking_company_code
stringCode of the shipping company.DJ-11343
fulfillment.
tracking_url
stringURL for tracking the shipment.https://tracking.example.com
fulfillment.
created_at
stringTimestamp of creation in ISO-8601 format.2024-04-22T08:37:12Z
fulfillment.
updated_at
stringTimestamp of the last update in ISO-8601 format.2024-04-22T08:37:12Z
fulfillment.
line_items
array of objectsList of fulfilled line items.-
fulfillment.
line_items[].
id
stringLine item ID.ed8af005-1f4e-42d1-859d-99b0fd420781
fulfillment.
line_items[].
product_id
stringProduct ID.a1a88be0-a1d4-47e4-a2f2-ba6e131cf447
fulfillment.
line_items[].
variant_id
stringVariant ID of the product.a7175820-36b3-4fc6-9baf-51e3035242ba
fulfillment.
line_items[].
variant_title
stringTitle of the product variant.L-blue-T
fulfillment.
line_items[].
product_title
stringTitle of the product.shirt
fulfillment.
line_items[].
product_handle
stringHandle of the product.shirt
fulfillment.
line_items[].
quantity
integerQuantity of the product fulfilled.1
fulfillment.
line_items[].
note
stringNote associated with the line item.Special instructions
fulfillment.
line_items[].
fulfillment_status
stringFulfillment status for the line item.shipped
fulfillment.
line_items[].
sku
stringSKU of the product.T-M-L-blue-T-A001008
fulfillment.
line_items[].
weight_unit
stringUnit for the weight of the product.kg
fulfillment.
line_items[].
weight
stringWeight of the product.1.10
fulfillment.
line_items[].
vendor
stringVendor or supplier of the product.shoplazza
fulfillment.
line_items[].
product_url
stringURL of the product page./products/shirt
fulfillment.
line_items[].
image
stringURL of the product image.//cdn.shoplazza.com/image.jpg
fulfillment.
line_items[].
price
stringPrice of the product per unit.81.00
fulfillment.
line_items[].
total
stringTotal price for the fulfilled quantity.81.00
fulfillment.
line_items[].
compare_at_price
stringOriginal (compare at) price of the product.97.00
fulfillment.
line_items[].
properties
array of objectsCustom properties of the line item.[{ "name": "size", "value": "L" }]
fulfillment.
line_items[].
refund_quantity
integerQuantity refunded from this line item.0
fulfillment.
line_items[].
refund_total
stringTotal refunded amount for this line item.0.00
fulfillment.
line_items[].
taxable
booleanIndicates whether the product is taxable.true
fulfillment.
line_items[].
requires_shipping
booleanIndicates if shipping is required for the product.true
fulfillment.
line_items[].
shipping_quantity
integerQuantity being shipped in this fulfillment.1

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!