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

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]
2024-11-25 14:33:22 +00:00
committed by GitHub
co-authored by Oli Juhl Shahed Nasser
parent 3ab056e572
commit 7865909891
73 changed files with 2943 additions and 275 deletions
@@ -0,0 +1,66 @@
post:
operationId: PostCartsIdCustomer
summary: Set Cart's Customer
x-sidebar-summary: Set Customer
description: >-
Set the customer of the cart. This is useful when you create the cart for a
guest customer, then they log in with their account.
externalDocs:
url: >-
https://docs.medusajs.com/resources/storefront-development/cart/update#set-carts-customer
description: 'Storefront guide: How to set the cart''s customer.'
x-authenticated: false
parameters:
- name: id
in: path
description: The cart's ID.
required: true
schema:
type: string
- name: fields
in: query
description: >-
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false
schema:
type: string
title: fields
description: >-
Comma-separated fields that should be included in the returned data.
If a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. Without
prefix it will replace the entire default fields.
externalDocs:
url: '#select-fields-and-relations'
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_carts_{id}_customer/post.sh
tags:
- Carts
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreCartResponse.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: transferCartCustomerWorkflow
@@ -0,0 +1,72 @@
post:
operationId: PostOrdersIdTransferAccept
summary: Accept Order Transfer
x-sidebar-summary: Accept Transfer
description: >-
Accept an order to be transfered to a customer's account, which was
specified when the transfer request was created. The transfer is requested
previously either by the customer using the [Request Order Transfer Store
API
route](https://docs.medusajs.com/api/store#orders_postordersidtransferrequest),
or by the admin using the [Request Order Transfer Admin API
route](https://docs.medusajs.com/api/admin#orders_postordersidtransferrequest).
x-authenticated: false
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: fields
in: query
description: >-
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false
schema:
type: string
title: fields
description: >-
Comma-separated fields that should be included in the returned data.
If a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. Without
prefix it will replace the entire default fields.
externalDocs:
url: '#select-fields-and-relations'
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/StoreAcceptOrderTransfer.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_orders_{id}_transfer_accept/post.sh
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreOrderResponse.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: acceptOrderTransferWorkflow
@@ -0,0 +1,67 @@
post:
operationId: PostOrdersIdTransferCancel
summary: Cancel Order Transfer
x-sidebar-summary: Cancel Transfer
description: >-
Cancel an order transfer that the logged-in customer previously requested
using the [Request Order
Transfer](https://docs.medusajs.com/api/store#orders_postordersidtransferrequest)
API route.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: fields
in: query
description: >-
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false
schema:
type: string
title: fields
description: >-
Comma-separated fields that should be included in the returned data.
If a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. Without
prefix it will replace the entire default fields.
externalDocs:
url: '#select-fields-and-relations'
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_orders_{id}_transfer_cancel/post.sh
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreOrderResponse.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: cancelOrderTransferRequestWorkflow
security:
- cookie_auth: []
- jwt_token: []
@@ -0,0 +1,68 @@
post:
operationId: PostOrdersIdTransferDecline
summary: Decline Order Transfer
x-sidebar-summary: Decline Transfer
description: >-
Decline an order transfer previously requested, typically by the admin user
using the [Request Order Transfer Admin API
route](https://docs.medusajs.com/api/admin#orders_postordersidtransferrequest).
x-authenticated: false
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: fields
in: query
description: >-
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false
schema:
type: string
title: fields
description: >-
Comma-separated fields that should be included in the returned data.
If a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. Without
prefix it will replace the entire default fields.
externalDocs:
url: '#select-fields-and-relations'
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/StoreDeclineOrderTransferRequest.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_orders_{id}_transfer_decline/post.sh
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreOrderResponse.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: declineOrderTransferRequestWorkflow
@@ -0,0 +1,72 @@
post:
operationId: PostOrdersIdTransferRequest
summary: Request Order Transfer
x-sidebar-summery: Request Transfer
description: >-
Request an order to be transfered to the logged-in customer's account. The
transfer is confirmed using the [Accept Order
Transfer](https://docs.medusajs.com/api/store#orders_postordersidtransferaccept)
API route.
x-authenticated: true
parameters:
- name: id
in: path
description: The order's ID.
required: true
schema:
type: string
- name: fields
in: query
description: >-
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false
schema:
type: string
title: fields
description: >-
Comma-separated fields that should be included in the returned data.
If a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. Without
prefix it will replace the entire default fields.
externalDocs:
url: '#select-fields-and-relations'
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/StoreRequestOrderTransfer.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_orders_{id}_transfer_request/post.sh
tags:
- Orders
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/StoreOrderResponse.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: getOrderDetailWorkflow
security:
- cookie_auth: []
- jwt_token: []