Files
medusa-store/docs/api/store/paths/store_swaps.yaml
2023-04-04 21:02:44 +03:00

42 lines
1.1 KiB
YAML

post:
operationId: PostSwaps
summary: Create a Swap
description: >-
Creates a Swap on an Order by providing some items to return along with some
items to send back
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/StorePostSwapsReq.yaml
x-codegen:
method: create
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/store_swaps/post.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_swaps/post.sh
tags:
- Swaps
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreSwapsRes.yaml
'400':
$ref: ../components/responses/400_error.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