> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/introduction.md

## Article Content:

# About the Order Fulfillments API

The Order Fulfillments API lets you manage how an order's items are prepared and delivered to customers. You can track each fulfillment from creation through delivery, with standard shipping carriers or your own fulfillment solution.

With the Order Fulfillments API, you can:
* Create and manage fulfillments for individual orders.
* Handle bulk fulfillment operations across multiple orders.
* Track fulfillment status through predefined stages.
* Integrate with major shipping carriers through automatic tracking link generation.
* Support custom fulfillment providers with flexible tracking information.
* Monitor fulfillment updates through webhooks.

## Before you begin

It's important to note the following points before starting to code:

* Fulfillments can only be created for orders that are in an approved state.
* In the site dashboard, merchants manage fulfillment from the **Sales** > **Orders** page.
* Marking an order as fulfilled in the site dashboard doesn't create a fulfillment. The order's `fulfillmentStatus` changes to `FULFILLED`, but it has no fulfillments. Learn how to [get the date an order was fulfilled](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/sample-flows.md#get-the-date-an-order-was-fulfilled).
* A line item's quantity can be split across multiple fulfillments. Each fulfillment can include up to the line item's remaining unfulfilled quantity.
* When using predefined shipping providers, tracking links are generated automatically.
* Custom shipping providers require manual tracking link management.
* The API supports up to 300 line items per fulfillment.
* Bulk operations are limited to 100 orders at a time.

## Use cases

* [Create fulfillments with a standard shipping provider](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/sample-flows.md#create-fulfillments-with-a-standard-shipping-provider).
* [Implement custom fulfillment provider integration](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/sample-flows.md#implement-custom-fulfillment-provider-integration).
* [Process bulk fulfillments for multiple orders](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/sample-flows.md#process-bulk-fulfillments-for-multiple-orders).
* [Track fulfillment status progression](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/sample-flows.md#track-fulfillment-status-progression).

## Terminology

* **Fulfillment**: A record tracking the delivery process for specific items in an order.
* **Line item**: A specific product quantity from an order being fulfilled.
* **Shipping provider**
  * **Predefined provider**: Standard carriers (FedEx, UPS, USPS, DHL, Canada Post, Hermes) with automatic tracking.
  * **Custom provider**: Any other shipping service requiring manual tracking management.
* **Tracking information**
  * **Tracking number**: Carrier-specific identifier for package tracking.
  * **Tracking link**: URL where customers can check delivery status.
* **Fulfillment status**
  * **Pending**: Initial state when fulfillment is created.
  * **Accepted**: Order validated and ready for processing.
  * **Ready**: Items picked and packed for shipping.
  * **In_Delivery**: Handed over to shipping carrier.
  * **Fulfilled**: Delivery completed successfully.

## SDK Setup
  `@wix/ecom`

To use the API, install the `@wix/ecom` package.

#### Install the package

Follow the installation instructions for your development environment.

| Development environment | Installation method |
|--|--|
| Wix sites (editor or IDE) | Use the [package manager](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-in-the-editor.md). |
| Wix sites (local IDE) | Run `wix install @wix/ecom` using the [Wix CLI](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-with-the-wix-cli.md).|
| Blocks apps | Use the same installation method as Wix sites. |
| CLI and self-hosted apps | Run `npm install @wix/ecom` or `yarn add @wix/ecom`. |
| Headless sites and apps | Run `npm install @wix/ecom` or `yarn add @wix/ecom`. |

#### Import the package

To import the package in your code:

```js
import { orderFulfillments } from '@wix/ecom'
```

#### Import types

Types for this API are accessed through the `orderFulfillments` namespace you already imported above, as `orderFulfillments.<TypeName>`, using any type name shown in these docs.
  