chore(docs): Updated API Reference (automated) (#11030)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-01-17 16:35:02 +00:00
committed by GitHub
co-authored by Oli Juhl Shahed Nasser
parent bff8c0bc93
commit 24441e48df
42 changed files with 953 additions and 460 deletions
@@ -61,7 +61,7 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: deleteReturnReasonsWorkflow
* x-workflow: deleteRefundReasonsWorkflow
*
*/
@@ -20,52 +20,7 @@
* content:
* application/json:
* schema:
* type: object
* description: The inventory levels to create or delete.
* properties:
* create:
* type: array
* description: The inventory levels to create.
* items:
* type: object
* description: The inventory level's details.
* required:
* - location_id
* properties:
* location_id:
* type: string
* title: location_id
* description: The ID of the associated location.
* stocked_quantity:
* type: number
* title: stocked_quantity
* description: The inventory level's stocked quantity.
* incoming_quantity:
* type: number
* title: incoming_quantity
* description: The inventory level's incoming quantity.
* update:
* type: array
* description: The inventory levels to update.
* items:
* type: object
* description: The inventory level's details.
* properties:
* stocked_quantity:
* type: number
* title: stocked_quantity
* description: The inventory level's stocked quantity.
* incoming_quantity:
* type: number
* title: incoming_quantity
* description: The inventory level's incoming quantity.
* delete:
* type: array
* description: The inventory levels to delete.
* items:
* type: string
* title: delete
* description: The ID of the inventory level to delete.
* $ref: "#/components/schemas/AdminBatchInventoryItemLocationsLevel"
* x-codeSamples:
* - lang: Shell
* label: cURL
@@ -75,19 +30,6 @@
* tags:
* - Inventory Items
* responses:
* "200":
* description: OK
* content:
* application/json:
* schema:
* type: object
* description: The inventory item's details.
* required:
* - inventory_item
* properties:
* inventory_item:
* type: object
* description: The inventory item's details.
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -100,7 +42,7 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: bulkCreateDeleteLevelsWorkflow
* x-workflow: batchInventoryItemLevelsWorkflow
*
*/
@@ -0,0 +1,130 @@
/**
* @oas [post] /admin/inventory-items/location-levels/batch
* operationId: PostInventoryItemsLocationLevelsBatch
* summary: Manage Inventory Levels
* description: Manage inventory levels to create, update, or delete them.
* x-authenticated: true
* parameters: []
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* type: object
* description: The inventory levels to manage.
* properties:
* create:
* type: array
* description: The inventory levels to create.
* items:
* type: object
* description: The details of an inventory level to create.
* required:
* - location_id
* - inventory_item_id
* properties:
* location_id:
* type: string
* title: location_id
* description: The ID of the associated stock location.
* inventory_item_id:
* type: string
* title: inventory_item_id
* description: The ID of the associated inventory item.
* stocked_quantity:
* type: number
* title: stocked_quantity
* description: The stocked quantity.
* incoming_quantity:
* type: number
* title: incoming_quantity
* description: The incoming quantity to be added to stock.
* update:
* type: array
* description: The inventory levels to update.
* items:
* type: object
* description: The details of an inventory level to update.
* required:
* - location_id
* - inventory_item_id
* properties:
* location_id:
* type: string
* title: location_id
* description: The ID of the associated stock location.
* inventory_item_id:
* type: string
* title: inventory_item_id
* description: The ID of the associated inventory item.
* stocked_quantity:
* type: number
* title: stocked_quantity
* description: The stocked quantity.
* incoming_quantity:
* type: number
* title: incoming_quantity
* description: The incoming quantity to be added to stock.
* delete:
* type: array
* description: The IDs of the inventory levels to delete.
* items:
* type: string
* title: delete
* description: The ID of the inventory level to delete.
* force:
* type: boolean
* title: force
* description: Whether to delete specified inventory levels even if they have a non-zero stocked quantity.
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/inventory-items/location-levels/batch' \
* -H 'Authorization: Bearer {access_token}' \
* -H 'Content-Type: application/json' \
* --data-raw '{
* "create": [
* {
* "location_id": "sloc_123",
* "inventory_item_id": "iitem_123",
* "stocked_quantity": 100,
* "incoming_quantity": 50
* }
* ],
* "update": [
* {
* "location_id": "sloc_456",
* "inventory_item_id": "iitem_456",
* "stocked_quantity": 200,
* "incoming_quantity": 75
* }
* ],
* "delete": [
* "iilev_123"
* ]
* }'
* tags:
* - Inventory Items
* responses:
* "200":
* description: OK
* "400":
* $ref: "#/components/responses/400_error"
* "401":
* $ref: "#/components/responses/unauthorized"
* "404":
* $ref: "#/components/responses/not_found_error"
* "409":
* $ref: "#/components/responses/invalid_state_error"
* "422":
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: batchInventoryItemLevelsWorkflow
*
*/