Files
medusa-store/docs/api/admin/paths/admin_inventory-items.yaml
Shahed Nasser ae017c4657 chore(docs): merge changes from master (#3780)
* chore(docs): Generated API Reference (#3761)

Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>

* docs: fix typo (#3771)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
Co-authored-by: Andre Schweighofer <fidrelity@users.noreply.github.com>
2023-04-10 11:15:54 +03:00

194 lines
5.0 KiB
YAML

get:
operationId: GetInventoryItems
summary: List Inventory Items
description: >-
Lists inventory items with the ability to apply filters or search queries on
them.
x-authenticated: true
parameters:
- in: query
name: offset
description: How many inventory items to skip in the result.
schema:
type: integer
default: 0
- in: query
name: limit
description: Limit the number of inventory items returned.
schema:
type: integer
default: 20
- 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
- in: query
name: q
description: Query used for searching product inventory items and their properties.
schema:
type: string
- in: query
name: location_id
style: form
explode: false
description: Locations ids to search for.
schema:
type: array
items:
type: string
- in: query
name: id
description: id to search for.
schema:
type: string
- in: query
name: sku
description: sku to search for.
schema:
type: string
- in: query
name: origin_country
description: origin_country to search for.
schema:
type: string
- in: query
name: mid_code
description: mid_code to search for.
schema:
type: string
- in: query
name: material
description: material to search for.
schema:
type: string
- in: query
name: hs_code
description: hs_code to search for.
schema:
type: string
- in: query
name: weight
description: weight to search for.
schema:
type: string
- in: query
name: length
description: length to search for.
schema:
type: string
- in: query
name: height
description: height to search for.
schema:
type: string
- in: query
name: width
description: width to search for.
schema:
type: string
- in: query
name: requires_shipping
description: requires_shipping to search for.
schema:
type: string
x-codegen:
method: list
queryParams: AdminGetInventoryItemsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/admin_inventory-items/get.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_inventory-items/get.sh
security:
- api_token: []
- cookie_auth: []
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: >-
../components/schemas/AdminInventoryItemsListWithVariantsAndLocationLevelsRes.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: PostInventoryItems
summary: Create an Inventory Item
description: Creates an Inventory Item.
x-authenticated: true
parameters:
- 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/AdminPostInventoryItemsReq.yaml
x-codegen:
method: create
queryParams: AdminPostInventoryItemsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/admin_inventory-items/post.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_inventory-items/post.sh
security:
- api_token: []
- cookie_auth: []
tags:
- Inventory Items
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminInventoryItemsRes.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