---
title: "Creates a Fulfillment"
method: POST
path: "/fulfillments"
tags: ["Fulfillments"]
---

# Creates a Fulfillment

`POST /fulfillments`

Fulfills and/or cancels all or part of an order.

## Request body

- FulfillmentRequest
  - `orderId` string, required — The identifier of the Order associated with this Fulfillment.
  - `shipmentId` string — The unique identifier associated to the shipment
  - `items` FulfillmentRequestItem[], required — An array of items to fulfill and/or cancel.
    - `itemId` string — The unique identifier of the line item.
    - `skuId` string — The unique identifier of the aku.
    - `shipmentItemId` string — The unique identifier associated to the shipment item
    - `quantity` integer, nullable — The number of items fulfilled. You must provide either this value and/or a value for the <code>cancelQuantity</code> attribute.
    - `cancelQuantity` integer, nullable — The number of items cancelled. You must provide either this value and/or a value for the <code>quantity</code> attribute.
    - `trackingCompany` string — The name of the tracking company
    - `trackingNumber` string — A tracking number provided by the shipping company
    - `trackingUrl` string — The URL of the tracking page for the fulfillment
    - `subfulfillerId` string — The unique identifer of the distributor. If you don't provide it, then Digital River’s accounting service won’t have the information it needs to make a payout to the distributor and the fulfillment can't be resolved.
    - `distributorCost` number, double — The distributor’s total cost for this <code>items[]</code>, inclusive of its <code>quantity</code>. In other words, the value should equal the distributor’s per unit product cost multiplied by the <code>quantity</code> of shipped units.<br> <br>The <code>distributorCost</code> can't be less then <code>0</code>. <br>If provided, then <code>currency</code> is required.
    - `shippingCost` number, double — The cost to ship the line item.<br><br> If provided, then <code>currency</code> is required.<br> <br>The <code>shippingCost</code> can't be less then <code>0</code>.
  - `currency` string — A valid [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) code that represents the currency the distributor should be paid in. If <code> items[].distributorCost</code> or <code>items[].shippingCost</code> are specified, then <code>currency</code> is required. The value doesn't have to be the same as the [Order's](https://www.digitalriver.com/docs/digital-river-api-reference/#tag/Orders) <code>currency</code>.
  - `metadata` Metadata — Key-value pairs used to store additional data. Value can be string, boolean or integer types.
  - `trackingCompany` string — The name of the tracking company.
  - `trackingNumber` string — The tracking number provided by the shipping company.
  - `trackingUrl` string — The URL of the tracking page for the fulfillment.
  - `partnerId` string — The unique identifier of the partner associated with the sku.

## Response `201`

201 Created

- Fulfillment
  - `id` string — The unique identifier of the Fulfillment.
  - `createdTime` string, date-time — The time when the Fulfillment was created.
  - `orderId` string — The unique identifier of the Order associated with this Fulfillment.
  - `shipmentId` string — The unique identifier associated to the shipment
  - `items` FulfillmentResponseItem[] — An array of line items fulfilled and/or cancelled.
    - `itemId` string — The unique identifier of the line item.
    - `skuId` string — The unique identifier of the sku.
    - `shipmentItemId` string — The unique identifier associated to the shipment item
    - `quantity` integer — The number of items fulfilled.
    - `cancelQuantity` integer — The number of items cancelled.
    - `trackingCompany` string — The name of the tracking company
    - `trackingNumber` string — A tracking number provided by the shipping company
    - `trackingUrl` string — The URL of the tracking page for the fulfillment
    - `subfulfillerId` string — The unique identifer of the distributor.
    - `distributorCost` number, double — The distributor’s total cost for this <code>items[]</code>, inclusive of its <code>quantity</code>. In other words, the distributor’s per unit product cost multiplied by the <code>quantity</code> of shipped units.<br>
    - `shippingCost` number, double — The cost to ship the line item.
  - `currency` string — A valid [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) code that represents the currency the distributor is paid in.
  - `liveMode` boolean — Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
  - `metadata` Metadata — Key-value pairs used to store additional data. Value can be string, boolean or integer types.
  - `trackingCompany` string — The name of the tracking company.
  - `trackingNumber` string — A tracking number provided by the shipping company.
  - `trackingUrl` string — The URL of the tracking page for the Fulfillment.

## Other responses

- `400` — 400 Bad Request
- `401` — 401 Unauthorized
- `403` — 403 Forbidden
- `405` — 405 Method Not Allowed
- `406` — 406 Not Acceptable
- `408` — 408 Request Timeout
- `409` — 409 Conflict
- `429` — 429 Too Many Requests
- `500` — 500 Internal Server Error
- `502` — 502 Bad Gateway Error
- `503` — 503 Service Unavailable Error
- `504` — 504 Gateway Timeout Error

---

[API](https://skmtc.net/digitalriver/apis/digital-river-api-reference.md) · [All operations](https://skmtc.net/digitalriver/apis/digital-river-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalriver/digital-river-api-reference/revisions/f21981db32be/schema)
