Files
medusa-store/docs/api/admin/paths/admin_regions.yaml
2023-04-04 21:02:44 +03:00

126 lines
3.2 KiB
YAML

get:
operationId: GetRegions
summary: List Regions
description: Retrieves a list of Regions.
x-authenticated: true
parameters:
- in: query
name: limit
schema:
type: integer
default: 50
required: false
description: limit the number of regions in response
- in: query
name: offset
schema:
type: integer
default: 0
required: false
description: Offset of regions in response (used for pagination)
- in: query
name: created_at
schema:
type: object
required: false
description: >-
Date comparison for when resulting region was created, i.e. less than,
greater than etc.
- in: query
name: updated_at
schema:
type: object
required: false
description: >-
Date comparison for when resulting region was updated, i.e. less than,
greater than etc.
- in: query
name: deleted_at
schema:
type: object
required: false
description: >-
Date comparison for when resulting region was deleted, i.e. less than,
greater than etc.
x-codegen:
method: list
queryParams: AdminGetRegionsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/admin_regions/get.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_regions/get.sh
security:
- api_token: []
- cookie_auth: []
tags:
- Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminRegionsListRes.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
post:
operationId: PostRegions
summary: Create a Region
description: Creates a Region
x-authenticated: true
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminPostRegionsReq.yaml
x-codegen:
method: create
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/admin_regions/post.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_regions/post.sh
security:
- api_token: []
- cookie_auth: []
tags:
- Regions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminRegionsRes.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