chore(docs): Updated API Reference (#2903)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1f1b85afbb
commit
d93d337df7
+1647
-1647
File diff suppressed because it is too large
Load Diff
+1556
-1556
File diff suppressed because it is too large
Load Diff
+26
-26
@@ -193,10 +193,6 @@ paths:
|
||||
$ref: paths/collections.yaml
|
||||
/collections/{id}:
|
||||
$ref: paths/collections_{id}.yaml
|
||||
/currencies:
|
||||
$ref: paths/currencies.yaml
|
||||
/currencies/{code}:
|
||||
$ref: paths/currencies_{code}.yaml
|
||||
/customer-groups/{id}/customers/batch:
|
||||
$ref: paths/customer-groups_{id}_customers_batch.yaml
|
||||
/customer-groups:
|
||||
@@ -205,6 +201,10 @@ paths:
|
||||
$ref: paths/customer-groups_{id}.yaml
|
||||
/customer-groups/{id}/customers:
|
||||
$ref: paths/customer-groups_{id}_customers.yaml
|
||||
/currencies:
|
||||
$ref: paths/currencies.yaml
|
||||
/currencies/{code}:
|
||||
$ref: paths/currencies_{code}.yaml
|
||||
/customers:
|
||||
$ref: paths/customers.yaml
|
||||
/customers/{id}:
|
||||
@@ -227,6 +227,10 @@ paths:
|
||||
$ref: paths/discounts_{id}_dynamic-codes_{code}.yaml
|
||||
/discounts/code/{code}:
|
||||
$ref: paths/discounts_code_{code}.yaml
|
||||
/gift-cards:
|
||||
$ref: paths/gift-cards.yaml
|
||||
/gift-cards/{id}:
|
||||
$ref: paths/gift-cards_{id}.yaml
|
||||
/draft-orders:
|
||||
$ref: paths/draft-orders.yaml
|
||||
/draft-orders/{id}/line-items:
|
||||
@@ -239,10 +243,6 @@ paths:
|
||||
$ref: paths/draft-orders_{id}_pay.yaml
|
||||
/admin/draft-orders/{id}:
|
||||
$ref: paths/admin_draft-orders_{id}.yaml
|
||||
/gift-cards:
|
||||
$ref: paths/gift-cards.yaml
|
||||
/gift-cards/{id}:
|
||||
$ref: paths/gift-cards_{id}.yaml
|
||||
/invites/accept:
|
||||
$ref: paths/invites_accept.yaml
|
||||
/invites:
|
||||
@@ -329,12 +329,6 @@ paths:
|
||||
$ref: paths/payment-collections_{id}.yaml
|
||||
/payment-collections/{id}/authorize:
|
||||
$ref: paths/payment-collections_{id}_authorize.yaml
|
||||
/payments/{id}/capture:
|
||||
$ref: paths/payments_{id}_capture.yaml
|
||||
/payments/{id}:
|
||||
$ref: paths/payments_{id}.yaml
|
||||
/payments/{id}/refund:
|
||||
$ref: paths/payments_{id}_refund.yaml
|
||||
/price-lists/{id}/prices/batch:
|
||||
$ref: paths/price-lists_{id}_prices_batch.yaml
|
||||
/price-lists:
|
||||
@@ -347,10 +341,10 @@ paths:
|
||||
$ref: paths/price-lists_{id}_variants_{variant_id}_prices.yaml
|
||||
/price-lists/{id}/products:
|
||||
$ref: paths/price-lists_{id}_products.yaml
|
||||
/product-tags:
|
||||
$ref: paths/product-tags.yaml
|
||||
/product-types:
|
||||
$ref: paths/product-types.yaml
|
||||
/product-tags:
|
||||
$ref: paths/product-tags.yaml
|
||||
/products/{id}/options:
|
||||
$ref: paths/products_{id}_options.yaml
|
||||
/products:
|
||||
@@ -369,6 +363,12 @@ paths:
|
||||
$ref: paths/products_types.yaml
|
||||
/products/{id}/metadata:
|
||||
$ref: paths/products_{id}_metadata.yaml
|
||||
/payments/{id}/capture:
|
||||
$ref: paths/payments_{id}_capture.yaml
|
||||
/payments/{id}:
|
||||
$ref: paths/payments_{id}.yaml
|
||||
/payments/{id}/refund:
|
||||
$ref: paths/payments_{id}_refund.yaml
|
||||
/publishable-api-keys/{id}/sales-channels/batch:
|
||||
$ref: paths/publishable-api-keys_{id}_sales-channels_batch.yaml
|
||||
/publishable-api-keys:
|
||||
@@ -403,26 +403,22 @@ paths:
|
||||
$ref: paths/return-reasons.yaml
|
||||
/return-reasons/{id}:
|
||||
$ref: paths/return-reasons_{id}.yaml
|
||||
/returns/{id}/cancel:
|
||||
$ref: paths/returns_{id}_cancel.yaml
|
||||
/returns:
|
||||
$ref: paths/returns.yaml
|
||||
/returns/{id}/receive:
|
||||
$ref: paths/returns_{id}_receive.yaml
|
||||
/sales-channels/{id}/products/batch:
|
||||
$ref: paths/sales-channels_{id}_products_batch.yaml
|
||||
/sales-channels:
|
||||
$ref: paths/sales-channels.yaml
|
||||
/sales-channels/{id}:
|
||||
$ref: paths/sales-channels_{id}.yaml
|
||||
/returns/{id}/cancel:
|
||||
$ref: paths/returns_{id}_cancel.yaml
|
||||
/returns:
|
||||
$ref: paths/returns.yaml
|
||||
/returns/{id}/receive:
|
||||
$ref: paths/returns_{id}_receive.yaml
|
||||
/shipping-options:
|
||||
$ref: paths/shipping-options.yaml
|
||||
/shipping-options/{id}:
|
||||
$ref: paths/shipping-options_{id}.yaml
|
||||
/shipping-profiles:
|
||||
$ref: paths/shipping-profiles.yaml
|
||||
/shipping-profiles/{id}:
|
||||
$ref: paths/shipping-profiles_{id}.yaml
|
||||
/store/currencies/{code}:
|
||||
$ref: paths/store_currencies_{code}.yaml
|
||||
/store:
|
||||
@@ -445,6 +441,10 @@ paths:
|
||||
$ref: paths/tax-rates.yaml
|
||||
/tax-rates/{id}:
|
||||
$ref: paths/tax-rates_{id}.yaml
|
||||
/shipping-profiles:
|
||||
$ref: paths/shipping-profiles.yaml
|
||||
/shipping-profiles/{id}:
|
||||
$ref: paths/shipping-profiles_{id}.yaml
|
||||
/uploads/protected:
|
||||
$ref: paths/uploads_protected.yaml
|
||||
/uploads:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostDiscountsDiscountConditionsConditionBatch
|
||||
summary: Add a batch of resources to a discount condition
|
||||
summary: Add Batch Resources
|
||||
description: Add a batch of resources to a discount condition.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
@@ -76,7 +76,7 @@ post:
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
delete:
|
||||
operationId: DeleteDiscountsDiscountConditionsConditionBatch
|
||||
summary: Delete a batch of resources from a discount condition
|
||||
summary: Delete Batch Resources
|
||||
description: Delete a batch of resources from a discount condition.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
delete:
|
||||
operationId: DeleteOrderEditsOrderEdit
|
||||
summary: Delete an Order Edit
|
||||
description: Deletes an Order Edit
|
||||
description: Delete an Order Edit
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
@@ -47,7 +47,7 @@ delete:
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
get:
|
||||
operationId: GetOrderEditsOrderEdit
|
||||
summary: Retrieve an OrderEdit
|
||||
summary: Get an OrderEdit
|
||||
description: Retrieves a OrderEdit.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
@@ -105,7 +105,7 @@ get:
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
post:
|
||||
operationId: PostOrderEditsOrderEdit
|
||||
summary: Updates an OrderEdit
|
||||
summary: Update an OrderEdit
|
||||
description: Updates a OrderEdit.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
delete:
|
||||
operationId: DeleteOrderEditsOrderEditItemChange
|
||||
summary: Delete an Order Edit Item Change
|
||||
summary: Delete a Line Item Change
|
||||
description: Deletes an Order Edit Item Change
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostOrderEditsEditLineItems
|
||||
summary: Add an line item to an order (edit)
|
||||
summary: Add a Line Item
|
||||
description: Create an OrderEdit LineItem.
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
delete:
|
||||
operationId: DeleteOrderEditsOrderEditLineItemsLineItem
|
||||
summary: Delete line items from an order edit and create change item
|
||||
summary: Delete a Line Item
|
||||
description: Delete line items from an order edit and create change item
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
@@ -55,7 +55,7 @@ delete:
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
post:
|
||||
operationId: PostOrderEditsEditLineItemsLineItem
|
||||
summary: Create or update the order edit change holding the line item changes
|
||||
summary: Upsert Line Item Change
|
||||
description: Create or update the order edit change holding the line item changes
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostOrderEditsOrderEditRequest
|
||||
summary: Request order edit confirmation
|
||||
summary: Request Confirmation
|
||||
description: Request customer confirmation of an Order Edit
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
delete:
|
||||
operationId: DeletePaymentCollectionsPaymentCollection
|
||||
summary: Delete a Payment Collection
|
||||
summary: Del a PaymentCollection
|
||||
description: Deletes a Payment Collection
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
@@ -49,7 +49,7 @@ delete:
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
get:
|
||||
operationId: GetPaymentCollectionsPaymentCollection
|
||||
summary: Retrieve an PaymentCollection
|
||||
summary: Get a PaymentCollection
|
||||
description: Retrieves a PaymentCollection.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
@@ -107,7 +107,7 @@ get:
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
post:
|
||||
operationId: PostPaymentCollectionsPaymentCollection
|
||||
summary: Updates a PaymentCollection
|
||||
summary: Update PaymentCollection
|
||||
description: Updates a PaymentCollection.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPaymentCollectionsPaymentCollectionAuthorize
|
||||
summary: Set the status of PaymentCollection as Authorized
|
||||
summary: Mark Authorized
|
||||
description: Sets the status of PaymentCollection as Authorized.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPublishableApiKysPublishableApiKey
|
||||
summary: Updates a PublishableApiKey
|
||||
summary: Update PublishableApiKey
|
||||
description: Updates a PublishableApiKey.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPublishableApiKeys
|
||||
summary: Create a PublishableApiKey
|
||||
summary: Create PublishableApiKey
|
||||
description: Creates a PublishableApiKey.
|
||||
requestBody:
|
||||
content:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
delete:
|
||||
operationId: DeletePublishableApiKeysPublishableApiKey
|
||||
summary: Delete a PublishableApiKey
|
||||
summary: Delete PublishableApiKey
|
||||
description: Deletes a PublishableApiKeys
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
@@ -47,7 +47,7 @@ delete:
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
get:
|
||||
operationId: GetPublishableApiKeysPublishableApiKey
|
||||
summary: Get a Publishable API Key
|
||||
summary: Get a PublishableApiKey
|
||||
description: Retrieve the Publishable Api Key.
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPublishableApiKeysPublishableApiKeyRevoke
|
||||
summary: Revoke a PublishableApiKey
|
||||
summary: Revoke PublishableApiKey
|
||||
description: Revokes a PublishableApiKey.
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
get:
|
||||
operationId: GetPublishableApiKeySalesChannels
|
||||
summary: List PublishableApiKey's SalesChannels
|
||||
summary: List SalesChannels
|
||||
description: List PublishableApiKey's SalesChannels
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPublishableApiKeySalesChannelsChannelsBatch
|
||||
summary: Add sales channel to a publishable api key scope
|
||||
summary: Add SalesChannels
|
||||
description: Assign a batch of sales channels to a publishable api key.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
@@ -55,7 +55,7 @@ post:
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
delete:
|
||||
operationId: DeletePublishableApiKeySalesChannelsChannelsBatch
|
||||
summary: Remove sales channel from a publishable api key scope
|
||||
summary: Delete SalesChannels
|
||||
description: Remove a batch of sales channels from a publishable api key.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
post:
|
||||
operationId: PostUploadsProtected
|
||||
summary: Upload files with acl or in a non-public bucket
|
||||
summary: Protected File Upload
|
||||
description: >-
|
||||
Uploads at least one file to the specific fileservice that is installed in
|
||||
Medusa.
|
||||
Uploads at least one file with ACL or a non-public bucket to the specific
|
||||
fileservice that is installed in Medusa.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
|
||||
+66
-66
@@ -1429,6 +1429,59 @@ paths:
|
||||
$ref: '#/components/responses/invalid_request_error'
|
||||
'500':
|
||||
$ref: '#/components/responses/500_error'
|
||||
'/gift-cards/{code}':
|
||||
get:
|
||||
operationId: GetGiftCardsCode
|
||||
summary: Get Gift Card by Code
|
||||
description: Retrieves a Gift Card by its associated unqiue code.
|
||||
parameters:
|
||||
- in: path
|
||||
name: code
|
||||
required: true
|
||||
description: The unique Gift Card code.
|
||||
schema:
|
||||
type: string
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source: >
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||
3 })
|
||||
|
||||
medusa.giftCards.retrieve(code)
|
||||
|
||||
.then(({ gift_card }) => {
|
||||
console.log(gift_card.id);
|
||||
});
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source: >
|
||||
curl --location --request GET
|
||||
'https://medusa-url.com/store/gift-cards/{code}'
|
||||
tags:
|
||||
- Gift Card
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
gift_card:
|
||||
$ref: '#/components/schemas/GiftCard'
|
||||
'400':
|
||||
$ref: '#/components/responses/400_error'
|
||||
'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'
|
||||
/customers/me/addresses:
|
||||
post:
|
||||
operationId: PostCustomersCustomerAddresses
|
||||
@@ -2291,59 +2344,6 @@ paths:
|
||||
$ref: '#/components/responses/invalid_request_error'
|
||||
'500':
|
||||
$ref: '#/components/responses/500_error'
|
||||
'/gift-cards/{code}':
|
||||
get:
|
||||
operationId: GetGiftCardsCode
|
||||
summary: Get Gift Card by Code
|
||||
description: Retrieves a Gift Card by its associated unqiue code.
|
||||
parameters:
|
||||
- in: path
|
||||
name: code
|
||||
required: true
|
||||
description: The unique Gift Card code.
|
||||
schema:
|
||||
type: string
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source: >
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||
3 })
|
||||
|
||||
medusa.giftCards.retrieve(code)
|
||||
|
||||
.then(({ gift_card }) => {
|
||||
console.log(gift_card.id);
|
||||
});
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source: >
|
||||
curl --location --request GET
|
||||
'https://medusa-url.com/store/gift-cards/{code}'
|
||||
tags:
|
||||
- Gift Card
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
gift_card:
|
||||
$ref: '#/components/schemas/GiftCard'
|
||||
'400':
|
||||
$ref: '#/components/responses/400_error'
|
||||
'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'
|
||||
'/order-edits/{id}/complete':
|
||||
post:
|
||||
operationId: PostOrderEditsOrderEditComplete
|
||||
@@ -2507,7 +2507,7 @@ paths:
|
||||
/orders/customer/confirm:
|
||||
post:
|
||||
operationId: PostOrdersCustomerOrderClaimsCustomerOrderClaimAccept
|
||||
summary: Verify a claim to orders
|
||||
summary: Verify an Order Claim
|
||||
description: >-
|
||||
Verifies the claim order token provided to the customer upon request of
|
||||
order ownership
|
||||
@@ -2553,7 +2553,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Invite
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -2756,7 +2756,7 @@ paths:
|
||||
/orders/batch/customer/token:
|
||||
post:
|
||||
operationId: PostOrdersCustomerOrderClaim
|
||||
summary: Claim orders for signed in account
|
||||
summary: Claim an Order
|
||||
description: >-
|
||||
Sends an email to emails registered to orders provided with link to
|
||||
transfer order ownership
|
||||
@@ -2821,7 +2821,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions/batch/authorize':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessionsBatchAuthorize
|
||||
summary: Authorize Payment Sessions of a Payment Collection
|
||||
summary: Authorize PaymentSessions
|
||||
description: Authorizes Payment Sessions of a Payment Collection.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -2862,7 +2862,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -2887,7 +2887,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions/{session_id}/authorize':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessionsSessionAuthorize
|
||||
summary: Authorize a Payment Session of a Payment Collection
|
||||
summary: Authorize Payment Session
|
||||
description: Authorizes a Payment Session of a Payment Collection.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -2928,7 +2928,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -2953,8 +2953,8 @@ paths:
|
||||
'/payment-collections/{id}':
|
||||
get:
|
||||
operationId: GetPaymentCollectionsPaymentCollection
|
||||
summary: Retrieve an PaymentCollection
|
||||
description: Retrieves a PaymentCollection.
|
||||
summary: Get a PaymentCollection
|
||||
description: Get a Payment Collection
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
- in: path
|
||||
@@ -3023,7 +3023,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions/batch':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsPaymentCollectionSessionsBatch
|
||||
summary: Manage Multiple Payment Sessions from Payment Collections
|
||||
summary: Manage Payment Sessions
|
||||
description: Manages Multiple Payment Sessions from Payment Collections.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -3090,7 +3090,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -3115,7 +3115,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessions
|
||||
summary: Manage Payment Sessions from Payment Collections
|
||||
summary: Manage a Payment Session
|
||||
description: Manages Payment Sessions from Payment Collections.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -3160,7 +3160,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
+182
-182
@@ -343,6 +343,175 @@ paths:
|
||||
$ref: '#/components/responses/invalid_request_error'
|
||||
'500':
|
||||
$ref: '#/components/responses/500_error'
|
||||
'/collections/{id}':
|
||||
get:
|
||||
operationId: GetCollectionsCollection
|
||||
summary: Get a Collection
|
||||
description: Retrieves a Product Collection.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The id of the Product Collection
|
||||
schema:
|
||||
type: string
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source: >
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||
3 })
|
||||
|
||||
medusa.collections.retrieve(collection_id)
|
||||
|
||||
.then(({ collection }) => {
|
||||
console.log(collection.id);
|
||||
});
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source: >
|
||||
curl --location --request GET
|
||||
'https://medusa-url.com/store/collections/{id}'
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
collection:
|
||||
$ref: '#/components/schemas/ProductCollection'
|
||||
'400':
|
||||
$ref: '#/components/responses/400_error'
|
||||
'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'
|
||||
/collections:
|
||||
get:
|
||||
operationId: GetCollections
|
||||
summary: List Collections
|
||||
description: Retrieve a list of Product Collection.
|
||||
parameters:
|
||||
- in: query
|
||||
name: offset
|
||||
description: >-
|
||||
The number of collections to skip before starting to collect the
|
||||
collections set
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of collections to return
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting collections were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting collections were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source: >
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||
3 })
|
||||
|
||||
medusa.collections.list()
|
||||
|
||||
.then(({ collections, limit, offset, count }) => {
|
||||
console.log(collections.length);
|
||||
});
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source: >
|
||||
curl --location --request GET
|
||||
'https://medusa-url.com/store/collections'
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
collections:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ProductCollection'
|
||||
count:
|
||||
type: integer
|
||||
description: The total number of items available
|
||||
offset:
|
||||
type: integer
|
||||
description: The number of items skipped before these items
|
||||
limit:
|
||||
type: integer
|
||||
description: The number of items per page
|
||||
'400':
|
||||
$ref: '#/components/responses/400_error'
|
||||
'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'
|
||||
'/carts/{id}/shipping-methods':
|
||||
post:
|
||||
operationId: PostCartsCartShippingMethod
|
||||
@@ -1260,175 +1429,6 @@ paths:
|
||||
provider_id:
|
||||
type: string
|
||||
description: The ID of the Payment Provider.
|
||||
'/collections/{id}':
|
||||
get:
|
||||
operationId: GetCollectionsCollection
|
||||
summary: Get a Collection
|
||||
description: Retrieves a Product Collection.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The id of the Product Collection
|
||||
schema:
|
||||
type: string
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source: >
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||
3 })
|
||||
|
||||
medusa.collections.retrieve(collection_id)
|
||||
|
||||
.then(({ collection }) => {
|
||||
console.log(collection.id);
|
||||
});
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source: >
|
||||
curl --location --request GET
|
||||
'https://medusa-url.com/store/collections/{id}'
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
collection:
|
||||
$ref: '#/components/schemas/ProductCollection'
|
||||
'400':
|
||||
$ref: '#/components/responses/400_error'
|
||||
'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'
|
||||
/collections:
|
||||
get:
|
||||
operationId: GetCollections
|
||||
summary: List Collections
|
||||
description: Retrieve a list of Product Collection.
|
||||
parameters:
|
||||
- in: query
|
||||
name: offset
|
||||
description: >-
|
||||
The number of collections to skip before starting to collect the
|
||||
collections set
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of collections to return
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting collections were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting collections were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source: >
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||
3 })
|
||||
|
||||
medusa.collections.list()
|
||||
|
||||
.then(({ collections, limit, offset, count }) => {
|
||||
console.log(collections.length);
|
||||
});
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source: >
|
||||
curl --location --request GET
|
||||
'https://medusa-url.com/store/collections'
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
collections:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ProductCollection'
|
||||
count:
|
||||
type: integer
|
||||
description: The total number of items available
|
||||
offset:
|
||||
type: integer
|
||||
description: The number of items skipped before these items
|
||||
limit:
|
||||
type: integer
|
||||
description: The number of items per page
|
||||
'400':
|
||||
$ref: '#/components/responses/400_error'
|
||||
'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'
|
||||
/customers/me/addresses:
|
||||
post:
|
||||
operationId: PostCustomersCustomerAddresses
|
||||
@@ -2507,7 +2507,7 @@ paths:
|
||||
/orders/customer/confirm:
|
||||
post:
|
||||
operationId: PostOrdersCustomerOrderClaimsCustomerOrderClaimAccept
|
||||
summary: Verify a claim to orders
|
||||
summary: Verify an Order Claim
|
||||
description: >-
|
||||
Verifies the claim order token provided to the customer upon request of
|
||||
order ownership
|
||||
@@ -2553,7 +2553,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Invite
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -2756,7 +2756,7 @@ paths:
|
||||
/orders/batch/customer/token:
|
||||
post:
|
||||
operationId: PostOrdersCustomerOrderClaim
|
||||
summary: Claim orders for signed in account
|
||||
summary: Claim an Order
|
||||
description: >-
|
||||
Sends an email to emails registered to orders provided with link to
|
||||
transfer order ownership
|
||||
@@ -2821,7 +2821,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions/batch/authorize':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessionsBatchAuthorize
|
||||
summary: Authorize Payment Sessions of a Payment Collection
|
||||
summary: Authorize PaymentSessions
|
||||
description: Authorizes Payment Sessions of a Payment Collection.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -2862,7 +2862,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -2887,7 +2887,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions/{session_id}/authorize':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessionsSessionAuthorize
|
||||
summary: Authorize a Payment Session of a Payment Collection
|
||||
summary: Authorize Payment Session
|
||||
description: Authorizes a Payment Session of a Payment Collection.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -2928,7 +2928,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -2953,8 +2953,8 @@ paths:
|
||||
'/payment-collections/{id}':
|
||||
get:
|
||||
operationId: GetPaymentCollectionsPaymentCollection
|
||||
summary: Retrieve an PaymentCollection
|
||||
description: Retrieves a PaymentCollection.
|
||||
summary: Get a PaymentCollection
|
||||
description: Get a Payment Collection
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
- in: path
|
||||
@@ -3023,7 +3023,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions/batch':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsPaymentCollectionSessionsBatch
|
||||
summary: Manage Multiple Payment Sessions from Payment Collections
|
||||
summary: Manage Payment Sessions
|
||||
description: Manages Multiple Payment Sessions from Payment Collections.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -3090,7 +3090,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -3115,7 +3115,7 @@ paths:
|
||||
'/payment-collections/{id}/sessions':
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessions
|
||||
summary: Manage Payment Sessions from Payment Collections
|
||||
summary: Manage a Payment Session
|
||||
description: Manages Payment Sessions from Payment Collections.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -3160,7 +3160,7 @@ paths:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
@@ -137,6 +137,10 @@ paths:
|
||||
$ref: paths/auth.yaml
|
||||
/auth/{email}:
|
||||
$ref: paths/auth_{email}.yaml
|
||||
/collections/{id}:
|
||||
$ref: paths/collections_{id}.yaml
|
||||
/collections:
|
||||
$ref: paths/collections.yaml
|
||||
/carts/{id}/shipping-methods:
|
||||
$ref: paths/carts_{id}_shipping-methods.yaml
|
||||
/carts/{id}/taxes:
|
||||
@@ -159,10 +163,6 @@ paths:
|
||||
$ref: paths/carts_{id}_payment-sessions_{provider_id}_refresh.yaml
|
||||
/carts/{id}/payment-session:
|
||||
$ref: paths/carts_{id}_payment-session.yaml
|
||||
/collections/{id}:
|
||||
$ref: paths/collections_{id}.yaml
|
||||
/collections:
|
||||
$ref: paths/collections.yaml
|
||||
/customers/me/addresses:
|
||||
$ref: paths/customers_me_addresses.yaml
|
||||
/customers:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostOrdersCustomerOrderClaim
|
||||
summary: Claim orders for signed in account
|
||||
summary: Claim an Order
|
||||
description: >-
|
||||
Sends an email to emails registered to orders provided with link to transfer
|
||||
order ownership
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostOrdersCustomerOrderClaimsCustomerOrderClaimAccept
|
||||
summary: Verify a claim to orders
|
||||
summary: Verify an Order Claim
|
||||
description: >-
|
||||
Verifies the claim order token provided to the customer upon request of
|
||||
order ownership
|
||||
@@ -22,7 +22,7 @@ post:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Invite
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
get:
|
||||
operationId: GetPaymentCollectionsPaymentCollection
|
||||
summary: Retrieve an PaymentCollection
|
||||
description: Retrieves a PaymentCollection.
|
||||
summary: Get a PaymentCollection
|
||||
description: Get a Payment Collection
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
- in: path
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessions
|
||||
summary: Manage Payment Sessions from Payment Collections
|
||||
summary: Manage a Payment Session
|
||||
description: Manages Payment Sessions from Payment Collections.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -29,7 +29,7 @@ post:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPaymentCollectionsPaymentCollectionSessionsBatch
|
||||
summary: Manage Multiple Payment Sessions from Payment Collections
|
||||
summary: Manage Payment Sessions
|
||||
description: Manages Multiple Payment Sessions from Payment Collections.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -31,7 +31,7 @@ post:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessionsBatchAuthorize
|
||||
summary: Authorize Payment Sessions of a Payment Collection
|
||||
summary: Authorize PaymentSessions
|
||||
description: Authorizes Payment Sessions of a Payment Collection.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -31,7 +31,7 @@ post:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
operationId: PostPaymentCollectionsSessionsSessionAuthorize
|
||||
summary: Authorize a Payment Session of a Payment Collection
|
||||
summary: Authorize Payment Session
|
||||
description: Authorizes a Payment Session of a Payment Collection.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
@@ -31,7 +31,7 @@ post:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Payment
|
||||
- PaymentCollection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
@@ -4,7 +4,7 @@ import { OrderEditService } from "../../../../services"
|
||||
/**
|
||||
* @oas [delete] /order-edits/{id}/changes/{change_id}
|
||||
* operationId: "DeleteOrderEditsOrderEditItemChange"
|
||||
* summary: "Delete an Order Edit Item Change"
|
||||
* summary: "Delete a Line Item Change"
|
||||
* description: "Deletes an Order Edit Item Change"
|
||||
* x-authenticated: true
|
||||
* parameters:
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FindParams } from "../../../../types/common"
|
||||
/**
|
||||
* @oas [get] /payment-collections/{id}
|
||||
* operationId: "GetPaymentCollectionsPaymentCollection"
|
||||
* summary: "Retrieve an PaymentCollection"
|
||||
* summary: "Get a PaymentCollection"
|
||||
* description: "Get a Payment Collection"
|
||||
* x-authenticated: false
|
||||
* parameters:
|
||||
|
||||
Reference in New Issue
Block a user