Medusa
Store APIAdmin API
Store APIAdmin API
Discord
Twitter
Linkedin
Github
  1. Order Edits
  • Getting Started
    • Introduction
    • Authentication
    • HTTP Compression
    • Publishable API Key
    • Expanding Fields
    • Selecting Fields
    • Query Parameter Types
    • Pagination
  • Auth
    • Check if Email Exists
      GET
    • Customer Login (JWT)
      POST
    • Customer Login (JWT)
      POST
    • Customer Log out
      DELETE
    • Get Current Customer
      GET
    • Customer Login
      POST
  • Carts
    • Create Payment Sessions
      POST
    • Update a Payment Session
      POST
    • Delete a Payment Session
      DELETE
    • Create a Cart
      POST
    • Get a Cart
      GET
    • Update a Cart
      POST
    • Remove Discount
      DELETE
    • Add a Line Item
      POST
    • Update a Line Item
      POST
    • Delete a Line Item
      DELETE
    • Select a Payment Session
      POST
    • Refresh a Payment Session
      POST
    • Add Shipping Method
      POST
    • Calculate Cart Taxes
      POST
    • Complete a Cart
      POST
  • Customers
    • Get Saved Payment Methods
    • Request Password Reset
    • Update a Shipping Address
    • Delete an Address
    • Create a Customer
    • Get a Customer
    • Update Customer
    • Add a Shipping Address
    • Reset Password
    • List Orders
  • Gift Cards
    • Get Gift Card by Code
  • Orders
    • Claim Order
    • Verify Order Claim
    • Look Up an Order
    • Get by Cart ID
    • Get an Order
  • Order Edits
    • Retrieve an Order Edit
      GET
    • Decline an Order Edit
      POST
    • Complete an Order Edit
      POST
  • Payment Collections
    • Refresh a Payment Session
    • Authorize Payment Session
    • Get a PaymentCollection
    • Create a Payment Session
    • Manage Payment Sessions
    • Authorize Payment Sessions
  • Products
    • Search Products
    • Get a Product
    • List Products
  • Product Variants
    • Get Product Variants
    • Get a Product Variant
  • Product Categories
    • Get a Product Category
    • List Product Categories
  • Product Collections
    • List Collections
    • Get a Collection
  • Product Tags
    • List Product Tags
  • Product Types
    • List Product Types
  • Regions
    • Get a Region
    • List Regions
  • Returns
    • Create Return
  • Return Reasons
    • List Return Reasons
    • Get a Return Reason
  • Shipping Options
    • List for Cart
    • Get Shipping Options
  • Swaps
    • Create a Swap
    • Get by Cart ID
  1. Order Edits

Complete an Order Edit

POST
/store/order-edits/{id}/complete
Order Edits
Complete an Order Edit and reflect its changes on the original order. Any additional payment required must be authorized first using the Payment Collection API Routes.

Request

Path Params
id
string 
required
The ID of the Order Edit.

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.medusa-commerce.com/store/order-edits//complete'

Responses

🟢200OK
application/json
Body
The order edit's details.
order_edit
object (Order Edit) 
required
Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order.
id
string 
required
The order edit's ID
Example:
oe_01G8TJSYT9M6AVS5N4EMNFS1EK
order_id
string 
required
The ID of the order that is edited
Example:
order_01G2SG30J8C85S4A5CHM2S1NS2
order
object  | null 
optional
The details of the order that this order edit was created for.
internal_note
string  | null 
required
An optional note with additional details about the order edit.
Example:
Included two more items B to the order.
created_by
string 
required
The unique identifier of the user or customer who created the order edit.
requested_by
string  | null 
required
The unique identifier of the user or customer who requested the order edit.
requested_at
string <date-time> | null 
required
The date with timezone at which the edit was requested.
confirmed_by
string  | null 
required
The unique identifier of the user or customer who confirmed the order edit.
confirmed_at
string <date-time> | null 
required
The date with timezone at which the edit was confirmed.
declined_by
string  | null 
required
The unique identifier of the user or customer who declined the order edit.
declined_at
string <date-time> | null 
required
The date with timezone at which the edit was declined.
declined_reason
string  | null 
required
An optional note why the order edit is declined.
canceled_by
string  | null 
required
The unique identifier of the user or customer who cancelled the order edit.
canceled_at
string <date-time> | null 
required
The date with timezone at which the edit was cancelled.
subtotal
integer 
optional
The total of subtotal
Example:
8000
discount_total
integer 
optional
The total of discount
Example:
800
shipping_total
integer 
optional
The total of the shipping amount
Example:
800
gift_card_total
integer 
optional
The total of the gift card amount
Example:
800
gift_card_tax_total
integer 
optional
The total of the gift card tax amount
Example:
800
tax_total
integer 
optional
The total of tax
Example:
0
total
integer 
optional
The total amount of the edited order.
Example:
8200
difference_due
integer 
optional
The difference between the total amount of the order and total amount of edited order.
Example:
8200
payment_collection_id
string  | null 
required
The ID of the payment collection
Example:
paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
created_at
string <date-time>
required
The date with timezone at which the resource was created.
updated_at
string <date-time>
required
The date with timezone at which the resource was updated.
status
enum<string> 
required
The status of the order edit.
Allowed values:
confirmeddeclinedrequestedcreatedcanceled
items
array[object (Line Item) {42}] 
optional
The details of the cloned items from the original order with the new changes. Once the order edit is confirmed, these line items are associated with the original order.
payment_collection
object (Payment Collection) 
optional
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
changes
array[object (Order Item Change) {11}] 
optional
The details of all the changes on the original order's line items.
Example
🟠400Client Error or Multiple Errors
🟠401User is not authorized. Must log in first
🟠404Not Found Error
🔴500Server Error
Modified at 2024-01-06 03:57:20
Previous
Decline an Order Edit
Next
Refresh a Payment Session
Built with