Creating a fulfillment

Learn how to create a fulfillment.

Setting Fulfillment parameters

When you create a Fulfillment, you'll need to provide the required parameters listed in the following table. The remaining parameters are optional:

PriceItem
AggregatePriceItem
PriceItem

Parameter

Required/Optional

Description

orderId

Required

The identifier of the order associated with this fulfillment.

items

Required

The item you want to fulfill. The skuId is required, the following attributes are optional: subscriptionInfo, quantity, cancelQuantity, amount, discount, and metadata.

trackingCompany

Optional

The name of the tracking company.

trackingNumber

Optional

The tracking number provided by the shipping company.

trackingUrl

Optional

The URL of the tracking page for the fulfillment.

AggregatePriceItem

Parameter

Required/Optional

Description

orderId

Required

The identifier of the order associated with this fulfillment.

items

Required

The item you want to fulfill. TheskuId is required, the following attributes are optional: aggregatePrice, subscriptionInfo, quantity, cancelQuantity, amount, and metadata.

The item you want to fulfill. The skuId is required, the following attributes are optional: subscriptionInfo, quantity, cancelQuantity, amount, discount, and metadata.

trackingCompany

Optional

The name of the tracking company.

trackingNumber

Optional

The tracking number provided by the shipping company.

trackingUrl

Optional

The URL of the tracking page for the fulfillment.

Example create request and response

You can pass in one or more SKU identifiers and quantity. If you do not supply the quantity, we assume the quantity is the same as in the SKU object.

Create a Fulfillment object with a POST request:

cURL
cURL
curl https://api.digitalriver.com/fulfillments \
-u sk_test_db9682a2-b04a-4e94-8e11-35fe8ec0b324: \
-d orderId="ord_5678901234" \
-d items[skuId]="sku_5823594809" \
-d trackingCompany="Fedex" \
-d trackingNumber="5678901234" \
-d trackingUrl="http://www.digitalriver.com?code=5678901234"

A 201 Created response returns a Fulfillment object:

JSON
JSON
{
"id": "25c651d0-8079-48d7-b22e-eb1e2f451966",
"createdTime": "2020-05-15T12:20:38Z",
"orderId": "ord_5678901234",
"items": [
{
"skuId": "sku_5823594809",
}
],
"liveMode": false,
"trackingCompany": "Fedex",
"trackingNumber": "5678901234",
"trackingUrl": "http://www.digitalriver.com?code=5678901234"
}