---
title: "Create a fulfillment"
method: POST
path: "/sales_orders/{id}/fulfillments"
tags: ["Sales orders"]
---

# Create a fulfillment

`POST /sales_orders/{id}/fulfillments`

Creates a fulfillment, based on a sales_order.

      
Fulfillments are used for completing orders and creating shipments.

## Path parameters

- `id` integer, required

## Request body

- CreateFulfillmentRequest
  - `fulfilled_by_third_party` boolean — Defines if fulfillment is fulfilled by a third party.
  - `order_packaging_id` integer — ID of a desired order_packaging. Specifies which order packaging to use.
  - `fulfillment_lines` object[], required — Lines to be fulfilled for the sales_order.
    - `order_line_id` integer, required — The id of the order_line you wish to fulfill. It has to be associated with the sales_order.
    - `shipped_quantity` string, required — The quantity of items you wish to ship. Total shipped quantity must not be higher than the quantity of items for the order line.

## Response `200`

Successful.

- FulfillmentCreated
  - `id` integer — Unique identifier of the fulfillment.
  - `sales_order_id` integer — Unique identifier of the related sales order.
  - `code` string — The generated code for the fulfillment. Generated from the related order ID
  - `type` 'outbound' | 'return' — The type of the fulfillment.
  - `shipment_id` integer — Unique identifier of the created shipment.
  - `fulfilled_by_third_party` boolean — Defines if fulfillment is fulfilled by a third party.
  - `order_packaging_id` integer — ID of a desired order_packaging. Specifies which order packaging that has been used.
  - `cancelled` boolean — Defines if fulfillment is cancelled.
  - `created_at` string, date-time — ISO 8601 datetime the object was created.
  - `updated_at` string, date-time — ISO 8601 datetime when the object was updated.
  - `return_resolution_name` string — Name of the chosen return resolution for return fulfillments.
  - `fulfillment_lines` object[] — fulfillment_lines associated with the fulfillment. Based on provided order_lines
    - `id` integer — Unique identifier of the fulfillment_line.
    - `item_id` integer — Unique identifier of the item.
    - `item_variant_code` string — The variant for the item
    - `item_sku` string — The sku of the item
    - `item_name` string — The name of the item
    - `shipped_quantity` integer — The quantity of items you wanted to ship
    - `quantity` string — The quantity of the item in the sales order
    - `unit_price_excluding_vat` string — The price of each item, without tax
    - `unit_price_including_vat` string — The price of each item, with tax
    - `amount_excluding_vat` string — Total price excluding taxes for the order line
    - `amount_including_vat` string — Total price including taxes for the order line
    - `vat_amount` string — Total tax amount for the fulfillment line
    - `vat_percent` string — Average tax percentage.
    - `currency_code` string — ISO 4217 currency code of the order total.
    - `order_line_id` integer — The ID of the related order_line
    - `return_reason_name` string — Name of the chosen return reason for return fulfillments
    - `return_comment` string — Comment provided by the user

## Other responses

- `401` — Unauthorized.
- `404` — Resource not found.
- `422` — Invalid or not found parameter(s)

---

[API](https://skmtc.net/shipmondo/apis/shipmondo-api.md) · [All operations](https://skmtc.net/shipmondo/apis/shipmondo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shipmondo/shipmondo-api/versions/dbe9a4ea0826/schema)
