Files
medusa-store/docs/api/admin/paths/stock-locations_{id}.yaml
2023-01-11 18:08:33 +02:00

110 lines
2.9 KiB
YAML

get:
operationId: GetStockLocationsStockLocation
summary: Get a Stock Location
description: Retrieves the Stock Location.
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the Stock Location.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the results.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the results.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/stock-locations_{id}/getundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/stock-locations_{id}/getundefined
security:
- api_token: []
- cookie_auth: []
tags:
- Stock Location
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
stock_location:
$ref: ../components/schemas/StockLocationDTO.yaml
post:
operationId: PostStockLocationsStockLocation
summary: Update a Stock Location
description: Updates a Stock Location.
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the Stock Location.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the results.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the results.
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminPostStockLocationsLocationReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/stock-locations_{id}/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/stock-locations_{id}/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- Stock Location
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
stock_location:
$ref: ../components/schemas/StockLocationDTO.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