chore(docs): Generated API Reference (#3308)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-02-22 14:45:23 +02:00
committed by GitHub
parent 3f5b7fbe7e
commit e3305188bd
31 changed files with 9056 additions and 8251 deletions
+5077 -4813
View File
File diff suppressed because it is too large Load Diff
+2563 -2305
View File
File diff suppressed because it is too large Load Diff
@@ -303,6 +303,13 @@ properties:
description: The total of gift cards with taxes
type: integer
example: 0
returnable_items:
description: >-
The items that are returnable as part of the order, order swaps or order
claims
type: array
items:
$ref: ./LineItem.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
+40 -40
View File
@@ -197,10 +197,6 @@ paths:
$ref: paths/currencies.yaml
/currencies/{code}:
$ref: paths/currencies_{code}.yaml
/customers:
$ref: paths/customers.yaml
/customers/{id}:
$ref: paths/customers_{id}.yaml
/customer-groups/{id}/customers/batch:
$ref: paths/customer-groups_{id}_customers_batch.yaml
/customer-groups:
@@ -209,6 +205,10 @@ paths:
$ref: paths/customer-groups_{id}.yaml
/customer-groups/{id}/customers:
$ref: paths/customer-groups_{id}_customers.yaml
/customers:
$ref: paths/customers.yaml
/customers/{id}:
$ref: paths/customers_{id}.yaml
/discounts/{id}/regions/{region_id}:
$ref: paths/discounts_{id}_regions_{region_id}.yaml
/discounts/{discount_id}/conditions/{condition_id}/batch:
@@ -243,14 +243,6 @@ paths:
$ref: paths/gift-cards.yaml
/gift-cards/{id}:
$ref: paths/gift-cards_{id}.yaml
/invites/accept:
$ref: paths/invites_accept.yaml
/invites:
$ref: paths/invites.yaml
/invites/{invite_id}:
$ref: paths/invites_{invite_id}.yaml
/invites/{invite_id}/resend:
$ref: paths/invites_{invite_id}_resend.yaml
/inventory-items/{id}/location-levels:
$ref: paths/inventory-items_{id}_location-levels.yaml
/inventory-items/{id}:
@@ -259,14 +251,22 @@ paths:
$ref: paths/inventory-items_{id}_location-levels_{location_id}.yaml
/inventory-items:
$ref: paths/inventory-items.yaml
/notifications:
$ref: paths/notifications.yaml
/notifications/{id}/resend:
$ref: paths/notifications_{id}_resend.yaml
/invites/accept:
$ref: paths/invites_accept.yaml
/invites:
$ref: paths/invites.yaml
/invites/{invite_id}:
$ref: paths/invites_{invite_id}.yaml
/invites/{invite_id}/resend:
$ref: paths/invites_{invite_id}_resend.yaml
/notes:
$ref: paths/notes.yaml
/notes/{id}:
$ref: paths/notes_{id}.yaml
/notifications:
$ref: paths/notifications.yaml
/notifications/{id}/resend:
$ref: paths/notifications_{id}_resend.yaml
/order-edits/{id}/items:
$ref: paths/order-edits_{id}_items.yaml
/order-edits/{id}/cancel:
@@ -283,10 +283,6 @@ paths:
$ref: paths/order-edits_{id}.yaml
/order-edits/{id}/request:
$ref: paths/order-edits_{id}_request.yaml
/payment-collections/{id}:
$ref: paths/payment-collections_{id}.yaml
/payment-collections/{id}/authorize:
$ref: paths/payment-collections_{id}_authorize.yaml
/orders/{id}/shipping-methods:
$ref: paths/orders_{id}_shipping-methods.yaml
/orders/{id}/archive:
@@ -341,6 +337,10 @@ paths:
$ref: paths/orders_{id}_return.yaml
/order/{id}/claims/{claim_id}:
$ref: paths/order_{id}_claims_{claim_id}.yaml
/payment-collections/{id}:
$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}:
@@ -359,6 +359,12 @@ paths:
$ref: paths/price-lists_{id}_variants_{variant_id}_prices.yaml
/price-lists/{id}/products:
$ref: paths/price-lists_{id}_products.yaml
/product-categories/{id}/products/batch:
$ref: paths/product-categories_{id}_products_batch.yaml
/product-categories:
$ref: paths/product-categories.yaml
/product-categories/{id}:
$ref: paths/product-categories_{id}.yaml
/product-tags:
$ref: paths/product-tags.yaml
/product-types:
@@ -381,12 +387,6 @@ paths:
$ref: paths/products_types.yaml
/products/{id}/metadata:
$ref: paths/products_{id}_metadata.yaml
/product-categories/{id}/products/batch:
$ref: paths/product-categories_{id}_products_batch.yaml
/product-categories:
$ref: paths/product-categories.yaml
/product-categories/{id}:
$ref: paths/product-categories_{id}.yaml
/publishable-api-keys/{id}/sales-channels/batch:
$ref: paths/publishable-api-keys_{id}_sales-channels_batch.yaml
/publishable-api-keys:
@@ -425,6 +425,12 @@ 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/{id}/stock-locations:
@@ -433,12 +439,6 @@ paths:
$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}:
@@ -451,6 +451,14 @@ paths:
$ref: paths/stock-locations.yaml
/stock-locations/{id}:
$ref: paths/stock-locations_{id}.yaml
/store/currencies/{code}:
$ref: paths/store_currencies_{code}.yaml
/store:
$ref: paths/store.yaml
/store/payment-providers:
$ref: paths/store_payment-providers.yaml
/store/tax-providers:
$ref: paths/store_tax-providers.yaml
/swaps/{id}:
$ref: paths/swaps_{id}.yaml
/swaps:
@@ -465,14 +473,6 @@ paths:
$ref: paths/tax-rates.yaml
/tax-rates/{id}:
$ref: paths/tax-rates_{id}.yaml
/store/currencies/{code}:
$ref: paths/store_currencies_{code}.yaml
/store:
$ref: paths/store.yaml
/store/payment-providers:
$ref: paths/store_payment-providers.yaml
/store/tax-providers:
$ref: paths/store_tax-providers.yaml
/uploads/protected:
$ref: paths/uploads_protected.yaml
/uploads:
@@ -10,6 +10,16 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -17,6 +27,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderClaimsReq.yaml
x-codegen:
method: createClaim
params: AdminPostOrdersOrderClaimsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,6 +16,16 @@ post:
description: The ID of the Claim.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -23,6 +33,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderClaimsClaimReq.yaml
x-codegen:
method: updateClaim
params: AdminPostOrdersOrderClaimsClaimParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -12,6 +12,20 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: >-
(Comma separated) Which fields should be expanded the order of the
result.
schema:
type: string
- in: query
name: fields
description: >-
(Comma separated) Which fields should be included the order of the
result.
schema:
type: string
requestBody:
content:
application/json:
@@ -19,6 +33,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderSwapsReq.yaml
x-codegen:
method: createSwap
queryParams: AdminPostOrdersOrderSwapsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
+11
View File
@@ -68,6 +68,16 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -75,6 +85,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderReq.yaml
x-codegen:
method: update
params: AdminPostOrdersOrderParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -10,8 +10,19 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: archive
params: AdminPostOrdersOrderArchiveParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -13,8 +13,19 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: cancel
params: AdminPostOrdersOrderCancel
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -10,8 +10,19 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: capturePayment
params: AdminPostOrdersOrderCaptureParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,8 +16,19 @@ post:
description: The ID of the Claim.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: cancelClaim
params: AdminPostOrdersClaimCancel
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,6 +16,16 @@ post:
description: The ID of the Claim.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -24,6 +34,7 @@ post:
../components/schemas/AdminPostOrdersOrderClaimsClaimFulfillmentsReq.yaml
x-codegen:
method: fulfillClaim
params: AdminPostOrdersOrderClaimsClaimFulfillmentsReq
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -22,8 +22,19 @@ post:
description: The ID of the Fulfillment.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: cancelClaimFulfillment
params: AdminPostOrdersClaimFulfillmentsCancelParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,6 +16,16 @@ post:
description: The ID of the Claim.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -24,6 +34,7 @@ post:
../components/schemas/AdminPostOrdersOrderClaimsClaimShipmentsReq.yaml
x-codegen:
method: createClaimShipment
params: AdminPostOrdersOrderClaimsClaimShipmentsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -10,8 +10,19 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: complete
params: AdminPostOrdersOrderCompleteParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -12,6 +12,16 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -19,6 +29,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderFulfillmentsReq.yaml
x-codegen:
method: createFulfillment
params: AdminPostOrdersOrderFulfillmentsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,8 +16,19 @@ post:
description: The ID of the Fulfillment
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: cancelFulfillment
params: AdminPostOrdersOrderFulfillementsCancelParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -10,6 +10,16 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -17,6 +27,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderRefundsReq.yaml
x-codegen:
method: refundPayment
params: AdminPostOrdersOrderRefundsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -12,6 +12,16 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -19,6 +29,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderReturnsReq.yaml
x-codegen:
method: requestReturn
params: AdminPostOrdersOrderReturnsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -10,6 +10,16 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -17,6 +27,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderShipmentReq.yaml
x-codegen:
method: createShipment
params: AdminPostOrdersOrderShipmentParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -11,6 +11,16 @@ post:
description: The ID of the Order.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -19,6 +29,7 @@ post:
x-authenticated: true
x-codegen:
method: addShippingMethod
params: AdminPostOrdersOrderShippingMethodsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,8 +16,19 @@ post:
description: The ID of the Swap.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: cancelSwap
params: AdminPostOrdersSwapCancelParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,6 +16,16 @@ post:
description: The ID of the Swap.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -24,6 +34,7 @@ post:
../components/schemas/AdminPostOrdersOrderSwapsSwapFulfillmentsReq.yaml
x-codegen:
method: fulfillSwap
params: AdminPostOrdersOrderSwapsSwapFulfillmentsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -22,8 +22,19 @@ post:
description: The ID of the Fulfillment.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: cancelSwapFulfillment
params: AdminPostOrdersSwapFulfillementsCancelParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -19,8 +19,19 @@ post:
description: The ID of the Swap.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
x-codegen:
method: processSwapPayment
params: AdminPostOrdersOrderSwapsSwapProcessPaymentParams
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -16,6 +16,16 @@ post:
description: The ID of the Swap.
schema:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the result.
schema:
type: string
- in: query
name: fields
description: Comma separated list of fields to include in the result.
schema:
type: string
requestBody:
content:
application/json:
@@ -23,6 +33,7 @@ post:
$ref: ../components/schemas/AdminPostOrdersOrderSwapsSwapShipmentsReq.yaml
x-codegen:
method: createSwapShipment
params: AdminPostOrdersOrderSwapsSwapShipmentsParams
x-codeSamples:
- lang: JavaScript
label: JS Client
+913 -906
View File
File diff suppressed because it is too large Load Diff
+186 -181
View File
@@ -262,151 +262,6 @@ 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-codegen:
method: retrieve
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:
$ref: '#/components/schemas/StoreCollectionsRes'
'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-codegen:
method: list
queryParams: StoreGetCollectionsParams
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:
$ref: '#/components/schemas/StoreCollectionsListRes'
'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
@@ -1143,16 +998,16 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/gift-cards/{code}:
/collections/{id}:
get:
operationId: GetGiftCardsCode
summary: Get Gift Card by Code
description: Retrieves a Gift Card by its associated unique code.
operationId: GetCollectionsCollection
summary: Get a Collection
description: Retrieves a Product Collection.
parameters:
- in: path
name: code
name: id
required: true
description: The unique Gift Card code.
description: The id of the Product Collection
schema:
type: string
x-codegen:
@@ -1163,23 +1018,121 @@ paths:
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);
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/gift-cards/{code}'
curl --location --request GET 'https://medusa-url.com/store/collections/{id}'
tags:
- Gift Card
- Collection
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreGiftCardsRes'
$ref: '#/components/schemas/StoreCollectionsRes'
'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-codegen:
method: list
queryParams: StoreGetCollectionsParams
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:
$ref: '#/components/schemas/StoreCollectionsListRes'
'400':
$ref: '#/components/responses/400_error'
'404':
@@ -1929,6 +1882,53 @@ 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 unique code.
parameters:
- in: path
name: code
required: true
description: The unique Gift Card code.
schema:
type: string
x-codegen:
method: retrieve
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:
$ref: '#/components/schemas/StoreGiftCardsRes'
'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
@@ -7685,6 +7685,11 @@ components:
description: The total of gift cards with taxes
type: integer
example: 0
returnable_items:
description: The items that are returnable as part of the order, order swaps or order claims
type: array
items:
$ref: '#/components/schemas/LineItem'
created_at:
description: The date with timezone at which the resource was created.
type: string
@@ -10798,27 +10803,6 @@ components:
exists:
type: boolean
description: Whether email exists or not.
StoreCollectionsListRes:
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
StoreCollectionsRes:
type: object
properties:
collection:
$ref: '#/components/schemas/ProductCollection'
StorePostCartsCartShippingMethodReq:
type: object
required:
@@ -10985,11 +10969,27 @@ components:
data:
type: object
description: The data to update the payment session with.
StoreGiftCardsRes:
StoreCollectionsListRes:
type: object
properties:
gift_card:
$ref: '#/components/schemas/GiftCard'
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
StoreCollectionsRes:
type: object
properties:
collection:
$ref: '#/components/schemas/ProductCollection'
StorePostCustomersCustomerAddressesReq:
type: object
required:
@@ -11125,6 +11125,11 @@ components:
metadata:
description: Metadata about the customer.
type: object
StoreGiftCardsRes:
type: object
properties:
gift_card:
$ref: '#/components/schemas/GiftCard'
StorePostOrderEditsOrderEditDecline:
type: object
properties:
@@ -303,6 +303,13 @@ properties:
description: The total of gift cards with taxes
type: integer
example: 0
returnable_items:
description: >-
The items that are returnable as part of the order, order swaps or order
claims
type: array
items:
$ref: ./LineItem.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
+6 -6
View File
@@ -137,10 +137,6 @@ 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:
@@ -163,8 +159,10 @@ paths:
$ref: paths/carts_{id}_payment-sessions_{provider_id}_refresh.yaml
/carts/{id}/payment-session:
$ref: paths/carts_{id}_payment-session.yaml
/gift-cards/{code}:
$ref: paths/gift-cards_{code}.yaml
/collections/{id}:
$ref: paths/collections_{id}.yaml
/collections:
$ref: paths/collections.yaml
/customers/me/addresses:
$ref: paths/customers_me_addresses.yaml
/customers:
@@ -181,6 +179,8 @@ paths:
$ref: paths/customers_password-token.yaml
/customers/password-reset:
$ref: paths/customers_password-reset.yaml
/gift-cards/{code}:
$ref: paths/gift-cards_{code}.yaml
/order-edits/{id}/complete:
$ref: paths/order-edits_{id}_complete.yaml
/order-edits/{id}/decline: