Files
medusa-store/docs/api/admin/paths/regions.yaml
2022-12-22 17:09:49 +02:00

138 lines
3.6 KiB
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-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/regions/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/regions/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- Region
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
region:
$ref: ../components/schemas/Region.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
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-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/regions/getundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/regions/getundefined
security:
- api_token: []
- cookie_auth: []
tags:
- Region
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
regions:
type: array
items:
$ref: ../components/schemas/Region.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of items skipped before these items
limit:
type: integer
description: The number of items per page
'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