Files
medusa-store/www/apps/api-reference/specs/admin/paths/admin_uploads.yaml
Shahed Nasser cd66cdd2bb docs: generate OAS manually for 2.7.0 (#12158)
* original changes

* changes

* fixes for delete operations

* generate oas
2025-04-11 16:41:39 +03:00

87 lines
2.8 KiB
YAML

post:
operationId: PostUploads
summary: Upload Files
description: Upload files to the configured File Module Provider.
x-authenticated: true
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
description: The files to upload
required:
- files
properties:
files:
type: array
description: The upload's files.
items:
oneOf:
- type: object
description: The file's files.
required:
- name
- content
properties:
name:
type: string
title: name
description: The file's name.
content:
type: string
title: content
description: The file's content.
- type: object
description: A File to upload.
externalDocs:
url: >-
https://developer.mozilla.org/en-US/docs/Web/API/File
description: Learn more about the File API
title: files
- type: array
description: list of files to upload.
items:
type: object
description: A File to upload.
externalDocs:
url: https://developer.mozilla.org/en-US/docs/Web/API/File
description: Learn more about the File API
title: FileList
description: The files to upload.
x-codeSamples:
- lang: JavaScript
label: JS SDK
source:
$ref: ../code_samples/JavaScript/admin_uploads/post.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_uploads/post.sh
tags:
- Uploads
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminFileListResponse.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
x-workflow: uploadFilesWorkflow