Orders API Routes
Guest and registered customers can view orders they placed.
These API routes allow customers to view their orders.
GET /store/orders#
List Logged-in Customer's Orders
Retrieve the orders of the logged-in customer. The orders can be filtered by fields such as id. The orders can also be sorted or paginated.
Authentication: cookie session, JWT bearer token.
Header parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.idstring | string[]Optional$andobject[]Optional$orobject[]Optionalstatus"canceled" | "requires_action" | "pending" | "completed" | "draft" | "archived" | ("canceled")[] | ("requires_action")[] | ("pending")[] | ("completed")[] | ("draft")[] | ("archived")[]Optionalwith_deletedbooleanOptionallocalestringOptionalen-USRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberordersobject[]The order's orders.
ordersobject[]400, 401, 404, 409, 422, 500: an error response is returned.
GET /store/orders/{id}#
Get an Order
Retrieve an order by its ID. You can expand the order's relations or select the fields that should be returned. This API route doesn't require customer authentication, so that guest customers can view their order confirmation page after placing an order. To restrict access to this API route, refer to the Restrict Order Retrieval guide.
Authentication: none.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.localestringOptionalen-USRequest examples
Responses
200 OK
orderobjectThe order's details.
orderobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /store/orders/{id}/transfer/accept#
Accept Order Transfer
Accept an order to be transfered to a customer's account, which was specified when the transfer request was created. The transfer is requested previously either by the customer using the Request Order Transfer Store API route, or by the admin using the Request Order Transfer Admin API route.
Authentication: none.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields.
without prefix it will replace the entire default fields.localestringOptionalen-USRequest body (application/json)
tokenstringRequest examples
Responses
200 OK
orderobjectThe order's details.
orderobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /store/orders/{id}/transfer/cancel#
Cancel Order Transfer
Cancel an order transfer that the logged-in customer previously requested using the Request Order Transfer API route.
Authentication: cookie session, JWT bearer token.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields.
without prefix it will replace the entire default fields.localestringOptionalen-USRequest examples
Responses
200 OK
orderobjectThe order's details.
orderobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /store/orders/{id}/transfer/decline#
Decline Order Transfer
Decline an order transfer previously requested, typically by the admin user using the Request Order Transfer Admin API route.
Authentication: none.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields.
without prefix it will replace the entire default fields.localestringOptionalen-USRequest body (application/json)
tokenstringRequest examples
Responses
200 OK
orderobjectThe order's details.
orderobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /store/orders/{id}/transfer/request#
Request Order Transfer
Request an order to be transfered to the logged-in customer's account. The transfer is confirmed using the Accept Order Transfer API route.
Authentication: cookie session, JWT bearer token.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields.
without prefix it will replace the entire default fields.localestringOptionalen-USRequest body (application/json)
descriptionstringOptionalupdate_order_emailbooleanOptionalDefault: false
Request examples
Responses
200 OK
orderobjectThe order's details.
orderobject400, 401, 404, 409, 422, 500: an error response is returned.