Skip to main content

Fulfill a Checkout Order

Marking items as "fulfilled" can mean different things depending on your store's business logic. You may want to mark an order as "fulfilled" at one of various points in the order life cycle:

  • After the payment is processed.
  • After the order is shipped.
  • After the order is delivered.

However you define the fulfillment of an order, it is important to keep the fulfillment status of an order up to date in both Bold Checkout and your store's platform.

Each Bold Checkout order has a fulfillment_status attribute — with possible values of unfulfilled, partially_fulfilled, and fulfilled. Bold Checkout calculates the fulfillment_status using the fulfilled_quantity property of each line item.

When the sum of fulfilled_quantity across all line items is equal to the total number of items in the order, the order is considered fulfilled. This value appears as the order fulfillment status in both Bold Checkout and your store's ecommerce platform.

This document explains how to update the fulfilled_quantity of one or multiple line items.

Mark items as fulfilled

The Update Line Item endpoint enables you to mark a single line item as fulfilled by updating the fulfilled_quantity property of each line item.

The following cURL example call shows how to update the fulfilled_quantity of one line item:

curl --request PATCH 'https://api.boldcommerce.com/checkout/orders/{shop_identifier}/{public_order_id}/line_items/{line_item_key}' \
--header 'Authorization: Bearer {access_token}' \
--header 'Bold-API-Version-Date: 2022-05-01' \
--header 'Content-Type: application/json' \
--data '{
"fulfilled_quantity": 2
}'

The endpoint returns a line_item JSON object with the updated fulfilled quantity.

The Update Line Items endpoint works similarly, but it allows you to update more than one line item at once. This endpoint is helpful for marking a full order as fulfilled.

The following cURL example call shows how to update the fulfilled_quantity of several line items:

curl --request PATCH 'https://api.boldcommerce.com/checkout/orders/{shop_identifier}/{public_order_id}/line_items' \
--header 'Authorization: Bearer {access_token}' \
--header 'Bold-API-Version-Date: 2022-05-01' \
--header 'Content-Type: application/json' \
--data '{
"line_items": [
{
"fulfilled_quantity": 1,
"line_item_key": "abcdefg"
},
{
"fulfilled_quantity": 3,
"line_item_key": "hijklmop"
}
]
}'

These endpoints also update the fulfillment_status of the order accordingly.