post https://{shopdomain}.myshoplaza.com/openapi/2022-01/orders//fulfillments//complete
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:
- Ensuring the completion of a fulfillment.
- Fetching fulfillment details when the fulfillment status is already
finished
. - Handling edge cases where fulfillment completion fails initially.
Request Parameters
Public Request Parameters
Path Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
order_id | string | Yes | 633130-00000012 | Unique identifier for the order. |
fulfillment_id | string | Yes | 49a731b0-1b7e-47c3-94d9-6d688f36201e | Unique identifier for the fulfillment. |
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Description | Example |
---|---|---|---|
fulfillment | object | Fulfillment details. | - |
fulfillment. | string | Unique ID of the fulfillment. | 51c7dd5d-8f49-40c3-b2c1-5dfdeef9946d |
fulfillment. | string | Order ID associated with the fulfillment. | 633130-00000007 |
fulfillment. | string | Status of the fulfillment (shipped , pending , etc.). | shipped |
fulfillment. | string | Name of the shipping company. | 燕文物流 |
fulfillment. | string | Tracking number for the shipment. | 11111111111 |
fulfillment. | string | Code of the shipping company. | DJ-11343 |
fulfillment. | string | URL for tracking the shipment. | https://tracking.example.com |
fulfillment. | string | Timestamp of creation in ISO-8601 format. | 2024-04-22T08:37:12Z |
fulfillment. | string | Timestamp of the last update in ISO-8601 format. | 2024-04-22T08:37:12Z |
fulfillment. | array of objects | List of fulfilled line items. | - |
fulfillment. | string | Line item ID. | ed8af005-1f4e-42d1-859d-99b0fd420781 |
fulfillment. | string | Product ID. | a1a88be0-a1d4-47e4-a2f2-ba6e131cf447 |
fulfillment. | string | Variant ID of the product. | a7175820-36b3-4fc6-9baf-51e3035242ba |
fulfillment. | string | Title of the product variant. | L-blue-T |
fulfillment. | string | Title of the product. | shirt |
fulfillment. | string | Handle of the product. | shirt |
fulfillment. | integer | Quantity of the product fulfilled. | 1 |
fulfillment. | string | Note associated with the line item. | Special instructions |
fulfillment. | string | Fulfillment status for the line item. | shipped |
fulfillment. | string | SKU of the product. | T-M-L-blue-T-A001008 |
fulfillment. | string | Unit for the weight of the product. | kg |
fulfillment. | string | Weight of the product. | 1.10 |
fulfillment. | string | Vendor or supplier of the product. | shoplazza |
fulfillment. | string | URL of the product page. | /products/shirt |
fulfillment. | string | URL of the product image. | //cdn.shoplazza.com/image.jpg |
fulfillment. | string | Price of the product per unit. | 81.00 |
fulfillment. | string | Total price for the fulfilled quantity. | 81.00 |
fulfillment. | string | Original (compare at) price of the product. | 97.00 |
fulfillment. | array of objects | Custom properties of the line item. | [{ "name": "size", "value": "L" }] |
fulfillment. | integer | Quantity refunded from this line item. | 0 |
fulfillment. | string | Total refunded amount for this line item. | 0.00 |
fulfillment. | boolean | Indicates whether the product is taxable. | true |
fulfillment. | boolean | Indicates if shipping is required for the product. | true |
fulfillment. | integer | Quantity 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.
Field | Type | Example | Description |
---|---|---|---|
errors | Array | [ "invalid line_item id"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
404 | Record not found | provided order_id and fulfillment_id is not existing | {"errors": ["Record not found"]} |