> 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/orders/introduction.md

## Article Content:

# About the Orders API

The Orders API allows apps or site owners to customize management of the order lifecycle, including viewing, updating, and canceling. In the dashboard, business staff can create new orders, view and edit existing orders, track fulfillment, and manage the payments cycle.

An order holds information about purchased items, price and tax summaries, shipping and billing information, any applied discounts, and the status of payment and fulfillment.

With the Orders API, you can:

* [Get](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/get-order.md) and [search](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/search-orders.md) for orders.
* [Update](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/update-order.md) and [cancel](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/cancel-order.md) an order.
* Archive and unarchive orders by setting the `archived` field with [Update Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/update-order.md). Archived orders are hidden from the main orders view in the dashboard.
* [Create](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/create-order.md) an order for your records.
* Listen to events when an order is [approved](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/order-approved.md), [updated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/order-updated.md), or [canceled](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/order-canceled.md).

## Order creation and the Create Order method

Orders are typically created automatically when a buyer completes checkout on a Wix site. However, you can use the [Create Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/create-order.md) method to:
+ Record orders from external systems, such as POS terminals, marketplaces, or legacy platforms.
+ Create manual orders for phone or email sales.

When creating an order via the API, set the `channelInfo.type` to match the original source of the order. If no matching type exists, use `OTHER_PLATFORM`.

## Editing orders with draft orders

The [Update Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/update-order.md) method only supports updating specific fields such as contact info, addresses, and metadata. To modify pricing or line items on an existing order, use the [Draft Orders API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/draft-orders/introduction.md).

## Controlling who can edit an order

When creating an order with [Create Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/create-order.md), use `settings.editableByOwnerApps` to control which apps are allowed to edit the order.

By default, any app with the required permissions can edit an order. To restrict editing to specific apps, set `settings.editableByOwnerApps` and specify the app IDs. Apps not listed as owners receive an `ORDER_CANNOT_BE_EDITED` error when attempting to edit.

This setting can't be changed after the order is created.

## Test orders

With Test Purchase Flow, Wix users can place test orders through their live checkout to try out their purchase flow without making a real payment. Test orders have `demo` set to `true`. They behave like real orders in most ways, but most order events aren't sent for them, while API calls still return them. For details, see [Test Orders](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/test-orders.md).

## Use cases

+ [Use an order ID across different eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/sample-flows.md#using-an-order-id-across-different-ecommerce-apis)
+ [Search for orders by customer](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/sample-flows.md#search-for-orders-by-customer)
+ [Track fulfillment status](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/sample-flows.md#track-fulfillment-status)
+ [Create an order with restricted edit access](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/sample-flows.md#create-an-order-with-restricted-edit-access)
+ [Skip test orders when syncing orders](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/sample-flows.md#skip-test-orders-when-syncing-orders)

## Terminology

For definitions of key terms used in this API, see [Terminology](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/terminology.md).

## See also

+ [Order Transactions API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-transactions/introduction.md)
+ [Order Fulfillments API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/introduction.md)
+ [Draft Orders API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/draft-orders/introduction.md)

