Files
medusa-store/docs/api/store/paths/carts_{id}_shipping-methods.yaml
2023-02-09 09:50:55 +02:00

47 lines
1.2 KiB
YAML

post:
operationId: PostCartsCartShippingMethod
description: Adds a Shipping Method to the Cart.
summary: Add a Shipping Method
parameters:
- in: path
name: id
required: true
description: The cart ID.
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/StorePostCartsCartShippingMethodReq.yaml
x-codegen:
method: addShippingMethod
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/carts_{id}_shipping-methods/post.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/carts_{id}_shipping-methods/post.sh
tags:
- Cart
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreCartsRes.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