Medusa Draft Orders API

A draft order is an order created by the admin user. This is useful for orders created offline or from clients other than a storefront, such as a third-party integration. These API routes allow admin users to create and manage draft orders.

GitHub OpenAPI
Business capability
Cart & Checkout AE-140.20

Operations 21

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /admin/draft-orders List draft orders · List Draft Orders #
Ask an LLM
“Which draft orders have I created for a particular customer?”
“Can I filter draft orders by region or sales channel?”
Tell an agent
List draft orders for customer {customer_id}.
Show draft orders in region {region_id}.
POST /admin/draft-orders Create a draft order · Create Draft Order #
Ask an LLM
“How do I create a draft order for a customer who placed an order offline?”
“What do I need to include when creating a draft order, like items and shipping?”
Tell an agent
Create a draft order for customer {customer_id} at {email} on sales channel {sales_channel_id} in {currency_code} with shipping methods {shipping_methods}.
Add items {items} to a new draft order for {email} in {currency_code}.
GET /admin/draft-orders/{id} Get a draft order · Get a Draft Order #
Ask an LLM
“What items and totals are on a draft order?”
“Can I look up one draft order by its ID?”
Tell an agent
Get draft order {id}.
Show the items on draft order {id}.
POST /admin/draft-orders/{id} Update a draft order · Update a Draft Order #
Ask an LLM
“Can I change the billing or shipping address on a draft order?”
“Is it possible to update the customer email on a draft order?”
Tell an agent
Change the shipping address on draft order {id} to {shipping_address}.
Update the customer email on draft order {id} to {email}.
DELETE /admin/draft-orders/{id} Delete a draft order · Delete a Draft Order #
Ask an LLM
“How do I delete a draft order I no longer need?”
“Can I remove a draft order by its ID?”
Tell an agent destructive · confirm first
Delete draft order {id}.
Remove the draft order {id} from my store.
POST /admin/draft-orders/{id}/convert-to-order Convert a draft order to an order · Convert a Draft Order to an Order #
Ask an LLM
“How do I turn a draft order into a real order?”
“What finalizes a draft order and creates an order?”
Tell an agent
Convert draft order {id} into an order.
Finalize draft order {id} and create an order.
POST /admin/draft-orders/{id}/edit Start an edit on a draft order · Create a Draft Order Edit #
Ask an LLM
“How do I begin changing the items or shipping on a draft order?”
“Can I create an edit on a draft order before finalizing it?”
Tell an agent
Create an edit on draft order {id}.
Start changing the items on draft order {id}.
DELETE /admin/draft-orders/{id}/edit Cancel an unconfirmed draft order edit · Cancel Edit on Draft Order #
Ask an LLM
“How do I cancel a draft order edit that hasn't been confirmed yet?”
“Can I discard changes made to a draft order before it's finalized?”
Tell an agent destructive · confirm first
Cancel the unconfirmed edit on draft order {id}.
Discard the changes I made to draft order {id}.
POST /admin/draft-orders/{id}/edit/confirm Confirm a draft order edit · Confirm an Edit on a Draft Order #
Ask an LLM
“How do I apply the changes made in a draft order edit?”
“What finalizes an edit on a draft order?”
Tell an agent
Confirm the edit on draft order {id}.
Apply the changes made to draft order {id}.
POST /admin/draft-orders/{id}/edit/items Add items to a draft order edit · Add Item to Draft Order Edit #
Ask an LLM
“How do I add a new product to a draft order I'm editing?”
“Can I add several items to a draft order edit at once?”
Tell an agent
Add items {items} to the edit on draft order {id}.
Insert new products into draft order {id}.
POST /admin/draft-orders/{id}/edit/items/item/{item_id} Update an existing item in a draft order edit · Update Existing Item in Draft Order Edit #
Ask an LLM
“How do I change the quantity of an item already on a draft order edit?”
“Can I adjust the price of an existing item in a draft order edit?”
Tell an agent
Set the quantity of item {item_id} in draft order {id} edit to {quantity}.
Change item {item_id} on draft order {id} to {quantity} at {unit_price}.
POST /admin/draft-orders/{id}/edit/items/{action_id} Update a new item added to a draft order edit · Update New Item in Draft Order Edit #
Ask an LLM
“How do I edit a product I just added to a draft order edit?”
“Can I change the price of a new item in a draft order edit?”
Tell an agent
Update new item {action_id} on draft order {id} edit to {quantity} at {unit_price}.
Change the quantity of item {action_id} in draft order {id} edit.
DELETE /admin/draft-orders/{id}/edit/items/{action_id} Remove an item from a draft order edit · Remove Item from Draft Order Edit #
Ask an LLM
“How do I remove a product from a draft order edit?”
“Can I delete an item I added to a draft order edit?”
Tell an agent destructive · confirm first
Remove item {action_id} from the edit on draft order {id}.
Delete the product added as action {action_id} on draft order {id}.
POST /admin/draft-orders/{id}/edit/promotions Add promotions to a draft order edit · Add Promotions to Draft Order Edit #
Ask an LLM
“How do I apply promo codes to a draft order I'm editing?”
“Can I add several promotions to a draft order edit at once?”
Tell an agent
Add promo codes {promo_codes} to the edit on draft order {id}.
Apply promotions {promo_codes} to draft order {id}.
DELETE /admin/draft-orders/{id}/edit/promotions Remove promotions from a draft order edit · Remove Promotions from Draft Order Edit #
Ask an LLM
“How do I take a promo code off a draft order I'm editing?”
“Can I remove several promotions from a draft order edit?”
Tell an agent destructive · confirm first
Remove promo codes {promo_codes} from the edit on draft order {id}.
Take off promotions {promo_codes} from draft order {id}.
POST /admin/draft-orders/{id}/edit/request Request changes to a draft order · Request Edit on Draft Order #
Ask an LLM
“How do I send a draft order edit back to the customer for confirmation?”
“Can I request changes to a draft order before finalizing it?”
Tell an agent
Request the changes on draft order {id}.
Send draft order {id} back to the customer for confirmation.
POST /admin/draft-orders/{id}/edit/shipping-methods Add a shipping method to a draft order edit · Add Shipping Method to Draft Order Edit #
Ask an LLM
“How do I add a new shipping method to a draft order I'm editing?”
“Can I charge a custom amount for a shipping method on a draft order edit?”
Tell an agent
Add shipping option {shipping_option_id} to draft order {id} edit.
Add a custom shipping method to draft order {id} edit with amount {custom_amount}.
POST /admin/draft-orders/{id}/edit/shipping-methods/method/{method_id} Update an existing shipping method in a draft order edit · Update Existing Shipping Method in Draft Order Edit #
Ask an LLM
“How do I change the shipping option on a shipping method already on a draft order edit?”
“Can I adjust the amount of an existing shipping method on a draft order edit?”
Tell an agent
Change shipping method {method_id} on draft order {id} edit to option {shipping_option_id}.
Set the amount of shipping method {method_id} on draft order {id} edit to {custom_amount}.
DELETE /admin/draft-orders/{id}/edit/shipping-methods/method/{method_id} Remove a shipping method from a draft order edit · Remove Shipping Method from Draft Order Edit #
Ask an LLM
“How do I remove a shipping method from a draft order edit?”
“Can I delete an existing shipping method on a draft order edit?”
Tell an agent destructive · confirm first
Remove shipping method {method_id} from the edit on draft order {id}.
Delete the shipping method {method_id} on draft order {id}.
POST /admin/draft-orders/{id}/edit/shipping-methods/{action_id} Update a new shipping method added to a draft order edit · Update New Shipping Method in Draft Order Edit #
Ask an LLM
“How do I edit a shipping method I just added to a draft order edit?”
“Can I change the shipping option on a new shipping method in a draft order edit?”
Tell an agent
Update new shipping method {action_id} on draft order {id} edit to option {shipping_option_id}.
Change the amount of new shipping method {action_id} on draft order {id} edit to {custom_amount}.
DELETE /admin/draft-orders/{id}/edit/shipping-methods/{action_id} Remove a shipping method added to a draft order edit · Remove New Shipping Method from Draft Order #
Ask an LLM
“How do I take a new shipping method off a draft order I'm editing?”
“Can I remove a shipping method add action from a draft order edit?”
Tell an agent destructive · confirm first
Remove shipping method action {action_id} from draft order {id}.
Delete the new shipping method edit {action_id} on draft order {id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/medusa:medusa-draft-orders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

medusa-draft-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.19.0
  title: Medusa Admin Draft Orders API
  license:
    name: MIT
    url: https://github.com/medusajs/medusa/blob/develop/LICENSE
  description: 'A draft order is an order created by the admin user. This is useful for orders created offline or from clients other than a storefront, such as a third-party integration.


    These API routes allow admin users to create and manage draft orders.'
servers:
- url: http://localhost:9000
- url: https://api.medusajs.com
tags:


# --- truncated at 32 KB (318 KB total) ---
# Full source: https://artifacts.apis.io/medusa/openapi/medusa-draft-orders-api-openapi.yml