Files
medusa-store/docs/api/admin/paths/admin_orders.yaml
github-actions[bot] 658339767b chore(docs): Generated API Reference (#4706)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-07 16:54:48 +03:00

254 lines
6.6 KiB
YAML

get:
operationId: GetOrders
summary: List Orders
description: >-
Retrieve a list of Orders. The orders can be filtered by fields such as
`status` or `display_id`. The order can also be paginated.
x-authenticated: true
parameters:
- in: query
name: q
description: >-
term to search orders' shipping address, first name, email, and display
ID
schema:
type: string
- in: query
name: id
description: Filter by ID.
schema:
type: string
- in: query
name: status
style: form
explode: false
description: Filter by status
schema:
type: array
items:
type: string
enum:
- pending
- completed
- archived
- canceled
- requires_action
- in: query
name: fulfillment_status
style: form
explode: false
description: Filter by fulfillment status
schema:
type: array
items:
type: string
enum:
- not_fulfilled
- fulfilled
- partially_fulfilled
- shipped
- partially_shipped
- canceled
- returned
- partially_returned
- requires_action
- in: query
name: payment_status
style: form
explode: false
description: Filter by payment status
schema:
type: array
items:
type: string
enum:
- captured
- awaiting
- not_paid
- refunded
- partially_refunded
- canceled
- requires_action
- in: query
name: display_id
description: Filter by display ID
schema:
type: string
- in: query
name: cart_id
description: Filter by cart ID
schema:
type: string
- in: query
name: customer_id
description: Filter by customer ID
schema:
type: string
- in: query
name: email
description: Filter by email
schema:
type: string
- in: query
name: region_id
style: form
explode: false
description: Filter by region IDs.
schema:
oneOf:
- type: string
description: ID of a Region.
- type: array
items:
type: string
description: ID of a Region.
- in: query
name: currency_code
style: form
explode: false
description: Filter by currency codes.
schema:
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
- in: query
name: tax_rate
description: Filter by tax rate.
schema:
type: string
- in: query
name: created_at
description: Filter by a creation date range.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: updated_at
description: Filter by an update date range.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: canceled_at
description: Filter by a cancelation date range.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: sales_channel_id
style: form
explode: false
description: Filter by Sales Channel IDs
schema:
type: array
items:
type: string
description: The ID of a Sales Channel
- in: query
name: offset
description: The number of orders to skip when retrieving the orders.
schema:
type: integer
default: 0
- in: query
name: limit
description: Limit the number of orders returned.
schema:
type: integer
default: 50
- in: query
name: expand
description: Comma-separated relations that should be expanded in the returned order.
schema:
type: string
- in: query
name: fields
description: Comma-separated fields that should be included in the returned order.
schema:
type: string
x-codegen:
method: list
queryParams: AdminGetOrdersParams
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/admin_orders/get.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_orders/get.sh
security:
- api_token: []
- cookie_auth: []
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminOrdersListRes.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml