POST

Create Draft Order


Creates a draft order.

Pass one of the following in source:

  • sourceOrderId: Creates a draft for editing an existing order. If the order already has an active draft that you created, the existing draft is returned with preexistingDraftOrder: true. To apply the draft's changes to the original order, call Commit Draft Order.
  • draftOrder: Creates a draft order from scratch with the provided initial values. To convert it to an order, call Create Order From Draft.

Notes:

  • An order can have a single active draft at a time. If the active draft was created by a different identity, the call fails with ORDER_IS_ALREADY_EDITED.
  • A draft created for an existing order expires 24 hours after its last update. Modifying the draft resets the timer, and an expired draft is replaced with a new one on the next call to Create Draft Order. Drafts created from scratch don't expire.
Permission Scopes
Edit an order
Learn more about app permissions.
Method Declaration
Copy
Errors
400Invalid Argument

There are 8 errors with this status code.

404Not Found

There is 1 error with this status code.

409Already Exists

There is 1 error with this status code.

428Failed Precondition

There is 1 error with this status code.

500Internal

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?