From 56ee4d6aade2d9a64c0ee3ad10cca5975e7fc246 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 07:13:51 +0000 Subject: [PATCH] chore(docs): Updated API Reference (v2) (#9148) 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> --- .../Shell/auth_token_refresh/post.sh | 2 + .../Shell/auth_user_{auth_provider}/post.sh | 2 +- .../post.sh | 2 +- .../post.sh | 7 +- .../admin/components/schemas/AdminApiKey.yaml | 23 +- .../schemas/AdminApiKeyResponse.yaml | 2 +- .../schemas/AdminBatchProductRequest.yaml | 10 +- .../schemas/AdminBatchProductResponse.yaml | 17 +- .../AdminBatchProductVariantRequest.yaml | 10 +- .../AdminBatchProductVariantResponse.yaml | 17 +- .../components/schemas/AdminCampaign.yaml | 18 +- .../schemas/AdminCampaignResponse.yaml | 2 +- .../schemas/AdminCancelFulfillment.yaml | 3 - .../admin/components/schemas/AdminClaim.yaml | 69 +- .../schemas/AdminClaimDeleteResponse.yaml | 4 +- .../schemas/AdminClaimListResponse.yaml | 10 +- .../schemas/AdminClaimOrderResponse.yaml | 2 +- .../schemas/AdminClaimPreviewResponse.yaml | 4 +- .../schemas/AdminClaimRequestResponse.yaml | 4 +- .../schemas/AdminClaimResponse.yaml | 2 +- .../AdminClaimReturnPreviewResponse.yaml | 4 +- .../components/schemas/AdminCollection.yaml | 10 +- .../AdminCollectionDeleteResponse.yaml | 4 +- .../schemas/AdminCollectionListResponse.yaml | 10 +- .../schemas/AdminCollectionResponse.yaml | 2 +- .../components/schemas/AdminCreateApiKey.yaml | 8 +- .../schemas/AdminCreateApplicationMethod.yaml | 33 +- .../schemas/AdminCreateCampaign.yaml | 48 - .../schemas/AdminCreateCollection.yaml | 4 +- .../schemas/AdminCreateCustomerGroup.yaml | 4 +- .../schemas/AdminCreateFulfillment.yaml | 63 +- .../schemas/AdminCreateInventoryItem.yaml | 12 +- .../schemas/AdminCreatePriceList.yaml | 24 +- .../schemas/AdminCreatePricePreference.yaml | 12 +- .../schemas/AdminCreateProduct.yaml | 62 +- .../schemas/AdminCreateProductCategory.yaml | 12 +- .../schemas/AdminCreateProductOption.yaml | 8 +- .../schemas/AdminCreateProductTag.yaml | 4 +- .../schemas/AdminCreateProductVariant.yaml | 46 +- .../AdminCreateProductVariantPrice.yaml | 12 +- .../schemas/AdminCreatePromotionRule.yaml | 20 +- .../schemas/AdminCreateRefundReason.yaml | 2 +- .../components/schemas/AdminCreateRegion.yaml | 17 +- .../schemas/AdminCreateReservation.yaml | 12 +- .../schemas/AdminCreateSalesChannel.yaml | 6 +- .../schemas/AdminCreateShipment.yaml | 10 +- .../schemas/AdminCreateShippingOption.yaml | 33 +- .../AdminCreateShippingOptionRule.yaml | 15 +- .../schemas/AdminCreateShippingProfile.yaml | 4 +- .../schemas/AdminCreateStockLocation.yaml | 6 +- .../schemas/AdminCreateTaxRate.yaml | 19 +- .../schemas/AdminCreateTaxRateRule.yaml | 8 +- .../schemas/AdminCreateTaxRegion.yaml | 21 +- .../AdminCreateVariantInventoryItem.yaml | 6 +- .../AdminCreateWorkflowsAsyncResponse.yaml | 14 +- .../schemas/AdminCreateWorkflowsRun.yaml | 7 +- .../components/schemas/AdminCurrency.yaml | 56 +- .../schemas/AdminCurrencyListResponse.yaml | 10 +- .../schemas/AdminCurrencyResponse.yaml | 2 +- .../components/schemas/AdminCustomer.yaml | 34 +- .../schemas/AdminCustomerAddress.yaml | 25 +- .../schemas/AdminCustomerAddressResponse.yaml | 2 +- .../schemas/AdminCustomerGroup.yaml | 36 +- .../schemas/AdminCustomerInGroupFilters.yaml | 66 +- .../AdminDeletePaymentCollectionResponse.yaml | 6 +- .../schemas/AdminDraftOrderResponse.yaml | 2 +- .../components/schemas/AdminExchange.yaml | 80 +- .../schemas/AdminExchangeDeleteResponse.yaml | 4 +- .../schemas/AdminExchangeOrderResponse.yaml | 3 +- .../schemas/AdminExchangePreviewResponse.yaml | 2 +- .../schemas/AdminExchangeRequestResponse.yaml | 4 +- .../schemas/AdminExchangeResponse.yaml | 2 +- .../schemas/AdminExchangeReturnResponse.yaml | 2 +- .../schemas/AdminExportProductRequest.yaml | 3 - .../schemas/AdminExportProductResponse.yaml | 7 +- .../admin/components/schemas/AdminFile.yaml | 4 +- .../schemas/AdminFileListResponse.yaml | 4 +- .../components/schemas/AdminFileResponse.yaml | 2 +- .../components/schemas/AdminFulfillment.yaml | 33 +- .../schemas/AdminFulfillmentAddress.yaml | 34 +- .../schemas/AdminFulfillmentItem.yaml | 18 +- .../schemas/AdminFulfillmentLabel.yaml | 14 +- .../schemas/AdminFulfillmentProvider.yaml | 2 +- .../AdminFulfillmentProviderListResponse.yaml | 10 +- .../schemas/AdminFulfillmentResponse.yaml | 2 +- .../AdminFulfillmentSetDeleteResponse.yaml | 4 +- .../components/schemas/AdminGeoZone.yaml | 55 +- .../schemas/AdminImportProductRequest.yaml | 2 +- .../schemas/AdminImportProductResponse.yaml | 12 +- .../schemas/AdminInventoryItem.yaml | 14 +- .../schemas/AdminInventoryItemResponse.yaml | 2 +- .../schemas/AdminInventoryLevel.yaml | 65 +- .../admin/components/schemas/AdminInvite.yaml | 10 +- .../schemas/AdminInviteResponse.yaml | 2 +- .../schemas/AdminLinkPriceListProducts.yaml | 2 +- .../components/schemas/AdminNotification.yaml | 33 +- .../AdminNotificationListResponse.yaml | 10 +- .../schemas/AdminNotificationResponse.yaml | 2 +- .../admin/components/schemas/AdminOrder.yaml | 58 +- .../components/schemas/AdminOrderAddress.yaml | 37 +- .../schemas/AdminOrderChangesResponse.yaml | 4 +- .../AdminOrderEditPreviewResponse.yaml | 2 +- .../schemas/AdminOrderEditResponse.yaml | 2 +- .../components/schemas/AdminOrderPreview.yaml | 274 +- .../schemas/AuthCallbackResponse.yaml | 12 + .../components/schemas/BaseCustomer.yaml | 73 + .../components/schemas/StoreCreateCart.yaml | 33 + .../specs/admin/openapi.full.yaml | 1951 +++++---- .../api-reference/specs/admin/openapi.yaml | 2 + .../paths/admin_fulfillments_{id}_cancel.yaml | 5 - .../admin/paths/admin_products_export.yaml | 5 - .../specs/admin/paths/auth_token_refresh.yaml | 38 + .../paths/auth_user_{auth_provider}.yaml | 38 +- .../auth_user_{auth_provider}_callback.yaml | 29 +- .../auth_user_{auth_provider}_register.yaml | 19 +- .../Shell/store_customers/post.sh | 4 +- .../store/components/schemas/AdminApiKey.yaml | 23 +- .../schemas/AdminApiKeyResponse.yaml | 2 +- .../schemas/AdminBatchProductRequest.yaml | 10 +- .../schemas/AdminBatchProductResponse.yaml | 17 +- .../AdminBatchProductVariantRequest.yaml | 10 +- .../AdminBatchProductVariantResponse.yaml | 17 +- .../components/schemas/AdminCampaign.yaml | 18 +- .../schemas/AdminCampaignResponse.yaml | 2 +- .../schemas/AdminCancelFulfillment.yaml | 3 - .../store/components/schemas/AdminClaim.yaml | 69 +- .../schemas/AdminClaimDeleteResponse.yaml | 4 +- .../schemas/AdminClaimListResponse.yaml | 10 +- .../schemas/AdminClaimOrderResponse.yaml | 2 +- .../schemas/AdminClaimPreviewResponse.yaml | 4 +- .../schemas/AdminClaimRequestResponse.yaml | 4 +- .../schemas/AdminClaimResponse.yaml | 2 +- .../AdminClaimReturnPreviewResponse.yaml | 4 +- .../components/schemas/AdminCollection.yaml | 10 +- .../AdminCollectionDeleteResponse.yaml | 4 +- .../schemas/AdminCollectionListResponse.yaml | 10 +- .../schemas/AdminCollectionResponse.yaml | 2 +- .../components/schemas/AdminCreateApiKey.yaml | 8 +- .../schemas/AdminCreateApplicationMethod.yaml | 33 +- .../schemas/AdminCreateCampaign.yaml | 48 - .../schemas/AdminCreateCollection.yaml | 4 +- .../schemas/AdminCreateCustomerGroup.yaml | 4 +- .../schemas/AdminCreateFulfillment.yaml | 63 +- .../schemas/AdminCreateInventoryItem.yaml | 12 +- .../schemas/AdminCreatePriceList.yaml | 24 +- .../schemas/AdminCreatePricePreference.yaml | 12 +- .../schemas/AdminCreateProduct.yaml | 62 +- .../schemas/AdminCreateProductCategory.yaml | 12 +- .../schemas/AdminCreateProductOption.yaml | 8 +- .../schemas/AdminCreateProductTag.yaml | 4 +- .../schemas/AdminCreateProductVariant.yaml | 46 +- .../AdminCreateProductVariantPrice.yaml | 12 +- .../schemas/AdminCreatePromotionRule.yaml | 20 +- .../schemas/AdminCreateRefundReason.yaml | 2 +- .../components/schemas/AdminCreateRegion.yaml | 17 +- .../schemas/AdminCreateReservation.yaml | 12 +- .../schemas/AdminCreateSalesChannel.yaml | 6 +- .../schemas/AdminCreateShipment.yaml | 10 +- .../schemas/AdminCreateShippingOption.yaml | 33 +- .../AdminCreateShippingOptionRule.yaml | 15 +- .../schemas/AdminCreateShippingProfile.yaml | 4 +- .../schemas/AdminCreateStockLocation.yaml | 6 +- .../schemas/AdminCreateTaxRate.yaml | 19 +- .../schemas/AdminCreateTaxRateRule.yaml | 8 +- .../schemas/AdminCreateTaxRegion.yaml | 21 +- .../AdminCreateVariantInventoryItem.yaml | 6 +- .../AdminCreateWorkflowsAsyncResponse.yaml | 14 +- .../schemas/AdminCreateWorkflowsRun.yaml | 7 +- .../components/schemas/AdminCurrency.yaml | 56 +- .../schemas/AdminCurrencyListResponse.yaml | 10 +- .../schemas/AdminCurrencyResponse.yaml | 2 +- .../components/schemas/AdminCustomer.yaml | 34 +- .../schemas/AdminCustomerAddress.yaml | 25 +- .../schemas/AdminCustomerAddressResponse.yaml | 2 +- .../schemas/AdminCustomerGroup.yaml | 36 +- .../schemas/AdminCustomerInGroupFilters.yaml | 66 +- .../AdminDeletePaymentCollectionResponse.yaml | 6 +- .../schemas/AdminDraftOrderResponse.yaml | 2 +- .../components/schemas/AdminExchange.yaml | 80 +- .../schemas/AdminExchangeDeleteResponse.yaml | 4 +- .../schemas/AdminExchangeOrderResponse.yaml | 3 +- .../schemas/AdminExchangePreviewResponse.yaml | 2 +- .../schemas/AdminExchangeRequestResponse.yaml | 4 +- .../schemas/AdminExchangeResponse.yaml | 2 +- .../schemas/AdminExchangeReturnResponse.yaml | 2 +- .../schemas/AdminExportProductRequest.yaml | 3 - .../schemas/AdminExportProductResponse.yaml | 7 +- .../store/components/schemas/AdminFile.yaml | 4 +- .../schemas/AdminFileListResponse.yaml | 4 +- .../components/schemas/AdminFileResponse.yaml | 2 +- .../components/schemas/AdminFulfillment.yaml | 33 +- .../schemas/AdminFulfillmentAddress.yaml | 34 +- .../schemas/AdminFulfillmentItem.yaml | 18 +- .../schemas/AdminFulfillmentLabel.yaml | 14 +- .../schemas/AdminFulfillmentProvider.yaml | 2 +- .../AdminFulfillmentProviderListResponse.yaml | 10 +- .../schemas/AdminFulfillmentResponse.yaml | 2 +- .../AdminFulfillmentSetDeleteResponse.yaml | 4 +- .../components/schemas/AdminGeoZone.yaml | 55 +- .../schemas/AdminImportProductRequest.yaml | 2 +- .../schemas/AdminImportProductResponse.yaml | 12 +- .../schemas/AdminInventoryItem.yaml | 14 +- .../schemas/AdminInventoryItemResponse.yaml | 2 +- .../schemas/AdminInventoryLevel.yaml | 65 +- .../store/components/schemas/AdminInvite.yaml | 10 +- .../schemas/AdminInviteResponse.yaml | 2 +- .../schemas/AdminLinkPriceListProducts.yaml | 2 +- .../components/schemas/AdminNotification.yaml | 33 +- .../AdminNotificationListResponse.yaml | 10 +- .../schemas/AdminNotificationResponse.yaml | 2 +- .../store/components/schemas/AdminOrder.yaml | 58 +- .../components/schemas/AdminOrderAddress.yaml | 37 +- .../schemas/AdminOrderChangesResponse.yaml | 4 +- .../AdminOrderEditPreviewResponse.yaml | 2 +- .../schemas/AdminOrderEditResponse.yaml | 2 +- .../components/schemas/AdminOrderPreview.yaml | 274 +- .../schemas/AuthCallbackResponse.yaml | 12 + .../components/schemas/BaseCustomer.yaml | 73 + .../components/schemas/StoreCreateCart.yaml | 33 + .../specs/store/openapi.full.yaml | 3604 +++++++++-------- .../api-reference/specs/store/openapi.yaml | 2 + .../paths/auth_customer_{auth_provider}.yaml | 34 +- ...uth_customer_{auth_provider}_callback.yaml | 29 +- ...uth_customer_{auth_provider}_register.yaml | 19 +- .../specs/store/paths/auth_token_refresh.yaml | 39 + .../specs/store/paths/store_carts.yaml | 6 +- .../specs/store/paths/store_carts_{id}.yaml | 10 +- .../paths/store_carts_{id}_complete.yaml | 58 +- .../paths/store_carts_{id}_line-items.yaml | 9 +- ...store_carts_{id}_line-items_{line_id}.yaml | 36 +- .../paths/store_carts_{id}_promotions.yaml | 13 +- .../store_carts_{id}_shipping-methods.yaml | 23 +- .../store/paths/store_carts_{id}_taxes.yaml | 5 +- .../specs/store/paths/store_collections.yaml | 146 +- .../store/paths/store_collections_{id}.yaml | 4 + .../specs/store/paths/store_currencies.yaml | 12 +- .../store/paths/store_currencies_{code}.yaml | 2 +- .../specs/store/paths/store_customers.yaml | 13 +- .../specs/store/paths/store_customers_me.yaml | 19 +- .../paths/store_customers_me_addresses.yaml | 114 +- ...e_customers_me_addresses_{address_id}.yaml | 77 +- .../specs/store/paths/store_orders.yaml | 13 +- .../specs/store/paths/store_orders_{id}.yaml | 4 +- .../paths/store_payment-collections.yaml | 8 +- ...ent-collections_{id}_payment-sessions.yaml | 31 +- .../store/paths/store_payment-providers.yaml | 29 +- .../store/paths/store_product-categories.yaml | 244 +- .../paths/store_product-categories_{id}.yaml | 20 +- .../specs/store/paths/store_products.yaml | 507 ++- .../store/paths/store_products_{id}.yaml | 43 +- .../specs/store/paths/store_regions.yaml | 588 +-- .../store/paths/store_return-reasons.yaml | 18 +- .../specs/store/paths/store_return.yaml | 4 +- .../store/paths/store_shipping-options.yaml | 19 +- 254 files changed, 6353 insertions(+), 5465 deletions(-) create mode 100644 www/apps/api-reference/specs/admin/code_samples/Shell/auth_token_refresh/post.sh delete mode 100644 www/apps/api-reference/specs/admin/components/schemas/AdminCancelFulfillment.yaml delete mode 100644 www/apps/api-reference/specs/admin/components/schemas/AdminCreateCampaign.yaml delete mode 100644 www/apps/api-reference/specs/admin/components/schemas/AdminExportProductRequest.yaml create mode 100644 www/apps/api-reference/specs/admin/components/schemas/AuthCallbackResponse.yaml create mode 100644 www/apps/api-reference/specs/admin/components/schemas/BaseCustomer.yaml create mode 100644 www/apps/api-reference/specs/admin/components/schemas/StoreCreateCart.yaml create mode 100644 www/apps/api-reference/specs/admin/paths/auth_token_refresh.yaml delete mode 100644 www/apps/api-reference/specs/store/components/schemas/AdminCancelFulfillment.yaml delete mode 100644 www/apps/api-reference/specs/store/components/schemas/AdminCreateCampaign.yaml delete mode 100644 www/apps/api-reference/specs/store/components/schemas/AdminExportProductRequest.yaml create mode 100644 www/apps/api-reference/specs/store/components/schemas/AuthCallbackResponse.yaml create mode 100644 www/apps/api-reference/specs/store/components/schemas/BaseCustomer.yaml create mode 100644 www/apps/api-reference/specs/store/components/schemas/StoreCreateCart.yaml create mode 100644 www/apps/api-reference/specs/store/paths/auth_token_refresh.yaml diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/auth_token_refresh/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_token_refresh/post.sh new file mode 100644 index 0000000000000..5db8edcfa5f5a --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_token_refresh/post.sh @@ -0,0 +1,2 @@ +curl -X POST '{backend_url}/auth/token/refresh' \ +-H 'Authorization: Bearer {token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}/post.sh index cceca04346303..0e2617e18e651 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}/post.sh @@ -1 +1 @@ -curl -X POST '{backend_url}/auth/user/{auth_provider}' \ No newline at end of file +curl -X POST '{backend_url}/auth/user/github' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_callback/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_callback/post.sh index 4be8f2007da20..c4a07555a3070 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_callback/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_callback/post.sh @@ -1 +1 @@ -curl -X POST '{backend_url}/auth/user/{auth_provider}/callback' \ No newline at end of file +curl -X POST '{backend_url}/auth/user/github/callback?code=123' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_register/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_register/post.sh index 996baeeae5e91..3f6704f0de272 100644 --- a/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_register/post.sh +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/auth_user_{auth_provider}_register/post.sh @@ -1 +1,6 @@ -curl -X POST '{backend_url}/auth/user/{auth_provider}/register' \ No newline at end of file +curl -X POST '{backend_url}/auth/user/emailpass/register' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "email": "admin@medusa-test.com", + "password": "supersecret" +}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminApiKey.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminApiKey.yaml index e51ff4c548a77..2400d96322d33 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminApiKey.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminApiKey.yaml @@ -1,5 +1,5 @@ type: object -description: The api key's details. +description: The API key's details. x-schemaName: AdminApiKey required: - id @@ -24,37 +24,44 @@ properties: redacted: type: string title: redacted - description: The api key's redacted. + description: >- + The redacted form of the API key's token. This is useful when showing + portion of the token. + example: sk_...123 title: type: string title: title description: The api key's title. type: type: string - description: The api key's type. + description: >- + The api key's type. `secret` is used for a user's API key, whereas + `publishable` is used for Publishable API keys. enum: - secret - publishable last_used_at: type: string title: last_used_at - description: The api key's last used at. + description: The date and time the API key was last used. format: date-time created_by: type: string title: created_by - description: The api key's created by. + description: The ID of the user that created the API key, if available. created_at: type: string format: date-time title: created_at - description: The api key's created at. + description: The date and time the API key was created. revoked_by: type: string title: revoked_by - description: The api key's revoked by. + description: The ID of the user that revoked the API key, if available. revoked_at: type: string title: revoked_at - description: The api key's revoked at. + description: >- + The date and time the API key was revoked. The API key is considered + revoked when this property is set. format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminApiKeyResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminApiKeyResponse.yaml index 980051356dda3..8e154ab40facf 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminApiKeyResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminApiKeyResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The API key's details. x-schemaName: AdminApiKeyResponse required: - api_key diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductRequest.yaml index b747877660cd9..5f35aa599fcad 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductRequest.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductRequest.yaml @@ -1,21 +1,21 @@ type: object -description: SUMMARY +description: The products to create, update, or delete. x-schemaName: AdminBatchProductRequest properties: create: type: array - description: The product's create. + description: The products to create. items: $ref: ./AdminCreateProduct.yaml update: type: array - description: The product's update. + description: The products to update. items: $ref: ./AdminUpdateProduct.yaml delete: type: array - description: The product's delete. + description: The products to delete. items: type: string title: delete - description: The delete's details. + description: A product's ID. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductResponse.yaml index 697f688c9018d..bc62bdabc64dd 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the products created, updated, or deleted. x-schemaName: AdminBatchProductResponse required: - created @@ -8,17 +8,17 @@ required: properties: created: type: array - description: The product's created. + description: The created products items: $ref: ./AdminProduct.yaml updated: type: array - description: The product's updated. + description: The updated products. items: $ref: ./AdminProduct.yaml deleted: type: object - description: SUMMARY + description: The deleted products' details. required: - ids - object @@ -26,16 +26,17 @@ properties: properties: ids: type: array - description: The deleted's ids. + description: The IDs of deleted products. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted product. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: product deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the products were deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml index 846c8aea3ac02..090be1d3698bf 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml @@ -1,21 +1,21 @@ type: object -description: SUMMARY +description: The product variants to create, update, or delete. x-schemaName: AdminBatchProductVariantRequest properties: create: type: array - description: The product's create. + description: The product variants to create. items: $ref: ./AdminCreateProductVariant.yaml update: type: array - description: The product's update. + description: The product variants to update. items: $ref: ./AdminUpdateProductVariant.yaml delete: type: array - description: The product's delete. + description: The product variants to delete. items: type: string title: delete - description: The delete's details. + description: A product variant's ID. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantResponse.yaml index 01dbaa3edda25..23bb110421da7 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the product variants created, updated, or deleted. x-schemaName: AdminBatchProductVariantResponse required: - created @@ -8,17 +8,17 @@ required: properties: created: type: array - description: The product's created. + description: The created product variants. items: $ref: ./AdminProductVariant.yaml updated: type: array - description: The product's updated. + description: The updated product variants. items: $ref: ./AdminProductVariant.yaml deleted: type: object - description: SUMMARY + description: The details of the deleted product variants. required: - ids - object @@ -26,16 +26,17 @@ properties: properties: ids: type: array - description: The deleted's ids. + description: The IDs of the deleted product variants. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted variant. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: variant deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the product variants were deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCampaign.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCampaign.yaml index 4b3d871f8a8f4..d5b0c111027d0 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCampaign.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCampaign.yaml @@ -30,15 +30,15 @@ properties: campaign_identifier: type: string title: campaign_identifier - description: The campaign's campaign identifier. + description: The campaign's identifier. starts_at: type: string title: starts_at - description: The campaign's starts at. + description: The date and time that the campaign starts. ends_at: type: string title: ends_at - description: The campaign's ends at. + description: The date and time that the campaign ends. budget: type: object description: The campaign's budget. @@ -55,7 +55,11 @@ properties: description: The budget's ID. type: type: string - description: The budget's type. + description: > + The budget's type. `spend` means the limit is set on the total amount + discounted by the campaign's promotions; `usage` means the limit is + set on the total number of times the campaign's promotions can be + used. enum: - spend - usage @@ -70,4 +74,8 @@ properties: used: type: number title: used - description: The budget's used. + description: > + How much of the budget has been used. If the limit is `spend`, this + property holds the total amount discounted so far. If the limit is + `usage`, it holds the number of times the campaign's promotions have + been used so far. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCampaignResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCampaignResponse.yaml index 60e666717fa65..a8eb2ba79327e 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCampaignResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCampaignResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The campaign's details. x-schemaName: AdminCampaignResponse required: - campaign diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCancelFulfillment.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCancelFulfillment.yaml deleted file mode 100644 index 57e177eccc410..0000000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCancelFulfillment.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminCancelFulfillment diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaim.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaim.yaml index 4bd73651ee282..21f60500a4924 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaim.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaim.yaml @@ -41,62 +41,63 @@ required: - original_shipping_subtotal - original_shipping_tax_total properties: + id: + type: string + title: id + description: The claim's ID. order_id: type: string title: order_id - description: The claim's order id. + description: The ID of the order associated with the claim. claim_items: type: array - description: The claim's claim items. + description: The order items targetted by the claim. items: $ref: ./BaseClaimItem.yaml additional_items: type: array - description: The claim's additional items. - items: {} + description: The outbound or new items of the claim. + items: + $ref: ./BaseClaimItem.yaml return: $ref: ./Return.yaml return_id: type: string title: return_id - description: The claim's return id. + description: The ID of the associated return. no_notification: type: boolean title: no_notification - description: The claim's no notification. + description: Whether the customer should be notified about changes in the claim. refund_amount: type: number title: refund_amount - description: The claim's refund amount. + description: The amount to be refunded. currency_code: type: string title: currency_code description: The claim's currency code. - id: - type: string - title: id - description: The claim's ID. region_id: type: string title: region_id - description: The claim's region id. + description: The ID of the region associated with the claim. customer_id: type: string title: customer_id - description: The claim's customer id. + description: The ID of the customer associated with the claim's order. sales_channel_id: type: string title: sales_channel_id - description: The claim's sales channel id. + description: The ID of the sales channel the claim's order is created in. email: type: string title: email - description: The claim's email. + description: The email associated with the claim's order. format: email display_id: type: number title: display_id - description: The claim's display id. + description: The claim's display ID. shipping_address: $ref: ./BaseOrderAddress.yaml billing_address: @@ -145,63 +146,67 @@ properties: transactions: type: array description: The claim's transactions. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions + description: Learn more about transactions of orders and associated models. items: $ref: ./BaseOrderTransaction.yaml summary: $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The claim's metadata. + description: The claim's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The claim's created at. + description: The claim's creation date. updated_at: type: string format: date-time title: updated_at - description: The claim's updated at. + description: The claim's update date. original_item_total: type: number title: original_item_total - description: The claim's original item total. + description: The total of the original items in the associated order. original_item_subtotal: type: number title: original_item_subtotal - description: The claim's original item subtotal. + description: The subtotal of the original items in the associated order. original_item_tax_total: type: number title: original_item_tax_total - description: The claim's original item tax total. + description: The tax total of the original items in the associated order. item_total: type: number title: item_total - description: The claim's item total. + description: The total of the claim's items. item_subtotal: type: number title: item_subtotal - description: The claim's item subtotal. + description: The subtotal of the claim's items. item_tax_total: type: number title: item_tax_total - description: The claim's item tax total. + description: The tax total of the claim's items. original_total: type: number title: original_total - description: The claim's original total. + description: The associated order's original total. original_subtotal: type: number title: original_subtotal - description: The claim's original subtotal. + description: The associated order's original subtotal. original_tax_total: type: number title: original_tax_total - description: The claim's original tax total. + description: The associated order's original tax total. total: type: number title: total - description: The claim's total. + description: The associated order's total. subtotal: type: number title: subtotal @@ -241,12 +246,12 @@ properties: original_shipping_total: type: number title: original_shipping_total - description: The claim's original shipping total. + description: The associated order's original shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The claim's original shipping subtotal. + description: The associated order's original shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The claim's original shipping tax total. + description: The associated order's original shipping tax total. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimDeleteResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimDeleteResponse.yaml index 762248df11573..1ebbe1838689d 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimDeleteResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the deleted claim. x-schemaName: AdminClaimDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Claim was deleted. + description: Whether the claim was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml index 71a3c2b6048ea..90a81e24cfb80 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of claims. x-schemaName: AdminClaimListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The claim's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The claim's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The claim's count. + description: The total number of items. claims: type: array - description: The claim's claims. + description: The list of claims. items: $ref: ./AdminClaim.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimOrderResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimOrderResponse.yaml index f656466d447ee..ea206926d5654 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimOrderResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimOrderResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The created claim's details. x-schemaName: AdminClaimOrderResponse required: - order diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimPreviewResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimPreviewResponse.yaml index 477ff17bd7307..d3d5cf085c60e 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimPreviewResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimPreviewResponse.yaml @@ -1,5 +1,7 @@ type: object -description: SUMMARY +description: >- + The details of the claim, as well as a preview of the order when the claim is + applied. x-schemaName: AdminClaimPreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimRequestResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimRequestResponse.yaml index 3b7c3d283cf94..eb463459db71e 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimRequestResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimRequestResponse.yaml @@ -1,5 +1,7 @@ type: object -description: SUMMARY +description: >- + The details of the claim, its return, and a preview of the order when the + claim is applied. x-schemaName: AdminClaimRequestResponse required: - return diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimResponse.yaml index f82723835466b..326b99ba9a754 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The claim's details. x-schemaName: AdminClaimResponse required: - claim diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimReturnPreviewResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimReturnPreviewResponse.yaml index 296a46bca0290..f91f77fa23062 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimReturnPreviewResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimReturnPreviewResponse.yaml @@ -1,5 +1,7 @@ type: object -description: SUMMARY +description: >- + The details of the claim's return, with a preview of the order when the + claim's return is applied. x-schemaName: AdminClaimReturnPreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollection.yaml index 7066453be8d51..c3feb25bdc087 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollection.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCollection.yaml @@ -1,5 +1,5 @@ type: object -description: The parent's collection. +description: The product collection's details. x-schemaName: AdminCollection required: - id @@ -26,17 +26,17 @@ properties: type: string format: date-time title: created_at - description: The collection's created at. + description: The collection's creation date. updated_at: type: string format: date-time title: updated_at - description: The collection's updated at. + description: The collection's update date. deleted_at: type: string format: date-time title: deleted_at - description: The collection's deleted at. + description: The collection's deletion date. products: type: array description: The collection's products. @@ -44,4 +44,4 @@ properties: type: object metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionDeleteResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionDeleteResponse.yaml index c49daa3bbe81e..46bb68b85a374 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionDeleteResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the deleted collection. x-schemaName: AdminCollectionDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Collection was deleted. + description: Whether the collection was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml index e97fa1ee121f5..8574aa002990c 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of product collections. x-schemaName: AdminCollectionListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The collection's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The collection's offset. + description: The number of items skipped before retrieving the returned results. count: type: number title: count - description: The collection's count. + description: The total number of items. collections: type: array - description: The collection's collections. + description: The list of product collections. items: $ref: ./AdminCollection.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionResponse.yaml index d48e815089ad4..9ad5e9f625615 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The collection's details. x-schemaName: AdminCollectionResponse required: - collection diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApiKey.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApiKey.yaml index 629c62ee00649..61a406f41689d 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApiKey.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApiKey.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The API key's details. x-schemaName: AdminCreateApiKey required: - title @@ -8,10 +8,12 @@ properties: title: type: string title: title - description: The api key's title. + description: The API key's title. type: type: string - description: The api key's type. + description: >- + The API key's type. Use `secret` for a user's API key; Use `publishable` + for Publishable API keys. enum: - publishable - secret diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApplicationMethod.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApplicationMethod.yaml index 7bc1869e1f51a..5cbb99276e849 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApplicationMethod.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateApplicationMethod.yaml @@ -1,5 +1,5 @@ type: object -description: The promotion's application method. +description: The application method's details. x-schemaName: AdminCreateApplicationMethod required: - value @@ -13,7 +13,9 @@ properties: value: type: number title: value - description: The application method's value. + description: >- + The discounted amount applied by the associated promotion based on the + `type`. currency_code: type: string title: currency_code @@ -21,23 +23,32 @@ properties: max_quantity: type: number title: max_quantity - description: The application method's max quantity. + description: >- + The max quantity allowed in the cart for the associated promotion to be + applied. type: type: string - description: The application method's type. + description: >- + The type of the application method indicating how the associated promotion + is applied. enum: - fixed - percentage target_type: type: string - description: The application method's target type. + description: >- + The target type of the application method indicating whether the + associated promotion is applied to the cart's items, shipping methods, or + the whole order. enum: - items - shipping_methods - order allocation: type: string - description: The application method's allocation. + description: >- + The allocation value that indicates whether the associated promotion is + applied on each item in a cart or split between the items in the cart. enum: - each - across @@ -54,8 +65,14 @@ properties: apply_to_quantity: type: number title: apply_to_quantity - description: The application method's apply to quantity. + description: >- + The quantity that results from matching the `buyget` promotion's + condition. For example, if the promotion is a "Buy 2 shirts get 1 free", + the value f this attribute is `1`. buy_rules_min_quantity: type: number title: buy_rules_min_quantity - description: The application method's buy rules min quantity. + description: >- + The minimum quantity required for a `buyget` promotion to be applied. For + example, if the promotion is a "Buy 2 shirts get 1 free", the value of + this attribute is `2`. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCampaign.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCampaign.yaml deleted file mode 100644 index f5219bcaeef5d..0000000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCampaign.yaml +++ /dev/null @@ -1,48 +0,0 @@ -type: object -description: The promotion's campaign. -x-schemaName: AdminCreateCampaign -properties: - name: - type: string - title: name - description: The campaign's name. - description: - type: string - title: description - description: The campaign's description. - currency: - type: string - title: currency - description: The campaign's currency. - campaign_identifier: - type: string - title: campaign_identifier - description: The campaign's campaign identifier. - starts_at: - type: string - title: starts_at - description: The campaign's starts at. - format: date-time - ends_at: - type: string - title: ends_at - description: The campaign's ends at. - format: date-time - budget: - type: object - description: The campaign's budget. - properties: - type: - type: string - description: The budget's type. - enum: - - spend - - usage - currency_code: - type: string - title: currency_code - description: The budget's currency code. - limit: - type: number - title: limit - description: The budget's limit. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml index cb4739e001f7b..08bd1f58b4789 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: the product collection's details. x-schemaName: AdminCreateCollection required: - title @@ -14,4 +14,4 @@ properties: description: The collection's handle. metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCustomerGroup.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCustomerGroup.yaml index bd8d34314bf6d..4dd642b053256 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCustomerGroup.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCustomerGroup.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The customer group's details. x-schemaName: AdminCreateCustomerGroup required: - name @@ -10,4 +10,4 @@ properties: description: The customer group's name. metadata: type: object - description: The customer group's metadata. + description: The customer group's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateFulfillment.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateFulfillment.yaml index 8a6e547262902..0dd456e29b17e 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateFulfillment.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateFulfillment.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The filfillment's details. x-schemaName: AdminCreateFulfillment required: - location_id @@ -15,27 +15,27 @@ properties: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the items are fulfilled from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the provider handling this fulfillment. delivery_address: type: object - description: The fulfillment's delivery address. + description: The address to deliver the items to. properties: first_name: type: string title: first_name - description: The delivery address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The customer's last name. phone: type: string title: phone - description: The delivery address's phone. + description: The customer's phone. company: type: string title: company @@ -43,11 +43,11 @@ properties: address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The delivery address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The delivery address's second line. city: type: string title: city @@ -66,13 +66,13 @@ properties: description: The delivery address's postal code. metadata: type: object - description: The delivery address's metadata. + description: The delivery address's metadata, used to store custom key-value pairs. items: type: array - description: The fulfillment's items. + description: The items to fulfill. items: type: object - description: The item's items. + description: An item to fulfill. required: - title - sku @@ -86,11 +86,11 @@ properties: sku: type: string title: sku - description: The item's sku. + description: The item's SKU. quantity: type: number title: quantity - description: The item's quantity. + description: The quantity to fulfill of the item. barcode: type: string title: barcode @@ -98,17 +98,17 @@ properties: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the associated line item. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item associated with the underlying variant. labels: type: array - description: The fulfillment's labels. + description: The labels for the fulfillment's shipments. items: type: object - description: The label's labels. + description: A shipment's label. required: - tracking_number - tracking_url @@ -121,45 +121,46 @@ properties: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. - order: - type: object - description: The fulfillment's order. + description: The label's URL. order_id: type: string title: order_id - description: The fulfillment's order id. + description: The ID of the order this fulfillment is created for. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option used in the order. data: type: object - description: The fulfillment's data. + description: Any data useful for the fulfillment provider to handle the fulfillment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date and time the fulfillment was packed. format: date-time shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date and time the fulfillment was shipped. format: date-time delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date and time the fulfillment was delivered. format: date-time canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date and time the fulfillment was canceled. format: date-time metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateInventoryItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateInventoryItem.yaml index e5c490d22eb07..21a7ed1cd95c1 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateInventoryItem.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateInventoryItem.yaml @@ -1,15 +1,15 @@ type: object -description: SUMMARY +description: The inventory item's details. x-schemaName: AdminCreateInventoryItem properties: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. weight: type: number title: weight @@ -45,15 +45,15 @@ properties: description: type: string title: description - description: The inventory item's description. + description: The description of the variant associated with the inventory item. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the item requires shipping. thumbnail: type: string title: thumbnail description: The inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePriceList.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePriceList.yaml index f360a50004d64..ff78bb5483e55 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePriceList.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePriceList.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The price list's details. x-schemaName: AdminCreatePriceList required: - title @@ -16,11 +16,13 @@ properties: starts_at: type: string title: starts_at - description: The price list's starts at. + description: The date and time the price list starts at. + format: date-time ends_at: type: string title: ends_at - description: The price list's ends at. + description: The date and time the price list ends at. + format: date-time status: type: string description: The price list's status. @@ -36,12 +38,14 @@ properties: rules: type: object description: The price list's rules. + example: + product_category_id: pcat_123 prices: type: array description: The price list's prices. items: type: object - description: The price's prices. + description: A price's details. required: - currency_code - amount @@ -58,15 +62,21 @@ properties: variant_id: type: string title: variant_id - description: The price's variant id. + description: The ID of the product variant this price is for. min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: >- + The minimum quantity required in the cart for this price to be + applied. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: >- + The maximum quantity in the cart that shouldn't be crossed for this + price to be applied. rules: type: object description: The price's rules. + example: + region_id: reg_123 diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePricePreference.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePricePreference.yaml index cc2c0dbe9d218..4049498a4b179 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePricePreference.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePricePreference.yaml @@ -1,16 +1,20 @@ type: object -description: SUMMARY +description: The price preference's details. x-schemaName: AdminCreatePricePreference properties: attribute: type: string title: attribute - description: The price preference's attribute. + description: The name of the attribute the price preference applies on. + example: currency_code value: type: string title: value - description: The price preference's value. + description: The attribute's value. + example: usd is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The price preference's is tax inclusive. + description: >- + Whether the price is tax inclusive if the value of the specified attribute + matches the specified value. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProduct.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProduct.yaml index fac1377ff4803..d4cece0e332de 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProduct.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProduct.yaml @@ -1,5 +1,5 @@ type: object -description: The create's details. +description: The product's details. x-schemaName: AdminCreateProduct required: - title @@ -7,47 +7,47 @@ properties: title: type: string title: title - description: The create's title. + description: The product's title. subtitle: type: string title: subtitle - description: The create's subtitle. + description: The product's subtitle. description: type: string title: description - description: The create's description. + description: The product's description. is_giftcard: type: boolean title: is_giftcard - description: The create's is giftcard. + description: Whether the product is a gift card. discountable: type: boolean title: discountable - description: The create's discountable. + description: Whether the product is discountable. images: type: array - description: The create's images. + description: The product's images. items: type: object - description: The image's images. + description: A product's image details. required: - url properties: url: type: string title: url - description: The image's url. + description: The image's URL. thumbnail: type: string title: thumbnail - description: The create's thumbnail. + description: The URL of the product's thumbnail. handle: type: string title: handle - description: The create's handle. + description: The product's handle. status: type: string - description: The create's status. + description: The product's status. enum: - draft - proposed @@ -56,17 +56,17 @@ properties: type_id: type: string title: type_id - description: The create's type id. + description: The ID of the type the product belongs to. collection_id: type: string title: collection_id - description: The create's collection id. + description: The ID of the collection the product belongs to. categories: type: array - description: The create's categories. + description: The categories the product belongs to. items: type: object - description: The category's categories. + description: A category's details. required: - id properties: @@ -76,10 +76,10 @@ properties: description: The category's ID. tags: type: array - description: The create's tags. + description: The product's tags. items: type: object - description: The tag's tags. + description: A tag's details. required: - id properties: @@ -89,20 +89,20 @@ properties: description: The tag's ID. options: type: array - description: The create's options. + description: The product's options. items: $ref: ./AdminCreateProductOption.yaml variants: type: array - description: The create's variants. + description: The product's variants. items: $ref: ./AdminCreateProductVariant.yaml sales_channels: type: array - description: The create's sales channels. + description: The sales channels the product is available in. items: type: object - description: The sales channel's sales channels. + description: A sales channel's details. required: - id properties: @@ -113,35 +113,35 @@ properties: weight: type: number title: weight - description: The create's weight. + description: The product's weight. length: type: number title: length - description: The create's length. + description: The product's length. height: type: number title: height - description: The create's height. + description: The product's height. width: type: number title: width - description: The create's width. + description: The product's width. hs_code: type: string title: hs_code - description: The create's hs code. + description: The product's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The product's MID code. origin_country: type: string title: origin_country - description: The create's origin country. + description: The product's origin country. material: type: string title: material - description: The create's material. + description: The product's material. metadata: type: object - description: The create's metadata. + description: The product's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductCategory.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductCategory.yaml index 19c2aa6d6e4e4..5273e97f2bd2c 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductCategory.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductCategory.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The product category's details. x-schemaName: AdminCreateProductCategory required: - name @@ -19,19 +19,19 @@ properties: is_internal: type: boolean title: is_internal - description: The product category's is internal. + description: Whether the product category is only used and seen by admin users. is_active: type: boolean title: is_active - description: The product category's is active. + description: Whether the product category is active. parent_category_id: type: string title: parent_category_id - description: The product category's parent category id. + description: The ID of a category that's the parent of this one. rank: type: number title: rank - description: The product category's rank. + description: The sorting order of the product category among sibling categories. metadata: type: object - description: The product category's metadata. + description: The product category's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductOption.yaml index 156ef7cf2f98e..cdf6409b07bbf 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductOption.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductOption.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The product option's details. x-schemaName: AdminCreateProductOption required: - title @@ -8,11 +8,11 @@ properties: title: type: string title: title - description: The product's title. + description: The product option's title. values: type: array - description: The product's values. + description: The product option's values. items: type: string title: values - description: The value's values. + description: A value. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductTag.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductTag.yaml index 3c412794aba21..88b118a73fe08 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductTag.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductTag.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The product tag's details. x-schemaName: AdminCreateProductTag required: - value @@ -10,4 +10,4 @@ properties: description: The product tag's value. metadata: type: object - description: The product tag's metadata. + description: The product tag's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariant.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariant.yaml index 16419ecccd6cc..874a1015bb353 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariant.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariant.yaml @@ -1,5 +1,5 @@ type: object -description: The create's details. +description: The product variant's details. x-schemaName: AdminCreateProductVariant required: - title @@ -8,75 +8,81 @@ properties: title: type: string title: title - description: The create's title. + description: The variant's title. sku: type: string title: sku - description: The create's sku. + description: The variant's SKU. ean: type: string title: ean - description: The create's ean. + description: The variant's EAN. upc: type: string title: upc - description: The create's upc. + description: The variant's UPC. barcode: type: string title: barcode - description: The create's barcode. + description: The variant's barcode. hs_code: type: string title: hs_code - description: The create's hs code. + description: The variant's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The variant's MID code. allow_backorder: type: boolean title: allow_backorder - description: The create's allow backorder. + description: Whether it's allowed to order this variant when it's out of stock. manage_inventory: type: boolean title: manage_inventory - description: The create's manage inventory. + description: >- + Whether Medusa manages the variant's inventory quantity. If disabled, the + product variant is always considered in stock. variant_rank: type: number title: variant_rank - description: The create's variant rank. + description: The sorting order of the variant among other variants in the product. weight: type: number title: weight - description: The create's weight. + description: The variant's weight. length: type: number title: length - description: The create's length. + description: The variant's length. height: type: number title: height - description: The create's height. + description: The variant's height. width: type: number title: width - description: The create's width. + description: The variant's width. origin_country: type: string title: origin_country - description: The create's origin country. + description: The variant's origin country. material: type: string title: material - description: The create's material. + description: The variant's material. metadata: type: object - description: The create's metadata. + description: The variant's metadata, used to store custom key-value pairs. prices: type: array - description: The create's prices. + description: The variant's prices. items: $ref: ./AdminCreateProductVariantPrice.yaml options: type: object - description: The create's options. + description: >- + The variant's options, where the key is an option's name, and the value is + the option's value. + example: + Color: Black diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariantPrice.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariantPrice.yaml index 9d4db23102885..e543b4f377602 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariantPrice.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateProductVariantPrice.yaml @@ -1,5 +1,5 @@ type: object -description: The price's prices. +description: The details of a variant's price. x-schemaName: AdminCreateProductVariantPrice required: - currency_code @@ -16,11 +16,17 @@ properties: min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: >- + The minimum quantity that must be available in the cart for this price to + apply. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: >- + The maximum quantity that must not be surpassed in the cart for this price + to apply. rules: type: object description: The price's rules. + example: + region_id: reg_123 diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePromotionRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePromotionRule.yaml index 71606d0bd6481..93373ce2207a0 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePromotionRule.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreatePromotionRule.yaml @@ -1,5 +1,5 @@ type: object -description: The rule's rules. +description: The promotion rule's details. x-schemaName: AdminCreatePromotionRule required: - operator @@ -8,7 +8,10 @@ required: properties: operator: type: string - description: The rule's operator. + description: >- + The operator used to check whether the buy rule applies on a cart. For + example, `eq` means that the cart's value for the specified attribute must + match the specified value. enum: - gt - lt @@ -24,15 +27,20 @@ properties: attribute: type: string title: attribute - description: The rule's attribute. + description: >- + The attribute to compare against when checking whether a promotion can be + applied on a cart. + example: item.product.id values: oneOf: - type: string title: values - description: The rule's values. + description: The attribute's value. + example: prod_123 - type: array - description: The rule's values. + description: The allowed attribute values. items: type: string title: values - description: The value's values. + description: An attribute value. + example: prod_123 diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRefundReason.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRefundReason.yaml index 9add02da6686e..a94aba8a115d0 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRefundReason.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRefundReason.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The refund reason's details. x-schemaName: AdminCreateRefundReason required: - label diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRegion.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRegion.yaml index c7b2be70761c3..6028eaf5d3831 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRegion.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateRegion.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The region's details. x-schemaName: AdminCreateRegion required: - name @@ -13,28 +13,31 @@ properties: type: string title: currency_code description: The region's currency code. + example: usd countries: type: array description: The region's countries. items: type: string title: countries - description: The country's countries. + description: A country code. + example: us automatic_taxes: type: boolean title: automatic_taxes - description: The region's automatic taxes. + description: Whether taxes are calculated automatically during checkout in this region. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The region's is tax inclusive. + description: Whether prices in this region are tax inclusive. payment_providers: type: array - description: The region's payment providers. + description: The payment providers enabled in this region. items: type: string title: payment_providers - description: The payment provider's payment providers. + description: A payment provider's ID. + example: pp_stripe_stripe metadata: type: object - description: The region's metadata. + description: The region's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateReservation.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateReservation.yaml index bf02a07a9c6a1..1f78aa26dd015 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateReservation.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateReservation.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The reservation's details. x-schemaName: AdminCreateReservation required: - location_id @@ -9,23 +9,23 @@ properties: line_item_id: type: string title: line_item_id - description: The reservation's line item id. + description: The ID of the line item this reservation is created for. location_id: type: string title: location_id - description: The reservation's location id. + description: The ID of the location the quantity is reserved from. inventory_item_id: type: string title: inventory_item_id - description: The reservation's inventory item id. + description: The ID of the inventory item associated with the line item's variant. quantity: type: number title: quantity - description: The reservation's quantity. + description: The reserved quantity. description: type: string title: description description: The reservation's description. metadata: type: object - description: The reservation's metadata. + description: The reservation's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateSalesChannel.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateSalesChannel.yaml index 21e87751127c3..69ac7d89c6f3d 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateSalesChannel.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateSalesChannel.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The sales channel's details. x-schemaName: AdminCreateSalesChannel required: - name @@ -15,7 +15,7 @@ properties: is_disabled: type: boolean title: is_disabled - description: The sales channel's is disabled. + description: Whether the sales channel is disabled. metadata: type: object - description: The sales channel's metadata. + description: The sales channel's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShipment.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShipment.yaml index 3d5448c4bf5e2..92a29e274be12 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShipment.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShipment.yaml @@ -1,15 +1,15 @@ type: object -description: SUMMARY +description: The shipment's details. x-schemaName: AdminCreateShipment required: - labels properties: labels: type: array - description: The fulfillment's labels. + description: The shipment's labels. items: type: object - description: The label's labels. + description: A shipment label's details. required: - tracking_number - tracking_url @@ -22,8 +22,8 @@ properties: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOption.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOption.yaml index 5bf5ce727fcba..ea6b78201e029 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOption.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOption.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The shipping option's details. x-schemaName: AdminCreateShippingOption required: - name @@ -17,33 +17,46 @@ properties: service_zone_id: type: string title: service_zone_id - description: The shipping option's service zone id. + description: The ID of the service zone this shipping option belongs to. shipping_profile_id: type: string title: shipping_profile_id - description: The shipping option's shipping profile id. + description: The ID of the shipping profile this shipping option belongs to. data: type: object - description: The shipping option's data. + description: >- + Any data necessary for fulfillment providers to handle shipping methods + and fulfillments of this shipping option. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. price_type: type: string - description: The shipping option's price type. + description: > + The shipping option price's type. If `flat`, it means the option has a + fixed price set in the `prices` property. `calculated` means that the + shipping option's price is calculated during checkout. enum: - flat - calculated provider_id: type: string title: provider_id - description: The shipping option's provider id. + description: >- + The ID of the fulfillment provider used to handle this shipping option and + its associated methods and fulfillments. type: type: object prices: type: array - description: The shipping option's prices. + description: >- + The shipping option's prices. If `price_type` is `calculated`, pass an + empty array for this property. items: oneOf: - type: object - description: The price's prices. + description: The price for a currency code. x-schemaName: AdminCreateShippingOptionPriceWithCurrency required: - currency_code @@ -58,7 +71,7 @@ properties: title: amount description: The price's amount. - type: object - description: The price's prices. + description: The price in a region. x-schemaName: AdminCreateShippingOptionPriceWithRegion required: - region_id @@ -67,7 +80,7 @@ properties: region_id: type: string title: region_id - description: The price's region id. + description: The ID of the region this price is used in. amount: type: number title: amount diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOptionRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOptionRule.yaml index 5fca721e07503..05df606241c91 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOptionRule.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOptionRule.yaml @@ -1,5 +1,5 @@ type: object -description: The rule's rules. +description: The details of the shipping option rule. x-schemaName: AdminCreateShippingOptionRule required: - operator @@ -8,7 +8,7 @@ required: properties: operator: type: string - description: The rule's operator. + description: The operator used to check whether a rule applies. enum: - gt - lt @@ -21,15 +21,18 @@ properties: attribute: type: string title: attribute - description: The rule's attribute. + description: The name of a property or table that the rule applies to. + example: customer_group value: oneOf: - type: string title: value - description: The rule's value. + description: A value of the attribute that enables this rule. + example: cusgroup_123 - type: array - description: The rule's value. + description: Values of the attribute that enable this rule. items: type: string title: value - description: The value's details. + description: A value of the attribute that enables this rule. + example: cusgroup_123 diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingProfile.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingProfile.yaml index 94a4933a1eb31..80a6b3ae524d4 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingProfile.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingProfile.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The shipping profile's details. x-schemaName: AdminCreateShippingProfile required: - name @@ -15,4 +15,4 @@ properties: description: The shipping profile's type. metadata: type: object - description: The shipping profile's metadata. + description: The shipping profile's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateStockLocation.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateStockLocation.yaml index 3766f7c914e9e..4e52d487ce02a 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateStockLocation.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateStockLocation.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The stock location's details. x-schemaName: AdminCreateStockLocation required: - name @@ -11,9 +11,9 @@ properties: address_id: type: string title: address_id - description: The stock location's address id. + description: The ID of the stock location's address. address: $ref: ./AdminUpsertStockLocationAddress.yaml metadata: type: object - description: The stock location's metadata. + description: The stock location's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRate.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRate.yaml index 32492385be231..065c81d06b10b 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRate.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRate.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The tax rate's details. x-schemaName: AdminCreateTaxRate required: - name @@ -9,18 +9,20 @@ properties: type: string title: name description: The tax rate's name. + example: VAT tax_region_id: type: string title: tax_region_id - description: The tax rate's tax region id. + description: The ID of the tax region this rate belongs to. rate: type: number title: rate - description: The tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The tax rate's code. + description: The code the tax rate is identified by. rules: type: array description: The tax rate's rules. @@ -29,11 +31,14 @@ properties: is_default: type: boolean title: is_default - description: The tax rate's is default. + description: Whether the tax rate is the default in its tax region. is_combinable: type: boolean title: is_combinable - description: The tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The tax rate's metadata. + description: The tax rate's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRateRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRateRule.yaml index 46cf869c16596..98126c62292c5 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRateRule.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRateRule.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The tax rate rule's details. x-schemaName: AdminCreateTaxRateRule required: - reference @@ -8,8 +8,10 @@ properties: reference: type: string title: reference - description: The tax rate's reference. + description: The name of a table in the database that this rule points to. + example: product_type reference_id: type: string title: reference_id - description: The tax rate's reference id. + description: The ID of a record in the table specified in reference. + example: ptype_123 diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml index 2e24b98894fe3..f0cdf7c0396ed 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The tax region's details. x-schemaName: AdminCreateTaxRegion required: - country_code @@ -8,6 +8,7 @@ properties: type: string title: country_code description: The tax region's country code. + example: us province_code: type: string title: province_code @@ -15,7 +16,7 @@ properties: parent_id: type: string title: parent_id - description: The tax region's parent id. + description: The ID of the parent tax region. default_tax_rate: type: object description: The tax region's default tax rate. @@ -25,22 +26,26 @@ properties: rate: type: number title: rate - description: The default tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The default tax rate's code. + description: The code the tax rate is identified by name: type: string title: name description: The default tax rate's name. + example: VAT is_combinable: type: boolean - title: is_combinable - description: The default tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The default tax rate's metadata. + description: The default tax rate's metadata, used to store custom key-value pairs. metadata: type: object - description: The tax region's metadata. + description: The tax region's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateVariantInventoryItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateVariantInventoryItem.yaml index 6674b16f20bc5..23e84a8328b64 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateVariantInventoryItem.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateVariantInventoryItem.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the variant-inventory item association. x-schemaName: AdminCreateVariantInventoryItem required: - required_quantity @@ -8,8 +8,8 @@ properties: required_quantity: type: number title: required_quantity - description: The product's required quantity. + description: The quantity of the variant in the inventory item. inventory_item_id: type: string title: inventory_item_id - description: The product's inventory item id. + description: The inventory item's ID. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml index e10e7538512d5..f7539f38b9e8f 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of changing a workflow execution's step status. x-schemaName: AdminCreateWorkflowsAsyncResponse required: - transaction_id @@ -8,16 +8,18 @@ properties: transaction_id: type: string title: transaction_id - description: The workflows execution's transaction id. + description: The workflows execution's transaction ID. step_id: type: string title: step_id - description: The workflows execution's step id. - response: {} - compensate_input: {} + description: The ID of the step whose status was changed. + response: + description: Sets the step's response. It accepts any type. + compensate_input: + description: Sets the compensation function's input. It accepts any response. action: type: string - description: The workflows execution's action. + description: Whether to invoke or compensate the step. enum: - invoke - compensate diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsRun.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsRun.yaml index 9d4e5dc6f3055..c780d48d9cd93 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsRun.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateWorkflowsRun.yaml @@ -1,9 +1,10 @@ type: object -description: SUMMARY +description: The details of the workflow to execute. x-schemaName: AdminCreateWorkflowsRun properties: - input: {} + input: + description: The input to pass to the workflow. Can be of any type. transaction_id: type: string title: transaction_id - description: The workflows execution's transaction id. + description: The ID of the workflow execution's transaction. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrency.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrency.yaml index 4b310956abc46..984e1d51cf090 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrency.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrency.yaml @@ -1,3 +1,57 @@ type: object -description: The supported currency's currency. +description: The currency's currencies. x-schemaName: AdminCurrency +required: + - code + - symbol + - symbol_native + - name + - decimal_digits + - rounding + - raw_rounding + - created_at + - updated_at + - deleted_at +properties: + code: + type: string + title: code + description: The currency's code. + example: usd + symbol: + type: string + title: symbol + description: The currency's symbol. + example: $ + symbol_native: + type: string + title: symbol_native + description: The currency's native symbol, if different than the symbol. + example: $ + name: + type: string + title: name + description: The currency's name. + decimal_digits: + type: number + title: decimal_digits + description: The number of digits after the decimal for prices in this currency. + rounding: + type: number + title: rounding + description: The rounding percision applied on prices in this currency. + created_at: + type: string + format: date-time + title: created_at + description: The currency's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The currency's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The currency's deletion date. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml index ad2343c3800c3..896e430a10e1d 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of currencies. x-schemaName: AdminCurrencyListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The currency's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The currency's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The currency's count. + description: The total number of items. currencies: type: array - description: The currency's currencies. + description: The list of currencies. items: $ref: ./AdminCurrency.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyResponse.yaml index da9a68b4d3b02..4023729904675 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The currency's details. x-schemaName: AdminCurrencyResponse required: - currency diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomer.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomer.yaml index efce81ce39c30..af16ad0bf77b7 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomer.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomer.yaml @@ -1,5 +1,5 @@ type: object -description: The order's customer. +description: The customer's details. x-schemaName: AdminCustomer required: - has_account @@ -12,19 +12,19 @@ required: - last_name - addresses properties: + id: + type: string + title: id + description: The customer's ID. has_account: type: boolean title: has_account - description: The customer's has account. + description: Whether the customer is registered. groups: type: array description: The customer's groups. items: $ref: ./AdminCustomerGroup.yaml - id: - type: string - title: id - description: The customer's ID. email: type: string title: email @@ -33,11 +33,11 @@ properties: default_billing_address_id: type: string title: default_billing_address_id - description: The customer's default billing address id. + description: The ID of the address used as the default billing address. default_shipping_address_id: type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: The ID of the address used as the default shipping address. company_name: type: string title: company_name @@ -61,23 +61,23 @@ properties: description: The customer's phone. metadata: type: object - description: The customer's metadata. + description: The customer's metadata, used to store custom key-value pairs. created_by: type: string title: created_by - description: The customer's created by. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The customer's deleted at. + description: The ID of the user that created this customer, if available. created_at: type: string format: date-time title: created_at - description: The customer's created at. + description: The customer's creation date. updated_at: type: string format: date-time title: updated_at - description: The customer's updated at. + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddress.yaml index 6b2d655e7a5a8..de369d541a253 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddress.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddress.yaml @@ -28,39 +28,39 @@ properties: address_name: type: string title: address_name - description: The address's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The address's is default shipping. + description: Whether the address is the default shipping address. is_default_billing: type: boolean title: is_default_billing - description: The address's is default billing. + description: Whether the address is the default billing address. customer_id: type: string title: customer_id - description: The address's customer id. + description: The ID of the customer that this address belongs to. company: type: string title: company - description: The address's company. + description: The customer's company. first_name: type: string title: first_name - description: The address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The address's last name. + description: The customer's last name. address_1: type: string title: address_1 - description: The address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The address's address 2. + description: The address's second line. city: type: string title: city @@ -69,6 +69,7 @@ properties: type: string title: country_code description: The address's country code. + example: us province: type: string title: province @@ -83,14 +84,14 @@ properties: description: The address's phone. metadata: type: object - description: The address's metadata. + description: The address's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The address's created at. + description: The address's creation date. updated_at: type: string format: date-time title: updated_at - description: The address's updated at. + description: The address's update date. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddressResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddressResponse.yaml index e84a4d16dde97..40f32063a4fed 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddressResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerAddressResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The address's details. x-schemaName: AdminCustomerAddressResponse required: - address diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroup.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroup.yaml index ba7722625fdde..3984d6eb28592 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroup.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerGroup.yaml @@ -1,3 +1,37 @@ type: object -description: The group's groups. +description: The customer group's details. x-schemaName: AdminCustomerGroup +required: + - id + - name + - customers + - metadata + - created_at + - updated_at +properties: + id: + type: string + title: id + description: The customer group's ID. + name: + type: string + title: name + description: The customer group's name. + customers: + type: array + description: The customer group's customers. + items: + $ref: ./BaseCustomer.yaml + metadata: + type: object + description: The customer group's metadata, used to store custom key-value pairs. + created_at: + type: string + format: date-time + title: created_at + description: The customer group's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer group's update date. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerInGroupFilters.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerInGroupFilters.yaml index 11fdbf8084c6e..0582cbffdc86f 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerInGroupFilters.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCustomerInGroupFilters.yaml @@ -1,33 +1,33 @@ type: object -description: The customer group's customers. +description: Filters to apply on customers to retrieve their groups. x-schemaName: AdminCustomerInGroupFilters properties: id: oneOf: - type: string title: id - description: The customer's ID. + description: Filter by a customer's ID. - type: array - description: The customer's ID. + description: Filter by customer IDs. items: type: string title: id - description: The id's ID. + description: A customer's ID. email: oneOf: - type: string title: email - description: The customer's email. + description: Filter by a customer's email. format: email - type: array - description: The customer's email. + description: Filter by customer emails. items: type: string title: email - description: The email's details. + description: A customer's email. format: email - type: object - description: The customer's email. + description: Apply filters on the customer's email. properties: $and: type: array @@ -51,7 +51,7 @@ properties: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -164,71 +164,75 @@ properties: oneOf: - type: string title: default_billing_address_id - description: The customer's default billing address id. + description: Filter by the ID of a customer's default billing address. - type: array - description: The customer's default billing address id. + description: Filter by the IDs of a customers' default billing address. items: type: string title: default_billing_address_id - description: The default billing address id's details. + description: The ID of a customer's default billing address. default_shipping_address_id: oneOf: - type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: Filter by the ID of a customer's default shipping address. - type: array - description: The customer's default shipping address id. + description: Filter by the IDs of a customers' default shipping address. items: type: string title: default_shipping_address_id - description: The default shipping address id's details. + description: The ID of a customer's default shipping address. company_name: oneOf: - type: string title: company_name - description: The customer's company name. + description: Filter by a customer's company name. - type: array - description: The customer's company name. + description: Filter by customers' company names. items: type: string title: company_name - description: The company name's details. + description: A company name. first_name: oneOf: - type: string title: first_name - description: The customer's first name. + description: Filter by a customer's first name. - type: array - description: The customer's first name. + description: Filter by customers' first names. items: type: string title: first_name - description: The first name's details. + description: A first name. last_name: oneOf: - type: string title: last_name - description: The customer's last name. + description: Filter by a customer's last name. - type: array - description: The customer's last name. + description: Filter by customers' last names. items: type: string title: last_name - description: The last name's details. + description: A last name. created_by: oneOf: - type: string title: created_by - description: The customer's created by. + description: >- + Filter by the ID of a user to retrieve the groups of the customers + they created. - type: array - description: The customer's created by. + description: >- + Filter by the ID of users to retrieve the groups of the customers they + created. items: type: string title: created_by - description: The created by's details. + description: A user's ID. created_at: type: object - description: The customer's created at. + description: Filter the customer's creation date. properties: $and: type: array @@ -252,7 +256,7 @@ properties: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -355,7 +359,7 @@ properties: description: Filter by whether a value for this parameter exists (not `null`). updated_at: type: object - description: The customer's updated at. + description: Filter the customer's update date. properties: $and: type: array @@ -482,7 +486,7 @@ properties: description: Filter by whether a value for this parameter exists (not `null`). deleted_at: type: object - description: The customer's deleted at. + description: Filter the customer's deletion date. properties: $and: type: array diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePaymentCollectionResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePaymentCollectionResponse.yaml index 479fe851d6940..8003af56c5dc1 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePaymentCollectionResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminDeletePaymentCollectionResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The result of deleting the payment collection. x-schemaName: AdminDeletePaymentCollectionResponse required: - id @@ -13,9 +13,9 @@ properties: object: type: string title: object - description: SUMMARY + description: The name of the object that was deleted. default: payment-collection deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the object was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderResponse.yaml index d2fd16520caea..e10135e61d015 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The draft order's details. x-schemaName: AdminDraftOrderResponse required: - draft_order diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExchange.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExchange.yaml index 90011a0ac81bb..e66c9d6ec8124 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExchange.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExchange.yaml @@ -44,31 +44,35 @@ properties: order_id: type: string title: order_id - description: The exchange's order id. + description: The ID of the order the exchange is created for. return_items: type: array - description: The exchange's return items. + description: The items returned (inbound) by the exchange. items: $ref: ./AdminReturnItem.yaml additional_items: type: array - description: The exchange's additional items. + description: The new items (outbound) sent by the exchange. items: $ref: ./BaseExchangeItem.yaml no_notification: type: boolean title: no_notification - description: The exchange's no notification. + description: Whether to send the customer notifications when the exchange is updated. difference_due: type: number title: difference_due - description: The exchange's difference due. + description: >- + The amount to be exchanged or refunded. If the amount is negative, it must + be refunded. If positive, additional payment is required from the + customer. return: + description: the return associated with the exchange. $ref: ./AdminReturn.yaml return_id: type: string title: return_id - description: The exchange's return id. + description: The ID of the associated exchange. currency_code: type: string title: currency_code @@ -80,31 +84,33 @@ properties: region_id: type: string title: region_id - description: The exchange's region id. + description: The ID of the associated order's region. customer_id: type: string title: customer_id - description: The exchange's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The exchange's sales channel id. + description: The ID of the sales channel the associated order belongs to. email: type: string title: email - description: The exchange's email. + description: The email used when placing the order. format: email display_id: type: number title: display_id - description: The exchange's display id. + description: The exchange's display ID. shipping_address: + description: The shipping address to send new items to. $ref: ./BaseOrderAddress.yaml billing_address: + description: The customer's billing address. $ref: ./BaseOrderAddress.yaml shipping_methods: type: array - description: The exchange's shipping methods. + description: The shipping methods used to send the new (outbound) items. items: $ref: ./BaseOrderShippingMethod.yaml payment_collections: @@ -128,7 +134,7 @@ properties: - requires_action fulfillments: type: array - description: The exchange's fulfillments. + description: The exchange's fulfillments of new (outbound) items. items: $ref: ./BaseOrderFulfillment.yaml fulfillment_status: @@ -146,87 +152,91 @@ properties: transactions: type: array description: The exchange's transactions. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions items: $ref: ./BaseOrderTransaction.yaml summary: + description: The totals summary of the exchange. $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The exchange's metadata. + description: The exchange's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The exchange's created at. + description: The date that the exchange was created. updated_at: type: string format: date-time title: updated_at - description: The exchange's updated at. + description: The date that the exchange was updated. original_item_total: type: number title: original_item_total - description: The exchange's original item total. + description: The total of the original items in the order. original_item_subtotal: type: number title: original_item_subtotal - description: The exchange's original item subtotal. + description: The subtotal of the original items in the order. original_item_tax_total: type: number title: original_item_tax_total - description: The exchange's original item tax total. + description: The total tax of the original items in the order. item_total: type: number title: item_total - description: The exchange's item total. + description: The total of the exchange's new items. item_subtotal: type: number title: item_subtotal - description: The exchange's item subtotal. + description: The subtotal of the exchange's new items. item_tax_total: type: number title: item_tax_total - description: The exchange's item tax total. + description: The tax total of the exchange's new items. original_total: type: number title: original_total - description: The exchange's original total. + description: The total of the order. original_subtotal: type: number title: original_subtotal - description: The exchange's original subtotal. + description: The subtotal of the order. original_tax_total: type: number title: original_tax_total - description: The exchange's original tax total. + description: The tax total of the order. total: type: number title: total - description: The exchange's total. + description: The total of the exchange. subtotal: type: number title: subtotal - description: The exchange's subtotal. + description: The subtotal of the exchange. tax_total: type: number title: tax_total - description: The exchange's tax total. + description: The tax total of the exchange. discount_total: type: number title: discount_total - description: The exchange's discount total. + description: The discount total of the exchange. discount_tax_total: type: number title: discount_tax_total - description: The exchange's discount tax total. + description: The total taxes on discount of the exchange. gift_card_total: type: number title: gift_card_total - description: The exchange's gift card total. + description: The gift cards total of the exchange. gift_card_tax_total: type: number title: gift_card_tax_total - description: The exchange's gift card tax total. + description: The total taxes on the gift card of the exchange. shipping_total: type: number title: shipping_total @@ -242,12 +252,12 @@ properties: original_shipping_total: type: number title: original_shipping_total - description: The exchange's original shipping total. + description: The order's shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The exchange's original shipping subtotal. + description: The order's shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The exchange's original shipping tax total. + description: The order's shipping tax total. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeDeleteResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeDeleteResponse.yaml index 4fa416b52c2a2..473019c6b38dc 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeDeleteResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of deleting an exchange. x-schemaName: AdminExchangeDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Exchange was deleted. + description: Whether the exchange was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeOrderResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeOrderResponse.yaml index 356c9e7e5478c..03bc03d999ba2 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeOrderResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeOrderResponse.yaml @@ -1,11 +1,12 @@ type: object -description: SUMMARY +description: The exchange's details. x-schemaName: AdminExchangeOrderResponse required: - order - exchange properties: order: + description: The details of the associated order. $ref: ./Order.yaml exchange: $ref: ./AdminExchange.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangePreviewResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangePreviewResponse.yaml index 4178d2079e313..43b16c64383de 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangePreviewResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangePreviewResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: A preview of the order once the exchange is applied. x-schemaName: AdminExchangePreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeRequestResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeRequestResponse.yaml index 16b834277c246..8c908c82e0c7c 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeRequestResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeRequestResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of a requested exchange. x-schemaName: AdminExchangeRequestResponse required: - return @@ -7,8 +7,10 @@ required: - exchange properties: return: + description: The associated return's details. $ref: ./AdminReturn.yaml order_preview: + description: A preview of the order once the exchange is applied. $ref: ./OrderPreview.yaml exchange: $ref: ./AdminExchange.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeResponse.yaml index 663eadcceed98..bb2478330dc77 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The exchange's details. x-schemaName: AdminExchangeResponse required: - exchange diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeReturnResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeReturnResponse.yaml index d357aa7c5f036..abe845366fc88 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeReturnResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExchangeReturnResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of an exchange's return. x-schemaName: AdminExchangeReturnResponse required: - order_preview diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExportProductRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExportProductRequest.yaml deleted file mode 100644 index aa3490570bfc1..0000000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExportProductRequest.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminExportProductRequest diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminExportProductResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminExportProductResponse.yaml index ae3edcdd2933c..3f5ef9c2cd87f 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminExportProductResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminExportProductResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the product export. x-schemaName: AdminExportProductResponse required: - transaction_id @@ -7,4 +7,7 @@ properties: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: >- + The ID of the workflow execution's transaction. Use it to check the status + of the export by sending a GET request to + `/admin/workflows-executions/export-products/:transaction-id` diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFile.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFile.yaml index 2cd7dd88eb773..22f64d6cd4e77 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFile.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFile.yaml @@ -1,5 +1,5 @@ type: object -description: The upload's file. +description: A file's details. x-schemaName: AdminFile required: - id @@ -12,4 +12,4 @@ properties: url: type: string title: url - description: The file's url. + description: The file's URL. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFileListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFileListResponse.yaml index 37160b8ed12f2..dd46f78b07b03 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFileListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFileListResponse.yaml @@ -1,11 +1,11 @@ type: object -description: SUMMARY +description: The list of uploaded files. x-schemaName: AdminFileListResponse required: - files properties: files: type: array - description: The upload's files. + description: The list of uploaded files. items: $ref: ./AdminFile.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFileResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFileResponse.yaml index c0850cabdc66f..346eb96a7c25e 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFileResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFileResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: A file's details. x-schemaName: AdminFileResponse required: - file diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillment.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillment.yaml index 797d72ca7bffb..80430cd6adf85 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillment.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillment.yaml @@ -27,18 +27,20 @@ properties: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the fulfillment's items are shipped from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the fulfillment provider handling this fulfillment. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option this fulfillment is created for. provider: + description: The details of the fulfillment provider using to handle this fulfillment. $ref: ./AdminFulfillmentProvider.yaml delivery_address: + description: The address to deliver the item to. $ref: ./AdminFulfillmentAddress.yaml items: type: array @@ -47,43 +49,48 @@ properties: $ref: ./AdminFulfillmentItem.yaml labels: type: array - description: The fulfillment's labels. + description: The fulfillment's shipment labels. items: $ref: ./AdminFulfillmentLabel.yaml packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date the fulfillment was packed at. shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date the fulfillment was shipped at. delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date the fulfillment was delivered at. canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date the fulfillment was canceled at. data: type: object - description: The fulfillment's data. + description: >- + The fulfillment's data, useful for the third-party provider handling the + fulfillment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The fulfillment's created at. + description: The date the fulfillment was created at. updated_at: type: string format: date-time title: updated_at - description: The fulfillment's updated at. + description: The date the fulfillment was updated at. deleted_at: type: string format: date-time title: deleted_at - description: The fulfillment's deleted at. + description: The date the fulfillment was deleted at. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentAddress.yaml index 4f2629008982a..37df664f0ec00 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentAddress.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentAddress.yaml @@ -1,5 +1,5 @@ type: object -description: The fulfillment's delivery address. +description: An address's details. x-schemaName: AdminFulfillmentAddress required: - id @@ -22,66 +22,66 @@ properties: id: type: string title: id - description: The delivery address's ID. + description: The address's ID. fulfillment_id: type: string title: fulfillment_id - description: The delivery address's fulfillment id. + description: The ID of the fulfillment that the address belongs to. company: type: string title: company - description: The delivery address's company. + description: The address's company. first_name: type: string title: first_name - description: The delivery address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The address's last name. address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The address's second line. city: type: string title: city - description: The delivery address's city. + description: The address's city. country_code: type: string title: country_code - description: The delivery address's country code. + description: The address's country code. province: type: string title: province - description: The delivery address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The delivery address's postal code. + description: The address's postal code. phone: type: string title: phone - description: The delivery address's phone. + description: The address's phone. metadata: type: object - description: The delivery address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The delivery address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The delivery address's updated at. + description: The date the address was updated. deleted_at: type: string format: date-time title: deleted_at - description: The delivery address's deleted at. + description: The date the address was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentItem.yaml index 618af8761d054..45776eb450953 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentItem.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentItem.yaml @@ -1,5 +1,5 @@ type: object -description: The item's items. +description: The details of a fulfillment's item. x-schemaName: AdminFulfillmentItem required: - id @@ -25,11 +25,11 @@ properties: quantity: type: number title: quantity - description: The item's quantity. + description: The item's quantity to be fulfilled. sku: type: string title: sku - description: The item's sku. + description: The item's SKU. barcode: type: string title: barcode @@ -37,27 +37,27 @@ properties: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the order's line item to be fulfilled. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item of the underlying product variant. fulfillment_id: type: string title: fulfillment_id - description: The item's fulfillment id. + description: The ID of the fulfillment the item belongs to. created_at: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. deleted_at: type: string format: date-time title: deleted_at - description: The item's deleted at. + description: The date the item was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentLabel.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentLabel.yaml index 6304d99832c2e..f371e16d534f7 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentLabel.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentLabel.yaml @@ -1,5 +1,5 @@ type: object -description: The label's labels. +description: The details of a fulfillmet's shipment label. x-schemaName: AdminFulfillmentLabel required: - id @@ -22,27 +22,27 @@ properties: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. fulfillment_id: type: string title: fulfillment_id - description: The label's fulfillment id. + description: The ID of the fulfillment the label is associated with. created_at: type: string format: date-time title: created_at - description: The label's created at. + description: The date the label was created. updated_at: type: string format: date-time title: updated_at - description: The label's updated at. + description: The date the label was updated. deleted_at: type: string format: date-time title: deleted_at - description: The label's deleted at. + description: The date the label was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProvider.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProvider.yaml index 0fbdf6fd21520..9d7d2c4f6a843 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProvider.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProvider.yaml @@ -1,3 +1,3 @@ type: object -description: The fulfillment provider's fulfillment providers. +description: The shipping option's provider. x-schemaName: AdminFulfillmentProvider diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml index 23fefdf66529b..4f9ed0309744a 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of fulfillment providers. x-schemaName: AdminFulfillmentProviderListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The fulfillment provider's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The fulfillment provider's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The fulfillment provider's count. + description: The total count of items. fulfillment_providers: type: array - description: The fulfillment provider's fulfillment providers. + description: The list of fulfillment providers. items: $ref: ./AdminFulfillmentProvider.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentResponse.yaml index 8870aa903b2d8..607f15d917912 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: A fulfillment's details. x-schemaName: AdminFulfillmentResponse required: - fulfillment diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentSetDeleteResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentSetDeleteResponse.yaml index 130dc3c7b4def..38f9f0bed87a7 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentSetDeleteResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentSetDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The deletion details. x-schemaName: AdminFulfillmentSetDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Fulfillment Set was deleted. + description: Whether the fulfillment set was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGeoZone.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGeoZone.yaml index 6684ce0d57490..fcdcef3406b53 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminGeoZone.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminGeoZone.yaml @@ -1,3 +1,56 @@ type: object -description: The geo zone's geo zones. +description: The geo zone's details. x-schemaName: AdminGeoZone +required: + - id + - type + - country_code + - province_code + - city + - postal_expression + - created_at + - updated_at + - deleted_at +properties: + id: + type: string + title: id + description: The geo zone's ID. + type: + type: string + description: The geo zone's type. + enum: + - country + - province + - city + - zip + country_code: + type: string + title: country_code + description: The geo zone's country code. + province_code: + type: string + title: province_code + description: The geo zone's province code. + city: + type: string + title: city + description: The geo zone's city. + postal_expression: + type: object + description: The geo zone's postal expression. + created_at: + type: string + format: date-time + title: created_at + description: The date the geo zone was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the geo zone was update. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the geo zone was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductRequest.yaml index 4462e48b07de8..94efb6c2bde43 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductRequest.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductRequest.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The import's details. x-schemaName: AdminImportProductRequest required: - file diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductResponse.yaml index 0074592dd120f..aab2f56e4df81 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminImportProductResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The import process's details. x-schemaName: AdminImportProductResponse required: - transaction_id @@ -8,10 +8,12 @@ properties: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: >- + The ID of the workflow execution's transaction. This is useful to confirm + the import using the `/admin/products/:transaction-id/import` API route. summary: type: object - description: The product's summary. + description: The import's summary. required: - toCreate - toUpdate @@ -19,8 +21,8 @@ properties: toCreate: type: number title: toCreate - description: The summary's tocreate. + description: The number of products that will be created by this import. toUpdate: type: number title: toUpdate - description: The summary's toupdate. + description: The number of products that will be updated by this import. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItem.yaml index cf8ed2a6dbf96..c2c758a65cd2f 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItem.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItem.yaml @@ -12,7 +12,7 @@ properties: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. origin_country: type: string title: origin_country @@ -20,15 +20,15 @@ properties: hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the inventory item requires shipping. mid_code: type: string title: mid_code - description: The inventory item's mid code. + description: The inventory item's MID code. material: type: string title: material @@ -60,12 +60,12 @@ properties: thumbnail: type: string title: thumbnail - description: The inventory item's thumbnail. + description: The URL of the inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, can hold custom key-value pairs. location_levels: type: array - description: The inventory item's location levels. + description: The inventory item's associated inventory levels. items: $ref: ./AdminInventoryLevel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemResponse.yaml index 9512367b8d05a..6aef877b4930c 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryItemResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The inventory item's details. x-schemaName: AdminInventoryItemResponse required: - inventory_item diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryLevel.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryLevel.yaml index cf4a36a39040b..28850cf68c1cf 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryLevel.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminInventoryLevel.yaml @@ -1,5 +1,5 @@ type: object -description: The location level's location levels. +description: The inventory level's details. x-schemaName: AdminInventoryLevel required: - id @@ -20,57 +20,56 @@ properties: id: type: string title: id - description: The location level's ID. - created_at: - type: string - format: date-time - title: created_at - description: The location level's created at. - updated_at: - type: string - format: date-time - title: updated_at - description: The location level's updated at. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The location level's deleted at. + description: The inventory level's ID. inventory_item_id: type: string title: inventory_item_id - description: The location level's inventory item id. + description: The ID of the inventory item this level belongs to. location_id: type: string title: location_id - description: The location level's location id. + description: The ID of the stock location this level belongs to. stocked_quantity: type: number title: stocked_quantity - description: The location level's stocked quantity. - raw_stocked_quantity: - type: object - description: The location level's raw stocked quantity. + description: >- + The quantity of the associated inventory item stocked in the associated + stock location. reserved_quantity: type: number title: reserved_quantity - description: The location level's reserved quantity. - raw_reserved_quantity: - type: object - description: The location level's raw reserved quantity. + description: >- + The reserved quantity of the associated inventory item stocked in the + associated stock location. incoming_quantity: type: number title: incoming_quantity - description: The location level's incoming quantity. - raw_incoming_quantity: - type: object - description: The location level's raw incoming quantity. + description: >- + The incoming quantity of the associated inventory item stocked in the + associated stock location. metadata: type: object - description: The location level's metadata. + description: The location level's metadata, can hold custom key-value pairs. inventory_item: type: object available_quantity: type: number title: available_quantity - description: The location level's available quantity. + description: >- + The quantity available for order of the associated inventory item in the + associated stock location. + created_at: + type: string + format: date-time + title: created_at + description: The date the inventory level was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the inventory level was updated. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the inventory level was deleted. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInvite.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInvite.yaml index f33a0a9aed845..d9928379cde37 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInvite.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminInvite.yaml @@ -19,7 +19,7 @@ properties: accepted: type: boolean title: accepted - description: The invite's accepted. + description: Whether the invite has been accepted. token: type: string title: token @@ -27,18 +27,18 @@ properties: expires_at: type: string title: expires_at - description: The invite's expires at. + description: The invite's expiry date. format: date-time metadata: type: object - description: The invite's metadata. + description: The invite's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The invite's created at. + description: The date the invite was created. updated_at: type: string format: date-time title: updated_at - description: The invite's updated at. + description: The date the invite was updated. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminInviteResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminInviteResponse.yaml index d2649d5348d29..c88c527c63ff5 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminInviteResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminInviteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The invite's details. x-schemaName: AdminInviteResponse required: - invite diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminLinkPriceListProducts.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminLinkPriceListProducts.yaml index 5e8a008bc434f..e122fdaa13b7e 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminLinkPriceListProducts.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminLinkPriceListProducts.yaml @@ -1,5 +1,5 @@ type: object -description: The removal details. +description: The products removal details. properties: remove: type: array diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotification.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotification.yaml index 4b4d98663cc73..c700f99e2cf57 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotification.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminNotification.yaml @@ -16,48 +16,57 @@ properties: to: type: string title: to - description: The notification's to. + description: >- + Where to send the notification to. For example, if `channel` is `email`, + this can be an email number. channel: type: string title: channel - description: The notification's channel. + description: Through which channel is the notification sent through. + example: email template: type: string title: template - description: The notification's template. + description: >- + The ID of the template in a third-party service used as the notification's + shape. data: type: object - description: The notification's data. + description: Data payload to send with the notification. trigger_type: type: string title: trigger_type - description: The notification's trigger type. + description: What triggered this notification. + example: order.created resource_id: type: string title: resource_id - description: The notification's resource id. + description: >- + The ID of the associated resource. For example, if the notification was + triggered because an order was created, this would be the ID of the order. resource_type: type: string title: resource_type - description: The notification's resource type. + description: The type of the resource that triggered the notification. + example: order receiver_id: type: string title: receiver_id - description: The notification's receiver id. + description: The ID of the user or customer that's receiving this notification. original_notification_id: type: string title: original_notification_id - description: The notification's original notification id. + description: The ID of the original notification, if this notification is resent. external_id: type: string title: external_id - description: The notification's external id. + description: The ID of the notification in an external or third-party system. provider_id: type: string title: provider_id - description: The notification's provider id. + description: The ID of the provider used to send the notification. created_at: type: string format: date-time title: created_at - description: The notification's created at. + description: The date the notification was created. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml index aa51a6a023439..f17ab50d8b4a6 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of notifications. x-schemaName: AdminNotificationListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The notification's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The notification's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The notification's count. + description: The total count of items. notifications: type: array - description: The notification's notifications. + description: The list of notifications. items: $ref: ./AdminNotification.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationResponse.yaml index b6e0ab7c90864..dcd404183a6dd 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The notification's details. x-schemaName: AdminNotificationResponse required: - notification diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrder.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrder.yaml index fd216bb354505..4d56258b6ed1d 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrder.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminOrder.yaml @@ -70,19 +70,19 @@ properties: region_id: type: string title: region_id - description: The order's region id. + description: The ID of the region associated with the order. customer_id: type: string title: customer_id - description: The order's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order's sales channel id. + description: The ID of the sales channel the order is placed in. email: type: string title: email - description: The order's email. + description: The email of the customer that placed the order. format: email currency_code: type: string @@ -91,7 +91,7 @@ properties: display_id: type: number title: display_id - description: The order's display id. + description: The order's display ID. items: type: array description: The order's items. @@ -137,73 +137,73 @@ properties: $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The order's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total @@ -211,28 +211,28 @@ properties: gift_card_tax_total: type: number title: gift_card_tax_total - description: The order's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderAddress.yaml index 0fda1d2756eb2..6a69c1a244240 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderAddress.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderAddress.yaml @@ -1,5 +1,5 @@ type: object -description: The order's billing address. +description: An order address. x-schemaName: AdminOrderAddress required: - id @@ -7,66 +7,67 @@ required: - created_at - updated_at properties: - country: - $ref: ./AdminRegionCountry.yaml id: type: string title: id - description: The billing address's ID. + description: The address's ID. customer_id: type: string title: customer_id - description: The billing address's customer id. + description: The ID of the customer this address belongs to. first_name: type: string title: first_name - description: The billing address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The billing address's last name. + description: The address's last name. phone: type: string title: phone - description: The billing address's phone. + description: The address's phone. company: type: string title: company - description: The billing address's company. + description: The address's company. address_1: type: string title: address_1 - description: The billing address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The billing address's address 2. + description: The address's second line. city: type: string title: city - description: The billing address's city. + description: The address's city. country_code: type: string title: country_code - description: The billing address's country code. + description: The address's country code. + example: us + country: + $ref: ./AdminRegionCountry.yaml province: type: string title: province - description: The billing address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The billing address's postal code. + description: The address's postal code. metadata: type: object - description: The billing address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The billing address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The billing address's updated at. + description: The date the address was updated. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderChangesResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderChangesResponse.yaml index 4f8c9327affd2..0126a1ad99ad3 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderChangesResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderChangesResponse.yaml @@ -1,11 +1,11 @@ type: object -description: SUMMARY +description: The details of an order's changes. x-schemaName: AdminOrderChangesResponse required: - order_changes properties: order_changes: type: array - description: The order's order changes. + description: An order's changes. items: $ref: ./BaseOrderChange.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditPreviewResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditPreviewResponse.yaml index 09feaf500fce5..ec43c247ffb39 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditPreviewResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditPreviewResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The preview of an order edit. x-schemaName: AdminOrderEditPreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditResponse.yaml index 09c7c1a096e41..db40b31387db3 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderEditResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: An order edit's details. x-schemaName: AdminOrderEditResponse required: - order_change diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderPreview.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderPreview.yaml index b031d34d77047..1d24582bdff15 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminOrderPreview.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminOrderPreview.yaml @@ -1,5 +1,7 @@ type: object -description: The return's order preview. +description: >- + A preview of an order if a change, such as exchange, return, edit, or claim is + applied on it. x-schemaName: AdminOrderPreview required: - return_requested_total @@ -44,16 +46,16 @@ properties: return_requested_total: type: number title: return_requested_total - description: The order preview's return requested total. + description: The total of the requested return. order_change: $ref: ./BaseOrderChange.yaml items: type: array - description: The order preview's items. + description: The order's items. items: allOf: - type: object - description: The item's items. + description: An order's item. x-schemaName: BaseOrderLineItem required: - id @@ -110,74 +112,77 @@ properties: thumbnail: type: string title: thumbnail - description: The item's thumbnail. + description: The URL of the item's thumbnail. variant: $ref: ./BaseProductVariant.yaml variant_id: type: string title: variant_id - description: The item's variant id. + description: The ID of the associated variant. product: $ref: ./BaseProduct.yaml product_id: type: string title: product_id - description: The item's product id. + description: The ID of the associated product. product_title: type: string title: product_title - description: The item's product title. + description: The title of the item's product. product_description: type: string title: product_description - description: The item's product description. + description: The description of the item's product. product_subtitle: type: string title: product_subtitle - description: The item's product subtitle. + description: The subtitle of the item's product. product_type: type: string title: product_type - description: The item's product type. + description: The ID of type of the item's product. product_collection: type: string title: product_collection - description: The item's product collection. + description: The ID of collection of the item's product. product_handle: type: string title: product_handle - description: The item's product handle. + description: The handle of the item's product. variant_sku: type: string title: variant_sku - description: The item's variant sku. + description: The SKU of the item's variant. variant_barcode: type: string title: variant_barcode - description: The item's variant barcode. + description: The barcode of the item's variant. variant_title: type: string title: variant_title - description: The item's variant title. + description: The title of the item's variant. variant_option_values: type: object - description: The item's variant option values. + description: >- + The option values of the item's variant as key-value pairs. The + key is the title of an option, and the value is the option's + value. requires_shipping: type: boolean title: requires_shipping - description: The item's requires shipping. + description: Whether the item requires shipping. is_discountable: type: boolean title: is_discountable - description: The item's is discountable. + description: Whether the item is discountable. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The item's is tax inclusive. + description: Whether the item's price includes taxes. compare_at_unit_price: type: number - title: compare_at_unit_price - description: The item's compare at unit price. + title: The original price of the item before a promotion or sale. + description: The unit_price: type: number title: unit_price @@ -202,84 +207,92 @@ properties: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. metadata: type: object - description: The item's metadata. + description: The item's metadata, can hold custom key-value pairs. original_total: type: number title: original_total - description: The item's original total. + description: The item's total including taxes, excluding promotions. original_subtotal: type: number title: original_subtotal - description: The item's original subtotal. + description: The item's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The item's original tax total. + description: The tax total of the item excluding promotions. item_total: type: number title: item_total - description: The item's item total. + description: >- + The item's total for a single unit including taxes and + promotions. item_subtotal: type: number title: item_subtotal - description: The item's item subtotal. + description: >- + The item's total for a single unit excluding taxes, including + promotions. item_tax_total: type: number title: item_tax_total - description: The item's item tax total. + description: >- + The tax total for a single unit of the item including + promotions. total: type: number title: total - description: The item's total. + description: The item's total including taxes and promotions. subtotal: type: number title: subtotal - description: The item's subtotal. + description: The item's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The item's tax total. + description: The tax total of the item including promotions. discount_total: type: number title: discount_total - description: The item's discount total. + description: The total of the item's discount / promotion. discount_tax_total: type: number title: discount_tax_total - description: The item's discount tax total. + description: The tax total of the item's discount / promotion refundable_total: type: number title: refundable_total - description: The item's refundable total. + description: The total refundable amount of the item's total. refundable_total_per_unit: type: number title: refundable_total_per_unit - description: The item's refundable total per unit. + description: >- + The total refundable amount of the item's total for a single + unit. - type: object - description: The item's items. + description: An order's item. properties: actions: type: array - description: The item's actions. + description: The actions applied on an item. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction shipping_methods: type: array - description: The order preview's shipping methods. + description: The order's shipping methods. items: allOf: - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. x-schemaName: BaseOrderShippingMethod required: - id @@ -308,7 +321,7 @@ properties: order_id: type: string title: order_id - description: The shipping method's order id. + description: The ID of the order this shipping method belongs to. name: type: string title: name @@ -324,17 +337,22 @@ properties: is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The shipping method's is tax inclusive. + description: Whether the shipping method's amount is tax inclusive. shipping_option_id: type: string title: shipping_option_id - description: The shipping method's shipping option id. + description: The ID of the shipping option this method was created from. data: type: object - description: The shipping method's data. + description: >- + The data relevant for the fulfillment provider to process this + shipment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/order/concepts#data-property metadata: type: object - description: The shipping method's metadata. + description: The shipping method's metadata, can hold custom key-value pairs. tax_lines: type: array description: The shipping method's tax lines. @@ -349,163 +367,143 @@ properties: oneOf: - type: string title: original_total - description: The shipping method's original total. + description: >- + The shipping method's total including taxes, excluding + promotions. - type: number title: original_total - description: The shipping method's original total. - - type: string - title: original_total - description: The shipping method's original total. - - $ref: ./IBigNumber.yaml + description: >- + The shipping method's total including taxes, excluding + promotions. original_subtotal: oneOf: - type: string title: original_subtotal - description: The shipping method's original subtotal. + description: >- + The shipping method's total excluding taxes, including + promotions. - type: number title: original_subtotal - description: The shipping method's original subtotal. - - type: string - title: original_subtotal - description: The shipping method's original subtotal. - - $ref: ./IBigNumber.yaml + description: >- + The shipping method's total excluding taxes, including + promotions. original_tax_total: oneOf: - type: string title: original_tax_total - description: The shipping method's original tax total. + description: The tax total of the shipping method excluding promotions. - type: number title: original_tax_total - description: The shipping method's original tax total. - - type: string - title: original_tax_total - description: The shipping method's original tax total. - - $ref: ./IBigNumber.yaml + description: The tax total of the shipping method excluding promotions. total: oneOf: - type: string title: total - description: The shipping method's total. + description: The shipping method's total including taxes and promotions. - type: number title: total - description: The shipping method's total. - - type: string - title: total - description: The shipping method's total. - - $ref: ./IBigNumber.yaml + description: The shipping method's total including taxes and promotions. subtotal: oneOf: - type: string title: subtotal - description: The shipping method's subtotal. + description: >- + The shipping method's total excluding taxes, including + promotions. - type: number title: subtotal - description: The shipping method's subtotal. - - type: string - title: subtotal - description: The shipping method's subtotal. - - $ref: ./IBigNumber.yaml + description: >- + The shipping method's total excluding taxes, including + promotions. tax_total: oneOf: - type: string title: tax_total - description: The shipping method's tax total. + description: The tax total of the shipping method including promotions. - type: number title: tax_total - description: The shipping method's tax total. - - type: string - title: tax_total - description: The shipping method's tax total. - - $ref: ./IBigNumber.yaml + description: The tax total of the shipping method including promotions. discount_total: oneOf: - type: string title: discount_total - description: The shipping method's discount total. + description: The total of the shipping method's promotion. - type: number title: discount_total - description: The shipping method's discount total. - - type: string - title: discount_total - description: The shipping method's discount total. - - $ref: ./IBigNumber.yaml + description: The total of the shipping method's promotion. discount_tax_total: oneOf: - type: string title: discount_tax_total - description: The shipping method's discount tax total. + description: The tax total of the shipping method's promotion. - type: number title: discount_tax_total description: The shipping method's discount tax total. - - type: string - title: discount_tax_total - description: The shipping method's discount tax total. - - $ref: ./IBigNumber.yaml created_at: type: string format: date-time title: created_at - description: The shipping method's created at. + description: The date the shipping method was created. updated_at: type: string format: date-time title: updated_at - description: The shipping method's updated at. + description: The date the shipping method was updated. - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. properties: actions: type: array - description: The shipping method's actions. + description: The actions applied on the shipping method. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction currency_code: type: string title: currency_code - description: The order preview's currency code. + description: The order's currency code. version: type: number title: version - description: The order preview's version. + description: The order's version when this preview is applied. id: type: string title: id - description: The order preview's ID. + description: The order's ID. region_id: type: string title: region_id - description: The order preview's region id. + description: The ID of the order's associated region. customer_id: type: string title: customer_id - description: The order preview's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order preview's sales channel id. + description: The ID of the sales channel that the order was placed in. email: type: string title: email - description: The order preview's email. + description: The email of the customer that placed the order. format: email display_id: type: number title: display_id - description: The order preview's display id. + description: The order's display ID. shipping_address: $ref: ./AdminOrderAddress.yaml billing_address: $ref: ./AdminOrderAddress.yaml payment_collections: type: array - description: The order preview's payment collections. + description: The order's payment collections. items: $ref: ./AdminPaymentCollection.yaml payment_status: type: string - description: The order preview's payment status. + description: The order's payment status. enum: - canceled - not_paid @@ -519,12 +517,12 @@ properties: - requires_action fulfillments: type: array - description: The order preview's fulfillments. + description: The order's fulfillments. items: $ref: ./BaseOrderFulfillment.yaml fulfillment_status: type: string - description: The order preview's fulfillment status. + description: The order's fulfillment status. enum: - canceled - not_fulfilled @@ -536,112 +534,112 @@ properties: - delivered transactions: type: array - description: The order preview's transactions. + description: The order's transactions. items: $ref: ./BaseOrderTransaction.yaml summary: $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The order preview's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order preview's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order preview's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order preview's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order preview's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order preview's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order preview's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order preview's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order preview's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order preview's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order preview's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order preview's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order preview's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order preview's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order preview's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order preview's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order preview's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total - description: The order preview's gift card total. + description: The order's gift card total. gift_card_tax_total: type: number title: gift_card_tax_total - description: The order preview's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order preview's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order preview's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order preview's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order preview's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order preview's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order preview's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. customer: $ref: ./AdminCustomer.yaml sales_channel: diff --git a/www/apps/api-reference/specs/admin/components/schemas/AuthCallbackResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AuthCallbackResponse.yaml new file mode 100644 index 0000000000000..65706e144b57a --- /dev/null +++ b/www/apps/api-reference/specs/admin/components/schemas/AuthCallbackResponse.yaml @@ -0,0 +1,12 @@ +type: object +description: The authentication's details. +x-schemaName: AuthCallbackResponse +required: + - location +properties: + token: + type: string + title: location + description: >- + The location to redirect the user to for further authentication with the + third-party provider. diff --git a/www/apps/api-reference/specs/admin/components/schemas/BaseCustomer.yaml b/www/apps/api-reference/specs/admin/components/schemas/BaseCustomer.yaml new file mode 100644 index 0000000000000..ef30b67813446 --- /dev/null +++ b/www/apps/api-reference/specs/admin/components/schemas/BaseCustomer.yaml @@ -0,0 +1,73 @@ +type: object +description: The customer's details. +x-schemaName: BaseCustomer +required: + - id + - email + - default_billing_address_id + - default_shipping_address_id + - company_name + - first_name + - last_name + - addresses +properties: + id: + type: string + title: id + description: The customer's ID. + email: + type: string + title: email + description: The customer's email. + format: email + default_billing_address_id: + type: string + title: default_billing_address_id + description: The ID of the address used as the default billing address. + default_shipping_address_id: + type: string + title: default_shipping_address_id + description: The ID of the address used as the default shipping address. + company_name: + type: string + title: company_name + description: The customer's company name. + first_name: + type: string + title: first_name + description: The customer's first name. + last_name: + type: string + title: last_name + description: The customer's last name. + addresses: + type: array + description: The customer's addresses. + items: + $ref: ./BaseCustomerAddress.yaml + phone: + type: string + title: phone + description: The customer's phone. + metadata: + type: object + description: The customer's metadata, used to store custom key-value pairs. + created_by: + type: string + title: created_by + description: The ID of the user that created this customer, if available. + created_at: + type: string + format: date-time + title: created_at + description: The customer's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreCreateCart.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreCreateCart.yaml new file mode 100644 index 0000000000000..41c5888a13851 --- /dev/null +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreCreateCart.yaml @@ -0,0 +1,33 @@ +type: object +description: SUMMARY +x-schemaName: StoreCreateCart +properties: + region_id: + type: string + title: region_id + description: The cart's region id. + shipping_address: + $ref: ./StoreCartAddress.yaml + billing_address: + $ref: ./StoreCartAddress.yaml + email: + type: string + title: email + description: The cart's email. + format: email + currency_code: + type: string + title: currency_code + description: The cart's currency code. + items: + type: array + description: The cart's items. + items: + $ref: ./StoreCartLineItem.yaml + sales_channel_id: + type: string + title: sales_channel_id + description: The cart's sales channel id. + metadata: + type: object + description: The cart's metadata. diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index aa59f0ed1e16a..4828f1e90efc5 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -16332,11 +16332,6 @@ paths: - api_token: [] - cookie_auth: [] - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminCancelFulfillment' x-codeSamples: - lang: Shell label: cURL @@ -26856,11 +26851,6 @@ paths: - api_token: [] - cookie_auth: [] - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AdminExportProductRequest' x-codeSamples: - lang: Shell label: cURL @@ -43705,11 +43695,53 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /auth/token/refresh: + post: + operationId: PostAdminAuthTokenRefresh + summary: Refresh Authentication Token + description: Refresh the authentication token of a user. This is useful after authenticating a user with a third-party service to ensure the token holds the new user's details, or when you don't want users to re-login every day. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. + x-authenticated: true + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/auth/token/refresh' \ + -H 'Authorization: Bearer {token}' + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthResponse' + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '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' /auth/user/{auth_provider}: post: operationId: PostActor_typeAuth_provider summary: Authenticate User - description: Authenticate an admin user and receive the JWT token to be used in the header of subsequent requests. + description: | + Authenticate a user and receive the JWT token to be used in the header of subsequent requests. + + When used with a third-party provider, such as Google, the request returns a `location` property. You redirect to the specified URL in your frontend to continue authentication with the third-party service. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#types-of-authentication-flows + description: Learn about different authentication flows. x-authenticated: false parameters: - name: auth_provider @@ -43719,10 +43751,29 @@ paths: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: The input data necessary for authentication. For example, for email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/auth/user/{auth_provider}' + label: EmailPass Provider + source: |- + curl -X POST '{backend_url}/auth/user/emailpass' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "email": "admin@medusa-test.com", + "password": "supersecret" + }' + - lang: Shell + label: Google Provider + source: curl -X POST '{backend_url}/auth/user/google' + - lang: Shell + label: GitHub Provider + source: curl -X POST '{backend_url}/auth/user/github' tags: - Auth responses: @@ -43731,7 +43782,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuthResponse' + oneOf: + - $ref: '#/components/schemas/AuthResponse' + - $ref: '#/components/schemas/AuthCallbackResponse' '400': $ref: '#/components/responses/400_error' '401': @@ -43748,7 +43801,15 @@ paths: post: operationId: PostActor_typeAuth_providerCallback summary: Validate Authentication Callback - description: Third-party authentication providers, such as Google, require an API route to call once authentication with the third-party provider is finished. This API route validates callback for admin users logged-in with third-party providers. + description: | + This API route is used by your dashboard or frontend application when a third-party provider redirects to it after authentication. + + It validates the authentication with the third-party provider and, if successful, returns an authentication token. + + You can decode the JWT token using libraries like [react-jwt](https://www.npmjs.com/package/react-jwt) in the frontend. If the decoded data doesn't have an `actor_id` property, then you must create a user, typically using the Accept Invite route passing the token in the request's Authorization header. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -43760,8 +43821,11 @@ paths: example: google x-codeSamples: - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/auth/user/{auth_provider}/callback' + label: Google Provider + source: curl -X POST '{backend_url}/auth/user/google/callback?code=123' + - lang: Shell + label: GitHub Provider + source: curl -X POST '{backend_url}/auth/user/github/callback?code=123' tags: - Auth responses: @@ -43787,7 +43851,10 @@ paths: post: operationId: PostActor_typeAuth_provider_register summary: Retrieve Registration JWT Token - description: A registration JWT token is used in the header of requests that create a user, such as the accept invitation request. This API route retrieves the JWT token of a user that hasn't been registered yet. + description: This API route retrieves a registration JWT token of a user that hasn't been registered yet. The token is used in the header of requests that create a user, such as the Accept Invite API route. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#1-basic-authentication-flow + description: Learn about the basic authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -43797,10 +43864,23 @@ paths: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: The input data necessary for authentication. For example, for email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell label: cURL - source: curl -X POST '{backend_url}/auth/user/{auth_provider}/register' + source: |- + curl -X POST '{backend_url}/auth/user/emailpass/register' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "email": "admin@medusa-test.com", + "password": "supersecret" + }' tags: - Auth responses: @@ -43826,7 +43906,7 @@ components: schemas: AdminApiKey: type: object - description: The api key's details. + description: The API key's details. x-schemaName: AdminApiKey required: - id @@ -43851,43 +43931,44 @@ components: redacted: type: string title: redacted - description: The api key's redacted. + description: The redacted form of the API key's token. This is useful when showing portion of the token. + example: sk_...123 title: type: string title: title description: The api key's title. type: type: string - description: The api key's type. + description: The api key's type. `secret` is used for a user's API key, whereas `publishable` is used for Publishable API keys. enum: - secret - publishable last_used_at: type: string title: last_used_at - description: The api key's last used at. + description: The date and time the API key was last used. format: date-time created_by: type: string title: created_by - description: The api key's created by. + description: The ID of the user that created the API key, if available. created_at: type: string format: date-time title: created_at - description: The api key's created at. + description: The date and time the API key was created. revoked_by: type: string title: revoked_by - description: The api key's revoked by. + description: The ID of the user that revoked the API key, if available. revoked_at: type: string title: revoked_at - description: The api key's revoked at. + description: The date and time the API key was revoked. The API key is considered revoked when this property is set. format: date-time AdminApiKeyResponse: type: object - description: SUMMARY + description: The API key's details. x-schemaName: AdminApiKeyResponse required: - api_key @@ -43907,29 +43988,29 @@ components: description: The order's order id. AdminBatchProductRequest: type: object - description: SUMMARY + description: The products to create, update, or delete. x-schemaName: AdminBatchProductRequest properties: create: type: array - description: The product's create. + description: The products to create. items: $ref: '#/components/schemas/AdminCreateProduct' update: type: array - description: The product's update. + description: The products to update. items: $ref: '#/components/schemas/AdminUpdateProduct' delete: type: array - description: The product's delete. + description: The products to delete. items: type: string title: delete - description: The delete's details. + description: A product's ID. AdminBatchProductResponse: type: object - description: SUMMARY + description: The details of the products created, updated, or deleted. x-schemaName: AdminBatchProductResponse required: - created @@ -43938,17 +44019,17 @@ components: properties: created: type: array - description: The product's created. + description: The created products items: $ref: '#/components/schemas/AdminProduct' updated: type: array - description: The product's updated. + description: The updated products. items: $ref: '#/components/schemas/AdminProduct' deleted: type: object - description: SUMMARY + description: The deleted products' details. required: - ids - object @@ -43956,44 +44037,45 @@ components: properties: ids: type: array - description: The deleted's ids. + description: The IDs of deleted products. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted product. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: product deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the products were deleted. AdminBatchProductVariantRequest: type: object - description: SUMMARY + description: The product variants to create, update, or delete. x-schemaName: AdminBatchProductVariantRequest properties: create: type: array - description: The product's create. + description: The product variants to create. items: $ref: '#/components/schemas/AdminCreateProductVariant' update: type: array - description: The product's update. + description: The product variants to update. items: $ref: '#/components/schemas/AdminUpdateProductVariant' delete: type: array - description: The product's delete. + description: The product variants to delete. items: type: string title: delete - description: The delete's details. + description: A product variant's ID. AdminBatchProductVariantResponse: type: object - description: SUMMARY + description: The details of the product variants created, updated, or deleted. x-schemaName: AdminBatchProductVariantResponse required: - created @@ -44002,17 +44084,17 @@ components: properties: created: type: array - description: The product's created. + description: The created product variants. items: $ref: '#/components/schemas/AdminProductVariant' updated: type: array - description: The product's updated. + description: The updated product variants. items: $ref: '#/components/schemas/AdminProductVariant' deleted: type: object - description: SUMMARY + description: The details of the deleted product variants. required: - ids - object @@ -44020,19 +44102,20 @@ components: properties: ids: type: array - description: The deleted's ids. + description: The IDs of the deleted product variants. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted variant. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: variant deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the product variants were deleted. AdminCampaign: type: object description: The campaign's details. @@ -44066,15 +44149,15 @@ components: campaign_identifier: type: string title: campaign_identifier - description: The campaign's campaign identifier. + description: The campaign's identifier. starts_at: type: string title: starts_at - description: The campaign's starts at. + description: The date and time that the campaign starts. ends_at: type: string title: ends_at - description: The campaign's ends at. + description: The date and time that the campaign ends. budget: type: object description: The campaign's budget. @@ -44091,7 +44174,8 @@ components: description: The budget's ID. type: type: string - description: The budget's type. + description: | + The budget's type. `spend` means the limit is set on the total amount discounted by the campaign's promotions; `usage` means the limit is set on the total number of times the campaign's promotions can be used. enum: - spend - usage @@ -44106,20 +44190,17 @@ components: used: type: number title: used - description: The budget's used. + description: | + How much of the budget has been used. If the limit is `spend`, this property holds the total amount discounted so far. If the limit is `usage`, it holds the number of times the campaign's promotions have been used so far. AdminCampaignResponse: type: object - description: SUMMARY + description: The campaign's details. x-schemaName: AdminCampaignResponse required: - campaign properties: campaign: $ref: '#/components/schemas/AdminCampaign' - AdminCancelFulfillment: - type: object - description: SUMMARY - x-schemaName: AdminCancelFulfillment AdminClaim: type: object description: The claim's details. @@ -44164,62 +44245,63 @@ components: - original_shipping_subtotal - original_shipping_tax_total properties: + id: + type: string + title: id + description: The claim's ID. order_id: type: string title: order_id - description: The claim's order id. + description: The ID of the order associated with the claim. claim_items: type: array - description: The claim's claim items. + description: The order items targetted by the claim. items: $ref: '#/components/schemas/BaseClaimItem' additional_items: type: array - description: The claim's additional items. - items: {} + description: The outbound or new items of the claim. + items: + $ref: '#/components/schemas/BaseClaimItem' return: $ref: '#/components/schemas/Return' return_id: type: string title: return_id - description: The claim's return id. + description: The ID of the associated return. no_notification: type: boolean title: no_notification - description: The claim's no notification. + description: Whether the customer should be notified about changes in the claim. refund_amount: type: number title: refund_amount - description: The claim's refund amount. + description: The amount to be refunded. currency_code: type: string title: currency_code description: The claim's currency code. - id: - type: string - title: id - description: The claim's ID. region_id: type: string title: region_id - description: The claim's region id. + description: The ID of the region associated with the claim. customer_id: type: string title: customer_id - description: The claim's customer id. + description: The ID of the customer associated with the claim's order. sales_channel_id: type: string title: sales_channel_id - description: The claim's sales channel id. + description: The ID of the sales channel the claim's order is created in. email: type: string title: email - description: The claim's email. + description: The email associated with the claim's order. format: email display_id: type: number title: display_id - description: The claim's display id. + description: The claim's display ID. shipping_address: $ref: '#/components/schemas/BaseOrderAddress' billing_address: @@ -44268,63 +44350,66 @@ components: transactions: type: array description: The claim's transactions. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions + description: Learn more about transactions of orders and associated models. items: $ref: '#/components/schemas/BaseOrderTransaction' summary: $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The claim's metadata. + description: The claim's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The claim's created at. + description: The claim's creation date. updated_at: type: string format: date-time title: updated_at - description: The claim's updated at. + description: The claim's update date. original_item_total: type: number title: original_item_total - description: The claim's original item total. + description: The total of the original items in the associated order. original_item_subtotal: type: number title: original_item_subtotal - description: The claim's original item subtotal. + description: The subtotal of the original items in the associated order. original_item_tax_total: type: number title: original_item_tax_total - description: The claim's original item tax total. + description: The tax total of the original items in the associated order. item_total: type: number title: item_total - description: The claim's item total. + description: The total of the claim's items. item_subtotal: type: number title: item_subtotal - description: The claim's item subtotal. + description: The subtotal of the claim's items. item_tax_total: type: number title: item_tax_total - description: The claim's item tax total. + description: The tax total of the claim's items. original_total: type: number title: original_total - description: The claim's original total. + description: The associated order's original total. original_subtotal: type: number title: original_subtotal - description: The claim's original subtotal. + description: The associated order's original subtotal. original_tax_total: type: number title: original_tax_total - description: The claim's original tax total. + description: The associated order's original tax total. total: type: number title: total - description: The claim's total. + description: The associated order's total. subtotal: type: number title: subtotal @@ -44364,18 +44449,18 @@ components: original_shipping_total: type: number title: original_shipping_total - description: The claim's original shipping total. + description: The associated order's original shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The claim's original shipping subtotal. + description: The associated order's original shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The claim's original shipping tax total. + description: The associated order's original shipping tax total. AdminClaimDeleteResponse: type: object - description: SUMMARY + description: The details of the deleted claim. x-schemaName: AdminClaimDeleteResponse required: - id @@ -44394,10 +44479,10 @@ components: deleted: type: boolean title: deleted - description: Whether the Claim was deleted. + description: Whether the claim was deleted. AdminClaimListResponse: type: object - description: SUMMARY + description: The paginated list of claims. x-schemaName: AdminClaimListResponse required: - limit @@ -44408,23 +44493,23 @@ components: limit: type: number title: limit - description: The claim's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The claim's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The claim's count. + description: The total number of items. claims: type: array - description: The claim's claims. + description: The list of claims. items: $ref: '#/components/schemas/AdminClaim' AdminClaimOrderResponse: type: object - description: SUMMARY + description: The created claim's details. x-schemaName: AdminClaimOrderResponse required: - order @@ -44436,7 +44521,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimPreviewResponse: type: object - description: SUMMARY + description: The details of the claim, as well as a preview of the order when the claim is applied. x-schemaName: AdminClaimPreviewResponse required: - order_preview @@ -44448,7 +44533,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimRequestResponse: type: object - description: SUMMARY + description: The details of the claim, its return, and a preview of the order when the claim is applied. x-schemaName: AdminClaimRequestResponse required: - return @@ -44463,7 +44548,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimResponse: type: object - description: SUMMARY + description: The claim's details. x-schemaName: AdminClaimResponse required: - claim @@ -44472,7 +44557,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimReturnPreviewResponse: type: object - description: SUMMARY + description: The details of the claim's return, with a preview of the order when the claim's return is applied. x-schemaName: AdminClaimReturnPreviewResponse required: - order_preview @@ -44484,7 +44569,7 @@ components: $ref: '#/components/schemas/AdminReturn' AdminCollection: type: object - description: The parent's collection. + description: The product collection's details. x-schemaName: AdminCollection required: - id @@ -44511,17 +44596,17 @@ components: type: string format: date-time title: created_at - description: The collection's created at. + description: The collection's creation date. updated_at: type: string format: date-time title: updated_at - description: The collection's updated at. + description: The collection's update date. deleted_at: type: string format: date-time title: deleted_at - description: The collection's deleted at. + description: The collection's deletion date. products: type: array description: The collection's products. @@ -44529,10 +44614,10 @@ components: type: object metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. AdminCollectionDeleteResponse: type: object - description: SUMMARY + description: The details of the deleted collection. x-schemaName: AdminCollectionDeleteResponse required: - id @@ -44551,10 +44636,10 @@ components: deleted: type: boolean title: deleted - description: Whether the Collection was deleted. + description: Whether the collection was deleted. AdminCollectionListResponse: type: object - description: SUMMARY + description: The paginated list of product collections. x-schemaName: AdminCollectionListResponse required: - limit @@ -44565,23 +44650,23 @@ components: limit: type: number title: limit - description: The collection's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The collection's offset. + description: The number of items skipped before retrieving the returned results. count: type: number title: count - description: The collection's count. + description: The total number of items. collections: type: array - description: The collection's collections. + description: The list of product collections. items: $ref: '#/components/schemas/AdminCollection' AdminCollectionResponse: type: object - description: SUMMARY + description: The collection's details. x-schemaName: AdminCollectionResponse required: - collection @@ -44590,7 +44675,7 @@ components: $ref: '#/components/schemas/AdminCollection' AdminCreateApiKey: type: object - description: SUMMARY + description: The API key's details. x-schemaName: AdminCreateApiKey required: - title @@ -44599,16 +44684,16 @@ components: title: type: string title: title - description: The api key's title. + description: The API key's title. type: type: string - description: The api key's type. + description: The API key's type. Use `secret` for a user's API key; Use `publishable` for Publishable API keys. enum: - publishable - secret AdminCreateApplicationMethod: type: object - description: The promotion's application method. + description: The application method's details. x-schemaName: AdminCreateApplicationMethod required: - value @@ -44622,7 +44707,7 @@ components: value: type: number title: value - description: The application method's value. + description: The discounted amount applied by the associated promotion based on the `type`. currency_code: type: string title: currency_code @@ -44630,23 +44715,23 @@ components: max_quantity: type: number title: max_quantity - description: The application method's max quantity. + description: The max quantity allowed in the cart for the associated promotion to be applied. type: type: string - description: The application method's type. + description: The type of the application method indicating how the associated promotion is applied. enum: - fixed - percentage target_type: type: string - description: The application method's target type. + description: The target type of the application method indicating whether the associated promotion is applied to the cart's items, shipping methods, or the whole order. enum: - items - shipping_methods - order allocation: type: string - description: The application method's allocation. + description: The allocation value that indicates whether the associated promotion is applied on each item in a cart or split between the items in the cart. enum: - each - across @@ -44663,63 +44748,14 @@ components: apply_to_quantity: type: number title: apply_to_quantity - description: The application method's apply to quantity. + description: The quantity that results from matching the `buyget` promotion's condition. For example, if the promotion is a "Buy 2 shirts get 1 free", the value f this attribute is `1`. buy_rules_min_quantity: type: number title: buy_rules_min_quantity - description: The application method's buy rules min quantity. - AdminCreateCampaign: - type: object - description: The promotion's campaign. - x-schemaName: AdminCreateCampaign - properties: - name: - type: string - title: name - description: The campaign's name. - description: - type: string - title: description - description: The campaign's description. - currency: - type: string - title: currency - description: The campaign's currency. - campaign_identifier: - type: string - title: campaign_identifier - description: The campaign's campaign identifier. - starts_at: - type: string - title: starts_at - description: The campaign's starts at. - format: date-time - ends_at: - type: string - title: ends_at - description: The campaign's ends at. - format: date-time - budget: - type: object - description: The campaign's budget. - properties: - type: - type: string - description: The budget's type. - enum: - - spend - - usage - currency_code: - type: string - title: currency_code - description: The budget's currency code. - limit: - type: number - title: limit - description: The budget's limit. + description: The minimum quantity required for a `buyget` promotion to be applied. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `2`. AdminCreateCollection: type: object - description: SUMMARY + description: the product collection's details. x-schemaName: AdminCreateCollection required: - title @@ -44734,10 +44770,10 @@ components: description: The collection's handle. metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. AdminCreateCustomerGroup: type: object - description: SUMMARY + description: The customer group's details. x-schemaName: AdminCreateCustomerGroup required: - name @@ -44748,10 +44784,10 @@ components: description: The customer group's name. metadata: type: object - description: The customer group's metadata. + description: The customer group's metadata, used to store custom key-value pairs. AdminCreateFulfillment: type: object - description: SUMMARY + description: The filfillment's details. x-schemaName: AdminCreateFulfillment required: - location_id @@ -44767,27 +44803,27 @@ components: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the items are fulfilled from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the provider handling this fulfillment. delivery_address: type: object - description: The fulfillment's delivery address. + description: The address to deliver the items to. properties: first_name: type: string title: first_name - description: The delivery address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The customer's last name. phone: type: string title: phone - description: The delivery address's phone. + description: The customer's phone. company: type: string title: company @@ -44795,11 +44831,11 @@ components: address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The delivery address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The delivery address's second line. city: type: string title: city @@ -44818,13 +44854,13 @@ components: description: The delivery address's postal code. metadata: type: object - description: The delivery address's metadata. + description: The delivery address's metadata, used to store custom key-value pairs. items: type: array - description: The fulfillment's items. + description: The items to fulfill. items: type: object - description: The item's items. + description: An item to fulfill. required: - title - sku @@ -44838,11 +44874,11 @@ components: sku: type: string title: sku - description: The item's sku. + description: The item's SKU. quantity: type: number title: quantity - description: The item's quantity. + description: The quantity to fulfill of the item. barcode: type: string title: barcode @@ -44850,17 +44886,17 @@ components: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the associated line item. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item associated with the underlying variant. labels: type: array - description: The fulfillment's labels. + description: The labels for the fulfillment's shipments. items: type: object - description: The label's labels. + description: A shipment's label. required: - tracking_number - tracking_url @@ -44873,61 +44909,61 @@ components: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. - order: - type: object - description: The fulfillment's order. + description: The label's URL. order_id: type: string title: order_id - description: The fulfillment's order id. + description: The ID of the order this fulfillment is created for. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option used in the order. data: type: object - description: The fulfillment's data. + description: Any data useful for the fulfillment provider to handle the fulfillment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date and time the fulfillment was packed. format: date-time shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date and time the fulfillment was shipped. format: date-time delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date and time the fulfillment was delivered. format: date-time canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date and time the fulfillment was canceled. format: date-time metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, used to store custom key-value pairs. AdminCreateInventoryItem: type: object - description: SUMMARY + description: The inventory item's details. x-schemaName: AdminCreateInventoryItem properties: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. weight: type: number title: weight @@ -44963,21 +44999,21 @@ components: description: type: string title: description - description: The inventory item's description. + description: The description of the variant associated with the inventory item. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the item requires shipping. thumbnail: type: string title: thumbnail description: The inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, used to store custom key-value pairs. AdminCreatePriceList: type: object - description: SUMMARY + description: The price list's details. x-schemaName: AdminCreatePriceList required: - title @@ -44994,11 +45030,13 @@ components: starts_at: type: string title: starts_at - description: The price list's starts at. + description: The date and time the price list starts at. + format: date-time ends_at: type: string title: ends_at - description: The price list's ends at. + description: The date and time the price list ends at. + format: date-time status: type: string description: The price list's status. @@ -45014,12 +45052,14 @@ components: rules: type: object description: The price list's rules. + example: + product_category_id: pcat_123 prices: type: array description: The price list's prices. items: type: object - description: The price's prices. + description: A price's details. required: - currency_code - amount @@ -45036,38 +45076,42 @@ components: variant_id: type: string title: variant_id - description: The price's variant id. + description: The ID of the product variant this price is for. min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: The minimum quantity required in the cart for this price to be applied. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: The maximum quantity in the cart that shouldn't be crossed for this price to be applied. rules: type: object description: The price's rules. + example: + region_id: reg_123 AdminCreatePricePreference: type: object - description: SUMMARY + description: The price preference's details. x-schemaName: AdminCreatePricePreference properties: attribute: type: string title: attribute - description: The price preference's attribute. + description: The name of the attribute the price preference applies on. + example: currency_code value: type: string title: value - description: The price preference's value. + description: The attribute's value. + example: usd is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The price preference's is tax inclusive. + description: Whether the price is tax inclusive if the value of the specified attribute matches the specified value. AdminCreateProduct: type: object - description: The create's details. + description: The product's details. x-schemaName: AdminCreateProduct required: - title @@ -45075,47 +45119,47 @@ components: title: type: string title: title - description: The create's title. + description: The product's title. subtitle: type: string title: subtitle - description: The create's subtitle. + description: The product's subtitle. description: type: string title: description - description: The create's description. + description: The product's description. is_giftcard: type: boolean title: is_giftcard - description: The create's is giftcard. + description: Whether the product is a gift card. discountable: type: boolean title: discountable - description: The create's discountable. + description: Whether the product is discountable. images: type: array - description: The create's images. + description: The product's images. items: type: object - description: The image's images. + description: A product's image details. required: - url properties: url: type: string title: url - description: The image's url. + description: The image's URL. thumbnail: type: string title: thumbnail - description: The create's thumbnail. + description: The URL of the product's thumbnail. handle: type: string title: handle - description: The create's handle. + description: The product's handle. status: type: string - description: The create's status. + description: The product's status. enum: - draft - proposed @@ -45124,17 +45168,17 @@ components: type_id: type: string title: type_id - description: The create's type id. + description: The ID of the type the product belongs to. collection_id: type: string title: collection_id - description: The create's collection id. + description: The ID of the collection the product belongs to. categories: type: array - description: The create's categories. + description: The categories the product belongs to. items: type: object - description: The category's categories. + description: A category's details. required: - id properties: @@ -45144,10 +45188,10 @@ components: description: The category's ID. tags: type: array - description: The create's tags. + description: The product's tags. items: type: object - description: The tag's tags. + description: A tag's details. required: - id properties: @@ -45157,20 +45201,20 @@ components: description: The tag's ID. options: type: array - description: The create's options. + description: The product's options. items: $ref: '#/components/schemas/AdminCreateProductOption' variants: type: array - description: The create's variants. + description: The product's variants. items: $ref: '#/components/schemas/AdminCreateProductVariant' sales_channels: type: array - description: The create's sales channels. + description: The sales channels the product is available in. items: type: object - description: The sales channel's sales channels. + description: A sales channel's details. required: - id properties: @@ -45181,41 +45225,41 @@ components: weight: type: number title: weight - description: The create's weight. + description: The product's weight. length: type: number title: length - description: The create's length. + description: The product's length. height: type: number title: height - description: The create's height. + description: The product's height. width: type: number title: width - description: The create's width. + description: The product's width. hs_code: type: string title: hs_code - description: The create's hs code. + description: The product's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The product's MID code. origin_country: type: string title: origin_country - description: The create's origin country. + description: The product's origin country. material: type: string title: material - description: The create's material. + description: The product's material. metadata: type: object - description: The create's metadata. + description: The product's metadata, used to store custom key-value pairs. AdminCreateProductCategory: type: object - description: SUMMARY + description: The product category's details. x-schemaName: AdminCreateProductCategory required: - name @@ -45235,25 +45279,25 @@ components: is_internal: type: boolean title: is_internal - description: The product category's is internal. + description: Whether the product category is only used and seen by admin users. is_active: type: boolean title: is_active - description: The product category's is active. + description: Whether the product category is active. parent_category_id: type: string title: parent_category_id - description: The product category's parent category id. + description: The ID of a category that's the parent of this one. rank: type: number title: rank - description: The product category's rank. + description: The sorting order of the product category among sibling categories. metadata: type: object - description: The product category's metadata. + description: The product category's metadata, used to store custom key-value pairs. AdminCreateProductOption: type: object - description: SUMMARY + description: The product option's details. x-schemaName: AdminCreateProductOption required: - title @@ -45262,17 +45306,17 @@ components: title: type: string title: title - description: The product's title. + description: The product option's title. values: type: array - description: The product's values. + description: The product option's values. items: type: string title: values - description: The value's values. + description: A value. AdminCreateProductTag: type: object - description: SUMMARY + description: The product tag's details. x-schemaName: AdminCreateProductTag required: - value @@ -45283,10 +45327,10 @@ components: description: The product tag's value. metadata: type: object - description: The product tag's metadata. + description: The product tag's metadata, used to store custom key-value pairs. AdminCreateProductVariant: type: object - description: The create's details. + description: The product variant's details. x-schemaName: AdminCreateProductVariant required: - title @@ -45295,81 +45339,83 @@ components: title: type: string title: title - description: The create's title. + description: The variant's title. sku: type: string title: sku - description: The create's sku. + description: The variant's SKU. ean: type: string title: ean - description: The create's ean. + description: The variant's EAN. upc: type: string title: upc - description: The create's upc. + description: The variant's UPC. barcode: type: string title: barcode - description: The create's barcode. + description: The variant's barcode. hs_code: type: string title: hs_code - description: The create's hs code. + description: The variant's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The variant's MID code. allow_backorder: type: boolean title: allow_backorder - description: The create's allow backorder. + description: Whether it's allowed to order this variant when it's out of stock. manage_inventory: type: boolean title: manage_inventory - description: The create's manage inventory. + description: Whether Medusa manages the variant's inventory quantity. If disabled, the product variant is always considered in stock. variant_rank: type: number title: variant_rank - description: The create's variant rank. + description: The sorting order of the variant among other variants in the product. weight: type: number title: weight - description: The create's weight. + description: The variant's weight. length: type: number title: length - description: The create's length. + description: The variant's length. height: type: number title: height - description: The create's height. + description: The variant's height. width: type: number title: width - description: The create's width. + description: The variant's width. origin_country: type: string title: origin_country - description: The create's origin country. + description: The variant's origin country. material: type: string title: material - description: The create's material. + description: The variant's material. metadata: type: object - description: The create's metadata. + description: The variant's metadata, used to store custom key-value pairs. prices: type: array - description: The create's prices. + description: The variant's prices. items: $ref: '#/components/schemas/AdminCreateProductVariantPrice' options: type: object - description: The create's options. + description: The variant's options, where the key is an option's name, and the value is the option's value. + example: + Color: Black AdminCreateProductVariantPrice: type: object - description: The price's prices. + description: The details of a variant's price. x-schemaName: AdminCreateProductVariantPrice required: - currency_code @@ -45386,17 +45432,19 @@ components: min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: The minimum quantity that must be available in the cart for this price to apply. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: The maximum quantity that must not be surpassed in the cart for this price to apply. rules: type: object description: The price's rules. + example: + region_id: reg_123 AdminCreatePromotionRule: type: object - description: The rule's rules. + description: The promotion rule's details. x-schemaName: AdminCreatePromotionRule required: - operator @@ -45405,7 +45453,7 @@ components: properties: operator: type: string - description: The rule's operator. + description: The operator used to check whether the buy rule applies on a cart. For example, `eq` means that the cart's value for the specified attribute must match the specified value. enum: - gt - lt @@ -45421,21 +45469,24 @@ components: attribute: type: string title: attribute - description: The rule's attribute. + description: The attribute to compare against when checking whether a promotion can be applied on a cart. + example: item.product.id values: oneOf: - type: string title: values - description: The rule's values. + description: The attribute's value. + example: prod_123 - type: array - description: The rule's values. + description: The allowed attribute values. items: type: string title: values - description: The value's values. + description: An attribute value. + example: prod_123 AdminCreateRefundReason: type: object - description: SUMMARY + description: The refund reason's details. x-schemaName: AdminCreateRefundReason required: - label @@ -45450,7 +45501,7 @@ components: description: The refund reason's description. AdminCreateRegion: type: object - description: SUMMARY + description: The region's details. x-schemaName: AdminCreateRegion required: - name @@ -45464,34 +45515,37 @@ components: type: string title: currency_code description: The region's currency code. + example: usd countries: type: array description: The region's countries. items: type: string title: countries - description: The country's countries. + description: A country code. + example: us automatic_taxes: type: boolean title: automatic_taxes - description: The region's automatic taxes. + description: Whether taxes are calculated automatically during checkout in this region. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The region's is tax inclusive. + description: Whether prices in this region are tax inclusive. payment_providers: type: array - description: The region's payment providers. + description: The payment providers enabled in this region. items: type: string title: payment_providers - description: The payment provider's payment providers. + description: A payment provider's ID. + example: pp_stripe_stripe metadata: type: object - description: The region's metadata. + description: The region's metadata, used to store custom key-value pairs. AdminCreateReservation: type: object - description: SUMMARY + description: The reservation's details. x-schemaName: AdminCreateReservation required: - location_id @@ -45501,29 +45555,29 @@ components: line_item_id: type: string title: line_item_id - description: The reservation's line item id. + description: The ID of the line item this reservation is created for. location_id: type: string title: location_id - description: The reservation's location id. + description: The ID of the location the quantity is reserved from. inventory_item_id: type: string title: inventory_item_id - description: The reservation's inventory item id. + description: The ID of the inventory item associated with the line item's variant. quantity: type: number title: quantity - description: The reservation's quantity. + description: The reserved quantity. description: type: string title: description description: The reservation's description. metadata: type: object - description: The reservation's metadata. + description: The reservation's metadata, used to store custom key-value pairs. AdminCreateSalesChannel: type: object - description: SUMMARY + description: The sales channel's details. x-schemaName: AdminCreateSalesChannel required: - name @@ -45539,23 +45593,23 @@ components: is_disabled: type: boolean title: is_disabled - description: The sales channel's is disabled. + description: Whether the sales channel is disabled. metadata: type: object - description: The sales channel's metadata. + description: The sales channel's metadata, used to store custom key-value pairs. AdminCreateShipment: type: object - description: SUMMARY + description: The shipment's details. x-schemaName: AdminCreateShipment required: - labels properties: labels: type: array - description: The fulfillment's labels. + description: The shipment's labels. items: type: object - description: The label's labels. + description: A shipment label's details. required: - tracking_number - tracking_url @@ -45568,14 +45622,14 @@ components: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. AdminCreateShippingOption: type: object - description: SUMMARY + description: The shipping option's details. x-schemaName: AdminCreateShippingOption required: - name @@ -45593,33 +45647,37 @@ components: service_zone_id: type: string title: service_zone_id - description: The shipping option's service zone id. + description: The ID of the service zone this shipping option belongs to. shipping_profile_id: type: string title: shipping_profile_id - description: The shipping option's shipping profile id. + description: The ID of the shipping profile this shipping option belongs to. data: type: object - description: The shipping option's data. + description: Any data necessary for fulfillment providers to handle shipping methods and fulfillments of this shipping option. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. price_type: type: string - description: The shipping option's price type. + description: | + The shipping option price's type. If `flat`, it means the option has a fixed price set in the `prices` property. `calculated` means that the shipping option's price is calculated during checkout. enum: - flat - calculated provider_id: type: string title: provider_id - description: The shipping option's provider id. + description: The ID of the fulfillment provider used to handle this shipping option and its associated methods and fulfillments. type: type: object prices: type: array - description: The shipping option's prices. + description: The shipping option's prices. If `price_type` is `calculated`, pass an empty array for this property. items: oneOf: - type: object - description: The price's prices. + description: The price for a currency code. x-schemaName: AdminCreateShippingOptionPriceWithCurrency required: - currency_code @@ -45634,7 +45692,7 @@ components: title: amount description: The price's amount. - type: object - description: The price's prices. + description: The price in a region. x-schemaName: AdminCreateShippingOptionPriceWithRegion required: - region_id @@ -45643,7 +45701,7 @@ components: region_id: type: string title: region_id - description: The price's region id. + description: The ID of the region this price is used in. amount: type: number title: amount @@ -45655,7 +45713,7 @@ components: $ref: '#/components/schemas/AdminCreateShippingOptionRule' AdminCreateShippingOptionRule: type: object - description: The rule's rules. + description: The details of the shipping option rule. x-schemaName: AdminCreateShippingOptionRule required: - operator @@ -45664,7 +45722,7 @@ components: properties: operator: type: string - description: The rule's operator. + description: The operator used to check whether a rule applies. enum: - gt - lt @@ -45677,21 +45735,24 @@ components: attribute: type: string title: attribute - description: The rule's attribute. + description: The name of a property or table that the rule applies to. + example: customer_group value: oneOf: - type: string title: value - description: The rule's value. + description: A value of the attribute that enables this rule. + example: cusgroup_123 - type: array - description: The rule's value. + description: Values of the attribute that enable this rule. items: type: string title: value - description: The value's details. + description: A value of the attribute that enables this rule. + example: cusgroup_123 AdminCreateShippingProfile: type: object - description: SUMMARY + description: The shipping profile's details. x-schemaName: AdminCreateShippingProfile required: - name @@ -45707,10 +45768,10 @@ components: description: The shipping profile's type. metadata: type: object - description: The shipping profile's metadata. + description: The shipping profile's metadata, used to store custom key-value pairs. AdminCreateStockLocation: type: object - description: SUMMARY + description: The stock location's details. x-schemaName: AdminCreateStockLocation required: - name @@ -45722,15 +45783,15 @@ components: address_id: type: string title: address_id - description: The stock location's address id. + description: The ID of the stock location's address. address: $ref: '#/components/schemas/AdminUpsertStockLocationAddress' metadata: type: object - description: The stock location's metadata. + description: The stock location's metadata, used to store custom key-value pairs. AdminCreateTaxRate: type: object - description: SUMMARY + description: The tax rate's details. x-schemaName: AdminCreateTaxRate required: - name @@ -45740,18 +45801,20 @@ components: type: string title: name description: The tax rate's name. + example: VAT tax_region_id: type: string title: tax_region_id - description: The tax rate's tax region id. + description: The ID of the tax region this rate belongs to. rate: type: number title: rate - description: The tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The tax rate's code. + description: The code the tax rate is identified by. rules: type: array description: The tax rate's rules. @@ -45760,17 +45823,19 @@ components: is_default: type: boolean title: is_default - description: The tax rate's is default. + description: Whether the tax rate is the default in its tax region. is_combinable: type: boolean title: is_combinable - description: The tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The tax rate's metadata. + description: The tax rate's metadata, used to store custom key-value pairs. AdminCreateTaxRateRule: type: object - description: SUMMARY + description: The tax rate rule's details. x-schemaName: AdminCreateTaxRateRule required: - reference @@ -45779,14 +45844,16 @@ components: reference: type: string title: reference - description: The tax rate's reference. + description: The name of a table in the database that this rule points to. + example: product_type reference_id: type: string title: reference_id - description: The tax rate's reference id. + description: The ID of a record in the table specified in reference. + example: ptype_123 AdminCreateTaxRegion: type: object - description: SUMMARY + description: The tax region's details. x-schemaName: AdminCreateTaxRegion required: - country_code @@ -45795,6 +45862,7 @@ components: type: string title: country_code description: The tax region's country code. + example: us province_code: type: string title: province_code @@ -45802,7 +45870,7 @@ components: parent_id: type: string title: parent_id - description: The tax region's parent id. + description: The ID of the parent tax region. default_tax_rate: type: object description: The tax region's default tax rate. @@ -45812,28 +45880,31 @@ components: rate: type: number title: rate - description: The default tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The default tax rate's code. + description: The code the tax rate is identified by name: type: string title: name description: The default tax rate's name. + example: VAT is_combinable: type: boolean - title: is_combinable - description: The default tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The default tax rate's metadata. + description: The default tax rate's metadata, used to store custom key-value pairs. metadata: type: object - description: The tax region's metadata. + description: The tax region's metadata, used to store custom key-value pairs. AdminCreateVariantInventoryItem: type: object - description: SUMMARY + description: The details of the variant-inventory item association. x-schemaName: AdminCreateVariantInventoryItem required: - required_quantity @@ -45842,14 +45913,14 @@ components: required_quantity: type: number title: required_quantity - description: The product's required quantity. + description: The quantity of the variant in the inventory item. inventory_item_id: type: string title: inventory_item_id - description: The product's inventory item id. + description: The inventory item's ID. AdminCreateWorkflowsAsyncResponse: type: object - description: SUMMARY + description: The details of changing a workflow execution's step status. x-schemaName: AdminCreateWorkflowsAsyncResponse required: - transaction_id @@ -45858,36 +45929,93 @@ components: transaction_id: type: string title: transaction_id - description: The workflows execution's transaction id. + description: The workflows execution's transaction ID. step_id: type: string title: step_id - description: The workflows execution's step id. - response: {} - compensate_input: {} + description: The ID of the step whose status was changed. + response: + description: Sets the step's response. It accepts any type. + compensate_input: + description: Sets the compensation function's input. It accepts any response. action: type: string - description: The workflows execution's action. + description: Whether to invoke or compensate the step. enum: - invoke - compensate AdminCreateWorkflowsRun: type: object - description: SUMMARY + description: The details of the workflow to execute. x-schemaName: AdminCreateWorkflowsRun properties: - input: {} + input: + description: The input to pass to the workflow. Can be of any type. transaction_id: type: string title: transaction_id - description: The workflows execution's transaction id. + description: The ID of the workflow execution's transaction. AdminCurrency: type: object - description: The supported currency's currency. + description: The currency's currencies. x-schemaName: AdminCurrency + required: + - code + - symbol + - symbol_native + - name + - decimal_digits + - rounding + - raw_rounding + - created_at + - updated_at + - deleted_at + properties: + code: + type: string + title: code + description: The currency's code. + example: usd + symbol: + type: string + title: symbol + description: The currency's symbol. + example: $ + symbol_native: + type: string + title: symbol_native + description: The currency's native symbol, if different than the symbol. + example: $ + name: + type: string + title: name + description: The currency's name. + decimal_digits: + type: number + title: decimal_digits + description: The number of digits after the decimal for prices in this currency. + rounding: + type: number + title: rounding + description: The rounding percision applied on prices in this currency. + created_at: + type: string + format: date-time + title: created_at + description: The currency's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The currency's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The currency's deletion date. AdminCurrencyListResponse: type: object - description: SUMMARY + description: The paginated list of currencies. x-schemaName: AdminCurrencyListResponse required: - limit @@ -45898,23 +46026,23 @@ components: limit: type: number title: limit - description: The currency's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The currency's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The currency's count. + description: The total number of items. currencies: type: array - description: The currency's currencies. + description: The list of currencies. items: $ref: '#/components/schemas/AdminCurrency' AdminCurrencyResponse: type: object - description: SUMMARY + description: The currency's details. x-schemaName: AdminCurrencyResponse required: - currency @@ -45923,7 +46051,7 @@ components: $ref: '#/components/schemas/AdminCurrency' AdminCustomer: type: object - description: The order's customer. + description: The customer's details. x-schemaName: AdminCustomer required: - has_account @@ -45936,19 +46064,19 @@ components: - last_name - addresses properties: + id: + type: string + title: id + description: The customer's ID. has_account: type: boolean title: has_account - description: The customer's has account. + description: Whether the customer is registered. groups: type: array description: The customer's groups. items: $ref: '#/components/schemas/AdminCustomerGroup' - id: - type: string - title: id - description: The customer's ID. email: type: string title: email @@ -45957,11 +46085,11 @@ components: default_billing_address_id: type: string title: default_billing_address_id - description: The customer's default billing address id. + description: The ID of the address used as the default billing address. default_shipping_address_id: type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: The ID of the address used as the default shipping address. company_name: type: string title: company_name @@ -45985,26 +46113,26 @@ components: description: The customer's phone. metadata: type: object - description: The customer's metadata. + description: The customer's metadata, used to store custom key-value pairs. created_by: type: string title: created_by - description: The customer's created by. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The customer's deleted at. + description: The ID of the user that created this customer, if available. created_at: type: string format: date-time title: created_at - description: The customer's created at. + description: The customer's creation date. updated_at: type: string format: date-time title: updated_at - description: The customer's updated at. + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. AdminCustomerAddress: type: object description: The customer's address. @@ -46036,39 +46164,39 @@ components: address_name: type: string title: address_name - description: The address's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The address's is default shipping. + description: Whether the address is the default shipping address. is_default_billing: type: boolean title: is_default_billing - description: The address's is default billing. + description: Whether the address is the default billing address. customer_id: type: string title: customer_id - description: The address's customer id. + description: The ID of the customer that this address belongs to. company: type: string title: company - description: The address's company. + description: The customer's company. first_name: type: string title: first_name - description: The address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The address's last name. + description: The customer's last name. address_1: type: string title: address_1 - description: The address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The address's address 2. + description: The address's second line. city: type: string title: city @@ -46077,6 +46205,7 @@ components: type: string title: country_code description: The address's country code. + example: us province: type: string title: province @@ -46091,20 +46220,20 @@ components: description: The address's phone. metadata: type: object - description: The address's metadata. + description: The address's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The address's created at. + description: The address's creation date. updated_at: type: string format: date-time title: updated_at - description: The address's updated at. + description: The address's update date. AdminCustomerAddressResponse: type: object - description: SUMMARY + description: The address's details. x-schemaName: AdminCustomerAddressResponse required: - address @@ -46113,8 +46242,42 @@ components: $ref: '#/components/schemas/AdminCustomerAddress' AdminCustomerGroup: type: object - description: The group's groups. + description: The customer group's details. x-schemaName: AdminCustomerGroup + required: + - id + - name + - customers + - metadata + - created_at + - updated_at + properties: + id: + type: string + title: id + description: The customer group's ID. + name: + type: string + title: name + description: The customer group's name. + customers: + type: array + description: The customer group's customers. + items: + $ref: '#/components/schemas/BaseCustomer' + metadata: + type: object + description: The customer group's metadata, used to store custom key-value pairs. + created_at: + type: string + format: date-time + title: created_at + description: The customer group's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer group's update date. AdminCustomerGroupResponse: type: object description: SUMMARY @@ -46126,35 +46289,35 @@ components: $ref: '#/components/schemas/AdminCustomerGroup' AdminCustomerInGroupFilters: type: object - description: The customer group's customers. + description: Filters to apply on customers to retrieve their groups. x-schemaName: AdminCustomerInGroupFilters properties: id: oneOf: - type: string title: id - description: The customer's ID. + description: Filter by a customer's ID. - type: array - description: The customer's ID. + description: Filter by customer IDs. items: type: string title: id - description: The id's ID. + description: A customer's ID. email: oneOf: - type: string title: email - description: The customer's email. + description: Filter by a customer's email. format: email - type: array - description: The customer's email. + description: Filter by customer emails. items: type: string title: email - description: The email's details. + description: A customer's email. format: email - type: object - description: The customer's email. + description: Apply filters on the customer's email. properties: $and: type: array @@ -46174,7 +46337,7 @@ components: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -46271,71 +46434,71 @@ components: oneOf: - type: string title: default_billing_address_id - description: The customer's default billing address id. + description: Filter by the ID of a customer's default billing address. - type: array - description: The customer's default billing address id. + description: Filter by the IDs of a customers' default billing address. items: type: string title: default_billing_address_id - description: The default billing address id's details. + description: The ID of a customer's default billing address. default_shipping_address_id: oneOf: - type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: Filter by the ID of a customer's default shipping address. - type: array - description: The customer's default shipping address id. + description: Filter by the IDs of a customers' default shipping address. items: type: string title: default_shipping_address_id - description: The default shipping address id's details. + description: The ID of a customer's default shipping address. company_name: oneOf: - type: string title: company_name - description: The customer's company name. + description: Filter by a customer's company name. - type: array - description: The customer's company name. + description: Filter by customers' company names. items: type: string title: company_name - description: The company name's details. + description: A company name. first_name: oneOf: - type: string title: first_name - description: The customer's first name. + description: Filter by a customer's first name. - type: array - description: The customer's first name. + description: Filter by customers' first names. items: type: string title: first_name - description: The first name's details. + description: A first name. last_name: oneOf: - type: string title: last_name - description: The customer's last name. + description: Filter by a customer's last name. - type: array - description: The customer's last name. + description: Filter by customers' last names. items: type: string title: last_name - description: The last name's details. + description: A last name. created_by: oneOf: - type: string title: created_by - description: The customer's created by. + description: Filter by the ID of a user to retrieve the groups of the customers they created. - type: array - description: The customer's created by. + description: Filter by the ID of users to retrieve the groups of the customers they created. items: type: string title: created_by - description: The created by's details. + description: A user's ID. created_at: type: object - description: The customer's created at. + description: Filter the customer's creation date. properties: $and: type: array @@ -46355,7 +46518,7 @@ components: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -46450,7 +46613,7 @@ components: description: Filter by whether a value for this parameter exists (not `null`). updated_at: type: object - description: The customer's updated at. + description: Filter the customer's update date. properties: $and: type: array @@ -46565,7 +46728,7 @@ components: description: Filter by whether a value for this parameter exists (not `null`). deleted_at: type: object - description: The customer's deleted at. + description: Filter the customer's deletion date. properties: $and: type: array @@ -46689,7 +46852,7 @@ components: $ref: '#/components/schemas/AdminCustomer' AdminDeletePaymentCollectionResponse: type: object - description: SUMMARY + description: The result of deleting the payment collection. x-schemaName: AdminDeletePaymentCollectionResponse required: - id @@ -46703,15 +46866,15 @@ components: object: type: string title: object - description: SUMMARY + description: The name of the object that was deleted. default: payment-collection deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the object was deleted. AdminDraftOrderResponse: type: object - description: SUMMARY + description: The draft order's details. x-schemaName: AdminDraftOrderResponse required: - draft_order @@ -46765,31 +46928,32 @@ components: order_id: type: string title: order_id - description: The exchange's order id. + description: The ID of the order the exchange is created for. return_items: type: array - description: The exchange's return items. + description: The items returned (inbound) by the exchange. items: $ref: '#/components/schemas/AdminReturnItem' additional_items: type: array - description: The exchange's additional items. + description: The new items (outbound) sent by the exchange. items: $ref: '#/components/schemas/BaseExchangeItem' no_notification: type: boolean title: no_notification - description: The exchange's no notification. + description: Whether to send the customer notifications when the exchange is updated. difference_due: type: number title: difference_due - description: The exchange's difference due. + description: The amount to be exchanged or refunded. If the amount is negative, it must be refunded. If positive, additional payment is required from the customer. return: + description: the return associated with the exchange. $ref: '#/components/schemas/AdminReturn' return_id: type: string title: return_id - description: The exchange's return id. + description: The ID of the associated exchange. currency_code: type: string title: currency_code @@ -46801,31 +46965,33 @@ components: region_id: type: string title: region_id - description: The exchange's region id. + description: The ID of the associated order's region. customer_id: type: string title: customer_id - description: The exchange's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The exchange's sales channel id. + description: The ID of the sales channel the associated order belongs to. email: type: string title: email - description: The exchange's email. + description: The email used when placing the order. format: email display_id: type: number title: display_id - description: The exchange's display id. + description: The exchange's display ID. shipping_address: + description: The shipping address to send new items to. $ref: '#/components/schemas/BaseOrderAddress' billing_address: + description: The customer's billing address. $ref: '#/components/schemas/BaseOrderAddress' shipping_methods: type: array - description: The exchange's shipping methods. + description: The shipping methods used to send the new (outbound) items. items: $ref: '#/components/schemas/BaseOrderShippingMethod' payment_collections: @@ -46849,7 +47015,7 @@ components: - requires_action fulfillments: type: array - description: The exchange's fulfillments. + description: The exchange's fulfillments of new (outbound) items. items: $ref: '#/components/schemas/BaseOrderFulfillment' fulfillment_status: @@ -46867,87 +47033,90 @@ components: transactions: type: array description: The exchange's transactions. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions items: $ref: '#/components/schemas/BaseOrderTransaction' summary: + description: The totals summary of the exchange. $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The exchange's metadata. + description: The exchange's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The exchange's created at. + description: The date that the exchange was created. updated_at: type: string format: date-time title: updated_at - description: The exchange's updated at. + description: The date that the exchange was updated. original_item_total: type: number title: original_item_total - description: The exchange's original item total. + description: The total of the original items in the order. original_item_subtotal: type: number title: original_item_subtotal - description: The exchange's original item subtotal. + description: The subtotal of the original items in the order. original_item_tax_total: type: number title: original_item_tax_total - description: The exchange's original item tax total. + description: The total tax of the original items in the order. item_total: type: number title: item_total - description: The exchange's item total. + description: The total of the exchange's new items. item_subtotal: type: number title: item_subtotal - description: The exchange's item subtotal. + description: The subtotal of the exchange's new items. item_tax_total: type: number title: item_tax_total - description: The exchange's item tax total. + description: The tax total of the exchange's new items. original_total: type: number title: original_total - description: The exchange's original total. + description: The total of the order. original_subtotal: type: number title: original_subtotal - description: The exchange's original subtotal. + description: The subtotal of the order. original_tax_total: type: number title: original_tax_total - description: The exchange's original tax total. + description: The tax total of the order. total: type: number title: total - description: The exchange's total. + description: The total of the exchange. subtotal: type: number title: subtotal - description: The exchange's subtotal. + description: The subtotal of the exchange. tax_total: type: number title: tax_total - description: The exchange's tax total. + description: The tax total of the exchange. discount_total: type: number title: discount_total - description: The exchange's discount total. + description: The discount total of the exchange. discount_tax_total: type: number title: discount_tax_total - description: The exchange's discount tax total. + description: The total taxes on discount of the exchange. gift_card_total: type: number title: gift_card_total - description: The exchange's gift card total. + description: The gift cards total of the exchange. gift_card_tax_total: type: number title: gift_card_tax_total - description: The exchange's gift card tax total. + description: The total taxes on the gift card of the exchange. shipping_total: type: number title: shipping_total @@ -46963,18 +47132,18 @@ components: original_shipping_total: type: number title: original_shipping_total - description: The exchange's original shipping total. + description: The order's shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The exchange's original shipping subtotal. + description: The order's shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The exchange's original shipping tax total. + description: The order's shipping tax total. AdminExchangeDeleteResponse: type: object - description: SUMMARY + description: The details of deleting an exchange. x-schemaName: AdminExchangeDeleteResponse required: - id @@ -46993,22 +47162,23 @@ components: deleted: type: boolean title: deleted - description: Whether the Exchange was deleted. + description: Whether the exchange was deleted. AdminExchangeOrderResponse: type: object - description: SUMMARY + description: The exchange's details. x-schemaName: AdminExchangeOrderResponse required: - order - exchange properties: order: + description: The details of the associated order. $ref: '#/components/schemas/Order' exchange: $ref: '#/components/schemas/AdminExchange' AdminExchangePreviewResponse: type: object - description: SUMMARY + description: A preview of the order once the exchange is applied. x-schemaName: AdminExchangePreviewResponse required: - order_preview @@ -47020,7 +47190,7 @@ components: $ref: '#/components/schemas/AdminExchange' AdminExchangeRequestResponse: type: object - description: SUMMARY + description: The details of a requested exchange. x-schemaName: AdminExchangeRequestResponse required: - return @@ -47028,14 +47198,16 @@ components: - exchange properties: return: + description: The associated return's details. $ref: '#/components/schemas/AdminReturn' order_preview: + description: A preview of the order once the exchange is applied. $ref: '#/components/schemas/OrderPreview' exchange: $ref: '#/components/schemas/AdminExchange' AdminExchangeResponse: type: object - description: SUMMARY + description: The exchange's details. x-schemaName: AdminExchangeResponse required: - exchange @@ -47044,7 +47216,7 @@ components: $ref: '#/components/schemas/AdminExchange' AdminExchangeReturnResponse: type: object - description: SUMMARY + description: The details of an exchange's return. x-schemaName: AdminExchangeReturnResponse required: - order_preview @@ -47054,13 +47226,9 @@ components: $ref: '#/components/schemas/OrderPreview' return: $ref: '#/components/schemas/AdminReturn' - AdminExportProductRequest: - type: object - description: SUMMARY - x-schemaName: AdminExportProductRequest AdminExportProductResponse: type: object - description: SUMMARY + description: The details of the product export. x-schemaName: AdminExportProductResponse required: - transaction_id @@ -47068,10 +47236,10 @@ components: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: The ID of the workflow execution's transaction. Use it to check the status of the export by sending a GET request to `/admin/workflows-executions/export-products/:transaction-id` AdminFile: type: object - description: The upload's file. + description: A file's details. x-schemaName: AdminFile required: - id @@ -47084,22 +47252,22 @@ components: url: type: string title: url - description: The file's url. + description: The file's URL. AdminFileListResponse: type: object - description: SUMMARY + description: The list of uploaded files. x-schemaName: AdminFileListResponse required: - files properties: files: type: array - description: The upload's files. + description: The list of uploaded files. items: $ref: '#/components/schemas/AdminFile' AdminFileResponse: type: object - description: SUMMARY + description: A file's details. x-schemaName: AdminFileResponse required: - file @@ -47136,18 +47304,20 @@ components: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the fulfillment's items are shipped from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the fulfillment provider handling this fulfillment. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option this fulfillment is created for. provider: + description: The details of the fulfillment provider using to handle this fulfillment. $ref: '#/components/schemas/AdminFulfillmentProvider' delivery_address: + description: The address to deliver the item to. $ref: '#/components/schemas/AdminFulfillmentAddress' items: type: array @@ -47156,49 +47326,51 @@ components: $ref: '#/components/schemas/AdminFulfillmentItem' labels: type: array - description: The fulfillment's labels. + description: The fulfillment's shipment labels. items: $ref: '#/components/schemas/AdminFulfillmentLabel' packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date the fulfillment was packed at. shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date the fulfillment was shipped at. delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date the fulfillment was delivered at. canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date the fulfillment was canceled at. data: type: object - description: The fulfillment's data. + description: The fulfillment's data, useful for the third-party provider handling the fulfillment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The fulfillment's created at. + description: The date the fulfillment was created at. updated_at: type: string format: date-time title: updated_at - description: The fulfillment's updated at. + description: The date the fulfillment was updated at. deleted_at: type: string format: date-time title: deleted_at - description: The fulfillment's deleted at. + description: The date the fulfillment was deleted at. AdminFulfillmentAddress: type: object - description: The fulfillment's delivery address. + description: An address's details. x-schemaName: AdminFulfillmentAddress required: - id @@ -47221,72 +47393,72 @@ components: id: type: string title: id - description: The delivery address's ID. + description: The address's ID. fulfillment_id: type: string title: fulfillment_id - description: The delivery address's fulfillment id. + description: The ID of the fulfillment that the address belongs to. company: type: string title: company - description: The delivery address's company. + description: The address's company. first_name: type: string title: first_name - description: The delivery address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The address's last name. address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The address's second line. city: type: string title: city - description: The delivery address's city. + description: The address's city. country_code: type: string title: country_code - description: The delivery address's country code. + description: The address's country code. province: type: string title: province - description: The delivery address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The delivery address's postal code. + description: The address's postal code. phone: type: string title: phone - description: The delivery address's phone. + description: The address's phone. metadata: type: object - description: The delivery address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The delivery address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The delivery address's updated at. + description: The date the address was updated. deleted_at: type: string format: date-time title: deleted_at - description: The delivery address's deleted at. + description: The date the address was deleted. AdminFulfillmentItem: type: object - description: The item's items. + description: The details of a fulfillment's item. x-schemaName: AdminFulfillmentItem required: - id @@ -47312,11 +47484,11 @@ components: quantity: type: number title: quantity - description: The item's quantity. + description: The item's quantity to be fulfilled. sku: type: string title: sku - description: The item's sku. + description: The item's SKU. barcode: type: string title: barcode @@ -47324,33 +47496,33 @@ components: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the order's line item to be fulfilled. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item of the underlying product variant. fulfillment_id: type: string title: fulfillment_id - description: The item's fulfillment id. + description: The ID of the fulfillment the item belongs to. created_at: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. deleted_at: type: string format: date-time title: deleted_at - description: The item's deleted at. + description: The date the item was deleted. AdminFulfillmentLabel: type: object - description: The label's labels. + description: The details of a fulfillmet's shipment label. x-schemaName: AdminFulfillmentLabel required: - id @@ -47373,37 +47545,37 @@ components: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. fulfillment_id: type: string title: fulfillment_id - description: The label's fulfillment id. + description: The ID of the fulfillment the label is associated with. created_at: type: string format: date-time title: created_at - description: The label's created at. + description: The date the label was created. updated_at: type: string format: date-time title: updated_at - description: The label's updated at. + description: The date the label was updated. deleted_at: type: string format: date-time title: deleted_at - description: The label's deleted at. + description: The date the label was deleted. AdminFulfillmentProvider: type: object - description: The fulfillment provider's fulfillment providers. + description: The shipping option's provider. x-schemaName: AdminFulfillmentProvider AdminFulfillmentProviderListResponse: type: object - description: SUMMARY + description: The paginated list of fulfillment providers. x-schemaName: AdminFulfillmentProviderListResponse required: - limit @@ -47414,23 +47586,23 @@ components: limit: type: number title: limit - description: The fulfillment provider's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The fulfillment provider's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The fulfillment provider's count. + description: The total count of items. fulfillment_providers: type: array - description: The fulfillment provider's fulfillment providers. + description: The list of fulfillment providers. items: $ref: '#/components/schemas/AdminFulfillmentProvider' AdminFulfillmentResponse: type: object - description: SUMMARY + description: A fulfillment's details. x-schemaName: AdminFulfillmentResponse required: - fulfillment @@ -47487,7 +47659,7 @@ components: description: The parent's deleted at. AdminFulfillmentSetDeleteResponse: type: object - description: SUMMARY + description: The deletion details. x-schemaName: AdminFulfillmentSetDeleteResponse required: - id @@ -47506,7 +47678,7 @@ components: deleted: type: boolean title: deleted - description: Whether the Fulfillment Set was deleted. + description: Whether the fulfillment set was deleted. AdminFulfillmentSetResponse: type: object description: SUMMARY @@ -47518,11 +47690,64 @@ components: $ref: '#/components/schemas/AdminFulfillmentSet' AdminGeoZone: type: object - description: The geo zone's geo zones. + description: The geo zone's details. x-schemaName: AdminGeoZone + required: + - id + - type + - country_code + - province_code + - city + - postal_expression + - created_at + - updated_at + - deleted_at + properties: + id: + type: string + title: id + description: The geo zone's ID. + type: + type: string + description: The geo zone's type. + enum: + - country + - province + - city + - zip + country_code: + type: string + title: country_code + description: The geo zone's country code. + province_code: + type: string + title: province_code + description: The geo zone's province code. + city: + type: string + title: city + description: The geo zone's city. + postal_expression: + type: object + description: The geo zone's postal expression. + created_at: + type: string + format: date-time + title: created_at + description: The date the geo zone was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the geo zone was update. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the geo zone was deleted. AdminImportProductRequest: type: object - description: SUMMARY + description: The import's details. x-schemaName: AdminImportProductRequest required: - file @@ -47531,7 +47756,7 @@ components: $ref: '#/components/schemas/File' AdminImportProductResponse: type: object - description: SUMMARY + description: The import process's details. x-schemaName: AdminImportProductResponse required: - transaction_id @@ -47540,10 +47765,10 @@ components: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: The ID of the workflow execution's transaction. This is useful to confirm the import using the `/admin/products/:transaction-id/import` API route. summary: type: object - description: The product's summary. + description: The import's summary. required: - toCreate - toUpdate @@ -47551,11 +47776,11 @@ components: toCreate: type: number title: toCreate - description: The summary's tocreate. + description: The number of products that will be created by this import. toUpdate: type: number title: toUpdate - description: The summary's toupdate. + description: The number of products that will be updated by this import. AdminInventoryItem: type: object description: The inventory item's details. @@ -47571,7 +47796,7 @@ components: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. origin_country: type: string title: origin_country @@ -47579,15 +47804,15 @@ components: hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the inventory item requires shipping. mid_code: type: string title: mid_code - description: The inventory item's mid code. + description: The inventory item's MID code. material: type: string title: material @@ -47619,18 +47844,18 @@ components: thumbnail: type: string title: thumbnail - description: The inventory item's thumbnail. + description: The URL of the inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, can hold custom key-value pairs. location_levels: type: array - description: The inventory item's location levels. + description: The inventory item's associated inventory levels. items: $ref: '#/components/schemas/AdminInventoryLevel' AdminInventoryItemResponse: type: object - description: SUMMARY + description: The inventory item's details. x-schemaName: AdminInventoryItemResponse required: - inventory_item @@ -47639,7 +47864,7 @@ components: $ref: '#/components/schemas/AdminInventoryItem' AdminInventoryLevel: type: object - description: The location level's location levels. + description: The inventory level's details. x-schemaName: AdminInventoryLevel required: - id @@ -47660,60 +47885,51 @@ components: id: type: string title: id - description: The location level's ID. - created_at: - type: string - format: date-time - title: created_at - description: The location level's created at. - updated_at: - type: string - format: date-time - title: updated_at - description: The location level's updated at. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The location level's deleted at. + description: The inventory level's ID. inventory_item_id: type: string title: inventory_item_id - description: The location level's inventory item id. + description: The ID of the inventory item this level belongs to. location_id: type: string title: location_id - description: The location level's location id. + description: The ID of the stock location this level belongs to. stocked_quantity: type: number title: stocked_quantity - description: The location level's stocked quantity. - raw_stocked_quantity: - type: object - description: The location level's raw stocked quantity. + description: The quantity of the associated inventory item stocked in the associated stock location. reserved_quantity: type: number title: reserved_quantity - description: The location level's reserved quantity. - raw_reserved_quantity: - type: object - description: The location level's raw reserved quantity. + description: The reserved quantity of the associated inventory item stocked in the associated stock location. incoming_quantity: type: number title: incoming_quantity - description: The location level's incoming quantity. - raw_incoming_quantity: - type: object - description: The location level's raw incoming quantity. + description: The incoming quantity of the associated inventory item stocked in the associated stock location. metadata: type: object - description: The location level's metadata. + description: The location level's metadata, can hold custom key-value pairs. inventory_item: type: object available_quantity: type: number title: available_quantity - description: The location level's available quantity. + description: The quantity available for order of the associated inventory item in the associated stock location. + created_at: + type: string + format: date-time + title: created_at + description: The date the inventory level was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the inventory level was updated. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the inventory level was deleted. AdminInvite: type: object description: The invite's details. @@ -47736,7 +47952,7 @@ components: accepted: type: boolean title: accepted - description: The invite's accepted. + description: Whether the invite has been accepted. token: type: string title: token @@ -47744,24 +47960,24 @@ components: expires_at: type: string title: expires_at - description: The invite's expires at. + description: The invite's expiry date. format: date-time metadata: type: object - description: The invite's metadata. + description: The invite's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The invite's created at. + description: The date the invite was created. updated_at: type: string format: date-time title: updated_at - description: The invite's updated at. + description: The date the invite was updated. AdminInviteResponse: type: object - description: SUMMARY + description: The invite's details. x-schemaName: AdminInviteResponse required: - invite @@ -47770,7 +47986,7 @@ components: $ref: '#/components/schemas/AdminInvite' AdminLinkPriceListProducts: type: object - description: The removal details. + description: The products removal details. properties: remove: type: array @@ -47799,54 +48015,57 @@ components: to: type: string title: to - description: The notification's to. + description: Where to send the notification to. For example, if `channel` is `email`, this can be an email number. channel: type: string title: channel - description: The notification's channel. + description: Through which channel is the notification sent through. + example: email template: type: string title: template - description: The notification's template. + description: The ID of the template in a third-party service used as the notification's shape. data: type: object - description: The notification's data. + description: Data payload to send with the notification. trigger_type: type: string title: trigger_type - description: The notification's trigger type. + description: What triggered this notification. + example: order.created resource_id: type: string title: resource_id - description: The notification's resource id. + description: The ID of the associated resource. For example, if the notification was triggered because an order was created, this would be the ID of the order. resource_type: type: string title: resource_type - description: The notification's resource type. + description: The type of the resource that triggered the notification. + example: order receiver_id: type: string title: receiver_id - description: The notification's receiver id. + description: The ID of the user or customer that's receiving this notification. original_notification_id: type: string title: original_notification_id - description: The notification's original notification id. + description: The ID of the original notification, if this notification is resent. external_id: type: string title: external_id - description: The notification's external id. + description: The ID of the notification in an external or third-party system. provider_id: type: string title: provider_id - description: The notification's provider id. + description: The ID of the provider used to send the notification. created_at: type: string format: date-time title: created_at - description: The notification's created at. + description: The date the notification was created. AdminNotificationListResponse: type: object - description: SUMMARY + description: The paginated list of notifications. x-schemaName: AdminNotificationListResponse required: - limit @@ -47857,23 +48076,23 @@ components: limit: type: number title: limit - description: The notification's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The notification's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The notification's count. + description: The total count of items. notifications: type: array - description: The notification's notifications. + description: The list of notifications. items: $ref: '#/components/schemas/AdminNotification' AdminNotificationResponse: type: object - description: SUMMARY + description: The notification's details. x-schemaName: AdminNotificationResponse required: - notification @@ -47953,19 +48172,19 @@ components: region_id: type: string title: region_id - description: The order's region id. + description: The ID of the region associated with the order. customer_id: type: string title: customer_id - description: The order's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order's sales channel id. + description: The ID of the sales channel the order is placed in. email: type: string title: email - description: The order's email. + description: The email of the customer that placed the order. format: email currency_code: type: string @@ -47974,7 +48193,7 @@ components: display_id: type: number title: display_id - description: The order's display id. + description: The order's display ID. items: type: array description: The order's items. @@ -48020,73 +48239,73 @@ components: $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The order's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total @@ -48094,34 +48313,34 @@ components: gift_card_tax_total: type: number title: gift_card_tax_total - description: The order's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. AdminOrderAddress: type: object - description: The order's billing address. + description: An order address. x-schemaName: AdminOrderAddress required: - id @@ -48129,84 +48348,85 @@ components: - created_at - updated_at properties: - country: - $ref: '#/components/schemas/AdminRegionCountry' id: type: string title: id - description: The billing address's ID. + description: The address's ID. customer_id: type: string title: customer_id - description: The billing address's customer id. + description: The ID of the customer this address belongs to. first_name: type: string title: first_name - description: The billing address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The billing address's last name. + description: The address's last name. phone: type: string title: phone - description: The billing address's phone. + description: The address's phone. company: type: string title: company - description: The billing address's company. + description: The address's company. address_1: type: string title: address_1 - description: The billing address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The billing address's address 2. + description: The address's second line. city: type: string title: city - description: The billing address's city. + description: The address's city. country_code: type: string title: country_code - description: The billing address's country code. + description: The address's country code. + example: us + country: + $ref: '#/components/schemas/AdminRegionCountry' province: type: string title: province - description: The billing address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The billing address's postal code. + description: The address's postal code. metadata: type: object - description: The billing address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The billing address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The billing address's updated at. + description: The date the address was updated. AdminOrderChangesResponse: type: object - description: SUMMARY + description: The details of an order's changes. x-schemaName: AdminOrderChangesResponse required: - order_changes properties: order_changes: type: array - description: The order's order changes. + description: An order's changes. items: $ref: '#/components/schemas/BaseOrderChange' AdminOrderEditPreviewResponse: type: object - description: SUMMARY + description: The preview of an order edit. x-schemaName: AdminOrderEditPreviewResponse required: - order_preview @@ -48215,7 +48435,7 @@ components: $ref: '#/components/schemas/OrderPreview' AdminOrderEditResponse: type: object - description: SUMMARY + description: An order edit's details. x-schemaName: AdminOrderEditResponse required: - order_change @@ -48224,7 +48444,7 @@ components: $ref: '#/components/schemas/OrderChange' AdminOrderPreview: type: object - description: The return's order preview. + description: A preview of an order if a change, such as exchange, return, edit, or claim is applied on it. x-schemaName: AdminOrderPreview required: - return_requested_total @@ -48269,16 +48489,16 @@ components: return_requested_total: type: number title: return_requested_total - description: The order preview's return requested total. + description: The total of the requested return. order_change: $ref: '#/components/schemas/BaseOrderChange' items: type: array - description: The order preview's items. + description: The order's items. items: allOf: - type: object - description: The item's items. + description: An order's item. x-schemaName: BaseOrderLineItem required: - id @@ -48335,74 +48555,74 @@ components: thumbnail: type: string title: thumbnail - description: The item's thumbnail. + description: The URL of the item's thumbnail. variant: $ref: '#/components/schemas/BaseProductVariant' variant_id: type: string title: variant_id - description: The item's variant id. + description: The ID of the associated variant. product: $ref: '#/components/schemas/BaseProduct' product_id: type: string title: product_id - description: The item's product id. + description: The ID of the associated product. product_title: type: string title: product_title - description: The item's product title. + description: The title of the item's product. product_description: type: string title: product_description - description: The item's product description. + description: The description of the item's product. product_subtitle: type: string title: product_subtitle - description: The item's product subtitle. + description: The subtitle of the item's product. product_type: type: string title: product_type - description: The item's product type. + description: The ID of type of the item's product. product_collection: type: string title: product_collection - description: The item's product collection. + description: The ID of collection of the item's product. product_handle: type: string title: product_handle - description: The item's product handle. + description: The handle of the item's product. variant_sku: type: string title: variant_sku - description: The item's variant sku. + description: The SKU of the item's variant. variant_barcode: type: string title: variant_barcode - description: The item's variant barcode. + description: The barcode of the item's variant. variant_title: type: string title: variant_title - description: The item's variant title. + description: The title of the item's variant. variant_option_values: type: object - description: The item's variant option values. + description: The option values of the item's variant as key-value pairs. The key is the title of an option, and the value is the option's value. requires_shipping: type: boolean title: requires_shipping - description: The item's requires shipping. + description: Whether the item requires shipping. is_discountable: type: boolean title: is_discountable - description: The item's is discountable. + description: Whether the item is discountable. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The item's is tax inclusive. + description: Whether the item's price includes taxes. compare_at_unit_price: type: number - title: compare_at_unit_price - description: The item's compare at unit price. + title: The original price of the item before a promotion or sale. + description: The unit_price: type: number title: unit_price @@ -48427,84 +48647,84 @@ components: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. metadata: type: object - description: The item's metadata. + description: The item's metadata, can hold custom key-value pairs. original_total: type: number title: original_total - description: The item's original total. + description: The item's total including taxes, excluding promotions. original_subtotal: type: number title: original_subtotal - description: The item's original subtotal. + description: The item's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The item's original tax total. + description: The tax total of the item excluding promotions. item_total: type: number title: item_total - description: The item's item total. + description: The item's total for a single unit including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The item's item subtotal. + description: The item's total for a single unit excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The item's item tax total. + description: The tax total for a single unit of the item including promotions. total: type: number title: total - description: The item's total. + description: The item's total including taxes and promotions. subtotal: type: number title: subtotal - description: The item's subtotal. + description: The item's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The item's tax total. + description: The tax total of the item including promotions. discount_total: type: number title: discount_total - description: The item's discount total. + description: The total of the item's discount / promotion. discount_tax_total: type: number title: discount_tax_total - description: The item's discount tax total. + description: The tax total of the item's discount / promotion refundable_total: type: number title: refundable_total - description: The item's refundable total. + description: The total refundable amount of the item's total. refundable_total_per_unit: type: number title: refundable_total_per_unit - description: The item's refundable total per unit. + description: The total refundable amount of the item's total for a single unit. - type: object - description: The item's items. + description: An order's item. properties: actions: type: array - description: The item's actions. + description: The actions applied on an item. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction shipping_methods: type: array - description: The order preview's shipping methods. + description: The order's shipping methods. items: allOf: - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. x-schemaName: BaseOrderShippingMethod required: - id @@ -48533,7 +48753,7 @@ components: order_id: type: string title: order_id - description: The shipping method's order id. + description: The ID of the order this shipping method belongs to. name: type: string title: name @@ -48549,17 +48769,19 @@ components: is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The shipping method's is tax inclusive. + description: Whether the shipping method's amount is tax inclusive. shipping_option_id: type: string title: shipping_option_id - description: The shipping method's shipping option id. + description: The ID of the shipping option this method was created from. data: type: object - description: The shipping method's data. + description: The data relevant for the fulfillment provider to process this shipment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/order/concepts#data-property metadata: type: object - description: The shipping method's metadata. + description: The shipping method's metadata, can hold custom key-value pairs. tax_lines: type: array description: The shipping method's tax lines. @@ -48574,163 +48796,131 @@ components: oneOf: - type: string title: original_total - description: The shipping method's original total. + description: The shipping method's total including taxes, excluding promotions. - type: number title: original_total - description: The shipping method's original total. - - type: string - title: original_total - description: The shipping method's original total. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total including taxes, excluding promotions. original_subtotal: oneOf: - type: string title: original_subtotal - description: The shipping method's original subtotal. + description: The shipping method's total excluding taxes, including promotions. - type: number title: original_subtotal - description: The shipping method's original subtotal. - - type: string - title: original_subtotal - description: The shipping method's original subtotal. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total excluding taxes, including promotions. original_tax_total: oneOf: - type: string title: original_tax_total - description: The shipping method's original tax total. + description: The tax total of the shipping method excluding promotions. - type: number title: original_tax_total - description: The shipping method's original tax total. - - type: string - title: original_tax_total - description: The shipping method's original tax total. - - $ref: '#/components/schemas/IBigNumber' + description: The tax total of the shipping method excluding promotions. total: oneOf: - type: string title: total - description: The shipping method's total. + description: The shipping method's total including taxes and promotions. - type: number title: total - description: The shipping method's total. - - type: string - title: total - description: The shipping method's total. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total including taxes and promotions. subtotal: oneOf: - type: string title: subtotal - description: The shipping method's subtotal. + description: The shipping method's total excluding taxes, including promotions. - type: number title: subtotal - description: The shipping method's subtotal. - - type: string - title: subtotal - description: The shipping method's subtotal. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total excluding taxes, including promotions. tax_total: oneOf: - type: string title: tax_total - description: The shipping method's tax total. + description: The tax total of the shipping method including promotions. - type: number title: tax_total - description: The shipping method's tax total. - - type: string - title: tax_total - description: The shipping method's tax total. - - $ref: '#/components/schemas/IBigNumber' + description: The tax total of the shipping method including promotions. discount_total: oneOf: - type: string title: discount_total - description: The shipping method's discount total. + description: The total of the shipping method's promotion. - type: number title: discount_total - description: The shipping method's discount total. - - type: string - title: discount_total - description: The shipping method's discount total. - - $ref: '#/components/schemas/IBigNumber' + description: The total of the shipping method's promotion. discount_tax_total: oneOf: - type: string title: discount_tax_total - description: The shipping method's discount tax total. + description: The tax total of the shipping method's promotion. - type: number title: discount_tax_total description: The shipping method's discount tax total. - - type: string - title: discount_tax_total - description: The shipping method's discount tax total. - - $ref: '#/components/schemas/IBigNumber' created_at: type: string format: date-time title: created_at - description: The shipping method's created at. + description: The date the shipping method was created. updated_at: type: string format: date-time title: updated_at - description: The shipping method's updated at. + description: The date the shipping method was updated. - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. properties: actions: type: array - description: The shipping method's actions. + description: The actions applied on the shipping method. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction currency_code: type: string title: currency_code - description: The order preview's currency code. + description: The order's currency code. version: type: number title: version - description: The order preview's version. + description: The order's version when this preview is applied. id: type: string title: id - description: The order preview's ID. + description: The order's ID. region_id: type: string title: region_id - description: The order preview's region id. + description: The ID of the order's associated region. customer_id: type: string title: customer_id - description: The order preview's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order preview's sales channel id. + description: The ID of the sales channel that the order was placed in. email: type: string title: email - description: The order preview's email. + description: The email of the customer that placed the order. format: email display_id: type: number title: display_id - description: The order preview's display id. + description: The order's display ID. shipping_address: $ref: '#/components/schemas/AdminOrderAddress' billing_address: $ref: '#/components/schemas/AdminOrderAddress' payment_collections: type: array - description: The order preview's payment collections. + description: The order's payment collections. items: $ref: '#/components/schemas/AdminPaymentCollection' payment_status: type: string - description: The order preview's payment status. + description: The order's payment status. enum: - canceled - not_paid @@ -48744,12 +48934,12 @@ components: - requires_action fulfillments: type: array - description: The order preview's fulfillments. + description: The order's fulfillments. items: $ref: '#/components/schemas/BaseOrderFulfillment' fulfillment_status: type: string - description: The order preview's fulfillment status. + description: The order's fulfillment status. enum: - canceled - not_fulfilled @@ -48761,112 +48951,112 @@ components: - delivered transactions: type: array - description: The order preview's transactions. + description: The order's transactions. items: $ref: '#/components/schemas/BaseOrderTransaction' summary: $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The order preview's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order preview's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order preview's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order preview's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order preview's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order preview's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order preview's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order preview's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order preview's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order preview's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order preview's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order preview's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order preview's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order preview's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order preview's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order preview's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order preview's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total - description: The order preview's gift card total. + description: The order's gift card total. gift_card_tax_total: type: number title: gift_card_tax_total - description: The order preview's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order preview's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order preview's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order preview's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order preview's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order preview's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order preview's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. customer: $ref: '#/components/schemas/AdminCustomer' sales_channel: @@ -54303,6 +54493,17 @@ components: title: user description: The logged-in user. $ref: '#/components/schemas/AdminUser' + AuthCallbackResponse: + type: object + description: The authentication's details. + x-schemaName: AuthCallbackResponse + required: + - location + properties: + token: + type: string + title: location + description: The location to redirect the user to for further authentication with the third-party provider. AuthResponse: type: object description: The authentication's details. @@ -55072,6 +55273,80 @@ components: type: object description: The product's collection. x-schemaName: BaseCollection + BaseCustomer: + type: object + description: The customer's details. + x-schemaName: BaseCustomer + required: + - id + - email + - default_billing_address_id + - default_shipping_address_id + - company_name + - first_name + - last_name + - addresses + properties: + id: + type: string + title: id + description: The customer's ID. + email: + type: string + title: email + description: The customer's email. + format: email + default_billing_address_id: + type: string + title: default_billing_address_id + description: The ID of the address used as the default billing address. + default_shipping_address_id: + type: string + title: default_shipping_address_id + description: The ID of the address used as the default shipping address. + company_name: + type: string + title: company_name + description: The customer's company name. + first_name: + type: string + title: first_name + description: The customer's first name. + last_name: + type: string + title: last_name + description: The customer's last name. + addresses: + type: array + description: The customer's addresses. + items: + $ref: '#/components/schemas/BaseCustomerAddress' + phone: + type: string + title: phone + description: The customer's phone. + metadata: + type: object + description: The customer's metadata, used to store custom key-value pairs. + created_by: + type: string + title: created_by + description: The ID of the user that created this customer, if available. + created_at: + type: string + format: date-time + title: created_at + description: The customer's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. BaseCustomerAddress: type: object description: The address's addresses. @@ -60143,6 +60418,40 @@ components: properties: collection: $ref: '#/components/schemas/StoreCollection' + StoreCreateCart: + type: object + description: SUMMARY + x-schemaName: StoreCreateCart + properties: + region_id: + type: string + title: region_id + description: The cart's region id. + shipping_address: + $ref: '#/components/schemas/StoreCartAddress' + billing_address: + $ref: '#/components/schemas/StoreCartAddress' + email: + type: string + title: email + description: The cart's email. + format: email + currency_code: + type: string + title: currency_code + description: The cart's currency code. + items: + type: array + description: The cart's items. + items: + $ref: '#/components/schemas/StoreCartLineItem' + sales_channel_id: + type: string + title: sales_channel_id + description: The cart's sales channel id. + metadata: + type: object + description: The cart's metadata. StoreCreateCustomer: type: object description: SUMMARY diff --git a/www/apps/api-reference/specs/admin/openapi.yaml b/www/apps/api-reference/specs/admin/openapi.yaml index 68296ff6b8b0f..594d270e4279b 100644 --- a/www/apps/api-reference/specs/admin/openapi.yaml +++ b/www/apps/api-reference/specs/admin/openapi.yaml @@ -1000,6 +1000,8 @@ paths: paths/admin_workflows-executions_{workflow_id}_{transaction_id}_{step_id}_subscribe.yaml /auth/session: $ref: paths/auth_session.yaml + /auth/token/refresh: + $ref: paths/auth_token_refresh.yaml /auth/user/{auth_provider}: $ref: paths/auth_user_{auth_provider}.yaml /auth/user/{auth_provider}/callback: diff --git a/www/apps/api-reference/specs/admin/paths/admin_fulfillments_{id}_cancel.yaml b/www/apps/api-reference/specs/admin/paths/admin_fulfillments_{id}_cancel.yaml index 2e5b1dff1ae45..cdafcd144e8ae 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_fulfillments_{id}_cancel.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_fulfillments_{id}_cancel.yaml @@ -45,11 +45,6 @@ post: - api_token: [] - cookie_auth: [] - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminCancelFulfillment.yaml x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_export.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_export.yaml index 0ed15984baac4..f734a31486da6 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products_export.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products_export.yaml @@ -44,11 +44,6 @@ post: - api_token: [] - cookie_auth: [] - jwt_token: [] - requestBody: - content: - application/json: - schema: - $ref: ../components/schemas/AdminExportProductRequest.yaml x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/admin/paths/auth_token_refresh.yaml b/www/apps/api-reference/specs/admin/paths/auth_token_refresh.yaml new file mode 100644 index 0000000000000..69af1244588e9 --- /dev/null +++ b/www/apps/api-reference/specs/admin/paths/auth_token_refresh.yaml @@ -0,0 +1,38 @@ +post: + operationId: PostAdminAuthTokenRefresh + summary: Refresh Authentication Token + description: >- + Refresh the authentication token of a user. This is useful after + authenticating a user with a third-party service to ensure the token holds + the new user's details, or when you don't want users to re-login every day. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. + x-authenticated: true + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/auth_token_refresh/post.sh + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: ../components/schemas/AuthResponse.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 diff --git a/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}.yaml b/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}.yaml index 2937dd005b5df..fd6cdfff633f8 100644 --- a/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}.yaml +++ b/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}.yaml @@ -1,9 +1,18 @@ post: operationId: PostActor_typeAuth_provider summary: Authenticate User - description: >- - Authenticate an admin user and receive the JWT token to be used in the - header of subsequent requests. + description: > + Authenticate a user and receive the JWT token to be used in the header of + subsequent requests. + + + When used with a third-party provider, such as Google, the request returns a + `location` property. You redirect to the specified URL in your frontend to + continue authentication with the third-party service. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#types-of-authentication-flows + description: Learn about different authentication flows. x-authenticated: false parameters: - name: auth_provider @@ -13,9 +22,26 @@ post: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: >- + The input data necessary for authentication. For example, for + email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell - label: cURL + label: EmailPass Provider + source: + $ref: ../code_samples/Shell/auth_user_{auth_provider}/post.sh + - lang: Shell + label: Google Provider + source: + $ref: ../code_samples/Shell/auth_user_{auth_provider}/post.sh + - lang: Shell + label: GitHub Provider source: $ref: ../code_samples/Shell/auth_user_{auth_provider}/post.sh tags: @@ -26,7 +52,9 @@ post: content: application/json: schema: - $ref: ../components/schemas/AuthResponse.yaml + oneOf: + - $ref: ../components/schemas/AuthResponse.yaml + - $ref: ../components/schemas/AuthCallbackResponse.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_callback.yaml b/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_callback.yaml index 9d047f0a15a0f..c04b43814c646 100644 --- a/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_callback.yaml +++ b/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_callback.yaml @@ -1,11 +1,24 @@ post: operationId: PostActor_typeAuth_providerCallback summary: Validate Authentication Callback - description: >- - Third-party authentication providers, such as Google, require an API route - to call once authentication with the third-party provider is finished. This - API route validates callback for admin users logged-in with third-party - providers. + description: > + This API route is used by your dashboard or frontend application when a + third-party provider redirects to it after authentication. + + + It validates the authentication with the third-party provider and, if + successful, returns an authentication token. + + + You can decode the JWT token using libraries like + [react-jwt](https://www.npmjs.com/package/react-jwt) in the frontend. If the + decoded data doesn't have an `actor_id` property, then you must create a + user, typically using the Accept Invite route passing the token in the + request's Authorization header. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -17,7 +30,11 @@ post: example: google x-codeSamples: - lang: Shell - label: cURL + label: Google Provider + source: + $ref: ../code_samples/Shell/auth_user_{auth_provider}_callback/post.sh + - lang: Shell + label: GitHub Provider source: $ref: ../code_samples/Shell/auth_user_{auth_provider}_callback/post.sh tags: diff --git a/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_register.yaml b/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_register.yaml index b580a6773499f..ff72429765e82 100644 --- a/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_register.yaml +++ b/www/apps/api-reference/specs/admin/paths/auth_user_{auth_provider}_register.yaml @@ -2,9 +2,13 @@ post: operationId: PostActor_typeAuth_provider_register summary: Retrieve Registration JWT Token description: >- - A registration JWT token is used in the header of requests that create a - user, such as the accept invitation request. This API route retrieves the - JWT token of a user that hasn't been registered yet. + This API route retrieves a registration JWT token of a user that hasn't been + registered yet. The token is used in the header of requests that create a + user, such as the Accept Invite API route. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#1-basic-authentication-flow + description: Learn about the basic authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -14,6 +18,15 @@ post: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: >- + The input data necessary for authentication. For example, for + email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh index f56806ef6dccf..c0942527bf309 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_customers/post.sh @@ -1,7 +1,7 @@ curl -X POST '{backend_url}/store/customers' \ -H 'Authorization: Bearer {token}' \ --H 'Content-Type: application/json' \ \ --H 'x-publishable-api-key: {your_publishable_api_key}' +-H 'Content-Type: application/json' \ +-H 'x-publishable-api-key: {your_publishable_api_key}' \ --data-raw '{ "email": "Monserrate.Leannon88@yahoo.com", "company_name": "{value}", diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminApiKey.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminApiKey.yaml index e51ff4c548a77..2400d96322d33 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminApiKey.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminApiKey.yaml @@ -1,5 +1,5 @@ type: object -description: The api key's details. +description: The API key's details. x-schemaName: AdminApiKey required: - id @@ -24,37 +24,44 @@ properties: redacted: type: string title: redacted - description: The api key's redacted. + description: >- + The redacted form of the API key's token. This is useful when showing + portion of the token. + example: sk_...123 title: type: string title: title description: The api key's title. type: type: string - description: The api key's type. + description: >- + The api key's type. `secret` is used for a user's API key, whereas + `publishable` is used for Publishable API keys. enum: - secret - publishable last_used_at: type: string title: last_used_at - description: The api key's last used at. + description: The date and time the API key was last used. format: date-time created_by: type: string title: created_by - description: The api key's created by. + description: The ID of the user that created the API key, if available. created_at: type: string format: date-time title: created_at - description: The api key's created at. + description: The date and time the API key was created. revoked_by: type: string title: revoked_by - description: The api key's revoked by. + description: The ID of the user that revoked the API key, if available. revoked_at: type: string title: revoked_at - description: The api key's revoked at. + description: >- + The date and time the API key was revoked. The API key is considered + revoked when this property is set. format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminApiKeyResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminApiKeyResponse.yaml index 980051356dda3..8e154ab40facf 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminApiKeyResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminApiKeyResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The API key's details. x-schemaName: AdminApiKeyResponse required: - api_key diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductRequest.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductRequest.yaml index b747877660cd9..5f35aa599fcad 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductRequest.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductRequest.yaml @@ -1,21 +1,21 @@ type: object -description: SUMMARY +description: The products to create, update, or delete. x-schemaName: AdminBatchProductRequest properties: create: type: array - description: The product's create. + description: The products to create. items: $ref: ./AdminCreateProduct.yaml update: type: array - description: The product's update. + description: The products to update. items: $ref: ./AdminUpdateProduct.yaml delete: type: array - description: The product's delete. + description: The products to delete. items: type: string title: delete - description: The delete's details. + description: A product's ID. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductResponse.yaml index 697f688c9018d..bc62bdabc64dd 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the products created, updated, or deleted. x-schemaName: AdminBatchProductResponse required: - created @@ -8,17 +8,17 @@ required: properties: created: type: array - description: The product's created. + description: The created products items: $ref: ./AdminProduct.yaml updated: type: array - description: The product's updated. + description: The updated products. items: $ref: ./AdminProduct.yaml deleted: type: object - description: SUMMARY + description: The deleted products' details. required: - ids - object @@ -26,16 +26,17 @@ properties: properties: ids: type: array - description: The deleted's ids. + description: The IDs of deleted products. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted product. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: product deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the products were deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml index 846c8aea3ac02..090be1d3698bf 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml @@ -1,21 +1,21 @@ type: object -description: SUMMARY +description: The product variants to create, update, or delete. x-schemaName: AdminBatchProductVariantRequest properties: create: type: array - description: The product's create. + description: The product variants to create. items: $ref: ./AdminCreateProductVariant.yaml update: type: array - description: The product's update. + description: The product variants to update. items: $ref: ./AdminUpdateProductVariant.yaml delete: type: array - description: The product's delete. + description: The product variants to delete. items: type: string title: delete - description: The delete's details. + description: A product variant's ID. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantResponse.yaml index 01dbaa3edda25..23bb110421da7 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the product variants created, updated, or deleted. x-schemaName: AdminBatchProductVariantResponse required: - created @@ -8,17 +8,17 @@ required: properties: created: type: array - description: The product's created. + description: The created product variants. items: $ref: ./AdminProductVariant.yaml updated: type: array - description: The product's updated. + description: The updated product variants. items: $ref: ./AdminProductVariant.yaml deleted: type: object - description: SUMMARY + description: The details of the deleted product variants. required: - ids - object @@ -26,16 +26,17 @@ properties: properties: ids: type: array - description: The deleted's ids. + description: The IDs of the deleted product variants. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted variant. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: variant deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the product variants were deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCampaign.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCampaign.yaml index 4b3d871f8a8f4..d5b0c111027d0 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCampaign.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCampaign.yaml @@ -30,15 +30,15 @@ properties: campaign_identifier: type: string title: campaign_identifier - description: The campaign's campaign identifier. + description: The campaign's identifier. starts_at: type: string title: starts_at - description: The campaign's starts at. + description: The date and time that the campaign starts. ends_at: type: string title: ends_at - description: The campaign's ends at. + description: The date and time that the campaign ends. budget: type: object description: The campaign's budget. @@ -55,7 +55,11 @@ properties: description: The budget's ID. type: type: string - description: The budget's type. + description: > + The budget's type. `spend` means the limit is set on the total amount + discounted by the campaign's promotions; `usage` means the limit is + set on the total number of times the campaign's promotions can be + used. enum: - spend - usage @@ -70,4 +74,8 @@ properties: used: type: number title: used - description: The budget's used. + description: > + How much of the budget has been used. If the limit is `spend`, this + property holds the total amount discounted so far. If the limit is + `usage`, it holds the number of times the campaign's promotions have + been used so far. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCampaignResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCampaignResponse.yaml index 60e666717fa65..a8eb2ba79327e 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCampaignResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCampaignResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The campaign's details. x-schemaName: AdminCampaignResponse required: - campaign diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCancelFulfillment.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCancelFulfillment.yaml deleted file mode 100644 index 57e177eccc410..0000000000000 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCancelFulfillment.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminCancelFulfillment diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaim.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaim.yaml index 4bd73651ee282..21f60500a4924 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaim.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaim.yaml @@ -41,62 +41,63 @@ required: - original_shipping_subtotal - original_shipping_tax_total properties: + id: + type: string + title: id + description: The claim's ID. order_id: type: string title: order_id - description: The claim's order id. + description: The ID of the order associated with the claim. claim_items: type: array - description: The claim's claim items. + description: The order items targetted by the claim. items: $ref: ./BaseClaimItem.yaml additional_items: type: array - description: The claim's additional items. - items: {} + description: The outbound or new items of the claim. + items: + $ref: ./BaseClaimItem.yaml return: $ref: ./Return.yaml return_id: type: string title: return_id - description: The claim's return id. + description: The ID of the associated return. no_notification: type: boolean title: no_notification - description: The claim's no notification. + description: Whether the customer should be notified about changes in the claim. refund_amount: type: number title: refund_amount - description: The claim's refund amount. + description: The amount to be refunded. currency_code: type: string title: currency_code description: The claim's currency code. - id: - type: string - title: id - description: The claim's ID. region_id: type: string title: region_id - description: The claim's region id. + description: The ID of the region associated with the claim. customer_id: type: string title: customer_id - description: The claim's customer id. + description: The ID of the customer associated with the claim's order. sales_channel_id: type: string title: sales_channel_id - description: The claim's sales channel id. + description: The ID of the sales channel the claim's order is created in. email: type: string title: email - description: The claim's email. + description: The email associated with the claim's order. format: email display_id: type: number title: display_id - description: The claim's display id. + description: The claim's display ID. shipping_address: $ref: ./BaseOrderAddress.yaml billing_address: @@ -145,63 +146,67 @@ properties: transactions: type: array description: The claim's transactions. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions + description: Learn more about transactions of orders and associated models. items: $ref: ./BaseOrderTransaction.yaml summary: $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The claim's metadata. + description: The claim's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The claim's created at. + description: The claim's creation date. updated_at: type: string format: date-time title: updated_at - description: The claim's updated at. + description: The claim's update date. original_item_total: type: number title: original_item_total - description: The claim's original item total. + description: The total of the original items in the associated order. original_item_subtotal: type: number title: original_item_subtotal - description: The claim's original item subtotal. + description: The subtotal of the original items in the associated order. original_item_tax_total: type: number title: original_item_tax_total - description: The claim's original item tax total. + description: The tax total of the original items in the associated order. item_total: type: number title: item_total - description: The claim's item total. + description: The total of the claim's items. item_subtotal: type: number title: item_subtotal - description: The claim's item subtotal. + description: The subtotal of the claim's items. item_tax_total: type: number title: item_tax_total - description: The claim's item tax total. + description: The tax total of the claim's items. original_total: type: number title: original_total - description: The claim's original total. + description: The associated order's original total. original_subtotal: type: number title: original_subtotal - description: The claim's original subtotal. + description: The associated order's original subtotal. original_tax_total: type: number title: original_tax_total - description: The claim's original tax total. + description: The associated order's original tax total. total: type: number title: total - description: The claim's total. + description: The associated order's total. subtotal: type: number title: subtotal @@ -241,12 +246,12 @@ properties: original_shipping_total: type: number title: original_shipping_total - description: The claim's original shipping total. + description: The associated order's original shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The claim's original shipping subtotal. + description: The associated order's original shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The claim's original shipping tax total. + description: The associated order's original shipping tax total. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimDeleteResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimDeleteResponse.yaml index 762248df11573..1ebbe1838689d 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimDeleteResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the deleted claim. x-schemaName: AdminClaimDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Claim was deleted. + description: Whether the claim was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml index 71a3c2b6048ea..90a81e24cfb80 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of claims. x-schemaName: AdminClaimListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The claim's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The claim's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The claim's count. + description: The total number of items. claims: type: array - description: The claim's claims. + description: The list of claims. items: $ref: ./AdminClaim.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimOrderResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimOrderResponse.yaml index f656466d447ee..ea206926d5654 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimOrderResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimOrderResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The created claim's details. x-schemaName: AdminClaimOrderResponse required: - order diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimPreviewResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimPreviewResponse.yaml index 477ff17bd7307..d3d5cf085c60e 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimPreviewResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimPreviewResponse.yaml @@ -1,5 +1,7 @@ type: object -description: SUMMARY +description: >- + The details of the claim, as well as a preview of the order when the claim is + applied. x-schemaName: AdminClaimPreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimRequestResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimRequestResponse.yaml index 3b7c3d283cf94..eb463459db71e 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimRequestResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimRequestResponse.yaml @@ -1,5 +1,7 @@ type: object -description: SUMMARY +description: >- + The details of the claim, its return, and a preview of the order when the + claim is applied. x-schemaName: AdminClaimRequestResponse required: - return diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimResponse.yaml index f82723835466b..326b99ba9a754 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The claim's details. x-schemaName: AdminClaimResponse required: - claim diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimReturnPreviewResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimReturnPreviewResponse.yaml index 296a46bca0290..f91f77fa23062 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimReturnPreviewResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimReturnPreviewResponse.yaml @@ -1,5 +1,7 @@ type: object -description: SUMMARY +description: >- + The details of the claim's return, with a preview of the order when the + claim's return is applied. x-schemaName: AdminClaimReturnPreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCollection.yaml index 7066453be8d51..c3feb25bdc087 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCollection.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCollection.yaml @@ -1,5 +1,5 @@ type: object -description: The parent's collection. +description: The product collection's details. x-schemaName: AdminCollection required: - id @@ -26,17 +26,17 @@ properties: type: string format: date-time title: created_at - description: The collection's created at. + description: The collection's creation date. updated_at: type: string format: date-time title: updated_at - description: The collection's updated at. + description: The collection's update date. deleted_at: type: string format: date-time title: deleted_at - description: The collection's deleted at. + description: The collection's deletion date. products: type: array description: The collection's products. @@ -44,4 +44,4 @@ properties: type: object metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionDeleteResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionDeleteResponse.yaml index c49daa3bbe81e..46bb68b85a374 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionDeleteResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the deleted collection. x-schemaName: AdminCollectionDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Collection was deleted. + description: Whether the collection was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml index e97fa1ee121f5..8574aa002990c 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of product collections. x-schemaName: AdminCollectionListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The collection's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The collection's offset. + description: The number of items skipped before retrieving the returned results. count: type: number title: count - description: The collection's count. + description: The total number of items. collections: type: array - description: The collection's collections. + description: The list of product collections. items: $ref: ./AdminCollection.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionResponse.yaml index d48e815089ad4..9ad5e9f625615 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The collection's details. x-schemaName: AdminCollectionResponse required: - collection diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateApiKey.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateApiKey.yaml index 629c62ee00649..61a406f41689d 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateApiKey.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateApiKey.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The API key's details. x-schemaName: AdminCreateApiKey required: - title @@ -8,10 +8,12 @@ properties: title: type: string title: title - description: The api key's title. + description: The API key's title. type: type: string - description: The api key's type. + description: >- + The API key's type. Use `secret` for a user's API key; Use `publishable` + for Publishable API keys. enum: - publishable - secret diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateApplicationMethod.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateApplicationMethod.yaml index 7bc1869e1f51a..5cbb99276e849 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateApplicationMethod.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateApplicationMethod.yaml @@ -1,5 +1,5 @@ type: object -description: The promotion's application method. +description: The application method's details. x-schemaName: AdminCreateApplicationMethod required: - value @@ -13,7 +13,9 @@ properties: value: type: number title: value - description: The application method's value. + description: >- + The discounted amount applied by the associated promotion based on the + `type`. currency_code: type: string title: currency_code @@ -21,23 +23,32 @@ properties: max_quantity: type: number title: max_quantity - description: The application method's max quantity. + description: >- + The max quantity allowed in the cart for the associated promotion to be + applied. type: type: string - description: The application method's type. + description: >- + The type of the application method indicating how the associated promotion + is applied. enum: - fixed - percentage target_type: type: string - description: The application method's target type. + description: >- + The target type of the application method indicating whether the + associated promotion is applied to the cart's items, shipping methods, or + the whole order. enum: - items - shipping_methods - order allocation: type: string - description: The application method's allocation. + description: >- + The allocation value that indicates whether the associated promotion is + applied on each item in a cart or split between the items in the cart. enum: - each - across @@ -54,8 +65,14 @@ properties: apply_to_quantity: type: number title: apply_to_quantity - description: The application method's apply to quantity. + description: >- + The quantity that results from matching the `buyget` promotion's + condition. For example, if the promotion is a "Buy 2 shirts get 1 free", + the value f this attribute is `1`. buy_rules_min_quantity: type: number title: buy_rules_min_quantity - description: The application method's buy rules min quantity. + description: >- + The minimum quantity required for a `buyget` promotion to be applied. For + example, if the promotion is a "Buy 2 shirts get 1 free", the value of + this attribute is `2`. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCampaign.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateCampaign.yaml deleted file mode 100644 index f5219bcaeef5d..0000000000000 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCampaign.yaml +++ /dev/null @@ -1,48 +0,0 @@ -type: object -description: The promotion's campaign. -x-schemaName: AdminCreateCampaign -properties: - name: - type: string - title: name - description: The campaign's name. - description: - type: string - title: description - description: The campaign's description. - currency: - type: string - title: currency - description: The campaign's currency. - campaign_identifier: - type: string - title: campaign_identifier - description: The campaign's campaign identifier. - starts_at: - type: string - title: starts_at - description: The campaign's starts at. - format: date-time - ends_at: - type: string - title: ends_at - description: The campaign's ends at. - format: date-time - budget: - type: object - description: The campaign's budget. - properties: - type: - type: string - description: The budget's type. - enum: - - spend - - usage - currency_code: - type: string - title: currency_code - description: The budget's currency code. - limit: - type: number - title: limit - description: The budget's limit. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml index cb4739e001f7b..08bd1f58b4789 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: the product collection's details. x-schemaName: AdminCreateCollection required: - title @@ -14,4 +14,4 @@ properties: description: The collection's handle. metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCustomerGroup.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateCustomerGroup.yaml index bd8d34314bf6d..4dd642b053256 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCustomerGroup.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateCustomerGroup.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The customer group's details. x-schemaName: AdminCreateCustomerGroup required: - name @@ -10,4 +10,4 @@ properties: description: The customer group's name. metadata: type: object - description: The customer group's metadata. + description: The customer group's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateFulfillment.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateFulfillment.yaml index 8a6e547262902..0dd456e29b17e 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateFulfillment.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateFulfillment.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The filfillment's details. x-schemaName: AdminCreateFulfillment required: - location_id @@ -15,27 +15,27 @@ properties: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the items are fulfilled from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the provider handling this fulfillment. delivery_address: type: object - description: The fulfillment's delivery address. + description: The address to deliver the items to. properties: first_name: type: string title: first_name - description: The delivery address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The customer's last name. phone: type: string title: phone - description: The delivery address's phone. + description: The customer's phone. company: type: string title: company @@ -43,11 +43,11 @@ properties: address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The delivery address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The delivery address's second line. city: type: string title: city @@ -66,13 +66,13 @@ properties: description: The delivery address's postal code. metadata: type: object - description: The delivery address's metadata. + description: The delivery address's metadata, used to store custom key-value pairs. items: type: array - description: The fulfillment's items. + description: The items to fulfill. items: type: object - description: The item's items. + description: An item to fulfill. required: - title - sku @@ -86,11 +86,11 @@ properties: sku: type: string title: sku - description: The item's sku. + description: The item's SKU. quantity: type: number title: quantity - description: The item's quantity. + description: The quantity to fulfill of the item. barcode: type: string title: barcode @@ -98,17 +98,17 @@ properties: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the associated line item. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item associated with the underlying variant. labels: type: array - description: The fulfillment's labels. + description: The labels for the fulfillment's shipments. items: type: object - description: The label's labels. + description: A shipment's label. required: - tracking_number - tracking_url @@ -121,45 +121,46 @@ properties: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. - order: - type: object - description: The fulfillment's order. + description: The label's URL. order_id: type: string title: order_id - description: The fulfillment's order id. + description: The ID of the order this fulfillment is created for. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option used in the order. data: type: object - description: The fulfillment's data. + description: Any data useful for the fulfillment provider to handle the fulfillment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date and time the fulfillment was packed. format: date-time shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date and time the fulfillment was shipped. format: date-time delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date and time the fulfillment was delivered. format: date-time canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date and time the fulfillment was canceled. format: date-time metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateInventoryItem.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateInventoryItem.yaml index e5c490d22eb07..21a7ed1cd95c1 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateInventoryItem.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateInventoryItem.yaml @@ -1,15 +1,15 @@ type: object -description: SUMMARY +description: The inventory item's details. x-schemaName: AdminCreateInventoryItem properties: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. weight: type: number title: weight @@ -45,15 +45,15 @@ properties: description: type: string title: description - description: The inventory item's description. + description: The description of the variant associated with the inventory item. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the item requires shipping. thumbnail: type: string title: thumbnail description: The inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreatePriceList.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePriceList.yaml index f360a50004d64..ff78bb5483e55 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreatePriceList.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePriceList.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The price list's details. x-schemaName: AdminCreatePriceList required: - title @@ -16,11 +16,13 @@ properties: starts_at: type: string title: starts_at - description: The price list's starts at. + description: The date and time the price list starts at. + format: date-time ends_at: type: string title: ends_at - description: The price list's ends at. + description: The date and time the price list ends at. + format: date-time status: type: string description: The price list's status. @@ -36,12 +38,14 @@ properties: rules: type: object description: The price list's rules. + example: + product_category_id: pcat_123 prices: type: array description: The price list's prices. items: type: object - description: The price's prices. + description: A price's details. required: - currency_code - amount @@ -58,15 +62,21 @@ properties: variant_id: type: string title: variant_id - description: The price's variant id. + description: The ID of the product variant this price is for. min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: >- + The minimum quantity required in the cart for this price to be + applied. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: >- + The maximum quantity in the cart that shouldn't be crossed for this + price to be applied. rules: type: object description: The price's rules. + example: + region_id: reg_123 diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreatePricePreference.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePricePreference.yaml index cc2c0dbe9d218..4049498a4b179 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreatePricePreference.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePricePreference.yaml @@ -1,16 +1,20 @@ type: object -description: SUMMARY +description: The price preference's details. x-schemaName: AdminCreatePricePreference properties: attribute: type: string title: attribute - description: The price preference's attribute. + description: The name of the attribute the price preference applies on. + example: currency_code value: type: string title: value - description: The price preference's value. + description: The attribute's value. + example: usd is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The price preference's is tax inclusive. + description: >- + Whether the price is tax inclusive if the value of the specified attribute + matches the specified value. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProduct.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProduct.yaml index fac1377ff4803..d4cece0e332de 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProduct.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProduct.yaml @@ -1,5 +1,5 @@ type: object -description: The create's details. +description: The product's details. x-schemaName: AdminCreateProduct required: - title @@ -7,47 +7,47 @@ properties: title: type: string title: title - description: The create's title. + description: The product's title. subtitle: type: string title: subtitle - description: The create's subtitle. + description: The product's subtitle. description: type: string title: description - description: The create's description. + description: The product's description. is_giftcard: type: boolean title: is_giftcard - description: The create's is giftcard. + description: Whether the product is a gift card. discountable: type: boolean title: discountable - description: The create's discountable. + description: Whether the product is discountable. images: type: array - description: The create's images. + description: The product's images. items: type: object - description: The image's images. + description: A product's image details. required: - url properties: url: type: string title: url - description: The image's url. + description: The image's URL. thumbnail: type: string title: thumbnail - description: The create's thumbnail. + description: The URL of the product's thumbnail. handle: type: string title: handle - description: The create's handle. + description: The product's handle. status: type: string - description: The create's status. + description: The product's status. enum: - draft - proposed @@ -56,17 +56,17 @@ properties: type_id: type: string title: type_id - description: The create's type id. + description: The ID of the type the product belongs to. collection_id: type: string title: collection_id - description: The create's collection id. + description: The ID of the collection the product belongs to. categories: type: array - description: The create's categories. + description: The categories the product belongs to. items: type: object - description: The category's categories. + description: A category's details. required: - id properties: @@ -76,10 +76,10 @@ properties: description: The category's ID. tags: type: array - description: The create's tags. + description: The product's tags. items: type: object - description: The tag's tags. + description: A tag's details. required: - id properties: @@ -89,20 +89,20 @@ properties: description: The tag's ID. options: type: array - description: The create's options. + description: The product's options. items: $ref: ./AdminCreateProductOption.yaml variants: type: array - description: The create's variants. + description: The product's variants. items: $ref: ./AdminCreateProductVariant.yaml sales_channels: type: array - description: The create's sales channels. + description: The sales channels the product is available in. items: type: object - description: The sales channel's sales channels. + description: A sales channel's details. required: - id properties: @@ -113,35 +113,35 @@ properties: weight: type: number title: weight - description: The create's weight. + description: The product's weight. length: type: number title: length - description: The create's length. + description: The product's length. height: type: number title: height - description: The create's height. + description: The product's height. width: type: number title: width - description: The create's width. + description: The product's width. hs_code: type: string title: hs_code - description: The create's hs code. + description: The product's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The product's MID code. origin_country: type: string title: origin_country - description: The create's origin country. + description: The product's origin country. material: type: string title: material - description: The create's material. + description: The product's material. metadata: type: object - description: The create's metadata. + description: The product's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductCategory.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductCategory.yaml index 19c2aa6d6e4e4..5273e97f2bd2c 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductCategory.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductCategory.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The product category's details. x-schemaName: AdminCreateProductCategory required: - name @@ -19,19 +19,19 @@ properties: is_internal: type: boolean title: is_internal - description: The product category's is internal. + description: Whether the product category is only used and seen by admin users. is_active: type: boolean title: is_active - description: The product category's is active. + description: Whether the product category is active. parent_category_id: type: string title: parent_category_id - description: The product category's parent category id. + description: The ID of a category that's the parent of this one. rank: type: number title: rank - description: The product category's rank. + description: The sorting order of the product category among sibling categories. metadata: type: object - description: The product category's metadata. + description: The product category's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductOption.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductOption.yaml index 156ef7cf2f98e..cdf6409b07bbf 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductOption.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductOption.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The product option's details. x-schemaName: AdminCreateProductOption required: - title @@ -8,11 +8,11 @@ properties: title: type: string title: title - description: The product's title. + description: The product option's title. values: type: array - description: The product's values. + description: The product option's values. items: type: string title: values - description: The value's values. + description: A value. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductTag.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductTag.yaml index 3c412794aba21..88b118a73fe08 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductTag.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductTag.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The product tag's details. x-schemaName: AdminCreateProductTag required: - value @@ -10,4 +10,4 @@ properties: description: The product tag's value. metadata: type: object - description: The product tag's metadata. + description: The product tag's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariant.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariant.yaml index 16419ecccd6cc..874a1015bb353 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariant.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariant.yaml @@ -1,5 +1,5 @@ type: object -description: The create's details. +description: The product variant's details. x-schemaName: AdminCreateProductVariant required: - title @@ -8,75 +8,81 @@ properties: title: type: string title: title - description: The create's title. + description: The variant's title. sku: type: string title: sku - description: The create's sku. + description: The variant's SKU. ean: type: string title: ean - description: The create's ean. + description: The variant's EAN. upc: type: string title: upc - description: The create's upc. + description: The variant's UPC. barcode: type: string title: barcode - description: The create's barcode. + description: The variant's barcode. hs_code: type: string title: hs_code - description: The create's hs code. + description: The variant's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The variant's MID code. allow_backorder: type: boolean title: allow_backorder - description: The create's allow backorder. + description: Whether it's allowed to order this variant when it's out of stock. manage_inventory: type: boolean title: manage_inventory - description: The create's manage inventory. + description: >- + Whether Medusa manages the variant's inventory quantity. If disabled, the + product variant is always considered in stock. variant_rank: type: number title: variant_rank - description: The create's variant rank. + description: The sorting order of the variant among other variants in the product. weight: type: number title: weight - description: The create's weight. + description: The variant's weight. length: type: number title: length - description: The create's length. + description: The variant's length. height: type: number title: height - description: The create's height. + description: The variant's height. width: type: number title: width - description: The create's width. + description: The variant's width. origin_country: type: string title: origin_country - description: The create's origin country. + description: The variant's origin country. material: type: string title: material - description: The create's material. + description: The variant's material. metadata: type: object - description: The create's metadata. + description: The variant's metadata, used to store custom key-value pairs. prices: type: array - description: The create's prices. + description: The variant's prices. items: $ref: ./AdminCreateProductVariantPrice.yaml options: type: object - description: The create's options. + description: >- + The variant's options, where the key is an option's name, and the value is + the option's value. + example: + Color: Black diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariantPrice.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariantPrice.yaml index 9d4db23102885..e543b4f377602 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariantPrice.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateProductVariantPrice.yaml @@ -1,5 +1,5 @@ type: object -description: The price's prices. +description: The details of a variant's price. x-schemaName: AdminCreateProductVariantPrice required: - currency_code @@ -16,11 +16,17 @@ properties: min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: >- + The minimum quantity that must be available in the cart for this price to + apply. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: >- + The maximum quantity that must not be surpassed in the cart for this price + to apply. rules: type: object description: The price's rules. + example: + region_id: reg_123 diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreatePromotionRule.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePromotionRule.yaml index 71606d0bd6481..93373ce2207a0 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreatePromotionRule.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreatePromotionRule.yaml @@ -1,5 +1,5 @@ type: object -description: The rule's rules. +description: The promotion rule's details. x-schemaName: AdminCreatePromotionRule required: - operator @@ -8,7 +8,10 @@ required: properties: operator: type: string - description: The rule's operator. + description: >- + The operator used to check whether the buy rule applies on a cart. For + example, `eq` means that the cart's value for the specified attribute must + match the specified value. enum: - gt - lt @@ -24,15 +27,20 @@ properties: attribute: type: string title: attribute - description: The rule's attribute. + description: >- + The attribute to compare against when checking whether a promotion can be + applied on a cart. + example: item.product.id values: oneOf: - type: string title: values - description: The rule's values. + description: The attribute's value. + example: prod_123 - type: array - description: The rule's values. + description: The allowed attribute values. items: type: string title: values - description: The value's values. + description: An attribute value. + example: prod_123 diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateRefundReason.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateRefundReason.yaml index 9add02da6686e..a94aba8a115d0 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateRefundReason.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateRefundReason.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The refund reason's details. x-schemaName: AdminCreateRefundReason required: - label diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateRegion.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateRegion.yaml index c7b2be70761c3..6028eaf5d3831 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateRegion.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateRegion.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The region's details. x-schemaName: AdminCreateRegion required: - name @@ -13,28 +13,31 @@ properties: type: string title: currency_code description: The region's currency code. + example: usd countries: type: array description: The region's countries. items: type: string title: countries - description: The country's countries. + description: A country code. + example: us automatic_taxes: type: boolean title: automatic_taxes - description: The region's automatic taxes. + description: Whether taxes are calculated automatically during checkout in this region. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The region's is tax inclusive. + description: Whether prices in this region are tax inclusive. payment_providers: type: array - description: The region's payment providers. + description: The payment providers enabled in this region. items: type: string title: payment_providers - description: The payment provider's payment providers. + description: A payment provider's ID. + example: pp_stripe_stripe metadata: type: object - description: The region's metadata. + description: The region's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateReservation.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateReservation.yaml index bf02a07a9c6a1..1f78aa26dd015 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateReservation.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateReservation.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The reservation's details. x-schemaName: AdminCreateReservation required: - location_id @@ -9,23 +9,23 @@ properties: line_item_id: type: string title: line_item_id - description: The reservation's line item id. + description: The ID of the line item this reservation is created for. location_id: type: string title: location_id - description: The reservation's location id. + description: The ID of the location the quantity is reserved from. inventory_item_id: type: string title: inventory_item_id - description: The reservation's inventory item id. + description: The ID of the inventory item associated with the line item's variant. quantity: type: number title: quantity - description: The reservation's quantity. + description: The reserved quantity. description: type: string title: description description: The reservation's description. metadata: type: object - description: The reservation's metadata. + description: The reservation's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateSalesChannel.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateSalesChannel.yaml index 21e87751127c3..69ac7d89c6f3d 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateSalesChannel.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateSalesChannel.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The sales channel's details. x-schemaName: AdminCreateSalesChannel required: - name @@ -15,7 +15,7 @@ properties: is_disabled: type: boolean title: is_disabled - description: The sales channel's is disabled. + description: Whether the sales channel is disabled. metadata: type: object - description: The sales channel's metadata. + description: The sales channel's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShipment.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShipment.yaml index 3d5448c4bf5e2..92a29e274be12 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShipment.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShipment.yaml @@ -1,15 +1,15 @@ type: object -description: SUMMARY +description: The shipment's details. x-schemaName: AdminCreateShipment required: - labels properties: labels: type: array - description: The fulfillment's labels. + description: The shipment's labels. items: type: object - description: The label's labels. + description: A shipment label's details. required: - tracking_number - tracking_url @@ -22,8 +22,8 @@ properties: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOption.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOption.yaml index f03625cdbf312..c3e9d1c9b2d8d 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOption.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOption.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The shipping option's details. x-schemaName: AdminCreateShippingOption required: - name @@ -17,33 +17,46 @@ properties: service_zone_id: type: string title: service_zone_id - description: The shipping option's service zone id. + description: The ID of the service zone this shipping option belongs to. shipping_profile_id: type: string title: shipping_profile_id - description: The shipping option's shipping profile id. + description: The ID of the shipping profile this shipping option belongs to. data: type: object - description: The shipping option's data. + description: >- + Any data necessary for fulfillment providers to handle shipping methods + and fulfillments of this shipping option. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. price_type: type: string - description: The shipping option's price type. + description: > + The shipping option price's type. If `flat`, it means the option has a + fixed price set in the `prices` property. `calculated` means that the + shipping option's price is calculated during checkout. enum: - flat - calculated provider_id: type: string title: provider_id - description: The shipping option's provider id. + description: >- + The ID of the fulfillment provider used to handle this shipping option and + its associated methods and fulfillments. type: $ref: ./AdminCreateShippingOption.yaml prices: type: array - description: The shipping option's prices. + description: >- + The shipping option's prices. If `price_type` is `calculated`, pass an + empty array for this property. items: oneOf: - type: object - description: The price's prices. + description: The price for a currency code. x-schemaName: AdminCreateShippingOptionPriceWithCurrency required: - currency_code @@ -58,7 +71,7 @@ properties: title: amount description: The price's amount. - type: object - description: The price's prices. + description: The price in a region. x-schemaName: AdminCreateShippingOptionPriceWithRegion required: - region_id @@ -67,7 +80,7 @@ properties: region_id: type: string title: region_id - description: The price's region id. + description: The ID of the region this price is used in. amount: type: number title: amount diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOptionRule.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOptionRule.yaml index 5fca721e07503..05df606241c91 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOptionRule.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingOptionRule.yaml @@ -1,5 +1,5 @@ type: object -description: The rule's rules. +description: The details of the shipping option rule. x-schemaName: AdminCreateShippingOptionRule required: - operator @@ -8,7 +8,7 @@ required: properties: operator: type: string - description: The rule's operator. + description: The operator used to check whether a rule applies. enum: - gt - lt @@ -21,15 +21,18 @@ properties: attribute: type: string title: attribute - description: The rule's attribute. + description: The name of a property or table that the rule applies to. + example: customer_group value: oneOf: - type: string title: value - description: The rule's value. + description: A value of the attribute that enables this rule. + example: cusgroup_123 - type: array - description: The rule's value. + description: Values of the attribute that enable this rule. items: type: string title: value - description: The value's details. + description: A value of the attribute that enables this rule. + example: cusgroup_123 diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingProfile.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingProfile.yaml index 94a4933a1eb31..80a6b3ae524d4 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingProfile.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateShippingProfile.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The shipping profile's details. x-schemaName: AdminCreateShippingProfile required: - name @@ -15,4 +15,4 @@ properties: description: The shipping profile's type. metadata: type: object - description: The shipping profile's metadata. + description: The shipping profile's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateStockLocation.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateStockLocation.yaml index 3766f7c914e9e..4e52d487ce02a 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateStockLocation.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateStockLocation.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The stock location's details. x-schemaName: AdminCreateStockLocation required: - name @@ -11,9 +11,9 @@ properties: address_id: type: string title: address_id - description: The stock location's address id. + description: The ID of the stock location's address. address: $ref: ./AdminUpsertStockLocationAddress.yaml metadata: type: object - description: The stock location's metadata. + description: The stock location's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRate.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRate.yaml index 32492385be231..065c81d06b10b 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRate.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRate.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The tax rate's details. x-schemaName: AdminCreateTaxRate required: - name @@ -9,18 +9,20 @@ properties: type: string title: name description: The tax rate's name. + example: VAT tax_region_id: type: string title: tax_region_id - description: The tax rate's tax region id. + description: The ID of the tax region this rate belongs to. rate: type: number title: rate - description: The tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The tax rate's code. + description: The code the tax rate is identified by. rules: type: array description: The tax rate's rules. @@ -29,11 +31,14 @@ properties: is_default: type: boolean title: is_default - description: The tax rate's is default. + description: Whether the tax rate is the default in its tax region. is_combinable: type: boolean title: is_combinable - description: The tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The tax rate's metadata. + description: The tax rate's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRateRule.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRateRule.yaml index 46cf869c16596..98126c62292c5 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRateRule.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRateRule.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The tax rate rule's details. x-schemaName: AdminCreateTaxRateRule required: - reference @@ -8,8 +8,10 @@ properties: reference: type: string title: reference - description: The tax rate's reference. + description: The name of a table in the database that this rule points to. + example: product_type reference_id: type: string title: reference_id - description: The tax rate's reference id. + description: The ID of a record in the table specified in reference. + example: ptype_123 diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml index 2e24b98894fe3..f0cdf7c0396ed 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The tax region's details. x-schemaName: AdminCreateTaxRegion required: - country_code @@ -8,6 +8,7 @@ properties: type: string title: country_code description: The tax region's country code. + example: us province_code: type: string title: province_code @@ -15,7 +16,7 @@ properties: parent_id: type: string title: parent_id - description: The tax region's parent id. + description: The ID of the parent tax region. default_tax_rate: type: object description: The tax region's default tax rate. @@ -25,22 +26,26 @@ properties: rate: type: number title: rate - description: The default tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The default tax rate's code. + description: The code the tax rate is identified by name: type: string title: name description: The default tax rate's name. + example: VAT is_combinable: type: boolean - title: is_combinable - description: The default tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The default tax rate's metadata. + description: The default tax rate's metadata, used to store custom key-value pairs. metadata: type: object - description: The tax region's metadata. + description: The tax region's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateVariantInventoryItem.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateVariantInventoryItem.yaml index 6674b16f20bc5..23e84a8328b64 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateVariantInventoryItem.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateVariantInventoryItem.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the variant-inventory item association. x-schemaName: AdminCreateVariantInventoryItem required: - required_quantity @@ -8,8 +8,8 @@ properties: required_quantity: type: number title: required_quantity - description: The product's required quantity. + description: The quantity of the variant in the inventory item. inventory_item_id: type: string title: inventory_item_id - description: The product's inventory item id. + description: The inventory item's ID. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml index e10e7538512d5..f7539f38b9e8f 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsAsyncResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of changing a workflow execution's step status. x-schemaName: AdminCreateWorkflowsAsyncResponse required: - transaction_id @@ -8,16 +8,18 @@ properties: transaction_id: type: string title: transaction_id - description: The workflows execution's transaction id. + description: The workflows execution's transaction ID. step_id: type: string title: step_id - description: The workflows execution's step id. - response: {} - compensate_input: {} + description: The ID of the step whose status was changed. + response: + description: Sets the step's response. It accepts any type. + compensate_input: + description: Sets the compensation function's input. It accepts any response. action: type: string - description: The workflows execution's action. + description: Whether to invoke or compensate the step. enum: - invoke - compensate diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsRun.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsRun.yaml index 9d4e5dc6f3055..c780d48d9cd93 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsRun.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateWorkflowsRun.yaml @@ -1,9 +1,10 @@ type: object -description: SUMMARY +description: The details of the workflow to execute. x-schemaName: AdminCreateWorkflowsRun properties: - input: {} + input: + description: The input to pass to the workflow. Can be of any type. transaction_id: type: string title: transaction_id - description: The workflows execution's transaction id. + description: The ID of the workflow execution's transaction. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCurrency.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCurrency.yaml index 4b310956abc46..984e1d51cf090 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCurrency.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCurrency.yaml @@ -1,3 +1,57 @@ type: object -description: The supported currency's currency. +description: The currency's currencies. x-schemaName: AdminCurrency +required: + - code + - symbol + - symbol_native + - name + - decimal_digits + - rounding + - raw_rounding + - created_at + - updated_at + - deleted_at +properties: + code: + type: string + title: code + description: The currency's code. + example: usd + symbol: + type: string + title: symbol + description: The currency's symbol. + example: $ + symbol_native: + type: string + title: symbol_native + description: The currency's native symbol, if different than the symbol. + example: $ + name: + type: string + title: name + description: The currency's name. + decimal_digits: + type: number + title: decimal_digits + description: The number of digits after the decimal for prices in this currency. + rounding: + type: number + title: rounding + description: The rounding percision applied on prices in this currency. + created_at: + type: string + format: date-time + title: created_at + description: The currency's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The currency's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The currency's deletion date. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml index ad2343c3800c3..896e430a10e1d 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of currencies. x-schemaName: AdminCurrencyListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The currency's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The currency's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The currency's count. + description: The total number of items. currencies: type: array - description: The currency's currencies. + description: The list of currencies. items: $ref: ./AdminCurrency.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyResponse.yaml index da9a68b4d3b02..4023729904675 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The currency's details. x-schemaName: AdminCurrencyResponse required: - currency diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCustomer.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCustomer.yaml index efce81ce39c30..af16ad0bf77b7 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCustomer.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCustomer.yaml @@ -1,5 +1,5 @@ type: object -description: The order's customer. +description: The customer's details. x-schemaName: AdminCustomer required: - has_account @@ -12,19 +12,19 @@ required: - last_name - addresses properties: + id: + type: string + title: id + description: The customer's ID. has_account: type: boolean title: has_account - description: The customer's has account. + description: Whether the customer is registered. groups: type: array description: The customer's groups. items: $ref: ./AdminCustomerGroup.yaml - id: - type: string - title: id - description: The customer's ID. email: type: string title: email @@ -33,11 +33,11 @@ properties: default_billing_address_id: type: string title: default_billing_address_id - description: The customer's default billing address id. + description: The ID of the address used as the default billing address. default_shipping_address_id: type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: The ID of the address used as the default shipping address. company_name: type: string title: company_name @@ -61,23 +61,23 @@ properties: description: The customer's phone. metadata: type: object - description: The customer's metadata. + description: The customer's metadata, used to store custom key-value pairs. created_by: type: string title: created_by - description: The customer's created by. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The customer's deleted at. + description: The ID of the user that created this customer, if available. created_at: type: string format: date-time title: created_at - description: The customer's created at. + description: The customer's creation date. updated_at: type: string format: date-time title: updated_at - description: The customer's updated at. + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddress.yaml index 6b2d655e7a5a8..de369d541a253 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddress.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddress.yaml @@ -28,39 +28,39 @@ properties: address_name: type: string title: address_name - description: The address's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The address's is default shipping. + description: Whether the address is the default shipping address. is_default_billing: type: boolean title: is_default_billing - description: The address's is default billing. + description: Whether the address is the default billing address. customer_id: type: string title: customer_id - description: The address's customer id. + description: The ID of the customer that this address belongs to. company: type: string title: company - description: The address's company. + description: The customer's company. first_name: type: string title: first_name - description: The address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The address's last name. + description: The customer's last name. address_1: type: string title: address_1 - description: The address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The address's address 2. + description: The address's second line. city: type: string title: city @@ -69,6 +69,7 @@ properties: type: string title: country_code description: The address's country code. + example: us province: type: string title: province @@ -83,14 +84,14 @@ properties: description: The address's phone. metadata: type: object - description: The address's metadata. + description: The address's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The address's created at. + description: The address's creation date. updated_at: type: string format: date-time title: updated_at - description: The address's updated at. + description: The address's update date. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddressResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddressResponse.yaml index e84a4d16dde97..40f32063a4fed 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddressResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerAddressResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The address's details. x-schemaName: AdminCustomerAddressResponse required: - address diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerGroup.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerGroup.yaml index ba7722625fdde..3984d6eb28592 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerGroup.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerGroup.yaml @@ -1,3 +1,37 @@ type: object -description: The group's groups. +description: The customer group's details. x-schemaName: AdminCustomerGroup +required: + - id + - name + - customers + - metadata + - created_at + - updated_at +properties: + id: + type: string + title: id + description: The customer group's ID. + name: + type: string + title: name + description: The customer group's name. + customers: + type: array + description: The customer group's customers. + items: + $ref: ./BaseCustomer.yaml + metadata: + type: object + description: The customer group's metadata, used to store custom key-value pairs. + created_at: + type: string + format: date-time + title: created_at + description: The customer group's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer group's update date. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerInGroupFilters.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerInGroupFilters.yaml index 11fdbf8084c6e..0582cbffdc86f 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCustomerInGroupFilters.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCustomerInGroupFilters.yaml @@ -1,33 +1,33 @@ type: object -description: The customer group's customers. +description: Filters to apply on customers to retrieve their groups. x-schemaName: AdminCustomerInGroupFilters properties: id: oneOf: - type: string title: id - description: The customer's ID. + description: Filter by a customer's ID. - type: array - description: The customer's ID. + description: Filter by customer IDs. items: type: string title: id - description: The id's ID. + description: A customer's ID. email: oneOf: - type: string title: email - description: The customer's email. + description: Filter by a customer's email. format: email - type: array - description: The customer's email. + description: Filter by customer emails. items: type: string title: email - description: The email's details. + description: A customer's email. format: email - type: object - description: The customer's email. + description: Apply filters on the customer's email. properties: $and: type: array @@ -51,7 +51,7 @@ properties: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -164,71 +164,75 @@ properties: oneOf: - type: string title: default_billing_address_id - description: The customer's default billing address id. + description: Filter by the ID of a customer's default billing address. - type: array - description: The customer's default billing address id. + description: Filter by the IDs of a customers' default billing address. items: type: string title: default_billing_address_id - description: The default billing address id's details. + description: The ID of a customer's default billing address. default_shipping_address_id: oneOf: - type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: Filter by the ID of a customer's default shipping address. - type: array - description: The customer's default shipping address id. + description: Filter by the IDs of a customers' default shipping address. items: type: string title: default_shipping_address_id - description: The default shipping address id's details. + description: The ID of a customer's default shipping address. company_name: oneOf: - type: string title: company_name - description: The customer's company name. + description: Filter by a customer's company name. - type: array - description: The customer's company name. + description: Filter by customers' company names. items: type: string title: company_name - description: The company name's details. + description: A company name. first_name: oneOf: - type: string title: first_name - description: The customer's first name. + description: Filter by a customer's first name. - type: array - description: The customer's first name. + description: Filter by customers' first names. items: type: string title: first_name - description: The first name's details. + description: A first name. last_name: oneOf: - type: string title: last_name - description: The customer's last name. + description: Filter by a customer's last name. - type: array - description: The customer's last name. + description: Filter by customers' last names. items: type: string title: last_name - description: The last name's details. + description: A last name. created_by: oneOf: - type: string title: created_by - description: The customer's created by. + description: >- + Filter by the ID of a user to retrieve the groups of the customers + they created. - type: array - description: The customer's created by. + description: >- + Filter by the ID of users to retrieve the groups of the customers they + created. items: type: string title: created_by - description: The created by's details. + description: A user's ID. created_at: type: object - description: The customer's created at. + description: Filter the customer's creation date. properties: $and: type: array @@ -252,7 +256,7 @@ properties: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -355,7 +359,7 @@ properties: description: Filter by whether a value for this parameter exists (not `null`). updated_at: type: object - description: The customer's updated at. + description: Filter the customer's update date. properties: $and: type: array @@ -482,7 +486,7 @@ properties: description: Filter by whether a value for this parameter exists (not `null`). deleted_at: type: object - description: The customer's deleted at. + description: Filter the customer's deletion date. properties: $and: type: array diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminDeletePaymentCollectionResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminDeletePaymentCollectionResponse.yaml index 479fe851d6940..8003af56c5dc1 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminDeletePaymentCollectionResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminDeletePaymentCollectionResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The result of deleting the payment collection. x-schemaName: AdminDeletePaymentCollectionResponse required: - id @@ -13,9 +13,9 @@ properties: object: type: string title: object - description: SUMMARY + description: The name of the object that was deleted. default: payment-collection deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the object was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderResponse.yaml index d2fd16520caea..e10135e61d015 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The draft order's details. x-schemaName: AdminDraftOrderResponse required: - draft_order diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExchange.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExchange.yaml index 90011a0ac81bb..e66c9d6ec8124 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExchange.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExchange.yaml @@ -44,31 +44,35 @@ properties: order_id: type: string title: order_id - description: The exchange's order id. + description: The ID of the order the exchange is created for. return_items: type: array - description: The exchange's return items. + description: The items returned (inbound) by the exchange. items: $ref: ./AdminReturnItem.yaml additional_items: type: array - description: The exchange's additional items. + description: The new items (outbound) sent by the exchange. items: $ref: ./BaseExchangeItem.yaml no_notification: type: boolean title: no_notification - description: The exchange's no notification. + description: Whether to send the customer notifications when the exchange is updated. difference_due: type: number title: difference_due - description: The exchange's difference due. + description: >- + The amount to be exchanged or refunded. If the amount is negative, it must + be refunded. If positive, additional payment is required from the + customer. return: + description: the return associated with the exchange. $ref: ./AdminReturn.yaml return_id: type: string title: return_id - description: The exchange's return id. + description: The ID of the associated exchange. currency_code: type: string title: currency_code @@ -80,31 +84,33 @@ properties: region_id: type: string title: region_id - description: The exchange's region id. + description: The ID of the associated order's region. customer_id: type: string title: customer_id - description: The exchange's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The exchange's sales channel id. + description: The ID of the sales channel the associated order belongs to. email: type: string title: email - description: The exchange's email. + description: The email used when placing the order. format: email display_id: type: number title: display_id - description: The exchange's display id. + description: The exchange's display ID. shipping_address: + description: The shipping address to send new items to. $ref: ./BaseOrderAddress.yaml billing_address: + description: The customer's billing address. $ref: ./BaseOrderAddress.yaml shipping_methods: type: array - description: The exchange's shipping methods. + description: The shipping methods used to send the new (outbound) items. items: $ref: ./BaseOrderShippingMethod.yaml payment_collections: @@ -128,7 +134,7 @@ properties: - requires_action fulfillments: type: array - description: The exchange's fulfillments. + description: The exchange's fulfillments of new (outbound) items. items: $ref: ./BaseOrderFulfillment.yaml fulfillment_status: @@ -146,87 +152,91 @@ properties: transactions: type: array description: The exchange's transactions. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions items: $ref: ./BaseOrderTransaction.yaml summary: + description: The totals summary of the exchange. $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The exchange's metadata. + description: The exchange's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The exchange's created at. + description: The date that the exchange was created. updated_at: type: string format: date-time title: updated_at - description: The exchange's updated at. + description: The date that the exchange was updated. original_item_total: type: number title: original_item_total - description: The exchange's original item total. + description: The total of the original items in the order. original_item_subtotal: type: number title: original_item_subtotal - description: The exchange's original item subtotal. + description: The subtotal of the original items in the order. original_item_tax_total: type: number title: original_item_tax_total - description: The exchange's original item tax total. + description: The total tax of the original items in the order. item_total: type: number title: item_total - description: The exchange's item total. + description: The total of the exchange's new items. item_subtotal: type: number title: item_subtotal - description: The exchange's item subtotal. + description: The subtotal of the exchange's new items. item_tax_total: type: number title: item_tax_total - description: The exchange's item tax total. + description: The tax total of the exchange's new items. original_total: type: number title: original_total - description: The exchange's original total. + description: The total of the order. original_subtotal: type: number title: original_subtotal - description: The exchange's original subtotal. + description: The subtotal of the order. original_tax_total: type: number title: original_tax_total - description: The exchange's original tax total. + description: The tax total of the order. total: type: number title: total - description: The exchange's total. + description: The total of the exchange. subtotal: type: number title: subtotal - description: The exchange's subtotal. + description: The subtotal of the exchange. tax_total: type: number title: tax_total - description: The exchange's tax total. + description: The tax total of the exchange. discount_total: type: number title: discount_total - description: The exchange's discount total. + description: The discount total of the exchange. discount_tax_total: type: number title: discount_tax_total - description: The exchange's discount tax total. + description: The total taxes on discount of the exchange. gift_card_total: type: number title: gift_card_total - description: The exchange's gift card total. + description: The gift cards total of the exchange. gift_card_tax_total: type: number title: gift_card_tax_total - description: The exchange's gift card tax total. + description: The total taxes on the gift card of the exchange. shipping_total: type: number title: shipping_total @@ -242,12 +252,12 @@ properties: original_shipping_total: type: number title: original_shipping_total - description: The exchange's original shipping total. + description: The order's shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The exchange's original shipping subtotal. + description: The order's shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The exchange's original shipping tax total. + description: The order's shipping tax total. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeDeleteResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeDeleteResponse.yaml index 4fa416b52c2a2..473019c6b38dc 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeDeleteResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of deleting an exchange. x-schemaName: AdminExchangeDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Exchange was deleted. + description: Whether the exchange was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeOrderResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeOrderResponse.yaml index 356c9e7e5478c..03bc03d999ba2 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeOrderResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeOrderResponse.yaml @@ -1,11 +1,12 @@ type: object -description: SUMMARY +description: The exchange's details. x-schemaName: AdminExchangeOrderResponse required: - order - exchange properties: order: + description: The details of the associated order. $ref: ./Order.yaml exchange: $ref: ./AdminExchange.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExchangePreviewResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExchangePreviewResponse.yaml index 4178d2079e313..43b16c64383de 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExchangePreviewResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExchangePreviewResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: A preview of the order once the exchange is applied. x-schemaName: AdminExchangePreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeRequestResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeRequestResponse.yaml index 16b834277c246..8c908c82e0c7c 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeRequestResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeRequestResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of a requested exchange. x-schemaName: AdminExchangeRequestResponse required: - return @@ -7,8 +7,10 @@ required: - exchange properties: return: + description: The associated return's details. $ref: ./AdminReturn.yaml order_preview: + description: A preview of the order once the exchange is applied. $ref: ./OrderPreview.yaml exchange: $ref: ./AdminExchange.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeResponse.yaml index 663eadcceed98..bb2478330dc77 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The exchange's details. x-schemaName: AdminExchangeResponse required: - exchange diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeReturnResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeReturnResponse.yaml index d357aa7c5f036..abe845366fc88 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExchangeReturnResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExchangeReturnResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of an exchange's return. x-schemaName: AdminExchangeReturnResponse required: - order_preview diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExportProductRequest.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExportProductRequest.yaml deleted file mode 100644 index aa3490570bfc1..0000000000000 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExportProductRequest.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: object -description: SUMMARY -x-schemaName: AdminExportProductRequest diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminExportProductResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminExportProductResponse.yaml index ae3edcdd2933c..3f5ef9c2cd87f 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminExportProductResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminExportProductResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The details of the product export. x-schemaName: AdminExportProductResponse required: - transaction_id @@ -7,4 +7,7 @@ properties: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: >- + The ID of the workflow execution's transaction. Use it to check the status + of the export by sending a GET request to + `/admin/workflows-executions/export-products/:transaction-id` diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFile.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFile.yaml index 2cd7dd88eb773..22f64d6cd4e77 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFile.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFile.yaml @@ -1,5 +1,5 @@ type: object -description: The upload's file. +description: A file's details. x-schemaName: AdminFile required: - id @@ -12,4 +12,4 @@ properties: url: type: string title: url - description: The file's url. + description: The file's URL. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFileListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFileListResponse.yaml index 37160b8ed12f2..dd46f78b07b03 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFileListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFileListResponse.yaml @@ -1,11 +1,11 @@ type: object -description: SUMMARY +description: The list of uploaded files. x-schemaName: AdminFileListResponse required: - files properties: files: type: array - description: The upload's files. + description: The list of uploaded files. items: $ref: ./AdminFile.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFileResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFileResponse.yaml index c0850cabdc66f..346eb96a7c25e 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFileResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFileResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: A file's details. x-schemaName: AdminFileResponse required: - file diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillment.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillment.yaml index 797d72ca7bffb..80430cd6adf85 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillment.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillment.yaml @@ -27,18 +27,20 @@ properties: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the fulfillment's items are shipped from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the fulfillment provider handling this fulfillment. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option this fulfillment is created for. provider: + description: The details of the fulfillment provider using to handle this fulfillment. $ref: ./AdminFulfillmentProvider.yaml delivery_address: + description: The address to deliver the item to. $ref: ./AdminFulfillmentAddress.yaml items: type: array @@ -47,43 +49,48 @@ properties: $ref: ./AdminFulfillmentItem.yaml labels: type: array - description: The fulfillment's labels. + description: The fulfillment's shipment labels. items: $ref: ./AdminFulfillmentLabel.yaml packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date the fulfillment was packed at. shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date the fulfillment was shipped at. delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date the fulfillment was delivered at. canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date the fulfillment was canceled at. data: type: object - description: The fulfillment's data. + description: >- + The fulfillment's data, useful for the third-party provider handling the + fulfillment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The fulfillment's created at. + description: The date the fulfillment was created at. updated_at: type: string format: date-time title: updated_at - description: The fulfillment's updated at. + description: The date the fulfillment was updated at. deleted_at: type: string format: date-time title: deleted_at - description: The fulfillment's deleted at. + description: The date the fulfillment was deleted at. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentAddress.yaml index 4f2629008982a..37df664f0ec00 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentAddress.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentAddress.yaml @@ -1,5 +1,5 @@ type: object -description: The fulfillment's delivery address. +description: An address's details. x-schemaName: AdminFulfillmentAddress required: - id @@ -22,66 +22,66 @@ properties: id: type: string title: id - description: The delivery address's ID. + description: The address's ID. fulfillment_id: type: string title: fulfillment_id - description: The delivery address's fulfillment id. + description: The ID of the fulfillment that the address belongs to. company: type: string title: company - description: The delivery address's company. + description: The address's company. first_name: type: string title: first_name - description: The delivery address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The address's last name. address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The address's second line. city: type: string title: city - description: The delivery address's city. + description: The address's city. country_code: type: string title: country_code - description: The delivery address's country code. + description: The address's country code. province: type: string title: province - description: The delivery address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The delivery address's postal code. + description: The address's postal code. phone: type: string title: phone - description: The delivery address's phone. + description: The address's phone. metadata: type: object - description: The delivery address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The delivery address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The delivery address's updated at. + description: The date the address was updated. deleted_at: type: string format: date-time title: deleted_at - description: The delivery address's deleted at. + description: The date the address was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentItem.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentItem.yaml index 618af8761d054..45776eb450953 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentItem.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentItem.yaml @@ -1,5 +1,5 @@ type: object -description: The item's items. +description: The details of a fulfillment's item. x-schemaName: AdminFulfillmentItem required: - id @@ -25,11 +25,11 @@ properties: quantity: type: number title: quantity - description: The item's quantity. + description: The item's quantity to be fulfilled. sku: type: string title: sku - description: The item's sku. + description: The item's SKU. barcode: type: string title: barcode @@ -37,27 +37,27 @@ properties: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the order's line item to be fulfilled. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item of the underlying product variant. fulfillment_id: type: string title: fulfillment_id - description: The item's fulfillment id. + description: The ID of the fulfillment the item belongs to. created_at: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. deleted_at: type: string format: date-time title: deleted_at - description: The item's deleted at. + description: The date the item was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentLabel.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentLabel.yaml index 6304d99832c2e..f371e16d534f7 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentLabel.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentLabel.yaml @@ -1,5 +1,5 @@ type: object -description: The label's labels. +description: The details of a fulfillmet's shipment label. x-schemaName: AdminFulfillmentLabel required: - id @@ -22,27 +22,27 @@ properties: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. fulfillment_id: type: string title: fulfillment_id - description: The label's fulfillment id. + description: The ID of the fulfillment the label is associated with. created_at: type: string format: date-time title: created_at - description: The label's created at. + description: The date the label was created. updated_at: type: string format: date-time title: updated_at - description: The label's updated at. + description: The date the label was updated. deleted_at: type: string format: date-time title: deleted_at - description: The label's deleted at. + description: The date the label was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProvider.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProvider.yaml index 0fbdf6fd21520..9d7d2c4f6a843 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProvider.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProvider.yaml @@ -1,3 +1,3 @@ type: object -description: The fulfillment provider's fulfillment providers. +description: The shipping option's provider. x-schemaName: AdminFulfillmentProvider diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml index 23fefdf66529b..4f9ed0309744a 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of fulfillment providers. x-schemaName: AdminFulfillmentProviderListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The fulfillment provider's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The fulfillment provider's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The fulfillment provider's count. + description: The total count of items. fulfillment_providers: type: array - description: The fulfillment provider's fulfillment providers. + description: The list of fulfillment providers. items: $ref: ./AdminFulfillmentProvider.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentResponse.yaml index 8870aa903b2d8..607f15d917912 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: A fulfillment's details. x-schemaName: AdminFulfillmentResponse required: - fulfillment diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentSetDeleteResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentSetDeleteResponse.yaml index 130dc3c7b4def..38f9f0bed87a7 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentSetDeleteResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentSetDeleteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The deletion details. x-schemaName: AdminFulfillmentSetDeleteResponse required: - id @@ -18,4 +18,4 @@ properties: deleted: type: boolean title: deleted - description: Whether the Fulfillment Set was deleted. + description: Whether the fulfillment set was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminGeoZone.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGeoZone.yaml index 6684ce0d57490..fcdcef3406b53 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminGeoZone.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminGeoZone.yaml @@ -1,3 +1,56 @@ type: object -description: The geo zone's geo zones. +description: The geo zone's details. x-schemaName: AdminGeoZone +required: + - id + - type + - country_code + - province_code + - city + - postal_expression + - created_at + - updated_at + - deleted_at +properties: + id: + type: string + title: id + description: The geo zone's ID. + type: + type: string + description: The geo zone's type. + enum: + - country + - province + - city + - zip + country_code: + type: string + title: country_code + description: The geo zone's country code. + province_code: + type: string + title: province_code + description: The geo zone's province code. + city: + type: string + title: city + description: The geo zone's city. + postal_expression: + type: object + description: The geo zone's postal expression. + created_at: + type: string + format: date-time + title: created_at + description: The date the geo zone was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the geo zone was update. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the geo zone was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminImportProductRequest.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminImportProductRequest.yaml index 4462e48b07de8..94efb6c2bde43 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminImportProductRequest.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminImportProductRequest.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The import's details. x-schemaName: AdminImportProductRequest required: - file diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminImportProductResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminImportProductResponse.yaml index 0074592dd120f..aab2f56e4df81 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminImportProductResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminImportProductResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The import process's details. x-schemaName: AdminImportProductResponse required: - transaction_id @@ -8,10 +8,12 @@ properties: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: >- + The ID of the workflow execution's transaction. This is useful to confirm + the import using the `/admin/products/:transaction-id/import` API route. summary: type: object - description: The product's summary. + description: The import's summary. required: - toCreate - toUpdate @@ -19,8 +21,8 @@ properties: toCreate: type: number title: toCreate - description: The summary's tocreate. + description: The number of products that will be created by this import. toUpdate: type: number title: toUpdate - description: The summary's toupdate. + description: The number of products that will be updated by this import. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItem.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItem.yaml index cf8ed2a6dbf96..c2c758a65cd2f 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItem.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItem.yaml @@ -12,7 +12,7 @@ properties: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. origin_country: type: string title: origin_country @@ -20,15 +20,15 @@ properties: hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the inventory item requires shipping. mid_code: type: string title: mid_code - description: The inventory item's mid code. + description: The inventory item's MID code. material: type: string title: material @@ -60,12 +60,12 @@ properties: thumbnail: type: string title: thumbnail - description: The inventory item's thumbnail. + description: The URL of the inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, can hold custom key-value pairs. location_levels: type: array - description: The inventory item's location levels. + description: The inventory item's associated inventory levels. items: $ref: ./AdminInventoryLevel.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItemResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItemResponse.yaml index 9512367b8d05a..6aef877b4930c 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItemResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminInventoryItemResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The inventory item's details. x-schemaName: AdminInventoryItemResponse required: - inventory_item diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminInventoryLevel.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminInventoryLevel.yaml index 33bf6814f0b1b..91bd9eaab4285 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminInventoryLevel.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminInventoryLevel.yaml @@ -1,5 +1,5 @@ type: object -description: The location level's location levels. +description: The inventory level's details. x-schemaName: AdminInventoryLevel required: - id @@ -20,57 +20,56 @@ properties: id: type: string title: id - description: The location level's ID. - created_at: - type: string - format: date-time - title: created_at - description: The location level's created at. - updated_at: - type: string - format: date-time - title: updated_at - description: The location level's updated at. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The location level's deleted at. + description: The inventory level's ID. inventory_item_id: type: string title: inventory_item_id - description: The location level's inventory item id. + description: The ID of the inventory item this level belongs to. location_id: type: string title: location_id - description: The location level's location id. + description: The ID of the stock location this level belongs to. stocked_quantity: type: number title: stocked_quantity - description: The location level's stocked quantity. - raw_stocked_quantity: - type: object - description: The location level's raw stocked quantity. + description: >- + The quantity of the associated inventory item stocked in the associated + stock location. reserved_quantity: type: number title: reserved_quantity - description: The location level's reserved quantity. - raw_reserved_quantity: - type: object - description: The location level's raw reserved quantity. + description: >- + The reserved quantity of the associated inventory item stocked in the + associated stock location. incoming_quantity: type: number title: incoming_quantity - description: The location level's incoming quantity. - raw_incoming_quantity: - type: object - description: The location level's raw incoming quantity. + description: >- + The incoming quantity of the associated inventory item stocked in the + associated stock location. metadata: type: object - description: The location level's metadata. + description: The location level's metadata, can hold custom key-value pairs. inventory_item: $ref: ./AdminInventoryItem.yaml available_quantity: type: number title: available_quantity - description: The location level's available quantity. + description: >- + The quantity available for order of the associated inventory item in the + associated stock location. + created_at: + type: string + format: date-time + title: created_at + description: The date the inventory level was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the inventory level was updated. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the inventory level was deleted. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminInvite.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminInvite.yaml index f33a0a9aed845..d9928379cde37 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminInvite.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminInvite.yaml @@ -19,7 +19,7 @@ properties: accepted: type: boolean title: accepted - description: The invite's accepted. + description: Whether the invite has been accepted. token: type: string title: token @@ -27,18 +27,18 @@ properties: expires_at: type: string title: expires_at - description: The invite's expires at. + description: The invite's expiry date. format: date-time metadata: type: object - description: The invite's metadata. + description: The invite's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The invite's created at. + description: The date the invite was created. updated_at: type: string format: date-time title: updated_at - description: The invite's updated at. + description: The date the invite was updated. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminInviteResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminInviteResponse.yaml index d2649d5348d29..c88c527c63ff5 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminInviteResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminInviteResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The invite's details. x-schemaName: AdminInviteResponse required: - invite diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminLinkPriceListProducts.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminLinkPriceListProducts.yaml index 5e8a008bc434f..e122fdaa13b7e 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminLinkPriceListProducts.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminLinkPriceListProducts.yaml @@ -1,5 +1,5 @@ type: object -description: The removal details. +description: The products removal details. properties: remove: type: array diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminNotification.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminNotification.yaml index 4b4d98663cc73..c700f99e2cf57 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminNotification.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminNotification.yaml @@ -16,48 +16,57 @@ properties: to: type: string title: to - description: The notification's to. + description: >- + Where to send the notification to. For example, if `channel` is `email`, + this can be an email number. channel: type: string title: channel - description: The notification's channel. + description: Through which channel is the notification sent through. + example: email template: type: string title: template - description: The notification's template. + description: >- + The ID of the template in a third-party service used as the notification's + shape. data: type: object - description: The notification's data. + description: Data payload to send with the notification. trigger_type: type: string title: trigger_type - description: The notification's trigger type. + description: What triggered this notification. + example: order.created resource_id: type: string title: resource_id - description: The notification's resource id. + description: >- + The ID of the associated resource. For example, if the notification was + triggered because an order was created, this would be the ID of the order. resource_type: type: string title: resource_type - description: The notification's resource type. + description: The type of the resource that triggered the notification. + example: order receiver_id: type: string title: receiver_id - description: The notification's receiver id. + description: The ID of the user or customer that's receiving this notification. original_notification_id: type: string title: original_notification_id - description: The notification's original notification id. + description: The ID of the original notification, if this notification is resent. external_id: type: string title: external_id - description: The notification's external id. + description: The ID of the notification in an external or third-party system. provider_id: type: string title: provider_id - description: The notification's provider id. + description: The ID of the provider used to send the notification. created_at: type: string format: date-time title: created_at - description: The notification's created at. + description: The date the notification was created. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml index aa51a6a023439..f17ab50d8b4a6 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The paginated list of notifications. x-schemaName: AdminNotificationListResponse required: - limit @@ -10,17 +10,17 @@ properties: limit: type: number title: limit - description: The notification's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The notification's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The notification's count. + description: The total count of items. notifications: type: array - description: The notification's notifications. + description: The list of notifications. items: $ref: ./AdminNotification.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminNotificationResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminNotificationResponse.yaml index b6e0ab7c90864..dcd404183a6dd 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminNotificationResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminNotificationResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The notification's details. x-schemaName: AdminNotificationResponse required: - notification diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminOrder.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminOrder.yaml index fd216bb354505..4d56258b6ed1d 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminOrder.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminOrder.yaml @@ -70,19 +70,19 @@ properties: region_id: type: string title: region_id - description: The order's region id. + description: The ID of the region associated with the order. customer_id: type: string title: customer_id - description: The order's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order's sales channel id. + description: The ID of the sales channel the order is placed in. email: type: string title: email - description: The order's email. + description: The email of the customer that placed the order. format: email currency_code: type: string @@ -91,7 +91,7 @@ properties: display_id: type: number title: display_id - description: The order's display id. + description: The order's display ID. items: type: array description: The order's items. @@ -137,73 +137,73 @@ properties: $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The order's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total @@ -211,28 +211,28 @@ properties: gift_card_tax_total: type: number title: gift_card_tax_total - description: The order's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminOrderAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminOrderAddress.yaml index 0fda1d2756eb2..6a69c1a244240 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminOrderAddress.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminOrderAddress.yaml @@ -1,5 +1,5 @@ type: object -description: The order's billing address. +description: An order address. x-schemaName: AdminOrderAddress required: - id @@ -7,66 +7,67 @@ required: - created_at - updated_at properties: - country: - $ref: ./AdminRegionCountry.yaml id: type: string title: id - description: The billing address's ID. + description: The address's ID. customer_id: type: string title: customer_id - description: The billing address's customer id. + description: The ID of the customer this address belongs to. first_name: type: string title: first_name - description: The billing address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The billing address's last name. + description: The address's last name. phone: type: string title: phone - description: The billing address's phone. + description: The address's phone. company: type: string title: company - description: The billing address's company. + description: The address's company. address_1: type: string title: address_1 - description: The billing address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The billing address's address 2. + description: The address's second line. city: type: string title: city - description: The billing address's city. + description: The address's city. country_code: type: string title: country_code - description: The billing address's country code. + description: The address's country code. + example: us + country: + $ref: ./AdminRegionCountry.yaml province: type: string title: province - description: The billing address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The billing address's postal code. + description: The address's postal code. metadata: type: object - description: The billing address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The billing address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The billing address's updated at. + description: The date the address was updated. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminOrderChangesResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminOrderChangesResponse.yaml index 4f8c9327affd2..0126a1ad99ad3 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminOrderChangesResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminOrderChangesResponse.yaml @@ -1,11 +1,11 @@ type: object -description: SUMMARY +description: The details of an order's changes. x-schemaName: AdminOrderChangesResponse required: - order_changes properties: order_changes: type: array - description: The order's order changes. + description: An order's changes. items: $ref: ./BaseOrderChange.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditPreviewResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditPreviewResponse.yaml index 09feaf500fce5..ec43c247ffb39 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditPreviewResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditPreviewResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: The preview of an order edit. x-schemaName: AdminOrderEditPreviewResponse required: - order_preview diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditResponse.yaml index 09c7c1a096e41..db40b31387db3 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminOrderEditResponse.yaml @@ -1,5 +1,5 @@ type: object -description: SUMMARY +description: An order edit's details. x-schemaName: AdminOrderEditResponse required: - order_change diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminOrderPreview.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminOrderPreview.yaml index b031d34d77047..1d24582bdff15 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminOrderPreview.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminOrderPreview.yaml @@ -1,5 +1,7 @@ type: object -description: The return's order preview. +description: >- + A preview of an order if a change, such as exchange, return, edit, or claim is + applied on it. x-schemaName: AdminOrderPreview required: - return_requested_total @@ -44,16 +46,16 @@ properties: return_requested_total: type: number title: return_requested_total - description: The order preview's return requested total. + description: The total of the requested return. order_change: $ref: ./BaseOrderChange.yaml items: type: array - description: The order preview's items. + description: The order's items. items: allOf: - type: object - description: The item's items. + description: An order's item. x-schemaName: BaseOrderLineItem required: - id @@ -110,74 +112,77 @@ properties: thumbnail: type: string title: thumbnail - description: The item's thumbnail. + description: The URL of the item's thumbnail. variant: $ref: ./BaseProductVariant.yaml variant_id: type: string title: variant_id - description: The item's variant id. + description: The ID of the associated variant. product: $ref: ./BaseProduct.yaml product_id: type: string title: product_id - description: The item's product id. + description: The ID of the associated product. product_title: type: string title: product_title - description: The item's product title. + description: The title of the item's product. product_description: type: string title: product_description - description: The item's product description. + description: The description of the item's product. product_subtitle: type: string title: product_subtitle - description: The item's product subtitle. + description: The subtitle of the item's product. product_type: type: string title: product_type - description: The item's product type. + description: The ID of type of the item's product. product_collection: type: string title: product_collection - description: The item's product collection. + description: The ID of collection of the item's product. product_handle: type: string title: product_handle - description: The item's product handle. + description: The handle of the item's product. variant_sku: type: string title: variant_sku - description: The item's variant sku. + description: The SKU of the item's variant. variant_barcode: type: string title: variant_barcode - description: The item's variant barcode. + description: The barcode of the item's variant. variant_title: type: string title: variant_title - description: The item's variant title. + description: The title of the item's variant. variant_option_values: type: object - description: The item's variant option values. + description: >- + The option values of the item's variant as key-value pairs. The + key is the title of an option, and the value is the option's + value. requires_shipping: type: boolean title: requires_shipping - description: The item's requires shipping. + description: Whether the item requires shipping. is_discountable: type: boolean title: is_discountable - description: The item's is discountable. + description: Whether the item is discountable. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The item's is tax inclusive. + description: Whether the item's price includes taxes. compare_at_unit_price: type: number - title: compare_at_unit_price - description: The item's compare at unit price. + title: The original price of the item before a promotion or sale. + description: The unit_price: type: number title: unit_price @@ -202,84 +207,92 @@ properties: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. metadata: type: object - description: The item's metadata. + description: The item's metadata, can hold custom key-value pairs. original_total: type: number title: original_total - description: The item's original total. + description: The item's total including taxes, excluding promotions. original_subtotal: type: number title: original_subtotal - description: The item's original subtotal. + description: The item's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The item's original tax total. + description: The tax total of the item excluding promotions. item_total: type: number title: item_total - description: The item's item total. + description: >- + The item's total for a single unit including taxes and + promotions. item_subtotal: type: number title: item_subtotal - description: The item's item subtotal. + description: >- + The item's total for a single unit excluding taxes, including + promotions. item_tax_total: type: number title: item_tax_total - description: The item's item tax total. + description: >- + The tax total for a single unit of the item including + promotions. total: type: number title: total - description: The item's total. + description: The item's total including taxes and promotions. subtotal: type: number title: subtotal - description: The item's subtotal. + description: The item's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The item's tax total. + description: The tax total of the item including promotions. discount_total: type: number title: discount_total - description: The item's discount total. + description: The total of the item's discount / promotion. discount_tax_total: type: number title: discount_tax_total - description: The item's discount tax total. + description: The tax total of the item's discount / promotion refundable_total: type: number title: refundable_total - description: The item's refundable total. + description: The total refundable amount of the item's total. refundable_total_per_unit: type: number title: refundable_total_per_unit - description: The item's refundable total per unit. + description: >- + The total refundable amount of the item's total for a single + unit. - type: object - description: The item's items. + description: An order's item. properties: actions: type: array - description: The item's actions. + description: The actions applied on an item. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction shipping_methods: type: array - description: The order preview's shipping methods. + description: The order's shipping methods. items: allOf: - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. x-schemaName: BaseOrderShippingMethod required: - id @@ -308,7 +321,7 @@ properties: order_id: type: string title: order_id - description: The shipping method's order id. + description: The ID of the order this shipping method belongs to. name: type: string title: name @@ -324,17 +337,22 @@ properties: is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The shipping method's is tax inclusive. + description: Whether the shipping method's amount is tax inclusive. shipping_option_id: type: string title: shipping_option_id - description: The shipping method's shipping option id. + description: The ID of the shipping option this method was created from. data: type: object - description: The shipping method's data. + description: >- + The data relevant for the fulfillment provider to process this + shipment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/order/concepts#data-property metadata: type: object - description: The shipping method's metadata. + description: The shipping method's metadata, can hold custom key-value pairs. tax_lines: type: array description: The shipping method's tax lines. @@ -349,163 +367,143 @@ properties: oneOf: - type: string title: original_total - description: The shipping method's original total. + description: >- + The shipping method's total including taxes, excluding + promotions. - type: number title: original_total - description: The shipping method's original total. - - type: string - title: original_total - description: The shipping method's original total. - - $ref: ./IBigNumber.yaml + description: >- + The shipping method's total including taxes, excluding + promotions. original_subtotal: oneOf: - type: string title: original_subtotal - description: The shipping method's original subtotal. + description: >- + The shipping method's total excluding taxes, including + promotions. - type: number title: original_subtotal - description: The shipping method's original subtotal. - - type: string - title: original_subtotal - description: The shipping method's original subtotal. - - $ref: ./IBigNumber.yaml + description: >- + The shipping method's total excluding taxes, including + promotions. original_tax_total: oneOf: - type: string title: original_tax_total - description: The shipping method's original tax total. + description: The tax total of the shipping method excluding promotions. - type: number title: original_tax_total - description: The shipping method's original tax total. - - type: string - title: original_tax_total - description: The shipping method's original tax total. - - $ref: ./IBigNumber.yaml + description: The tax total of the shipping method excluding promotions. total: oneOf: - type: string title: total - description: The shipping method's total. + description: The shipping method's total including taxes and promotions. - type: number title: total - description: The shipping method's total. - - type: string - title: total - description: The shipping method's total. - - $ref: ./IBigNumber.yaml + description: The shipping method's total including taxes and promotions. subtotal: oneOf: - type: string title: subtotal - description: The shipping method's subtotal. + description: >- + The shipping method's total excluding taxes, including + promotions. - type: number title: subtotal - description: The shipping method's subtotal. - - type: string - title: subtotal - description: The shipping method's subtotal. - - $ref: ./IBigNumber.yaml + description: >- + The shipping method's total excluding taxes, including + promotions. tax_total: oneOf: - type: string title: tax_total - description: The shipping method's tax total. + description: The tax total of the shipping method including promotions. - type: number title: tax_total - description: The shipping method's tax total. - - type: string - title: tax_total - description: The shipping method's tax total. - - $ref: ./IBigNumber.yaml + description: The tax total of the shipping method including promotions. discount_total: oneOf: - type: string title: discount_total - description: The shipping method's discount total. + description: The total of the shipping method's promotion. - type: number title: discount_total - description: The shipping method's discount total. - - type: string - title: discount_total - description: The shipping method's discount total. - - $ref: ./IBigNumber.yaml + description: The total of the shipping method's promotion. discount_tax_total: oneOf: - type: string title: discount_tax_total - description: The shipping method's discount tax total. + description: The tax total of the shipping method's promotion. - type: number title: discount_tax_total description: The shipping method's discount tax total. - - type: string - title: discount_tax_total - description: The shipping method's discount tax total. - - $ref: ./IBigNumber.yaml created_at: type: string format: date-time title: created_at - description: The shipping method's created at. + description: The date the shipping method was created. updated_at: type: string format: date-time title: updated_at - description: The shipping method's updated at. + description: The date the shipping method was updated. - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. properties: actions: type: array - description: The shipping method's actions. + description: The actions applied on the shipping method. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction currency_code: type: string title: currency_code - description: The order preview's currency code. + description: The order's currency code. version: type: number title: version - description: The order preview's version. + description: The order's version when this preview is applied. id: type: string title: id - description: The order preview's ID. + description: The order's ID. region_id: type: string title: region_id - description: The order preview's region id. + description: The ID of the order's associated region. customer_id: type: string title: customer_id - description: The order preview's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order preview's sales channel id. + description: The ID of the sales channel that the order was placed in. email: type: string title: email - description: The order preview's email. + description: The email of the customer that placed the order. format: email display_id: type: number title: display_id - description: The order preview's display id. + description: The order's display ID. shipping_address: $ref: ./AdminOrderAddress.yaml billing_address: $ref: ./AdminOrderAddress.yaml payment_collections: type: array - description: The order preview's payment collections. + description: The order's payment collections. items: $ref: ./AdminPaymentCollection.yaml payment_status: type: string - description: The order preview's payment status. + description: The order's payment status. enum: - canceled - not_paid @@ -519,12 +517,12 @@ properties: - requires_action fulfillments: type: array - description: The order preview's fulfillments. + description: The order's fulfillments. items: $ref: ./BaseOrderFulfillment.yaml fulfillment_status: type: string - description: The order preview's fulfillment status. + description: The order's fulfillment status. enum: - canceled - not_fulfilled @@ -536,112 +534,112 @@ properties: - delivered transactions: type: array - description: The order preview's transactions. + description: The order's transactions. items: $ref: ./BaseOrderTransaction.yaml summary: $ref: ./BaseOrderSummary.yaml metadata: type: object - description: The order preview's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order preview's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order preview's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order preview's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order preview's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order preview's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order preview's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order preview's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order preview's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order preview's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order preview's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order preview's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order preview's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order preview's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order preview's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order preview's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order preview's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total - description: The order preview's gift card total. + description: The order's gift card total. gift_card_tax_total: type: number title: gift_card_tax_total - description: The order preview's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order preview's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order preview's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order preview's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order preview's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order preview's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order preview's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. customer: $ref: ./AdminCustomer.yaml sales_channel: diff --git a/www/apps/api-reference/specs/store/components/schemas/AuthCallbackResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AuthCallbackResponse.yaml new file mode 100644 index 0000000000000..65706e144b57a --- /dev/null +++ b/www/apps/api-reference/specs/store/components/schemas/AuthCallbackResponse.yaml @@ -0,0 +1,12 @@ +type: object +description: The authentication's details. +x-schemaName: AuthCallbackResponse +required: + - location +properties: + token: + type: string + title: location + description: >- + The location to redirect the user to for further authentication with the + third-party provider. diff --git a/www/apps/api-reference/specs/store/components/schemas/BaseCustomer.yaml b/www/apps/api-reference/specs/store/components/schemas/BaseCustomer.yaml new file mode 100644 index 0000000000000..ef30b67813446 --- /dev/null +++ b/www/apps/api-reference/specs/store/components/schemas/BaseCustomer.yaml @@ -0,0 +1,73 @@ +type: object +description: The customer's details. +x-schemaName: BaseCustomer +required: + - id + - email + - default_billing_address_id + - default_shipping_address_id + - company_name + - first_name + - last_name + - addresses +properties: + id: + type: string + title: id + description: The customer's ID. + email: + type: string + title: email + description: The customer's email. + format: email + default_billing_address_id: + type: string + title: default_billing_address_id + description: The ID of the address used as the default billing address. + default_shipping_address_id: + type: string + title: default_shipping_address_id + description: The ID of the address used as the default shipping address. + company_name: + type: string + title: company_name + description: The customer's company name. + first_name: + type: string + title: first_name + description: The customer's first name. + last_name: + type: string + title: last_name + description: The customer's last name. + addresses: + type: array + description: The customer's addresses. + items: + $ref: ./BaseCustomerAddress.yaml + phone: + type: string + title: phone + description: The customer's phone. + metadata: + type: object + description: The customer's metadata, used to store custom key-value pairs. + created_by: + type: string + title: created_by + description: The ID of the user that created this customer, if available. + created_at: + type: string + format: date-time + title: created_at + description: The customer's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCreateCart.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCreateCart.yaml new file mode 100644 index 0000000000000..41c5888a13851 --- /dev/null +++ b/www/apps/api-reference/specs/store/components/schemas/StoreCreateCart.yaml @@ -0,0 +1,33 @@ +type: object +description: SUMMARY +x-schemaName: StoreCreateCart +properties: + region_id: + type: string + title: region_id + description: The cart's region id. + shipping_address: + $ref: ./StoreCartAddress.yaml + billing_address: + $ref: ./StoreCartAddress.yaml + email: + type: string + title: email + description: The cart's email. + format: email + currency_code: + type: string + title: currency_code + description: The cart's currency code. + items: + type: array + description: The cart's items. + items: + $ref: ./StoreCartLineItem.yaml + sales_channel_id: + type: string + title: sales_channel_id + description: The cart's sales channel id. + metadata: + type: object + description: The cart's metadata. diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml index bfe4e73bebb8f..4a273fb3df935 100644 --- a/www/apps/api-reference/specs/store/openapi.full.yaml +++ b/www/apps/api-reference/specs/store/openapi.full.yaml @@ -152,7 +152,13 @@ paths: post: operationId: PostActor_typeAuth_provider summary: Authenticate Customer - description: Authenticate a customer and receive the JWT token to be used in the header of subsequent requests. + description: | + Authenticate a customer and receive the JWT token to be used in the header of subsequent requests. + + When used with a third-party provider, such as Google, the request returns a `location` property. You redirect to the specified URL in your storefront to continue authentication with the third-party service. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#types-of-authentication-flows + description: Learn about different authentication flows. x-authenticated: false parameters: - name: auth_provider @@ -162,10 +168,29 @@ paths: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: The input data necessary for authentication. For example, for email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/auth/customer/{auth_provider}' + label: EmailPass Provider + source: |- + curl -X POST '{backend_url}/auth/customer/emailpass' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "email": "customer@gmail.com", + "password": "supersecret" + }' + - lang: Shell + label: Google Provider + source: curl -X POST '{backend_url}/auth/customer/google' + - lang: Shell + label: GitHub Provider + source: curl -X POST '{backend_url}/auth/customer/github' tags: - Auth responses: @@ -174,7 +199,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuthResponse' + oneOf: + - $ref: '#/components/schemas/AuthResponse' + - $ref: '#/components/schemas/AuthCallbackResponse' '400': $ref: '#/components/responses/400_error' '401': @@ -191,7 +218,15 @@ paths: post: operationId: PostActor_typeAuth_providerCallback summary: Validate Authentication Callback - description: Third-party authentication providers, such as Google, require an API route to call once authentication with the third-party provider is finished. This API route validates callback for customers logged-in with third-party providers. + description: | + This API route is used by your storefront or frontend application when a third-party provider redirects to it after authentication. + + It validates the authentication with the third-party provider and, if successful, returns an authentication token. + + You can decode the JWT token using libraries like [react-jwt](https://www.npmjs.com/package/react-jwt) in the storefront. If the decoded data doesn't have an `actor_id` property, then you must register the customer using the Create Customer API route passing the token in the request's Authorization header. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -203,8 +238,11 @@ paths: example: google x-codeSamples: - lang: Shell - label: cURL - source: curl -X POST '{backend_url}/auth/customer/{auth_provider}/callback' + label: Google Provider + source: curl -X POST '{backend_url}/auth/customer/google/callback?code=123' + - lang: Shell + label: GitHub Provider + source: curl -X POST '{backend_url}/auth/customer/github/callback?code=123' tags: - Auth responses: @@ -230,7 +268,10 @@ paths: post: operationId: PostActor_typeAuth_provider_register summary: Retrieve Registration JWT Token - description: A registration JWT token is used in the header of requests that create a customer. This API route retrieves the JWT token of a customer that hasn't been registered yet. + description: This API route retrieves a registration JWT token of a customer that hasn't been registered yet. The token is used in the header of requests that create a customer. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#1-basic-authentication-flow + description: Learn about the basic authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -240,10 +281,23 @@ paths: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: The input data necessary for authentication. For example, for email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell label: cURL - source: curl -X POST '{backend_url}/auth/customer/{auth_provider}/register' + source: |- + curl -X POST '{backend_url}/auth/customer/emailpass/register' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "email": "customer@gmail.com", + "password": "supersecret" + }' tags: - Auth responses: @@ -338,6 +392,42 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /auth/token/refresh: + post: + operationId: PostAdminAuthTokenRefresh + summary: Refresh Authentication Token + description: Refresh the authentication token of a customer. This is useful after authenticating a customer with a third-party service to ensure the token holds the new user's details, or when you don't want customers to re-login every day. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. + x-authenticated: true + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/auth/token/refresh' \ + -H 'Authorization: Bearer {token}' + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthResponse' + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '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' /store/carts: post: operationId: PostCarts @@ -366,14 +456,14 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/CreateCartWorkflowInput' + - $ref: '#/components/schemas/StoreCreateCart' - type: object - description: SUMMARY + description: The cart's details. properties: additional_data: type: object description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. - description: SUMMARY + description: The cart's details. x-codeSamples: - lang: Shell label: cURL @@ -457,7 +547,7 @@ paths: post: operationId: PostCartsId summary: Update a Cart - description: Update a cart's details. + description: Update a cart's details. This unsets the shipping an payment methods chosen before, and the customer would have to choose them again. x-authenticated: false parameters: - name: id @@ -489,12 +579,12 @@ paths: allOf: - $ref: '#/components/schemas/UpdateCartData' - type: object - description: SUMMARY + description: The properties to update in the cart item. properties: additional_data: type: object description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. - description: SUMMARY + description: The properties to update in the cart item. x-codeSamples: - lang: Shell label: cURL @@ -508,7 +598,7 @@ paths: application/json: schema: type: object - description: SUMMARY + description: The updated cart's details. required: - cart properties: @@ -530,9 +620,12 @@ paths: /store/carts/{id}/complete: post: operationId: PostCartsIdComplete - summary: Add Completes to Cart - description: Add a list of completes to a cart. + summary: Complete Cart + description: Complete a cart and place an order. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/complete-cart + description: 'Storefront guide: How to implement cart completion during checkout.' parameters: - name: id in: path @@ -556,17 +649,6 @@ paths: 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. - requestBody: - content: - application/json: - schema: - type: object - description: SUMMARY - properties: - idempotency_key: - type: string - title: idempotency_key - description: The cart's idempotency key. x-codeSamples: - lang: Shell label: cURL @@ -581,7 +663,20 @@ paths: schema: oneOf: - type: object - description: SUMMARY + description: The created order's details. + required: + - type + - order + properties: + type: + type: string + title: type + description: The type of the returned object. + default: order + order: + $ref: '#/components/schemas/StoreOrder' + - type: object + description: The details of why the cart completion failed. required: - type - cart @@ -590,12 +685,13 @@ paths: type: type: string title: type - description: The cart's type. + description: The type of the returned object. + default: cart cart: $ref: '#/components/schemas/StoreCart' error: type: object - description: The cart's error. + description: The error's details. required: - message - name @@ -612,19 +708,8 @@ paths: type: type: string title: type - description: The error's type. - - type: object - description: SUMMARY - required: - - type - - order - properties: - type: - type: string - title: type - description: The cart's type. - order: - $ref: '#/components/schemas/StoreOrder' + description: | + The error's type. Can be a [MedusaError type](https://docs.medusajs.com/v2/advanced-development/api-routes/errors#medusaerror-types) or `payment_authorization_error` or `payment_requires_more_error` for payment-related errors. '400': $ref: '#/components/responses/400_error' '401': @@ -641,8 +726,12 @@ paths: /store/carts/{id}/line-items: post: operationId: PostCartsIdLineItems - summary: Add Line Items to Cart - description: Add a list of line items to a cart. + summary: Add Line Item to Cart + x-sidebar-summary: Add Line Item + description: Add a product variant as a line item in the cart. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#add-product-variant-to-cart + description: 'Storefront guide: How to add a product variant to the cart.' x-authenticated: false parameters: - name: id @@ -708,8 +797,12 @@ paths: /store/carts/{id}/line-items/{line_id}: post: operationId: PostCartsIdLineItemsLine_id - summary: Add Line Items to Cart - description: Add a list of line items to a cart. + summary: Update a Line Item in a Cart + x-sidebar-summary: Update Line Item + description: Update a line item's details in the cart. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#update-line-item-in-cart + description: 'Storefront guide: How to update a cart''s line item.' x-authenticated: false parameters: - name: id @@ -720,7 +813,7 @@ paths: type: string - name: line_id in: path - description: The cart's line id. + description: The line item's ID. required: true schema: type: string @@ -779,8 +872,12 @@ paths: x-workflow: updateLineItemInCartWorkflow delete: operationId: DeleteCartsIdLineItemsLine_id - summary: Remove Line Items from Cart - description: Remove a list of line items from a cart. This doesn't delete the Line Item, only the association between the Line Item and the cart. + summary: Remove Line Item from Cart + x-sidebar-summary: Remove Line Item + description: Remove a line item from a cart. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#remove-line-item-from-cart + description: 'Storefront guide: How to remove line item from cart.' x-authenticated: false parameters: - name: id @@ -791,7 +888,7 @@ paths: type: string - name: line_id in: path - description: The cart's line id. + description: The line item's ID. required: true schema: type: string @@ -825,7 +922,7 @@ paths: schema: allOf: - type: object - description: SUMMARY + description: The deletion's details. required: - id - object @@ -834,21 +931,23 @@ paths: id: type: string title: id - description: The cart's ID. + description: The ID of the deleted line item. object: type: string title: object description: The name of the deleted object. + default: line-item deleted: type: boolean title: deleted - description: Whether the Cart was deleted. + description: Whether the item was deleted. - type: object - description: SUMMARY + description: The deletion's details. properties: parent: $ref: '#/components/schemas/StoreCart' - description: SUMMARY + description: The cart that the item belonged to. + description: The deletion's details. '400': $ref: '#/components/responses/400_error' '401': @@ -866,6 +965,7 @@ paths: post: operationId: PostCartsIdPromotions summary: Add Promotions to Cart + x-sidebar-summary: Add Promotions description: Add a list of promotions to a cart. x-authenticated: false parameters: @@ -896,17 +996,17 @@ paths: application/json: schema: type: object - description: SUMMARY + description: The promotion's details. required: - promo_codes properties: promo_codes: type: array - description: The cart's promo codes. + description: Promotion codes to add to the cart. items: type: string title: promo_codes - description: The promo code's promo codes. + description: A promotion code. x-codeSamples: - lang: Shell label: cURL @@ -943,7 +1043,7 @@ paths: delete: operationId: DeleteCartsIdPromotions summary: Remove Promotions from Cart - description: Remove a list of promotions from a cart. This doesn't delete the Promotion, only the association between the Promotion and the cart. + description: Remove a list of promotions from a cart. x-authenticated: false parameters: - name: id @@ -981,7 +1081,7 @@ paths: application/json: schema: type: object - description: SUMMARY + description: The cart's details. required: - cart properties: @@ -1003,8 +1103,12 @@ paths: /store/carts/{id}/shipping-methods: post: operationId: PostCartsIdShippingMethods - summary: Add Shipping Methods to Cart - description: Add a list of shipping methods to a cart. + summary: Add Shipping Method to Cart + x-sidebar-summary: Add Shipping Method + description: Add a shipping method to a cart. Use this API route when the customer chooses their preferred shipping option. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping + description: 'Storefront guide: How to implement shipping during checkout.' x-authenticated: false parameters: - name: id @@ -1034,17 +1138,20 @@ paths: application/json: schema: type: object - description: SUMMARY + description: The shipping method's details. required: - option_id properties: option_id: type: string title: option_id - description: The cart's option id. + description: The ID of the shipping option this method is created from. data: type: object - description: The cart's data. + description: Any additional data relevant for the third-party fulfillment provider to process the shipment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter + description: Learn more about the `data` parameter. x-codeSamples: - lang: Shell label: cURL @@ -1079,8 +1186,9 @@ paths: /store/carts/{id}/taxes: post: operationId: PostCartsIdTaxes - summary: Add Taxes to Cart - description: Add a list of taxes to a cart. + summary: Calculate Cart Taxes + x-sidebar-summary: Calculate Taxes + description: Calculate the cart's tax lines and amounts. x-authenticated: false parameters: - name: id @@ -1140,8 +1248,11 @@ paths: get: operationId: GetCollections summary: List Collections - description: Retrieve a list of collections. The collections can be filtered by fields such as `id`. The collections can also be sorted or paginated. + description: Retrieve a list of collections. The collections can be filtered by fields such as `handle`. The collections can also be sorted or paginated. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list + description: 'Storefront guide: How to retrieve a list of collections.' parameters: - name: expand in: query @@ -1185,11 +1296,11 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: deleted_at in: query - description: The collection's deleted at. + description: Filter by the collection's deletion date. required: false schema: type: object - description: The collection's deleted at. + description: Filter by the collection's deletion date. properties: $and: type: array @@ -1421,20 +1532,20 @@ paths: oneOf: - type: string title: title - description: The collection's title. + description: Filter by a collection's title. - type: array - description: The collection's title. + description: Filter by collection titles. items: type: string title: title - description: The title's details. + description: A title. - name: created_at in: query - description: The collection's created at. + description: Filter by the collection's creation date. required: false schema: type: object - description: The collection's created at. + description: Filter by the collection's creation date. properties: $and: type: array @@ -1454,11 +1565,11 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -1469,19 +1580,19 @@ paths: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: @@ -1503,42 +1614,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -1577,31 +1688,31 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -1640,32 +1751,32 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - name: updated_at in: query - description: The collection's updated at. + description: Filter by the collection's update date. required: false schema: type: object - description: The collection's updated at. + description: Filter by the collection's update date. properties: $and: type: array @@ -1685,11 +1796,11 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -1700,19 +1811,19 @@ paths: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: @@ -1734,42 +1845,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -1808,31 +1919,31 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -1871,21 +1982,21 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -1897,21 +2008,21 @@ paths: oneOf: - type: string title: handle - description: The collection's handle. + description: Filter by a collection's handle. - type: array - description: The collection's handle. + description: Filter by collection handles. items: type: string title: handle - description: The handle's details. + description: A handle. - name: q in: query - description: The collection's q. + description: Search term to filter the collection's searchable properties. required: false schema: type: string title: q - description: The collection's q. + description: Search term to filter the collection's searchable properties. - name: $and in: query description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. @@ -1992,6 +2103,9 @@ paths: summary: Get a Collection description: Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/collections/retrieve + description: 'Storefront guide: How to retrieve a collection.' parameters: - name: id in: path @@ -2044,7 +2158,7 @@ paths: get: operationId: GetCurrencies summary: List Currencies - description: Retrieve a list of currencies. The currencies can be filtered by fields such as `id`. The currencies can also be sorted or paginated. + description: Retrieve a list of currencies. The currencies can be filtered by fields such as `code`. The currencies can also be sorted or paginated. x-authenticated: false parameters: - name: expand @@ -2089,12 +2203,12 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: q in: query - description: The currency's q. + description: Search term to filter the currency's searchable properties. required: false schema: type: string title: q - description: The currency's q. + description: Search term to filter the currency's searchable properties. - name: code in: query required: false @@ -2102,13 +2216,13 @@ paths: oneOf: - type: string title: code - description: The currency's code. + description: Filter by a currency code. - type: array - description: The currency's code. + description: Filter by currency codes. items: type: string title: code - description: The code's details. + description: A currency code. - name: $and in: query description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. @@ -2158,7 +2272,7 @@ paths: get: operationId: GetCurrenciesCode summary: Get a Currency - description: Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned. + description: Retrieve a currency by its code. You can expand the currency's relations or select the fields that should be returned. x-authenticated: false parameters: - name: code @@ -2211,9 +2325,12 @@ paths: /store/customers: post: operationId: PostCustomers - summary: Create Customer - description: Create a customer. - x-authenticated: false + summary: Register Customer + description: Register a customer. Use the `/auth/customer/emailpass/register` API route first to retrieve the registration token and pass it in the header of the request. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/customers/register + description: 'Storefront guide: How to register a customer.' + x-authenticated: true parameters: - name: expand in: query @@ -2241,6 +2358,7 @@ paths: label: cURL source: |- curl -X POST '{backend_url}/store/customers' \ + -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{ "email": "Monserrate.Leannon88@yahoo.com", @@ -2274,9 +2392,13 @@ paths: /store/customers/me: get: operationId: GetCustomersMe - summary: List Customers - description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. + summary: Get Logged-in Customer + x-sidebar-summary: Get Customer + description: Retrieve the logged-in customer. You can expand the customer's relations or select the fields that should be returned. x-authenticated: true + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/customers/retrieve + description: 'Storefront guide: How to retrieve the logged-in customer.' parameters: - name: expand in: query @@ -2326,8 +2448,11 @@ paths: $ref: '#/components/responses/500_error' post: operationId: PostCustomersMe - summary: Create Customer - description: Create a customer. + summary: Update Customer + description: Update the logged-in customer's details. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/customers/profile + description: 'Storefront guide: How to edit a customer''s profile.' x-authenticated: true parameters: - name: expand @@ -2392,9 +2517,13 @@ paths: /store/customers/me/addresses: get: operationId: GetCustomersMeAddresses - summary: List Customers - description: Retrieve a list of customers. The customers can be filtered by fields such as `id`. The customers can also be sorted or paginated. + summary: List Customer's Addresses + x-sidebary-summary: List Addresses + description: Retrieve the addresses of the logged-in customer. The addresses can be filtered by fields such as `country_code`. The addresses can also be sorted or paginated. x-authenticated: true + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#list-customer-addresses + description: 'Storefront guide: How to retrieve the logged-in customer''s addresses.' parameters: - name: expand in: query @@ -2438,57 +2567,36 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: city in: query - description: The customer's city. - required: false + description: Filter by the address's city. + required: true schema: - oneOf: - - type: string - title: city - description: The customer's city. - - type: array - description: The customer's city. - items: - type: string - title: city - description: The city's details. - - name: country_code + type: string + title: city + description: Filter by the address's city. + - name: postal_code in: query - description: The customer's country code. - required: false + description: Filter by the address's postal code. + required: true schema: - oneOf: - - type: string - title: country_code - description: The customer's country code. - - type: array - description: The customer's country code. - items: - type: string - title: country_code - description: The country code's details. - - name: postal_code + type: string + title: postal_code + description: Filter by the address's postal code. + - name: country_code in: query - description: The customer's postal code. - required: false + description: Filter by the address's country code. + required: true schema: - oneOf: - - type: string - title: postal_code - description: The customer's postal code. - - type: array - description: The customer's postal code. - items: - type: string - title: postal_code - description: The postal code's details. + type: string + title: country_code + description: Filter by the address's country code. - name: q in: query - description: The customer's q. - required: false + description: Search term to filter the address's searchable properties. + required: true schema: type: string title: q - description: The customer's q. + description: Search term to filter the address's searchable properties. security: - cookie_auth: [] - jwt_token: [] @@ -2521,8 +2629,12 @@ paths: $ref: '#/components/responses/500_error' post: operationId: PostCustomersMeAddresses - summary: Create Customer - description: Create a customer. + summary: Create Address for Logged-In Customer + x-sidebar-summary: Create Address + description: Create an address for the logged-in customer. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#add-customer-address + description: 'Storefront guide: How to create an address for the logged-in customer.' x-authenticated: true parameters: - name: expand @@ -2549,11 +2661,8 @@ paths: application/json: schema: type: object - description: SUMMARY + description: The address's details. properties: - metadata: - type: object - description: The customer's metadata. first_name: type: string title: first_name @@ -2569,43 +2678,46 @@ paths: company: type: string title: company - description: The customer's company. + description: The address's company. address_1: type: string title: address_1 - description: The customer's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The customer's address 2. + description: The address's second line. city: type: string title: city - description: The customer's city. + description: The address's city. country_code: type: string title: country_code - description: The customer's country code. + description: The address's country code. province: type: string title: province - description: The customer's province. + description: The address's province. postal_code: type: string title: postal_code - description: The customer's postal code. + description: The address's postal code. address_name: type: string title: address_name - description: The customer's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The customer's is default shipping. + description: Whether the address is used by default for shipping during checkout. is_default_billing: type: boolean title: is_default_billing - description: The customer's is default billing. + description: Whether the address is used by default for billing during checkout. + metadata: + type: object + description: Holds custom key-value pairs. x-codeSamples: - lang: Shell label: cURL @@ -2652,13 +2764,14 @@ paths: /store/customers/me/addresses/{address_id}: get: operationId: GetCustomersMeAddressesAddress_id - summary: List Addresses - description: Retrieve a list of addresses in a customer. The addresses can be filtered by fields like FILTER FIELDS. The addresses can also be paginated. + summary: Get Customer's Address + x-sidebar-summary: Get Address + description: Retrieve an address of the logged-in customer. You can expand the address's relations or select the fields that should be returned. x-authenticated: true parameters: - name: address_id in: path - description: The customer's address id. + description: The address's ID. required: true schema: type: string @@ -2710,13 +2823,17 @@ paths: $ref: '#/components/responses/500_error' post: operationId: PostCustomersMeAddressesAddress_id - summary: Add Addresses to Customer - description: Add a list of addresses to a customer. + summary: Update Customer's Address + x-sidebar-summary: Update Address + description: Update the logged-in customer's address. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#edit-an-address + description: 'Storefront guide: How to update an address of the logged-in customer.' x-authenticated: true parameters: - name: address_id in: path - description: The customer's address id. + description: The address's ID. required: true schema: type: string @@ -2744,11 +2861,8 @@ paths: application/json: schema: type: object - description: SUMMARY + description: The properties to update in the address. properties: - metadata: - type: object - description: The customer's metadata. first_name: type: string title: first_name @@ -2764,43 +2878,46 @@ paths: company: type: string title: company - description: The customer's company. + description: The address's company. address_1: type: string title: address_1 - description: The customer's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The customer's address 2. + description: The address's second line. city: type: string title: city - description: The customer's city. + description: The address's city. country_code: type: string title: country_code - description: The customer's country code. + description: The address's country code. province: type: string title: province - description: The customer's province. + description: The address's province. postal_code: type: string title: postal_code - description: The customer's postal code. + description: The address's postal code. address_name: type: string title: address_name - description: The customer's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The customer's is default shipping. + description: Whether the address is used by default for shipping during checkout. is_default_billing: type: boolean title: is_default_billing - description: The customer's is default billing. + description: Whether the address is used by default for billing during checkout. + metadata: + type: object + description: Holds custom key-value pairs. x-codeSamples: - lang: Shell label: cURL @@ -2809,18 +2926,7 @@ paths: -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ --data-raw '{ - "metadata": {}, "first_name": "{value}", - "last_name": "{value}", - "phone": "{value}", - "company": "{value}", - "address_1": "{value}", - "address_2": "{value}", - "city": "{value}", - "country_code": "{value}", - "province": "{value}", - "postal_code": "{value}", - "address_name": "{value}" }' tags: - Customers @@ -2846,13 +2952,17 @@ paths: x-workflow: updateCustomerAddressesWorkflow delete: operationId: DeleteCustomersMeAddressesAddress_id - summary: Remove Addresses from Customer - description: Remove a list of addresses from a customer. This doesn't delete the Address, only the association between the Address and the customer. + summary: Remove Customer's Address + x-sidebar-summary: Remove Address + description: Remove an address of the logged-in customer. x-authenticated: true + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#delete-customer-address + description: 'Storefront guide: How to delete a customer''s address.' parameters: - name: address_id in: path - description: The customer's address id. + description: The address's ID. required: true schema: type: string @@ -2891,7 +3001,7 @@ paths: schema: allOf: - type: object - description: SUMMARY + description: The deletion's details. required: - id - object @@ -2900,21 +3010,23 @@ paths: id: type: string title: id - description: The customer's ID. + description: The address's ID. object: type: string title: object description: The name of the deleted object. + default: address deleted: type: boolean title: deleted - description: Whether the Customer was deleted. + description: Whether the address was deleted. - type: object - description: SUMMARY + description: The deletion's details. properties: parent: $ref: '#/components/schemas/StoreCustomer' - description: SUMMARY + description: The details of the customer the address belongs to. + description: The deletion's details. '400': $ref: '#/components/responses/400_error' '401': @@ -2931,8 +3043,9 @@ paths: /store/orders: get: operationId: GetOrders - summary: List Orders - description: Retrieve a list of orders. The orders can be filtered by fields such as `id`. The orders can also be sorted or paginated. + summary: List Logged-in Customer's Orders + x-sidebar-summary: List Orders + description: Retrieve the orders of the logged-in customer. The orders can be filtered by fields such as `id`. The orders can also be sorted or paginated. x-authenticated: true parameters: - name: expand @@ -2982,13 +3095,13 @@ paths: oneOf: - type: string title: id - description: The order's ID. + description: Filter by an order ID. - type: array - description: The order's ID. + description: Filter by order IDs. items: type: string title: id - description: The id's ID. + description: An order ID. - name: $and in: query required: false @@ -3102,8 +3215,8 @@ paths: /store/orders/{id}: get: operationId: GetOrdersId - summary: Get a Order - description: Retrieve a order by its ID. You can expand the order's relations or select the fields that should be returned. + summary: Get an Order + description: Retrieve an order by its ID. You can expand the order's relations or select the fields that should be returned. x-authenticated: false parameters: - name: id @@ -3157,7 +3270,10 @@ paths: post: operationId: PostPaymentCollections summary: Create Payment Collection - description: Create a payment collection. + description: Create a payment collection for a cart. This is used during checkout, where the payment collection holds the cart's payment sessions. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment + description: 'Storefront guide: How to implement payment during checkout.' x-authenticated: false parameters: - name: expand @@ -3218,8 +3334,12 @@ paths: /store/payment-collections/{id}/payment-sessions: post: operationId: PostPaymentCollectionsIdPaymentSessions - summary: Add Payment Sessions to Payment Collection - description: Add a list of payment sessions to a payment collection. + summary: Initialize Payment Session of a Payment Collection + x-sidebar-summary: Initialize Payment Session + description: Initialize and add a payment session to a payment collection. This is used during checkout, where you create a payment collection for the cart, then initialize a payment session for the payment provider that the customer chooses. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment + description: 'Storefront guide: How to implement payment during checkout.' x-authenticated: false parameters: - name: id @@ -3249,20 +3369,24 @@ paths: application/json: schema: type: object - description: SUMMARY + description: The payment session's details. required: - provider_id properties: provider_id: type: string title: provider_id - description: The payment collection's provider id. + description: The ID of the payment provider the customer chose. + example: pp_stripe_stripe context: type: object - description: The payment collection's context. + description: The payment's context, such as the customer or address details. If the customer is logged-in, the customer `id` is set in the context under a `customer.id` property. data: type: object - description: The payment collection's data. + description: Any data necessary for the payment provider to process the payment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-session#data-property + description: Learn more about the payment session's data property x-codeSamples: - lang: Shell label: cURL @@ -3298,8 +3422,11 @@ paths: get: operationId: GetPaymentProviders summary: List Payment Providers - description: Retrieve a list of payment providers. The payment providers can be filtered by fields such as `id`. The payment providers can also be sorted or paginated. + description: Retrieve a list of payment providers. You must provide the `region_id` query parameter to retrieve the payment providers enabled in that region. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment + description: 'Storefront guide: How to implement payment during checkout.' parameters: - name: expand in: query @@ -3343,12 +3470,12 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: region_id in: query - description: The payment provider's region id. + description: Filter by a region ID to get the payment providers enabled in that region. required: true schema: type: string title: region_id - description: The payment provider's region id. + description: Filter by a region ID. x-codeSamples: - lang: Shell label: cURL @@ -3363,7 +3490,7 @@ paths: schema: allOf: - type: object - description: SUMMARY + description: The list of payment providers. required: - limit - offset @@ -3372,23 +3499,23 @@ paths: limit: type: number title: limit - description: The payment provider's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The payment provider's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The payment provider's count. + description: The total number of items. - type: object - description: SUMMARY + description: The list of payment providers. required: - payment_providers properties: payment_providers: type: array - description: The payment provider's payment providers. + description: The list of payment providers. items: $ref: '#/components/schemas/StorePaymentProvider' '400': @@ -3409,6 +3536,9 @@ paths: summary: List Product Categories description: Retrieve a list of product categories. The product categories can be filtered by fields such as `id`. The product categories can also be sorted or paginated. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list + description: 'Storefront guide: How to retrieve a list of product categories.' parameters: - name: expand in: query @@ -3452,12 +3582,12 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: q in: query - description: The product category's q. + description: Search term to filter the product category's properties. required: false schema: type: string title: q - description: The product category's q. + description: Search term to filter the product category's properties. - name: id in: query required: false @@ -3465,13 +3595,13 @@ paths: oneOf: - type: string title: id - description: The product category's ID. + description: Filter by a product category's ID. - type: array - description: The product category's ID. + description: Filter by product category IDs. items: type: string title: id - description: The id's ID. + description: A product category ID. - name: description in: query required: false @@ -3479,13 +3609,13 @@ paths: oneOf: - type: string title: description - description: The product category's description. + description: Filter by a description. This only matches categories with the exact description. To search by a term or keyword, use the `q` query parameter instead. - type: array - description: The product category's description. + description: Filter by descriptions. This only matches categories that have one of the provided descriptions. To search by a term or keyword, use the `q` query parameter instead. items: type: string title: description - description: The description's details. + description: A description. - name: handle in: query required: false @@ -3493,13 +3623,13 @@ paths: oneOf: - type: string title: handle - description: The product category's handle. + description: Filter by a category's handle. - type: array - description: The product category's handle. + description: Filter by category handles. items: type: string title: handle - description: The handle's details. + description: A handle. - name: parent_category_id in: query required: false @@ -3507,36 +3637,36 @@ paths: oneOf: - type: string title: parent_category_id - description: The product category's parent category id. + description: The ID of a category to retrieve its child categories. - type: array - description: The product category's parent category id. + description: The ID of categories to retrieve their child categories. items: type: string title: parent_category_id - description: The parent category id's details. + description: A product category's ID. - name: include_ancestors_tree in: query - description: The product category's include ancestors tree. + description: Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property. required: false schema: type: boolean title: include_ancestors_tree - description: The product category's include ancestors tree. + description: Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property. - name: include_descendants_tree in: query - description: The product category's include descendants tree. + description: Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property. required: false schema: type: boolean title: include_descendants_tree - description: The product category's include descendants tree. + description: Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property. - name: created_at in: query - description: The product category's created at. + description: Filter by the category's creation date. required: false schema: type: object - description: The product category's created at. + description: Filter by the category's creation date. properties: $and: type: array @@ -3556,11 +3686,11 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -3571,19 +3701,19 @@ paths: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: @@ -3605,42 +3735,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -3679,31 +3809,31 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -3742,32 +3872,32 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - name: updated_at in: query - description: The product category's updated at. + description: Filter by the category's update date. required: false schema: type: object - description: The product category's updated at. + description: Filter by the category's update date. properties: $and: type: array @@ -3787,11 +3917,11 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -3802,19 +3932,19 @@ paths: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: @@ -3836,42 +3966,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -3910,31 +4040,31 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -3973,32 +4103,32 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - name: deleted_at in: query - description: The product category's deleted at. + description: Filter by the category's deletion date. required: false schema: type: object - description: The product category's deleted at. + description: Filter by the category's deletion date. properties: $and: type: array @@ -4018,11 +4148,11 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -4033,19 +4163,19 @@ paths: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: @@ -4067,42 +4197,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -4141,31 +4271,31 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -4204,21 +4334,21 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -4228,7 +4358,7 @@ paths: required: false schema: type: array - description: The product category's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object title: $and @@ -4248,13 +4378,13 @@ paths: oneOf: - type: string title: name - description: The product category's name. + description: Filter by a product category name. - type: array - description: The product category's name. + description: Filter by product category names. items: type: string title: name - description: The name's details. + description: A product category name. x-codeSamples: - lang: Shell label: cURL @@ -4286,6 +4416,9 @@ paths: summary: Get a Product Category description: Retrieve a product category by its ID. You can expand the product category's relations or select the fields that should be returned. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/categories/retrieve + description: 'Storefront guide: How to retrieve a product category.' parameters: - name: id in: path @@ -4311,20 +4444,20 @@ paths: 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. - name: include_ancestors_tree in: query - description: The product category's include ancestors tree. + description: Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property. required: false schema: type: boolean title: include_ancestors_tree - description: The product category's include ancestors tree. + description: Whether to retrieve the category's parent. When enabled, the parent category is set in the `parent_category` property. - name: include_descendants_tree in: query - description: The product category's include descendants tree. + description: Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property. required: false schema: type: boolean title: include_descendants_tree - description: The product category's include descendants tree. + description: Whether to retrieve a list of child categories. When enabled, the parent categories are added to the `category_children` property. x-codeSamples: - lang: Shell label: cURL @@ -4356,6 +4489,9 @@ paths: summary: List Products description: Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/price + description: 'Storefront guide: How to retrieve a product variants'' prices.' parameters: - name: expand in: query @@ -4399,32 +4535,32 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: $and in: query + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. required: false schema: type: array - description: The product's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object - description: The $and's details. title: $and - name: $or in: query + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. required: false schema: type: array - description: The product's $or. + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. items: type: object - description: The $or's details. title: $or - name: q in: query - description: The product's q. + description: Search term to filter the product's searchable properties. required: false schema: type: string title: q - description: The product's q. + description: Search term to filter the product's searchable properties. - name: id in: query required: false @@ -4432,132 +4568,160 @@ paths: oneOf: - type: string title: id - description: The product's ID. + description: Filter by a product ID. - type: array - description: The product's ID. + description: Filter by product IDs. items: type: string title: id - description: The id's ID. + description: A product ID. - name: title in: query - description: The product's title. + description: Filter by product titles. required: false schema: oneOf: - type: string title: title - description: The product's title. + description: Filter by a title. - type: array - description: The product's title. + description: Filter by titles. items: type: string title: title - description: The title's details. + description: A title. - name: handle in: query - description: The product's handle. + description: Filter by product handles. required: false schema: oneOf: - type: string title: handle - description: The product's handle. + description: Filter by a product handle. - type: array - description: The product's handle. + description: Filter by product handles. items: type: string title: handle - description: The handle's details. + description: A product handle. - name: is_giftcard in: query - description: The product's is giftcard. + description: Whether the product is a gift card. required: false schema: type: boolean title: is_giftcard - description: The product's is giftcard. + description: Whether the product is a gift card. - name: collection_id in: query - description: The product's collection id. + description: Filter by a collection's ID to retrieve the products in it. required: false schema: - description: The product's collection id. + description: Filter by a collection's ID to retrieve the products in it. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/collections/products + description: 'Storefront guide: Retrieve a collection''s products.' items: type: string title: collection_id - description: The collection id's details. + description: A collection's ID. + - name: tag_id + in: query + description: Filter by a tag's ID to retrieve the products in it. + required: false + schema: + oneOf: + - type: string + title: tag_id + description: Filter by a product tag's ID. + - type: array + description: Filter by product tag IDs. + items: + type: string + title: tag_id + description: A product tag ID. - name: type_id in: query - description: The product's type id. + description: Filter by a type's ID to retrieve the products in it. required: false schema: - description: The product's type id. - items: - type: string - title: type_id - description: The type id's details. + oneOf: + - type: string + title: type_id + description: Filter by a product type's ID. + - type: array + description: Filter by product type IDs. + items: + type: string + title: type_id + description: A product type ID. - name: created_at in: query - description: The product's created at. + description: Filter by the product's creation date. required: false schema: type: object - description: The product's created at. + description: Filter by the product's creation date. properties: $and: type: array - description: The created at's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object + title: $and $or: type: array - description: The created at's $or. + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. items: type: object + title: $or $eq: oneOf: - type: string title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne + description: Filter by values not equal to this parameter. $in: type: array - description: The created at's $in. + description: Filter by values in this array. items: type: string title: $in + description: The value to match. $nin: type: array - description: The created at's $nin. + description: Filter by values not in this array. items: type: string title: $nin + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: $and: type: array - description: The $not's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object title: $and $or: type: array - description: The $not's $or. + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. items: type: object title: $or @@ -4567,42 +4731,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -4641,145 +4805,154 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt + description: Filter by values greater than this parameter. Useful for numbers and dates only. $gte: type: string title: $gte + description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. $lt: type: string title: $lt + description: Filter by values less than this parameter. Useful for numbers and dates only. $lte: type: string title: $lte + description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. $like: type: string title: $like - description: The created at's $like. + description: Apply a `like` filter. Useful for strings only. $re: type: string title: $re - description: The created at's $re. + description: Apply a regex filter. Useful for strings only. $ilike: type: string title: $ilike - description: The created at's $ilike. + description: Apply a case-insensitive `like` filter. Useful for strings only. $fulltext: type: string title: $fulltext - description: The created at's $fulltext. + description: Filter to apply on full-text properties. $overlap: type: array - description: The created at's $overlap. + description: Filter arrays that have overlapping values with this parameter. items: type: string title: $overlap - description: The $overlap's details. + description: The values to match. $contains: type: array - description: The created at's $contains. + description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: The $contain's $contains. + description: The values to match. $contained: type: array - description: The created at's $contained. + description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: The $contained's details. + description: The values to match. $exists: type: boolean title: $exists - description: The created at's $exists. + description: Filter by whether a value for this parameter exists (not `null`). - name: updated_at in: query - description: The product's updated at. + description: Filter by the product's update date. required: false schema: type: object - description: The product's updated at. + description: Filter by the product's update date. properties: $and: type: array - description: The updated at's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object + title: $and $or: type: array - description: The updated at's $or. + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. items: type: object + title: $or $eq: oneOf: - type: string title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne + description: Filter by values not equal to this parameter. $in: type: array - description: The updated at's $in. + description: Filter by values in this array. items: type: string title: $in + description: The value to match. $nin: type: array - description: The updated at's $nin. + description: Filter by values not in this array. items: type: string title: $nin + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: $and: type: array - description: The $not's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object title: $and $or: type: array - description: The $not's $or. + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. items: type: object title: $or @@ -4789,42 +4962,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -4863,145 +5036,154 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt + description: Filter by values greater than this parameter. Useful for numbers and dates only. $gte: type: string title: $gte + description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. $lt: type: string title: $lt + description: Filter by values less than this parameter. Useful for numbers and dates only. $lte: type: string title: $lte + description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. $like: type: string title: $like - description: The updated at's $like. + description: Apply a `like` filter. Useful for strings only. $re: type: string title: $re - description: The updated at's $re. + description: Apply a regex filter. Useful for strings only. $ilike: type: string title: $ilike - description: The updated at's $ilike. + description: Apply a case-insensitive `like` filter. Useful for strings only. $fulltext: type: string title: $fulltext - description: The updated at's $fulltext. + description: Filter to apply on full-text properties. $overlap: type: array - description: The updated at's $overlap. + description: Filter arrays that have overlapping values with this parameter. items: type: string title: $overlap - description: The $overlap's details. + description: The values to match. $contains: type: array - description: The updated at's $contains. + description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: The $contain's $contains. + description: The values to match. $contained: type: array - description: The updated at's $contained. + description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: The $contained's details. + description: The values to match. $exists: type: boolean title: $exists - description: The updated at's $exists. + description: Filter by whether a value for this parameter exists (not `null`). - name: deleted_at in: query - description: The product's deleted at. + description: Filter by the product's date date. required: false schema: type: object - description: The product's deleted at. + description: Filter by the product's date date. properties: $and: type: array - description: The deleted at's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object + title: $and $or: type: array - description: The deleted at's $or. + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. items: type: object + title: $or $eq: oneOf: - type: string title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne + description: Filter by values not equal to this parameter. $in: type: array - description: The deleted at's $in. + description: Filter by values in this array. items: type: string title: $in + description: The value to match. $nin: type: array - description: The deleted at's $nin. + description: Filter by values not in this array. items: type: string title: $nin + description: The value not to match. $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter. - type: object description: Filter by values not matching the conditions in this parameter. properties: $and: type: array - description: The $not's $and. + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. items: type: object title: $and $or: type: array - description: The $not's $or. + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. items: type: object title: $or @@ -5011,42 +5193,42 @@ paths: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching this parameter - type: object description: Filter by values not matching the conditions in this parameter. - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching the values of this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt @@ -5085,108 +5267,123 @@ paths: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The value to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - type: array - description: Filter by values not matching the conditions in this parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: Filter by values not matching the conditions in this parameter. + description: The values to not match. $gt: type: string title: $gt + description: Filter by values greater than this parameter. Useful for numbers and dates only. $gte: type: string title: $gte + description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. $lt: type: string title: $lt + description: Filter by values less than this parameter. Useful for numbers and dates only. $lte: type: string title: $lte + description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. $like: type: string title: $like - description: The deleted at's $like. + description: Apply a `like` filter. Useful for strings only. $re: type: string title: $re - description: The deleted at's $re. + description: Apply a regex filter. Useful for strings only. $ilike: type: string title: $ilike - description: The deleted at's $ilike. + description: Apply a case-insensitive `like` filter. Useful for strings only. $fulltext: type: string title: $fulltext - description: The deleted at's $fulltext. + description: Filter to apply on full-text properties. $overlap: type: array - description: The deleted at's $overlap. + description: Filter arrays that have overlapping values with this parameter. items: type: string title: $overlap - description: The $overlap's details. + description: The values to match. $contains: type: array - description: The deleted at's $contains. + description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: The $contain's $contains. + description: The values to match. $contained: type: array - description: The deleted at's $contained. + description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: The $contained's details. + description: The values to match. $exists: type: boolean title: $exists - description: The deleted at's $exists. + description: Filter by whether a value for this parameter exists (not `null`). - name: region_id in: query - description: The product's region id. + description: The ID of the region the products are being viewed from. This is required if you're retrieving product variant prices with taxes. required: false schema: type: string title: region_id - description: The product's region id. - - name: currency_code + description: The ID of the region the products are being viewed from. This is required if you're retrieving product variant prices with taxes. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/price/examples/tax-price + description: 'Storefront guide: How to show product variants'' prices with taxes.' + - name: country_code in: query - description: The product's currency code. + description: The country code the products are being viewed from. This is required if you're retrieving product variant prices with taxes. required: false schema: type: string - title: currency_code - description: The product's currency code. + title: country_code + description: The country code the products are being viewed from. This is required if you're retrieving product variant prices with taxes. - name: province in: query - description: The product's province. + description: The province the products are being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes. required: false schema: type: string title: province - description: The product's province. + description: The province the products are being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes. + - name: cart_id + in: query + description: The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties. + required: false + schema: + type: string + title: cart_id + description: The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties. - name: sales_channel_id in: query required: false @@ -5194,13 +5391,13 @@ paths: oneOf: - type: string title: sales_channel_id - description: The product's sales channel id. + description: The ID of a sales channel to retrieve products in it. - type: array - description: The product's sales channel id. + description: The IDs of sales channels to retrieve products in them. items: type: string title: sales_channel_id - description: The sales channel id's details. + description: A sales channel's ID. - name: category_id in: query required: false @@ -5208,27 +5405,13 @@ paths: oneOf: - type: string title: category_id - description: The product's category id. + description: The ID of a product category to retrieve products in it. - type: array - description: The product's category id. + description: The ID of product categories to retrieve products in them. items: type: string title: category_id - description: The category id's details. - - name: tag_id - in: query - required: false - schema: - oneOf: - - type: string - title: tag_id - description: The product's tag id. - - type: array - description: The product's tag id. - items: - type: string - title: tag_id - description: The tag id's details. + description: A product category's ID. x-codeSamples: - lang: Shell label: cURL @@ -5243,7 +5426,7 @@ paths: schema: allOf: - type: object - description: SUMMARY + description: The paginated list of products. required: - limit - offset @@ -5252,23 +5435,23 @@ paths: limit: type: number title: limit - description: The product's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The product's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The product's count. + description: The total number of items. - type: object - description: SUMMARY + description: The paginated list of products. required: - products properties: products: type: array - description: The product's products. + description: The list of products. items: type: object '400': @@ -5289,6 +5472,9 @@ paths: summary: Get a Product description: Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/price + description: 'Storefront guide: How to retrieve a product variants'' prices.' parameters: - name: id in: path @@ -5314,36 +5500,39 @@ paths: 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. - name: region_id in: query - description: The product's region id. + description: The ID of the region the product is being viewed from. This is required if you're retrieving product variant prices with taxes. required: false schema: type: string title: region_id - description: The product's region id. + description: The ID of the region the product is being viewed from. This is required if you're retrieving product variant prices with taxes. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/products/price/examples/tax-price + description: 'Storefront guide: How to show product variants'' prices with taxes.' - name: country_code in: query - description: The product's country code. + description: The country code the product is being viewed from. This is required if you're retrieving product variant prices with taxes. required: false schema: type: string title: country_code - description: The product's country code. + description: The country code the product is being viewed from. This is required if you're retrieving product variant prices with taxes. - name: province in: query - description: The product's province. + description: The province the product is being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes. required: false schema: type: string title: province - description: The product's province. + description: The province the product is being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes. - name: cart_id in: query - description: The product's cart id. + description: The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties. required: false schema: type: string title: cart_id - description: The product's cart id. + description: The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties. x-codeSamples: - lang: Shell label: cURL @@ -5375,6 +5564,9 @@ paths: summary: List Regions description: Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/regions/list + description: 'Storefront guide: How to retrieve a list of regions.' parameters: - name: expand in: query @@ -5418,12 +5610,12 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: q in: query - description: The region's q. + description: Search term to filter the region's searchable properties. required: false schema: type: string title: q - description: The region's q. + description: Search term to filter the region's searchable properties. - name: id in: query required: false @@ -5431,422 +5623,13 @@ paths: oneOf: - type: string title: id - description: The region's ID. + description: Filter by a region's ID. - type: array - description: The region's ID. + description: Filter by region IDs. items: type: string title: id - description: The id's ID. - - type: object - description: The region's ID. - properties: - $and: - type: array - description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. - items: - type: object - title: $and - $or: - type: array - description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. - items: - type: object - title: $or - $eq: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - $ne: - oneOf: - - type: string - title: $ne - description: Filter by values not equal to this parameter. - - type: array - description: Filter by values not equal to this parameter. - items: - type: string - title: $ne - description: Filter by values not equal to this parameter. - $in: - type: array - description: Filter by values in this array. - items: - oneOf: - - type: string - title: $in - description: Filter by values in this array. - - type: array - description: Filter by values in this array. - items: - type: string - title: $in - description: Filter by values in this array. - $nin: - type: array - description: Filter by values not in this array. - items: - oneOf: - - type: string - title: $nin - description: Filter by values not in this array. - - type: array - description: Filter by values not in this array. - items: - type: string - title: $nin - description: Filter by values not in this array. - $not: - oneOf: - - type: string - title: $not - description: Filter by values not matching the conditions in this parameter. - - type: object - description: Filter by values not matching the conditions in this parameter. - properties: - $and: - type: array - description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. - items: - type: object - title: $and - $or: - type: array - description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. - items: - type: object - title: $or - $eq: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - $ne: - type: string - title: $ne - description: Filter by values not equal to this parameter. - $in: - type: array - description: Filter by values in this array. - items: - type: string - title: $in - description: Filter by values in this array. - $nin: - type: array - description: Filter by values not in this array. - items: - type: string - title: $nin - description: Filter by values not in this array. - $not: - oneOf: - - type: string - title: $not - description: Filter by values not matching the conditions in this parameter. - - type: object - description: Filter by values not matching the conditions in this parameter. - - type: array - description: Filter by values not matching the conditions in this parameter. - items: - type: string - title: $not - description: Filter by values not matching the conditions in this parameter. - $gt: - type: string - title: $gt - description: Filter by values greater than this parameter. Useful for numbers and dates only. - $gte: - type: string - title: $gte - description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. - $lt: - type: string - title: $lt - description: Filter by values less than this parameter. Useful for numbers and dates only. - $lte: - type: string - title: $lte - description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. - $like: - type: string - title: $like - description: Apply a `like` filter. Useful for strings only. - $re: - type: string - title: $re - description: Apply a regex filter. Useful for strings only. - $ilike: - type: string - title: $ilike - description: Apply a case-insensitive `like` filter. Useful for strings only. - $fulltext: - type: string - title: $fulltext - description: Filter to apply on full-text properties. - $overlap: - type: array - description: Filter arrays that have overlapping values with this parameter. - items: - type: string - title: $overlap - description: Filter arrays that have overlapping values with this parameter. - $contains: - type: array - description: Filter arrays that contain some of the values of this parameter. - items: - type: string - title: $contains - description: Filter arrays that contain some of the values of this parameter. - $contained: - type: array - description: Filter arrays that contain all values of this parameter. - items: - type: string - title: $contained - description: Filter arrays that contain all values of this parameter. - $exists: - type: boolean - title: $exists - description: Filter by whether a value for this parameter exists (not `null`). - - type: array - description: Filter by values not matching the conditions in this parameter. - items: - type: string - title: $not - description: Filter by values not matching the conditions in this parameter. - - type: array - description: Filter by values not matching the conditions in this parameter. - items: - oneOf: - - type: string - title: $not - description: Filter by values not matching the conditions in this parameter. - - type: object - description: Filter by values not matching the conditions in this parameter. - properties: - $and: - type: array - description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. - items: - type: object - title: $and - $or: - type: array - description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. - items: - type: object - title: $or - $eq: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - $ne: - type: string - title: $ne - description: Filter by values not equal to this parameter. - $in: - type: array - description: Filter by values in this array. - items: - type: string - title: $in - description: Filter by values in this array. - $nin: - type: array - description: Filter by values not in this array. - items: - type: string - title: $nin - description: Filter by values not in this array. - $not: - oneOf: - - type: string - title: $not - description: Filter by values not matching the conditions in this parameter. - - type: object - description: Filter by values not matching the conditions in this parameter. - - type: array - description: Filter by values not matching the conditions in this parameter. - items: - type: string - title: $not - description: Filter by values not matching the conditions in this parameter. - $gt: - type: string - title: $gt - description: Filter by values greater than this parameter. Useful for numbers and dates only. - $gte: - type: string - title: $gte - description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. - $lt: - type: string - title: $lt - description: Filter by values less than this parameter. Useful for numbers and dates only. - $lte: - type: string - title: $lte - description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. - $like: - type: string - title: $like - description: Apply a `like` filter. Useful for strings only. - $re: - type: string - title: $re - description: Apply a regex filter. Useful for strings only. - $ilike: - type: string - title: $ilike - description: Apply a case-insensitive `like` filter. Useful for strings only. - $fulltext: - type: string - title: $fulltext - description: Filter to apply on full-text properties. - $overlap: - type: array - description: Filter arrays that have overlapping values with this parameter. - items: - type: string - title: $overlap - description: Filter arrays that have overlapping values with this parameter. - $contains: - type: array - description: Filter arrays that contain some of the values of this parameter. - items: - type: string - title: $contains - description: Filter arrays that contain some of the values of this parameter. - $contained: - type: array - description: Filter arrays that contain all values of this parameter. - items: - type: string - title: $contained - description: Filter arrays that contain all values of this parameter. - $exists: - type: boolean - title: $exists - description: Filter by whether a value for this parameter exists (not `null`). - $gt: - oneOf: - - type: string - title: $gt - description: Filter by values greater than this parameter. Useful for numbers and dates only. - - type: array - description: Filter by values greater than this parameter. Useful for numbers and dates only. - items: - type: string - title: $gt - description: Filter by values greater than this parameter. Useful for numbers and dates only. - $gte: - oneOf: - - type: string - title: $gte - description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. - - type: array - description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. - items: - type: string - title: $gte - description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only. - $lt: - oneOf: - - type: string - title: $lt - description: Filter by values less than this parameter. Useful for numbers and dates only. - - type: array - description: Filter by values less than this parameter. Useful for numbers and dates only. - items: - type: string - title: $lt - description: Filter by values less than this parameter. Useful for numbers and dates only. - $lte: - oneOf: - - type: string - title: $lte - description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. - - type: array - description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. - items: - type: string - title: $lte - description: Filter by values less than or equal to this parameter. Useful for numbers and dates only. - $like: - type: string - title: $like - description: Apply a `like` filter. Useful for strings only. - $re: - type: string - title: $re - description: Apply a regex filter. Useful for strings only. - $ilike: - type: string - title: $ilike - description: Apply a case-insensitive `like` filter. Useful for strings only. - $fulltext: - type: string - title: $fulltext - description: Filter to apply on full-text properties. - $overlap: - type: array - description: Filter arrays that have overlapping values with this parameter. - items: - type: string - title: $overlap - description: Filter arrays that have overlapping values with this parameter. - $contains: - type: array - description: Filter arrays that contain some of the values of this parameter. - items: - type: string - title: $contains - description: Filter arrays that contain some of the values of this parameter. - $contained: - type: array - description: Filter arrays that contain all values of this parameter. - items: - type: string - title: $contained - description: Filter arrays that contain all values of this parameter. - $exists: - type: boolean - title: $exists - description: Filter by whether a value for this parameter exists (not `null`). + description: A region's ID. - name: name in: query required: false @@ -5854,13 +5637,27 @@ paths: oneOf: - type: string title: name - description: The region's name. + description: Filter by a region name. - type: array - description: The region's name. + description: Filter by region names. items: type: string title: name - description: The name's details. + description: A region's name. + - name: currency_code + in: query + required: false + schema: + oneOf: + - type: string + title: currency_code + description: Filter by a currency code to retrieve regions that use that code. + - type: array + description: Filter by currency codes to retrieve regions that use one of these codes. + items: + type: string + title: currency_code + description: A currency code. - name: $and in: query description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. @@ -5881,20 +5678,6 @@ paths: items: type: object title: $or - - name: currency_code - in: query - required: false - schema: - oneOf: - - type: string - title: currency_code - description: The region's currency code. - - type: array - description: The region's currency code. - items: - type: string - title: currency_code - description: The currency code's details. x-codeSamples: - lang: Shell label: cURL @@ -6013,7 +5796,7 @@ paths: post: operationId: PostReturn summary: Create Return - description: Create a return. + description: Create a return for an order's items. The admin receives the return and process it from their side. x-authenticated: false requestBody: content: @@ -6069,7 +5852,7 @@ paths: get: operationId: GetReturnReasons summary: List Return Reasons - description: Retrieve a list of return reasons. The return reasons can be filtered by fields such as `id`. The return reasons can also be sorted or paginated. + description: Retrieve a list of return reasons. The return reasons can be sorted or paginated. x-authenticated: false parameters: - name: expand @@ -6126,7 +5909,7 @@ paths: schema: allOf: - type: object - description: SUMMARY + description: The paginated list of return reasons. required: - limit - offset @@ -6135,23 +5918,23 @@ paths: limit: type: number title: limit - description: The return reason's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The return reason's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The return reason's count. + description: The total number of items. - type: object - description: SUMMARY + description: The paginated list of return reasons. required: - return_reasons properties: return_reasons: type: array - description: The return reason's return reasons. + description: The list of return reasons. items: $ref: '#/components/schemas/StoreReturnReason' '400': @@ -6223,8 +6006,14 @@ paths: /store/shipping-options: get: operationId: GetShippingOptions - summary: List Shipping Options - description: Retrieve a list of shipping options. The shipping options can be filtered by fields such as `id`. The shipping options can also be sorted or paginated. + summary: List Shipping Options for Cart + description: | + Retrieve a list of shipping options for a cart. The cart's ID is set in the required `cart_id` query parameter. + + The shipping options also be sorted or paginated. + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping + description: 'Storefront guide: How to implement shipping during checkout.' x-authenticated: false parameters: - name: fields @@ -6261,12 +6050,12 @@ paths: description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. - name: cart_id in: query - description: The shipping option's cart id. + description: The ID of the cart to retrieve its shipping options. required: true schema: type: string title: cart_id - description: The shipping option's cart id. + description: The ID of the cart to retrieve its shipping options. - name: $and in: query description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. @@ -6317,7 +6106,7 @@ components: schemas: AdminApiKey: type: object - description: The api key's details. + description: The API key's details. x-schemaName: AdminApiKey required: - id @@ -6342,43 +6131,44 @@ components: redacted: type: string title: redacted - description: The api key's redacted. + description: The redacted form of the API key's token. This is useful when showing portion of the token. + example: sk_...123 title: type: string title: title description: The api key's title. type: type: string - description: The api key's type. + description: The api key's type. `secret` is used for a user's API key, whereas `publishable` is used for Publishable API keys. enum: - secret - publishable last_used_at: type: string title: last_used_at - description: The api key's last used at. + description: The date and time the API key was last used. format: date-time created_by: type: string title: created_by - description: The api key's created by. + description: The ID of the user that created the API key, if available. created_at: type: string format: date-time title: created_at - description: The api key's created at. + description: The date and time the API key was created. revoked_by: type: string title: revoked_by - description: The api key's revoked by. + description: The ID of the user that revoked the API key, if available. revoked_at: type: string title: revoked_at - description: The api key's revoked at. + description: The date and time the API key was revoked. The API key is considered revoked when this property is set. format: date-time AdminApiKeyResponse: type: object - description: SUMMARY + description: The API key's details. x-schemaName: AdminApiKeyResponse required: - api_key @@ -6398,29 +6188,29 @@ components: description: The order's order id. AdminBatchProductRequest: type: object - description: SUMMARY + description: The products to create, update, or delete. x-schemaName: AdminBatchProductRequest properties: create: type: array - description: The product's create. + description: The products to create. items: $ref: '#/components/schemas/AdminCreateProduct' update: type: array - description: The product's update. + description: The products to update. items: $ref: '#/components/schemas/AdminUpdateProduct' delete: type: array - description: The product's delete. + description: The products to delete. items: type: string title: delete - description: The delete's details. + description: A product's ID. AdminBatchProductResponse: type: object - description: SUMMARY + description: The details of the products created, updated, or deleted. x-schemaName: AdminBatchProductResponse required: - created @@ -6429,17 +6219,17 @@ components: properties: created: type: array - description: The product's created. + description: The created products items: $ref: '#/components/schemas/AdminProduct' updated: type: array - description: The product's updated. + description: The updated products. items: $ref: '#/components/schemas/AdminProduct' deleted: type: object - description: SUMMARY + description: The deleted products' details. required: - ids - object @@ -6447,44 +6237,45 @@ components: properties: ids: type: array - description: The deleted's ids. + description: The IDs of deleted products. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted product. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: product deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the products were deleted. AdminBatchProductVariantRequest: type: object - description: SUMMARY + description: The product variants to create, update, or delete. x-schemaName: AdminBatchProductVariantRequest properties: create: type: array - description: The product's create. + description: The product variants to create. items: $ref: '#/components/schemas/AdminCreateProductVariant' update: type: array - description: The product's update. + description: The product variants to update. items: $ref: '#/components/schemas/AdminUpdateProductVariant' delete: type: array - description: The product's delete. + description: The product variants to delete. items: type: string title: delete - description: The delete's details. + description: A product variant's ID. AdminBatchProductVariantResponse: type: object - description: SUMMARY + description: The details of the product variants created, updated, or deleted. x-schemaName: AdminBatchProductVariantResponse required: - created @@ -6493,17 +6284,17 @@ components: properties: created: type: array - description: The product's created. + description: The created product variants. items: $ref: '#/components/schemas/AdminProductVariant' updated: type: array - description: The product's updated. + description: The updated product variants. items: $ref: '#/components/schemas/AdminProductVariant' deleted: type: object - description: SUMMARY + description: The details of the deleted product variants. required: - ids - object @@ -6511,19 +6302,20 @@ components: properties: ids: type: array - description: The deleted's ids. + description: The IDs of the deleted product variants. items: type: string title: ids - description: The id's ids. + description: The ID of a deleted variant. object: type: string title: object - description: SUMMARY + description: The name of the deleted objects. + default: variant deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the product variants were deleted. AdminCampaign: type: object description: The campaign's details. @@ -6557,15 +6349,15 @@ components: campaign_identifier: type: string title: campaign_identifier - description: The campaign's campaign identifier. + description: The campaign's identifier. starts_at: type: string title: starts_at - description: The campaign's starts at. + description: The date and time that the campaign starts. ends_at: type: string title: ends_at - description: The campaign's ends at. + description: The date and time that the campaign ends. budget: type: object description: The campaign's budget. @@ -6582,7 +6374,8 @@ components: description: The budget's ID. type: type: string - description: The budget's type. + description: | + The budget's type. `spend` means the limit is set on the total amount discounted by the campaign's promotions; `usage` means the limit is set on the total number of times the campaign's promotions can be used. enum: - spend - usage @@ -6597,20 +6390,17 @@ components: used: type: number title: used - description: The budget's used. + description: | + How much of the budget has been used. If the limit is `spend`, this property holds the total amount discounted so far. If the limit is `usage`, it holds the number of times the campaign's promotions have been used so far. AdminCampaignResponse: type: object - description: SUMMARY + description: The campaign's details. x-schemaName: AdminCampaignResponse required: - campaign properties: campaign: $ref: '#/components/schemas/AdminCampaign' - AdminCancelFulfillment: - type: object - description: SUMMARY - x-schemaName: AdminCancelFulfillment AdminClaim: type: object description: The claim's details. @@ -6655,62 +6445,63 @@ components: - original_shipping_subtotal - original_shipping_tax_total properties: + id: + type: string + title: id + description: The claim's ID. order_id: type: string title: order_id - description: The claim's order id. + description: The ID of the order associated with the claim. claim_items: type: array - description: The claim's claim items. + description: The order items targetted by the claim. items: $ref: '#/components/schemas/BaseClaimItem' additional_items: type: array - description: The claim's additional items. - items: {} + description: The outbound or new items of the claim. + items: + $ref: '#/components/schemas/BaseClaimItem' return: $ref: '#/components/schemas/Return' return_id: type: string title: return_id - description: The claim's return id. + description: The ID of the associated return. no_notification: type: boolean title: no_notification - description: The claim's no notification. + description: Whether the customer should be notified about changes in the claim. refund_amount: type: number title: refund_amount - description: The claim's refund amount. + description: The amount to be refunded. currency_code: type: string title: currency_code description: The claim's currency code. - id: - type: string - title: id - description: The claim's ID. region_id: type: string title: region_id - description: The claim's region id. + description: The ID of the region associated with the claim. customer_id: type: string title: customer_id - description: The claim's customer id. + description: The ID of the customer associated with the claim's order. sales_channel_id: type: string title: sales_channel_id - description: The claim's sales channel id. + description: The ID of the sales channel the claim's order is created in. email: type: string title: email - description: The claim's email. + description: The email associated with the claim's order. format: email display_id: type: number title: display_id - description: The claim's display id. + description: The claim's display ID. shipping_address: $ref: '#/components/schemas/BaseOrderAddress' billing_address: @@ -6759,63 +6550,66 @@ components: transactions: type: array description: The claim's transactions. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions + description: Learn more about transactions of orders and associated models. items: $ref: '#/components/schemas/BaseOrderTransaction' summary: $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The claim's metadata. + description: The claim's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The claim's created at. + description: The claim's creation date. updated_at: type: string format: date-time title: updated_at - description: The claim's updated at. + description: The claim's update date. original_item_total: type: number title: original_item_total - description: The claim's original item total. + description: The total of the original items in the associated order. original_item_subtotal: type: number title: original_item_subtotal - description: The claim's original item subtotal. + description: The subtotal of the original items in the associated order. original_item_tax_total: type: number title: original_item_tax_total - description: The claim's original item tax total. + description: The tax total of the original items in the associated order. item_total: type: number title: item_total - description: The claim's item total. + description: The total of the claim's items. item_subtotal: type: number title: item_subtotal - description: The claim's item subtotal. + description: The subtotal of the claim's items. item_tax_total: type: number title: item_tax_total - description: The claim's item tax total. + description: The tax total of the claim's items. original_total: type: number title: original_total - description: The claim's original total. + description: The associated order's original total. original_subtotal: type: number title: original_subtotal - description: The claim's original subtotal. + description: The associated order's original subtotal. original_tax_total: type: number title: original_tax_total - description: The claim's original tax total. + description: The associated order's original tax total. total: type: number title: total - description: The claim's total. + description: The associated order's total. subtotal: type: number title: subtotal @@ -6855,18 +6649,18 @@ components: original_shipping_total: type: number title: original_shipping_total - description: The claim's original shipping total. + description: The associated order's original shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The claim's original shipping subtotal. + description: The associated order's original shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The claim's original shipping tax total. + description: The associated order's original shipping tax total. AdminClaimDeleteResponse: type: object - description: SUMMARY + description: The details of the deleted claim. x-schemaName: AdminClaimDeleteResponse required: - id @@ -6885,10 +6679,10 @@ components: deleted: type: boolean title: deleted - description: Whether the Claim was deleted. + description: Whether the claim was deleted. AdminClaimListResponse: type: object - description: SUMMARY + description: The paginated list of claims. x-schemaName: AdminClaimListResponse required: - limit @@ -6899,23 +6693,23 @@ components: limit: type: number title: limit - description: The claim's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The claim's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The claim's count. + description: The total number of items. claims: type: array - description: The claim's claims. + description: The list of claims. items: $ref: '#/components/schemas/AdminClaim' AdminClaimOrderResponse: type: object - description: SUMMARY + description: The created claim's details. x-schemaName: AdminClaimOrderResponse required: - order @@ -6927,7 +6721,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimPreviewResponse: type: object - description: SUMMARY + description: The details of the claim, as well as a preview of the order when the claim is applied. x-schemaName: AdminClaimPreviewResponse required: - order_preview @@ -6939,7 +6733,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimRequestResponse: type: object - description: SUMMARY + description: The details of the claim, its return, and a preview of the order when the claim is applied. x-schemaName: AdminClaimRequestResponse required: - return @@ -6954,7 +6748,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimResponse: type: object - description: SUMMARY + description: The claim's details. x-schemaName: AdminClaimResponse required: - claim @@ -6963,7 +6757,7 @@ components: $ref: '#/components/schemas/AdminClaim' AdminClaimReturnPreviewResponse: type: object - description: SUMMARY + description: The details of the claim's return, with a preview of the order when the claim's return is applied. x-schemaName: AdminClaimReturnPreviewResponse required: - order_preview @@ -6975,7 +6769,7 @@ components: $ref: '#/components/schemas/AdminReturn' AdminCollection: type: object - description: The parent's collection. + description: The product collection's details. x-schemaName: AdminCollection required: - id @@ -7002,17 +6796,17 @@ components: type: string format: date-time title: created_at - description: The collection's created at. + description: The collection's creation date. updated_at: type: string format: date-time title: updated_at - description: The collection's updated at. + description: The collection's update date. deleted_at: type: string format: date-time title: deleted_at - description: The collection's deleted at. + description: The collection's deletion date. products: type: array description: The collection's products. @@ -7020,10 +6814,10 @@ components: type: object metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. AdminCollectionDeleteResponse: type: object - description: SUMMARY + description: The details of the deleted collection. x-schemaName: AdminCollectionDeleteResponse required: - id @@ -7042,10 +6836,10 @@ components: deleted: type: boolean title: deleted - description: Whether the Collection was deleted. + description: Whether the collection was deleted. AdminCollectionListResponse: type: object - description: SUMMARY + description: The paginated list of product collections. x-schemaName: AdminCollectionListResponse required: - limit @@ -7056,23 +6850,23 @@ components: limit: type: number title: limit - description: The collection's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The collection's offset. + description: The number of items skipped before retrieving the returned results. count: type: number title: count - description: The collection's count. + description: The total number of items. collections: type: array - description: The collection's collections. + description: The list of product collections. items: $ref: '#/components/schemas/AdminCollection' AdminCollectionResponse: type: object - description: SUMMARY + description: The collection's details. x-schemaName: AdminCollectionResponse required: - collection @@ -7081,7 +6875,7 @@ components: $ref: '#/components/schemas/AdminCollection' AdminCreateApiKey: type: object - description: SUMMARY + description: The API key's details. x-schemaName: AdminCreateApiKey required: - title @@ -7090,16 +6884,16 @@ components: title: type: string title: title - description: The api key's title. + description: The API key's title. type: type: string - description: The api key's type. + description: The API key's type. Use `secret` for a user's API key; Use `publishable` for Publishable API keys. enum: - publishable - secret AdminCreateApplicationMethod: type: object - description: The promotion's application method. + description: The application method's details. x-schemaName: AdminCreateApplicationMethod required: - value @@ -7113,7 +6907,7 @@ components: value: type: number title: value - description: The application method's value. + description: The discounted amount applied by the associated promotion based on the `type`. currency_code: type: string title: currency_code @@ -7121,23 +6915,23 @@ components: max_quantity: type: number title: max_quantity - description: The application method's max quantity. + description: The max quantity allowed in the cart for the associated promotion to be applied. type: type: string - description: The application method's type. + description: The type of the application method indicating how the associated promotion is applied. enum: - fixed - percentage target_type: type: string - description: The application method's target type. + description: The target type of the application method indicating whether the associated promotion is applied to the cart's items, shipping methods, or the whole order. enum: - items - shipping_methods - order allocation: type: string - description: The application method's allocation. + description: The allocation value that indicates whether the associated promotion is applied on each item in a cart or split between the items in the cart. enum: - each - across @@ -7154,63 +6948,14 @@ components: apply_to_quantity: type: number title: apply_to_quantity - description: The application method's apply to quantity. + description: The quantity that results from matching the `buyget` promotion's condition. For example, if the promotion is a "Buy 2 shirts get 1 free", the value f this attribute is `1`. buy_rules_min_quantity: type: number title: buy_rules_min_quantity - description: The application method's buy rules min quantity. - AdminCreateCampaign: - type: object - description: The promotion's campaign. - x-schemaName: AdminCreateCampaign - properties: - name: - type: string - title: name - description: The campaign's name. - description: - type: string - title: description - description: The campaign's description. - currency: - type: string - title: currency - description: The campaign's currency. - campaign_identifier: - type: string - title: campaign_identifier - description: The campaign's campaign identifier. - starts_at: - type: string - title: starts_at - description: The campaign's starts at. - format: date-time - ends_at: - type: string - title: ends_at - description: The campaign's ends at. - format: date-time - budget: - type: object - description: The campaign's budget. - properties: - type: - type: string - description: The budget's type. - enum: - - spend - - usage - currency_code: - type: string - title: currency_code - description: The budget's currency code. - limit: - type: number - title: limit - description: The budget's limit. + description: The minimum quantity required for a `buyget` promotion to be applied. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `2`. AdminCreateCollection: type: object - description: SUMMARY + description: the product collection's details. x-schemaName: AdminCreateCollection required: - title @@ -7225,10 +6970,10 @@ components: description: The collection's handle. metadata: type: object - description: The collection's metadata. + description: The collection's metadata, used to store custom key-value pairs. AdminCreateCustomerGroup: type: object - description: SUMMARY + description: The customer group's details. x-schemaName: AdminCreateCustomerGroup required: - name @@ -7239,10 +6984,10 @@ components: description: The customer group's name. metadata: type: object - description: The customer group's metadata. + description: The customer group's metadata, used to store custom key-value pairs. AdminCreateFulfillment: type: object - description: SUMMARY + description: The filfillment's details. x-schemaName: AdminCreateFulfillment required: - location_id @@ -7258,27 +7003,27 @@ components: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the items are fulfilled from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the provider handling this fulfillment. delivery_address: type: object - description: The fulfillment's delivery address. + description: The address to deliver the items to. properties: first_name: type: string title: first_name - description: The delivery address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The customer's last name. phone: type: string title: phone - description: The delivery address's phone. + description: The customer's phone. company: type: string title: company @@ -7286,11 +7031,11 @@ components: address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The delivery address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The delivery address's second line. city: type: string title: city @@ -7309,13 +7054,13 @@ components: description: The delivery address's postal code. metadata: type: object - description: The delivery address's metadata. + description: The delivery address's metadata, used to store custom key-value pairs. items: type: array - description: The fulfillment's items. + description: The items to fulfill. items: type: object - description: The item's items. + description: An item to fulfill. required: - title - sku @@ -7329,11 +7074,11 @@ components: sku: type: string title: sku - description: The item's sku. + description: The item's SKU. quantity: type: number title: quantity - description: The item's quantity. + description: The quantity to fulfill of the item. barcode: type: string title: barcode @@ -7341,17 +7086,17 @@ components: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the associated line item. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item associated with the underlying variant. labels: type: array - description: The fulfillment's labels. + description: The labels for the fulfillment's shipments. items: type: object - description: The label's labels. + description: A shipment's label. required: - tracking_number - tracking_url @@ -7364,61 +7109,61 @@ components: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. - order: - type: object - description: The fulfillment's order. + description: The label's URL. order_id: type: string title: order_id - description: The fulfillment's order id. + description: The ID of the order this fulfillment is created for. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option used in the order. data: type: object - description: The fulfillment's data. + description: Any data useful for the fulfillment provider to handle the fulfillment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date and time the fulfillment was packed. format: date-time shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date and time the fulfillment was shipped. format: date-time delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date and time the fulfillment was delivered. format: date-time canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date and time the fulfillment was canceled. format: date-time metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, used to store custom key-value pairs. AdminCreateInventoryItem: type: object - description: SUMMARY + description: The inventory item's details. x-schemaName: AdminCreateInventoryItem properties: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. weight: type: number title: weight @@ -7454,21 +7199,21 @@ components: description: type: string title: description - description: The inventory item's description. + description: The description of the variant associated with the inventory item. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the item requires shipping. thumbnail: type: string title: thumbnail description: The inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, used to store custom key-value pairs. AdminCreatePriceList: type: object - description: SUMMARY + description: The price list's details. x-schemaName: AdminCreatePriceList required: - title @@ -7485,11 +7230,13 @@ components: starts_at: type: string title: starts_at - description: The price list's starts at. + description: The date and time the price list starts at. + format: date-time ends_at: type: string title: ends_at - description: The price list's ends at. + description: The date and time the price list ends at. + format: date-time status: type: string description: The price list's status. @@ -7505,12 +7252,14 @@ components: rules: type: object description: The price list's rules. + example: + product_category_id: pcat_123 prices: type: array description: The price list's prices. items: type: object - description: The price's prices. + description: A price's details. required: - currency_code - amount @@ -7527,38 +7276,42 @@ components: variant_id: type: string title: variant_id - description: The price's variant id. + description: The ID of the product variant this price is for. min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: The minimum quantity required in the cart for this price to be applied. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: The maximum quantity in the cart that shouldn't be crossed for this price to be applied. rules: type: object description: The price's rules. + example: + region_id: reg_123 AdminCreatePricePreference: type: object - description: SUMMARY + description: The price preference's details. x-schemaName: AdminCreatePricePreference properties: attribute: type: string title: attribute - description: The price preference's attribute. + description: The name of the attribute the price preference applies on. + example: currency_code value: type: string title: value - description: The price preference's value. + description: The attribute's value. + example: usd is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The price preference's is tax inclusive. + description: Whether the price is tax inclusive if the value of the specified attribute matches the specified value. AdminCreateProduct: type: object - description: The create's details. + description: The product's details. x-schemaName: AdminCreateProduct required: - title @@ -7566,47 +7319,47 @@ components: title: type: string title: title - description: The create's title. + description: The product's title. subtitle: type: string title: subtitle - description: The create's subtitle. + description: The product's subtitle. description: type: string title: description - description: The create's description. + description: The product's description. is_giftcard: type: boolean title: is_giftcard - description: The create's is giftcard. + description: Whether the product is a gift card. discountable: type: boolean title: discountable - description: The create's discountable. + description: Whether the product is discountable. images: type: array - description: The create's images. + description: The product's images. items: type: object - description: The image's images. + description: A product's image details. required: - url properties: url: type: string title: url - description: The image's url. + description: The image's URL. thumbnail: type: string title: thumbnail - description: The create's thumbnail. + description: The URL of the product's thumbnail. handle: type: string title: handle - description: The create's handle. + description: The product's handle. status: type: string - description: The create's status. + description: The product's status. enum: - draft - proposed @@ -7615,17 +7368,17 @@ components: type_id: type: string title: type_id - description: The create's type id. + description: The ID of the type the product belongs to. collection_id: type: string title: collection_id - description: The create's collection id. + description: The ID of the collection the product belongs to. categories: type: array - description: The create's categories. + description: The categories the product belongs to. items: type: object - description: The category's categories. + description: A category's details. required: - id properties: @@ -7635,10 +7388,10 @@ components: description: The category's ID. tags: type: array - description: The create's tags. + description: The product's tags. items: type: object - description: The tag's tags. + description: A tag's details. required: - id properties: @@ -7648,20 +7401,20 @@ components: description: The tag's ID. options: type: array - description: The create's options. + description: The product's options. items: $ref: '#/components/schemas/AdminCreateProductOption' variants: type: array - description: The create's variants. + description: The product's variants. items: $ref: '#/components/schemas/AdminCreateProductVariant' sales_channels: type: array - description: The create's sales channels. + description: The sales channels the product is available in. items: type: object - description: The sales channel's sales channels. + description: A sales channel's details. required: - id properties: @@ -7672,41 +7425,41 @@ components: weight: type: number title: weight - description: The create's weight. + description: The product's weight. length: type: number title: length - description: The create's length. + description: The product's length. height: type: number title: height - description: The create's height. + description: The product's height. width: type: number title: width - description: The create's width. + description: The product's width. hs_code: type: string title: hs_code - description: The create's hs code. + description: The product's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The product's MID code. origin_country: type: string title: origin_country - description: The create's origin country. + description: The product's origin country. material: type: string title: material - description: The create's material. + description: The product's material. metadata: type: object - description: The create's metadata. + description: The product's metadata, used to store custom key-value pairs. AdminCreateProductCategory: type: object - description: SUMMARY + description: The product category's details. x-schemaName: AdminCreateProductCategory required: - name @@ -7726,25 +7479,25 @@ components: is_internal: type: boolean title: is_internal - description: The product category's is internal. + description: Whether the product category is only used and seen by admin users. is_active: type: boolean title: is_active - description: The product category's is active. + description: Whether the product category is active. parent_category_id: type: string title: parent_category_id - description: The product category's parent category id. + description: The ID of a category that's the parent of this one. rank: type: number title: rank - description: The product category's rank. + description: The sorting order of the product category among sibling categories. metadata: type: object - description: The product category's metadata. + description: The product category's metadata, used to store custom key-value pairs. AdminCreateProductOption: type: object - description: SUMMARY + description: The product option's details. x-schemaName: AdminCreateProductOption required: - title @@ -7753,17 +7506,17 @@ components: title: type: string title: title - description: The product's title. + description: The product option's title. values: type: array - description: The product's values. + description: The product option's values. items: type: string title: values - description: The value's values. + description: A value. AdminCreateProductTag: type: object - description: SUMMARY + description: The product tag's details. x-schemaName: AdminCreateProductTag required: - value @@ -7774,10 +7527,10 @@ components: description: The product tag's value. metadata: type: object - description: The product tag's metadata. + description: The product tag's metadata, used to store custom key-value pairs. AdminCreateProductVariant: type: object - description: The create's details. + description: The product variant's details. x-schemaName: AdminCreateProductVariant required: - title @@ -7786,81 +7539,83 @@ components: title: type: string title: title - description: The create's title. + description: The variant's title. sku: type: string title: sku - description: The create's sku. + description: The variant's SKU. ean: type: string title: ean - description: The create's ean. + description: The variant's EAN. upc: type: string title: upc - description: The create's upc. + description: The variant's UPC. barcode: type: string title: barcode - description: The create's barcode. + description: The variant's barcode. hs_code: type: string title: hs_code - description: The create's hs code. + description: The variant's HS code. mid_code: type: string title: mid_code - description: The create's mid code. + description: The variant's MID code. allow_backorder: type: boolean title: allow_backorder - description: The create's allow backorder. + description: Whether it's allowed to order this variant when it's out of stock. manage_inventory: type: boolean title: manage_inventory - description: The create's manage inventory. + description: Whether Medusa manages the variant's inventory quantity. If disabled, the product variant is always considered in stock. variant_rank: type: number title: variant_rank - description: The create's variant rank. + description: The sorting order of the variant among other variants in the product. weight: type: number title: weight - description: The create's weight. + description: The variant's weight. length: type: number title: length - description: The create's length. + description: The variant's length. height: type: number title: height - description: The create's height. + description: The variant's height. width: type: number title: width - description: The create's width. + description: The variant's width. origin_country: type: string title: origin_country - description: The create's origin country. + description: The variant's origin country. material: type: string title: material - description: The create's material. + description: The variant's material. metadata: type: object - description: The create's metadata. + description: The variant's metadata, used to store custom key-value pairs. prices: type: array - description: The create's prices. + description: The variant's prices. items: $ref: '#/components/schemas/AdminCreateProductVariantPrice' options: type: object - description: The create's options. + description: The variant's options, where the key is an option's name, and the value is the option's value. + example: + Color: Black AdminCreateProductVariantPrice: type: object - description: The price's prices. + description: The details of a variant's price. x-schemaName: AdminCreateProductVariantPrice required: - currency_code @@ -7877,17 +7632,19 @@ components: min_quantity: type: number title: min_quantity - description: The price's min quantity. + description: The minimum quantity that must be available in the cart for this price to apply. max_quantity: type: number title: max_quantity - description: The price's max quantity. + description: The maximum quantity that must not be surpassed in the cart for this price to apply. rules: type: object description: The price's rules. + example: + region_id: reg_123 AdminCreatePromotionRule: type: object - description: The rule's rules. + description: The promotion rule's details. x-schemaName: AdminCreatePromotionRule required: - operator @@ -7896,7 +7653,7 @@ components: properties: operator: type: string - description: The rule's operator. + description: The operator used to check whether the buy rule applies on a cart. For example, `eq` means that the cart's value for the specified attribute must match the specified value. enum: - gt - lt @@ -7912,21 +7669,24 @@ components: attribute: type: string title: attribute - description: The rule's attribute. + description: The attribute to compare against when checking whether a promotion can be applied on a cart. + example: item.product.id values: oneOf: - type: string title: values - description: The rule's values. + description: The attribute's value. + example: prod_123 - type: array - description: The rule's values. + description: The allowed attribute values. items: type: string title: values - description: The value's values. + description: An attribute value. + example: prod_123 AdminCreateRefundReason: type: object - description: SUMMARY + description: The refund reason's details. x-schemaName: AdminCreateRefundReason required: - label @@ -7941,7 +7701,7 @@ components: description: The refund reason's description. AdminCreateRegion: type: object - description: SUMMARY + description: The region's details. x-schemaName: AdminCreateRegion required: - name @@ -7955,34 +7715,37 @@ components: type: string title: currency_code description: The region's currency code. + example: usd countries: type: array description: The region's countries. items: type: string title: countries - description: The country's countries. + description: A country code. + example: us automatic_taxes: type: boolean title: automatic_taxes - description: The region's automatic taxes. + description: Whether taxes are calculated automatically during checkout in this region. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The region's is tax inclusive. + description: Whether prices in this region are tax inclusive. payment_providers: type: array - description: The region's payment providers. + description: The payment providers enabled in this region. items: type: string title: payment_providers - description: The payment provider's payment providers. + description: A payment provider's ID. + example: pp_stripe_stripe metadata: type: object - description: The region's metadata. + description: The region's metadata, used to store custom key-value pairs. AdminCreateReservation: type: object - description: SUMMARY + description: The reservation's details. x-schemaName: AdminCreateReservation required: - location_id @@ -7992,29 +7755,29 @@ components: line_item_id: type: string title: line_item_id - description: The reservation's line item id. + description: The ID of the line item this reservation is created for. location_id: type: string title: location_id - description: The reservation's location id. + description: The ID of the location the quantity is reserved from. inventory_item_id: type: string title: inventory_item_id - description: The reservation's inventory item id. + description: The ID of the inventory item associated with the line item's variant. quantity: type: number title: quantity - description: The reservation's quantity. + description: The reserved quantity. description: type: string title: description description: The reservation's description. metadata: type: object - description: The reservation's metadata. + description: The reservation's metadata, used to store custom key-value pairs. AdminCreateSalesChannel: type: object - description: SUMMARY + description: The sales channel's details. x-schemaName: AdminCreateSalesChannel required: - name @@ -8030,23 +7793,23 @@ components: is_disabled: type: boolean title: is_disabled - description: The sales channel's is disabled. + description: Whether the sales channel is disabled. metadata: type: object - description: The sales channel's metadata. + description: The sales channel's metadata, used to store custom key-value pairs. AdminCreateShipment: type: object - description: SUMMARY + description: The shipment's details. x-schemaName: AdminCreateShipment required: - labels properties: labels: type: array - description: The fulfillment's labels. + description: The shipment's labels. items: type: object - description: The label's labels. + description: A shipment label's details. required: - tracking_number - tracking_url @@ -8059,14 +7822,14 @@ components: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. AdminCreateShippingOption: type: object - description: SUMMARY + description: The shipping option's details. x-schemaName: AdminCreateShippingOption required: - name @@ -8084,33 +7847,37 @@ components: service_zone_id: type: string title: service_zone_id - description: The shipping option's service zone id. + description: The ID of the service zone this shipping option belongs to. shipping_profile_id: type: string title: shipping_profile_id - description: The shipping option's shipping profile id. + description: The ID of the shipping profile this shipping option belongs to. data: type: object - description: The shipping option's data. + description: Any data necessary for fulfillment providers to handle shipping methods and fulfillments of this shipping option. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property + description: Learn more about the data property. price_type: type: string - description: The shipping option's price type. + description: | + The shipping option price's type. If `flat`, it means the option has a fixed price set in the `prices` property. `calculated` means that the shipping option's price is calculated during checkout. enum: - flat - calculated provider_id: type: string title: provider_id - description: The shipping option's provider id. + description: The ID of the fulfillment provider used to handle this shipping option and its associated methods and fulfillments. type: type: object prices: type: array - description: The shipping option's prices. + description: The shipping option's prices. If `price_type` is `calculated`, pass an empty array for this property. items: oneOf: - type: object - description: The price's prices. + description: The price for a currency code. x-schemaName: AdminCreateShippingOptionPriceWithCurrency required: - currency_code @@ -8125,7 +7892,7 @@ components: title: amount description: The price's amount. - type: object - description: The price's prices. + description: The price in a region. x-schemaName: AdminCreateShippingOptionPriceWithRegion required: - region_id @@ -8134,7 +7901,7 @@ components: region_id: type: string title: region_id - description: The price's region id. + description: The ID of the region this price is used in. amount: type: number title: amount @@ -8146,7 +7913,7 @@ components: $ref: '#/components/schemas/AdminCreateShippingOptionRule' AdminCreateShippingOptionRule: type: object - description: The rule's rules. + description: The details of the shipping option rule. x-schemaName: AdminCreateShippingOptionRule required: - operator @@ -8155,7 +7922,7 @@ components: properties: operator: type: string - description: The rule's operator. + description: The operator used to check whether a rule applies. enum: - gt - lt @@ -8168,21 +7935,24 @@ components: attribute: type: string title: attribute - description: The rule's attribute. + description: The name of a property or table that the rule applies to. + example: customer_group value: oneOf: - type: string title: value - description: The rule's value. + description: A value of the attribute that enables this rule. + example: cusgroup_123 - type: array - description: The rule's value. + description: Values of the attribute that enable this rule. items: type: string title: value - description: The value's details. + description: A value of the attribute that enables this rule. + example: cusgroup_123 AdminCreateShippingProfile: type: object - description: SUMMARY + description: The shipping profile's details. x-schemaName: AdminCreateShippingProfile required: - name @@ -8198,10 +7968,10 @@ components: description: The shipping profile's type. metadata: type: object - description: The shipping profile's metadata. + description: The shipping profile's metadata, used to store custom key-value pairs. AdminCreateStockLocation: type: object - description: SUMMARY + description: The stock location's details. x-schemaName: AdminCreateStockLocation required: - name @@ -8213,15 +7983,15 @@ components: address_id: type: string title: address_id - description: The stock location's address id. + description: The ID of the stock location's address. address: $ref: '#/components/schemas/AdminUpsertStockLocationAddress' metadata: type: object - description: The stock location's metadata. + description: The stock location's metadata, used to store custom key-value pairs. AdminCreateTaxRate: type: object - description: SUMMARY + description: The tax rate's details. x-schemaName: AdminCreateTaxRate required: - name @@ -8231,18 +8001,20 @@ components: type: string title: name description: The tax rate's name. + example: VAT tax_region_id: type: string title: tax_region_id - description: The tax rate's tax region id. + description: The ID of the tax region this rate belongs to. rate: type: number title: rate - description: The tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The tax rate's code. + description: The code the tax rate is identified by. rules: type: array description: The tax rate's rules. @@ -8251,17 +8023,19 @@ components: is_default: type: boolean title: is_default - description: The tax rate's is default. + description: Whether the tax rate is the default in its tax region. is_combinable: type: boolean title: is_combinable - description: The tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The tax rate's metadata. + description: The tax rate's metadata, used to store custom key-value pairs. AdminCreateTaxRateRule: type: object - description: SUMMARY + description: The tax rate rule's details. x-schemaName: AdminCreateTaxRateRule required: - reference @@ -8270,14 +8044,16 @@ components: reference: type: string title: reference - description: The tax rate's reference. + description: The name of a table in the database that this rule points to. + example: product_type reference_id: type: string title: reference_id - description: The tax rate's reference id. + description: The ID of a record in the table specified in reference. + example: ptype_123 AdminCreateTaxRegion: type: object - description: SUMMARY + description: The tax region's details. x-schemaName: AdminCreateTaxRegion required: - country_code @@ -8286,6 +8062,7 @@ components: type: string title: country_code description: The tax region's country code. + example: us province_code: type: string title: province_code @@ -8293,7 +8070,7 @@ components: parent_id: type: string title: parent_id - description: The tax region's parent id. + description: The ID of the parent tax region. default_tax_rate: type: object description: The tax region's default tax rate. @@ -8303,28 +8080,31 @@ components: rate: type: number title: rate - description: The default tax rate's rate. + description: The rate to charge. + example: 10 code: type: string title: code - description: The default tax rate's code. + description: The code the tax rate is identified by name: type: string title: name description: The default tax rate's name. + example: VAT is_combinable: type: boolean - title: is_combinable - description: The default tax rate's is combinable. + description: Whether the tax rate should be combined with parent rates. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates metadata: type: object - description: The default tax rate's metadata. + description: The default tax rate's metadata, used to store custom key-value pairs. metadata: type: object - description: The tax region's metadata. + description: The tax region's metadata, used to store custom key-value pairs. AdminCreateVariantInventoryItem: type: object - description: SUMMARY + description: The details of the variant-inventory item association. x-schemaName: AdminCreateVariantInventoryItem required: - required_quantity @@ -8333,14 +8113,14 @@ components: required_quantity: type: number title: required_quantity - description: The product's required quantity. + description: The quantity of the variant in the inventory item. inventory_item_id: type: string title: inventory_item_id - description: The product's inventory item id. + description: The inventory item's ID. AdminCreateWorkflowsAsyncResponse: type: object - description: SUMMARY + description: The details of changing a workflow execution's step status. x-schemaName: AdminCreateWorkflowsAsyncResponse required: - transaction_id @@ -8348,37 +8128,94 @@ components: properties: transaction_id: type: string - title: transaction_id - description: The workflows execution's transaction id. - step_id: + title: transaction_id + description: The workflows execution's transaction ID. + step_id: + type: string + title: step_id + description: The ID of the step whose status was changed. + response: + description: Sets the step's response. It accepts any type. + compensate_input: + description: Sets the compensation function's input. It accepts any response. + action: + type: string + description: Whether to invoke or compensate the step. + enum: + - invoke + - compensate + AdminCreateWorkflowsRun: + type: object + description: The details of the workflow to execute. + x-schemaName: AdminCreateWorkflowsRun + properties: + input: + description: The input to pass to the workflow. Can be of any type. + transaction_id: + type: string + title: transaction_id + description: The ID of the workflow execution's transaction. + AdminCurrency: + type: object + description: The currency's currencies. + x-schemaName: AdminCurrency + required: + - code + - symbol + - symbol_native + - name + - decimal_digits + - rounding + - raw_rounding + - created_at + - updated_at + - deleted_at + properties: + code: + type: string + title: code + description: The currency's code. + example: usd + symbol: + type: string + title: symbol + description: The currency's symbol. + example: $ + symbol_native: type: string - title: step_id - description: The workflows execution's step id. - response: {} - compensate_input: {} - action: + title: symbol_native + description: The currency's native symbol, if different than the symbol. + example: $ + name: type: string - description: The workflows execution's action. - enum: - - invoke - - compensate - AdminCreateWorkflowsRun: - type: object - description: SUMMARY - x-schemaName: AdminCreateWorkflowsRun - properties: - input: {} - transaction_id: + title: name + description: The currency's name. + decimal_digits: + type: number + title: decimal_digits + description: The number of digits after the decimal for prices in this currency. + rounding: + type: number + title: rounding + description: The rounding percision applied on prices in this currency. + created_at: type: string - title: transaction_id - description: The workflows execution's transaction id. - AdminCurrency: - type: object - description: The supported currency's currency. - x-schemaName: AdminCurrency + format: date-time + title: created_at + description: The currency's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The currency's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The currency's deletion date. AdminCurrencyListResponse: type: object - description: SUMMARY + description: The paginated list of currencies. x-schemaName: AdminCurrencyListResponse required: - limit @@ -8389,23 +8226,23 @@ components: limit: type: number title: limit - description: The currency's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The currency's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The currency's count. + description: The total number of items. currencies: type: array - description: The currency's currencies. + description: The list of currencies. items: $ref: '#/components/schemas/AdminCurrency' AdminCurrencyResponse: type: object - description: SUMMARY + description: The currency's details. x-schemaName: AdminCurrencyResponse required: - currency @@ -8414,7 +8251,7 @@ components: $ref: '#/components/schemas/AdminCurrency' AdminCustomer: type: object - description: The order's customer. + description: The customer's details. x-schemaName: AdminCustomer required: - has_account @@ -8427,19 +8264,19 @@ components: - last_name - addresses properties: + id: + type: string + title: id + description: The customer's ID. has_account: type: boolean title: has_account - description: The customer's has account. + description: Whether the customer is registered. groups: type: array description: The customer's groups. items: $ref: '#/components/schemas/AdminCustomerGroup' - id: - type: string - title: id - description: The customer's ID. email: type: string title: email @@ -8448,11 +8285,11 @@ components: default_billing_address_id: type: string title: default_billing_address_id - description: The customer's default billing address id. + description: The ID of the address used as the default billing address. default_shipping_address_id: type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: The ID of the address used as the default shipping address. company_name: type: string title: company_name @@ -8476,26 +8313,26 @@ components: description: The customer's phone. metadata: type: object - description: The customer's metadata. + description: The customer's metadata, used to store custom key-value pairs. created_by: type: string title: created_by - description: The customer's created by. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The customer's deleted at. + description: The ID of the user that created this customer, if available. created_at: type: string format: date-time title: created_at - description: The customer's created at. + description: The customer's creation date. updated_at: type: string format: date-time title: updated_at - description: The customer's updated at. + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. AdminCustomerAddress: type: object description: The customer's address. @@ -8527,39 +8364,39 @@ components: address_name: type: string title: address_name - description: The address's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The address's is default shipping. + description: Whether the address is the default shipping address. is_default_billing: type: boolean title: is_default_billing - description: The address's is default billing. + description: Whether the address is the default billing address. customer_id: type: string title: customer_id - description: The address's customer id. + description: The ID of the customer that this address belongs to. company: type: string title: company - description: The address's company. + description: The customer's company. first_name: type: string title: first_name - description: The address's first name. + description: The customer's first name. last_name: type: string title: last_name - description: The address's last name. + description: The customer's last name. address_1: type: string title: address_1 - description: The address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The address's address 2. + description: The address's second line. city: type: string title: city @@ -8568,6 +8405,7 @@ components: type: string title: country_code description: The address's country code. + example: us province: type: string title: province @@ -8582,20 +8420,20 @@ components: description: The address's phone. metadata: type: object - description: The address's metadata. + description: The address's metadata, used to store custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The address's created at. + description: The address's creation date. updated_at: type: string format: date-time title: updated_at - description: The address's updated at. + description: The address's update date. AdminCustomerAddressResponse: type: object - description: SUMMARY + description: The address's details. x-schemaName: AdminCustomerAddressResponse required: - address @@ -8604,8 +8442,42 @@ components: $ref: '#/components/schemas/AdminCustomerAddress' AdminCustomerGroup: type: object - description: The group's groups. + description: The customer group's details. x-schemaName: AdminCustomerGroup + required: + - id + - name + - customers + - metadata + - created_at + - updated_at + properties: + id: + type: string + title: id + description: The customer group's ID. + name: + type: string + title: name + description: The customer group's name. + customers: + type: array + description: The customer group's customers. + items: + $ref: '#/components/schemas/BaseCustomer' + metadata: + type: object + description: The customer group's metadata, used to store custom key-value pairs. + created_at: + type: string + format: date-time + title: created_at + description: The customer group's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer group's update date. AdminCustomerGroupResponse: type: object description: SUMMARY @@ -8617,35 +8489,35 @@ components: $ref: '#/components/schemas/AdminCustomerGroup' AdminCustomerInGroupFilters: type: object - description: The customer group's customers. + description: Filters to apply on customers to retrieve their groups. x-schemaName: AdminCustomerInGroupFilters properties: id: oneOf: - type: string title: id - description: The customer's ID. + description: Filter by a customer's ID. - type: array - description: The customer's ID. + description: Filter by customer IDs. items: type: string title: id - description: The id's ID. + description: A customer's ID. email: oneOf: - type: string title: email - description: The customer's email. + description: Filter by a customer's email. format: email - type: array - description: The customer's email. + description: Filter by customer emails. items: type: string title: email - description: The email's details. + description: A customer's email. format: email - type: object - description: The customer's email. + description: Apply filters on the customer's email. properties: $and: type: array @@ -8665,7 +8537,7 @@ components: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -8762,71 +8634,71 @@ components: oneOf: - type: string title: default_billing_address_id - description: The customer's default billing address id. + description: Filter by the ID of a customer's default billing address. - type: array - description: The customer's default billing address id. + description: Filter by the IDs of a customers' default billing address. items: type: string title: default_billing_address_id - description: The default billing address id's details. + description: The ID of a customer's default billing address. default_shipping_address_id: oneOf: - type: string title: default_shipping_address_id - description: The customer's default shipping address id. + description: Filter by the ID of a customer's default shipping address. - type: array - description: The customer's default shipping address id. + description: Filter by the IDs of a customers' default shipping address. items: type: string title: default_shipping_address_id - description: The default shipping address id's details. + description: The ID of a customer's default shipping address. company_name: oneOf: - type: string title: company_name - description: The customer's company name. + description: Filter by a customer's company name. - type: array - description: The customer's company name. + description: Filter by customers' company names. items: type: string title: company_name - description: The company name's details. + description: A company name. first_name: oneOf: - type: string title: first_name - description: The customer's first name. + description: Filter by a customer's first name. - type: array - description: The customer's first name. + description: Filter by customers' first names. items: type: string title: first_name - description: The first name's details. + description: A first name. last_name: oneOf: - type: string title: last_name - description: The customer's last name. + description: Filter by a customer's last name. - type: array - description: The customer's last name. + description: Filter by customers' last names. items: type: string title: last_name - description: The last name's details. + description: A last name. created_by: oneOf: - type: string title: created_by - description: The customer's created by. + description: Filter by the ID of a user to retrieve the groups of the customers they created. - type: array - description: The customer's created by. + description: Filter by the ID of users to retrieve the groups of the customers they created. items: type: string title: created_by - description: The created by's details. + description: A user's ID. created_at: type: object - description: The customer's created at. + description: Filter the customer's creation date. properties: $and: type: array @@ -8846,7 +8718,7 @@ components: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by exact matches items: type: string title: $eq @@ -8941,7 +8813,7 @@ components: description: Filter by whether a value for this parameter exists (not `null`). updated_at: type: object - description: The customer's updated at. + description: Filter the customer's update date. properties: $and: type: array @@ -9056,7 +8928,7 @@ components: description: Filter by whether a value for this parameter exists (not `null`). deleted_at: type: object - description: The customer's deleted at. + description: Filter the customer's deletion date. properties: $and: type: array @@ -9180,7 +9052,7 @@ components: $ref: '#/components/schemas/AdminCustomer' AdminDeletePaymentCollectionResponse: type: object - description: SUMMARY + description: The result of deleting the payment collection. x-schemaName: AdminDeletePaymentCollectionResponse required: - id @@ -9194,15 +9066,15 @@ components: object: type: string title: object - description: SUMMARY + description: The name of the object that was deleted. default: payment-collection deleted: type: boolean title: deleted - description: SUMMARY + description: Whether the object was deleted. AdminDraftOrderResponse: type: object - description: SUMMARY + description: The draft order's details. x-schemaName: AdminDraftOrderResponse required: - draft_order @@ -9256,31 +9128,32 @@ components: order_id: type: string title: order_id - description: The exchange's order id. + description: The ID of the order the exchange is created for. return_items: type: array - description: The exchange's return items. + description: The items returned (inbound) by the exchange. items: $ref: '#/components/schemas/AdminReturnItem' additional_items: type: array - description: The exchange's additional items. + description: The new items (outbound) sent by the exchange. items: $ref: '#/components/schemas/BaseExchangeItem' no_notification: type: boolean title: no_notification - description: The exchange's no notification. + description: Whether to send the customer notifications when the exchange is updated. difference_due: type: number title: difference_due - description: The exchange's difference due. + description: The amount to be exchanged or refunded. If the amount is negative, it must be refunded. If positive, additional payment is required from the customer. return: + description: the return associated with the exchange. $ref: '#/components/schemas/AdminReturn' return_id: type: string title: return_id - description: The exchange's return id. + description: The ID of the associated exchange. currency_code: type: string title: currency_code @@ -9292,31 +9165,33 @@ components: region_id: type: string title: region_id - description: The exchange's region id. + description: The ID of the associated order's region. customer_id: type: string title: customer_id - description: The exchange's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The exchange's sales channel id. + description: The ID of the sales channel the associated order belongs to. email: type: string title: email - description: The exchange's email. + description: The email used when placing the order. format: email display_id: type: number title: display_id - description: The exchange's display id. + description: The exchange's display ID. shipping_address: + description: The shipping address to send new items to. $ref: '#/components/schemas/BaseOrderAddress' billing_address: + description: The customer's billing address. $ref: '#/components/schemas/BaseOrderAddress' shipping_methods: type: array - description: The exchange's shipping methods. + description: The shipping methods used to send the new (outbound) items. items: $ref: '#/components/schemas/BaseOrderShippingMethod' payment_collections: @@ -9340,7 +9215,7 @@ components: - requires_action fulfillments: type: array - description: The exchange's fulfillments. + description: The exchange's fulfillments of new (outbound) items. items: $ref: '#/components/schemas/BaseOrderFulfillment' fulfillment_status: @@ -9358,87 +9233,90 @@ components: transactions: type: array description: The exchange's transactions. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/order/transactions items: $ref: '#/components/schemas/BaseOrderTransaction' summary: + description: The totals summary of the exchange. $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The exchange's metadata. + description: The exchange's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The exchange's created at. + description: The date that the exchange was created. updated_at: type: string format: date-time title: updated_at - description: The exchange's updated at. + description: The date that the exchange was updated. original_item_total: type: number title: original_item_total - description: The exchange's original item total. + description: The total of the original items in the order. original_item_subtotal: type: number title: original_item_subtotal - description: The exchange's original item subtotal. + description: The subtotal of the original items in the order. original_item_tax_total: type: number title: original_item_tax_total - description: The exchange's original item tax total. + description: The total tax of the original items in the order. item_total: type: number title: item_total - description: The exchange's item total. + description: The total of the exchange's new items. item_subtotal: type: number title: item_subtotal - description: The exchange's item subtotal. + description: The subtotal of the exchange's new items. item_tax_total: type: number title: item_tax_total - description: The exchange's item tax total. + description: The tax total of the exchange's new items. original_total: type: number title: original_total - description: The exchange's original total. + description: The total of the order. original_subtotal: type: number title: original_subtotal - description: The exchange's original subtotal. + description: The subtotal of the order. original_tax_total: type: number title: original_tax_total - description: The exchange's original tax total. + description: The tax total of the order. total: type: number title: total - description: The exchange's total. + description: The total of the exchange. subtotal: type: number title: subtotal - description: The exchange's subtotal. + description: The subtotal of the exchange. tax_total: type: number title: tax_total - description: The exchange's tax total. + description: The tax total of the exchange. discount_total: type: number title: discount_total - description: The exchange's discount total. + description: The discount total of the exchange. discount_tax_total: type: number title: discount_tax_total - description: The exchange's discount tax total. + description: The total taxes on discount of the exchange. gift_card_total: type: number title: gift_card_total - description: The exchange's gift card total. + description: The gift cards total of the exchange. gift_card_tax_total: type: number title: gift_card_tax_total - description: The exchange's gift card tax total. + description: The total taxes on the gift card of the exchange. shipping_total: type: number title: shipping_total @@ -9454,18 +9332,18 @@ components: original_shipping_total: type: number title: original_shipping_total - description: The exchange's original shipping total. + description: The order's shipping total. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The exchange's original shipping subtotal. + description: The order's shipping subtotal. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The exchange's original shipping tax total. + description: The order's shipping tax total. AdminExchangeDeleteResponse: type: object - description: SUMMARY + description: The details of deleting an exchange. x-schemaName: AdminExchangeDeleteResponse required: - id @@ -9484,22 +9362,23 @@ components: deleted: type: boolean title: deleted - description: Whether the Exchange was deleted. + description: Whether the exchange was deleted. AdminExchangeOrderResponse: type: object - description: SUMMARY + description: The exchange's details. x-schemaName: AdminExchangeOrderResponse required: - order - exchange properties: order: + description: The details of the associated order. $ref: '#/components/schemas/Order' exchange: $ref: '#/components/schemas/AdminExchange' AdminExchangePreviewResponse: type: object - description: SUMMARY + description: A preview of the order once the exchange is applied. x-schemaName: AdminExchangePreviewResponse required: - order_preview @@ -9511,7 +9390,7 @@ components: $ref: '#/components/schemas/AdminExchange' AdminExchangeRequestResponse: type: object - description: SUMMARY + description: The details of a requested exchange. x-schemaName: AdminExchangeRequestResponse required: - return @@ -9519,14 +9398,16 @@ components: - exchange properties: return: + description: The associated return's details. $ref: '#/components/schemas/AdminReturn' order_preview: + description: A preview of the order once the exchange is applied. $ref: '#/components/schemas/OrderPreview' exchange: $ref: '#/components/schemas/AdminExchange' AdminExchangeResponse: type: object - description: SUMMARY + description: The exchange's details. x-schemaName: AdminExchangeResponse required: - exchange @@ -9535,7 +9416,7 @@ components: $ref: '#/components/schemas/AdminExchange' AdminExchangeReturnResponse: type: object - description: SUMMARY + description: The details of an exchange's return. x-schemaName: AdminExchangeReturnResponse required: - order_preview @@ -9545,13 +9426,9 @@ components: $ref: '#/components/schemas/OrderPreview' return: $ref: '#/components/schemas/AdminReturn' - AdminExportProductRequest: - type: object - description: SUMMARY - x-schemaName: AdminExportProductRequest AdminExportProductResponse: type: object - description: SUMMARY + description: The details of the product export. x-schemaName: AdminExportProductResponse required: - transaction_id @@ -9559,10 +9436,10 @@ components: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: The ID of the workflow execution's transaction. Use it to check the status of the export by sending a GET request to `/admin/workflows-executions/export-products/:transaction-id` AdminFile: type: object - description: The upload's file. + description: A file's details. x-schemaName: AdminFile required: - id @@ -9575,22 +9452,22 @@ components: url: type: string title: url - description: The file's url. + description: The file's URL. AdminFileListResponse: type: object - description: SUMMARY + description: The list of uploaded files. x-schemaName: AdminFileListResponse required: - files properties: files: type: array - description: The upload's files. + description: The list of uploaded files. items: $ref: '#/components/schemas/AdminFile' AdminFileResponse: type: object - description: SUMMARY + description: A file's details. x-schemaName: AdminFileResponse required: - file @@ -9627,18 +9504,20 @@ components: location_id: type: string title: location_id - description: The fulfillment's location id. + description: The ID of the location the fulfillment's items are shipped from. provider_id: type: string title: provider_id - description: The fulfillment's provider id. + description: The ID of the fulfillment provider handling this fulfillment. shipping_option_id: type: string title: shipping_option_id - description: The fulfillment's shipping option id. + description: The ID of the shipping option this fulfillment is created for. provider: + description: The details of the fulfillment provider using to handle this fulfillment. $ref: '#/components/schemas/AdminFulfillmentProvider' delivery_address: + description: The address to deliver the item to. $ref: '#/components/schemas/AdminFulfillmentAddress' items: type: array @@ -9647,49 +9526,51 @@ components: $ref: '#/components/schemas/AdminFulfillmentItem' labels: type: array - description: The fulfillment's labels. + description: The fulfillment's shipment labels. items: $ref: '#/components/schemas/AdminFulfillmentLabel' packed_at: type: string title: packed_at - description: The fulfillment's packed at. + description: The date the fulfillment was packed at. shipped_at: type: string title: shipped_at - description: The fulfillment's shipped at. + description: The date the fulfillment was shipped at. delivered_at: type: string title: delivered_at - description: The fulfillment's delivered at. + description: The date the fulfillment was delivered at. canceled_at: type: string title: canceled_at - description: The fulfillment's canceled at. + description: The date the fulfillment was canceled at. data: type: object - description: The fulfillment's data. + description: The fulfillment's data, useful for the third-party provider handling the fulfillment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property metadata: type: object - description: The fulfillment's metadata. + description: The fulfillment's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The fulfillment's created at. + description: The date the fulfillment was created at. updated_at: type: string format: date-time title: updated_at - description: The fulfillment's updated at. + description: The date the fulfillment was updated at. deleted_at: type: string format: date-time title: deleted_at - description: The fulfillment's deleted at. + description: The date the fulfillment was deleted at. AdminFulfillmentAddress: type: object - description: The fulfillment's delivery address. + description: An address's details. x-schemaName: AdminFulfillmentAddress required: - id @@ -9712,72 +9593,72 @@ components: id: type: string title: id - description: The delivery address's ID. + description: The address's ID. fulfillment_id: type: string title: fulfillment_id - description: The delivery address's fulfillment id. + description: The ID of the fulfillment that the address belongs to. company: type: string title: company - description: The delivery address's company. + description: The address's company. first_name: type: string title: first_name - description: The delivery address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The delivery address's last name. + description: The address's last name. address_1: type: string title: address_1 - description: The delivery address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The delivery address's address 2. + description: The address's second line. city: type: string title: city - description: The delivery address's city. + description: The address's city. country_code: type: string title: country_code - description: The delivery address's country code. + description: The address's country code. province: type: string title: province - description: The delivery address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The delivery address's postal code. + description: The address's postal code. phone: type: string title: phone - description: The delivery address's phone. + description: The address's phone. metadata: type: object - description: The delivery address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The delivery address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The delivery address's updated at. + description: The date the address was updated. deleted_at: type: string format: date-time title: deleted_at - description: The delivery address's deleted at. + description: The date the address was deleted. AdminFulfillmentItem: type: object - description: The item's items. + description: The details of a fulfillment's item. x-schemaName: AdminFulfillmentItem required: - id @@ -9803,11 +9684,11 @@ components: quantity: type: number title: quantity - description: The item's quantity. + description: The item's quantity to be fulfilled. sku: type: string title: sku - description: The item's sku. + description: The item's SKU. barcode: type: string title: barcode @@ -9815,33 +9696,33 @@ components: line_item_id: type: string title: line_item_id - description: The item's line item id. + description: The ID of the order's line item to be fulfilled. inventory_item_id: type: string title: inventory_item_id - description: The item's inventory item id. + description: The ID of the inventory item of the underlying product variant. fulfillment_id: type: string title: fulfillment_id - description: The item's fulfillment id. + description: The ID of the fulfillment the item belongs to. created_at: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. deleted_at: type: string format: date-time title: deleted_at - description: The item's deleted at. + description: The date the item was deleted. AdminFulfillmentLabel: type: object - description: The label's labels. + description: The details of a fulfillmet's shipment label. x-schemaName: AdminFulfillmentLabel required: - id @@ -9864,37 +9745,37 @@ components: tracking_url: type: string title: tracking_url - description: The label's tracking url. + description: The label's tracking URL. label_url: type: string title: label_url - description: The label's label url. + description: The label's URL. fulfillment_id: type: string title: fulfillment_id - description: The label's fulfillment id. + description: The ID of the fulfillment the label is associated with. created_at: type: string format: date-time title: created_at - description: The label's created at. + description: The date the label was created. updated_at: type: string format: date-time title: updated_at - description: The label's updated at. + description: The date the label was updated. deleted_at: type: string format: date-time title: deleted_at - description: The label's deleted at. + description: The date the label was deleted. AdminFulfillmentProvider: type: object - description: The fulfillment provider's fulfillment providers. + description: The shipping option's provider. x-schemaName: AdminFulfillmentProvider AdminFulfillmentProviderListResponse: type: object - description: SUMMARY + description: The paginated list of fulfillment providers. x-schemaName: AdminFulfillmentProviderListResponse required: - limit @@ -9905,23 +9786,23 @@ components: limit: type: number title: limit - description: The fulfillment provider's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The fulfillment provider's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The fulfillment provider's count. + description: The total count of items. fulfillment_providers: type: array - description: The fulfillment provider's fulfillment providers. + description: The list of fulfillment providers. items: $ref: '#/components/schemas/AdminFulfillmentProvider' AdminFulfillmentResponse: type: object - description: SUMMARY + description: A fulfillment's details. x-schemaName: AdminFulfillmentResponse required: - fulfillment @@ -9978,7 +9859,7 @@ components: description: The parent's deleted at. AdminFulfillmentSetDeleteResponse: type: object - description: SUMMARY + description: The deletion details. x-schemaName: AdminFulfillmentSetDeleteResponse required: - id @@ -9997,7 +9878,7 @@ components: deleted: type: boolean title: deleted - description: Whether the Fulfillment Set was deleted. + description: Whether the fulfillment set was deleted. AdminFulfillmentSetResponse: type: object description: SUMMARY @@ -10009,11 +9890,64 @@ components: $ref: '#/components/schemas/AdminFulfillmentSet' AdminGeoZone: type: object - description: The geo zone's geo zones. + description: The geo zone's details. x-schemaName: AdminGeoZone + required: + - id + - type + - country_code + - province_code + - city + - postal_expression + - created_at + - updated_at + - deleted_at + properties: + id: + type: string + title: id + description: The geo zone's ID. + type: + type: string + description: The geo zone's type. + enum: + - country + - province + - city + - zip + country_code: + type: string + title: country_code + description: The geo zone's country code. + province_code: + type: string + title: province_code + description: The geo zone's province code. + city: + type: string + title: city + description: The geo zone's city. + postal_expression: + type: object + description: The geo zone's postal expression. + created_at: + type: string + format: date-time + title: created_at + description: The date the geo zone was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the geo zone was update. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the geo zone was deleted. AdminImportProductRequest: type: object - description: SUMMARY + description: The import's details. x-schemaName: AdminImportProductRequest required: - file @@ -10022,7 +9956,7 @@ components: $ref: '#/components/schemas/File' AdminImportProductResponse: type: object - description: SUMMARY + description: The import process's details. x-schemaName: AdminImportProductResponse required: - transaction_id @@ -10031,10 +9965,10 @@ components: transaction_id: type: string title: transaction_id - description: The product's transaction id. + description: The ID of the workflow execution's transaction. This is useful to confirm the import using the `/admin/products/:transaction-id/import` API route. summary: type: object - description: The product's summary. + description: The import's summary. required: - toCreate - toUpdate @@ -10042,11 +9976,11 @@ components: toCreate: type: number title: toCreate - description: The summary's tocreate. + description: The number of products that will be created by this import. toUpdate: type: number title: toUpdate - description: The summary's toupdate. + description: The number of products that will be updated by this import. AdminInventoryItem: type: object description: The inventory item's details. @@ -10062,7 +9996,7 @@ components: sku: type: string title: sku - description: The inventory item's sku. + description: The inventory item's SKU. origin_country: type: string title: origin_country @@ -10070,15 +10004,15 @@ components: hs_code: type: string title: hs_code - description: The inventory item's hs code. + description: The inventory item's HS code. requires_shipping: type: boolean title: requires_shipping - description: The inventory item's requires shipping. + description: Whether the inventory item requires shipping. mid_code: type: string title: mid_code - description: The inventory item's mid code. + description: The inventory item's MID code. material: type: string title: material @@ -10110,18 +10044,18 @@ components: thumbnail: type: string title: thumbnail - description: The inventory item's thumbnail. + description: The URL of the inventory item's thumbnail. metadata: type: object - description: The inventory item's metadata. + description: The inventory item's metadata, can hold custom key-value pairs. location_levels: type: array - description: The inventory item's location levels. + description: The inventory item's associated inventory levels. items: $ref: '#/components/schemas/AdminInventoryLevel' AdminInventoryItemResponse: type: object - description: SUMMARY + description: The inventory item's details. x-schemaName: AdminInventoryItemResponse required: - inventory_item @@ -10130,7 +10064,7 @@ components: $ref: '#/components/schemas/AdminInventoryItem' AdminInventoryLevel: type: object - description: The location level's location levels. + description: The inventory level's details. x-schemaName: AdminInventoryLevel required: - id @@ -10151,60 +10085,51 @@ components: id: type: string title: id - description: The location level's ID. - created_at: - type: string - format: date-time - title: created_at - description: The location level's created at. - updated_at: - type: string - format: date-time - title: updated_at - description: The location level's updated at. - deleted_at: - type: string - format: date-time - title: deleted_at - description: The location level's deleted at. + description: The inventory level's ID. inventory_item_id: type: string title: inventory_item_id - description: The location level's inventory item id. + description: The ID of the inventory item this level belongs to. location_id: type: string title: location_id - description: The location level's location id. + description: The ID of the stock location this level belongs to. stocked_quantity: type: number title: stocked_quantity - description: The location level's stocked quantity. - raw_stocked_quantity: - type: object - description: The location level's raw stocked quantity. + description: The quantity of the associated inventory item stocked in the associated stock location. reserved_quantity: type: number title: reserved_quantity - description: The location level's reserved quantity. - raw_reserved_quantity: - type: object - description: The location level's raw reserved quantity. + description: The reserved quantity of the associated inventory item stocked in the associated stock location. incoming_quantity: type: number title: incoming_quantity - description: The location level's incoming quantity. - raw_incoming_quantity: - type: object - description: The location level's raw incoming quantity. + description: The incoming quantity of the associated inventory item stocked in the associated stock location. metadata: type: object - description: The location level's metadata. + description: The location level's metadata, can hold custom key-value pairs. inventory_item: type: object available_quantity: type: number title: available_quantity - description: The location level's available quantity. + description: The quantity available for order of the associated inventory item in the associated stock location. + created_at: + type: string + format: date-time + title: created_at + description: The date the inventory level was created. + updated_at: + type: string + format: date-time + title: updated_at + description: The date the inventory level was updated. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The date the inventory level was deleted. AdminInvite: type: object description: The invite's details. @@ -10227,7 +10152,7 @@ components: accepted: type: boolean title: accepted - description: The invite's accepted. + description: Whether the invite has been accepted. token: type: string title: token @@ -10235,24 +10160,24 @@ components: expires_at: type: string title: expires_at - description: The invite's expires at. + description: The invite's expiry date. format: date-time metadata: type: object - description: The invite's metadata. + description: The invite's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The invite's created at. + description: The date the invite was created. updated_at: type: string format: date-time title: updated_at - description: The invite's updated at. + description: The date the invite was updated. AdminInviteResponse: type: object - description: SUMMARY + description: The invite's details. x-schemaName: AdminInviteResponse required: - invite @@ -10261,7 +10186,7 @@ components: $ref: '#/components/schemas/AdminInvite' AdminLinkPriceListProducts: type: object - description: The removal details. + description: The products removal details. properties: remove: type: array @@ -10290,54 +10215,57 @@ components: to: type: string title: to - description: The notification's to. + description: Where to send the notification to. For example, if `channel` is `email`, this can be an email number. channel: type: string title: channel - description: The notification's channel. + description: Through which channel is the notification sent through. + example: email template: type: string title: template - description: The notification's template. + description: The ID of the template in a third-party service used as the notification's shape. data: type: object - description: The notification's data. + description: Data payload to send with the notification. trigger_type: type: string title: trigger_type - description: The notification's trigger type. + description: What triggered this notification. + example: order.created resource_id: type: string title: resource_id - description: The notification's resource id. + description: The ID of the associated resource. For example, if the notification was triggered because an order was created, this would be the ID of the order. resource_type: type: string title: resource_type - description: The notification's resource type. + description: The type of the resource that triggered the notification. + example: order receiver_id: type: string title: receiver_id - description: The notification's receiver id. + description: The ID of the user or customer that's receiving this notification. original_notification_id: type: string title: original_notification_id - description: The notification's original notification id. + description: The ID of the original notification, if this notification is resent. external_id: type: string title: external_id - description: The notification's external id. + description: The ID of the notification in an external or third-party system. provider_id: type: string title: provider_id - description: The notification's provider id. + description: The ID of the provider used to send the notification. created_at: type: string format: date-time title: created_at - description: The notification's created at. + description: The date the notification was created. AdminNotificationListResponse: type: object - description: SUMMARY + description: The paginated list of notifications. x-schemaName: AdminNotificationListResponse required: - limit @@ -10348,23 +10276,23 @@ components: limit: type: number title: limit - description: The notification's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The notification's offset. + description: The number of items skipped before retrieving the returned items. count: type: number title: count - description: The notification's count. + description: The total count of items. notifications: type: array - description: The notification's notifications. + description: The list of notifications. items: $ref: '#/components/schemas/AdminNotification' AdminNotificationResponse: type: object - description: SUMMARY + description: The notification's details. x-schemaName: AdminNotificationResponse required: - notification @@ -10444,19 +10372,19 @@ components: region_id: type: string title: region_id - description: The order's region id. + description: The ID of the region associated with the order. customer_id: type: string title: customer_id - description: The order's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order's sales channel id. + description: The ID of the sales channel the order is placed in. email: type: string title: email - description: The order's email. + description: The email of the customer that placed the order. format: email currency_code: type: string @@ -10465,7 +10393,7 @@ components: display_id: type: number title: display_id - description: The order's display id. + description: The order's display ID. items: type: array description: The order's items. @@ -10511,73 +10439,73 @@ components: $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The order's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total @@ -10585,34 +10513,34 @@ components: gift_card_tax_total: type: number title: gift_card_tax_total - description: The order's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. AdminOrderAddress: type: object - description: The order's billing address. + description: An order address. x-schemaName: AdminOrderAddress required: - id @@ -10620,84 +10548,85 @@ components: - created_at - updated_at properties: - country: - $ref: '#/components/schemas/AdminRegionCountry' id: type: string title: id - description: The billing address's ID. + description: The address's ID. customer_id: type: string title: customer_id - description: The billing address's customer id. + description: The ID of the customer this address belongs to. first_name: type: string title: first_name - description: The billing address's first name. + description: The address's first name. last_name: type: string title: last_name - description: The billing address's last name. + description: The address's last name. phone: type: string title: phone - description: The billing address's phone. + description: The address's phone. company: type: string title: company - description: The billing address's company. + description: The address's company. address_1: type: string title: address_1 - description: The billing address's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The billing address's address 2. + description: The address's second line. city: type: string title: city - description: The billing address's city. + description: The address's city. country_code: type: string title: country_code - description: The billing address's country code. + description: The address's country code. + example: us + country: + $ref: '#/components/schemas/AdminRegionCountry' province: type: string title: province - description: The billing address's province. + description: The address's province. postal_code: type: string title: postal_code - description: The billing address's postal code. + description: The address's postal code. metadata: type: object - description: The billing address's metadata. + description: The address's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The billing address's created at. + description: The date the address was created. updated_at: type: string format: date-time title: updated_at - description: The billing address's updated at. + description: The date the address was updated. AdminOrderChangesResponse: type: object - description: SUMMARY + description: The details of an order's changes. x-schemaName: AdminOrderChangesResponse required: - order_changes properties: order_changes: type: array - description: The order's order changes. + description: An order's changes. items: $ref: '#/components/schemas/BaseOrderChange' AdminOrderEditPreviewResponse: type: object - description: SUMMARY + description: The preview of an order edit. x-schemaName: AdminOrderEditPreviewResponse required: - order_preview @@ -10706,7 +10635,7 @@ components: $ref: '#/components/schemas/OrderPreview' AdminOrderEditResponse: type: object - description: SUMMARY + description: An order edit's details. x-schemaName: AdminOrderEditResponse required: - order_change @@ -10715,7 +10644,7 @@ components: $ref: '#/components/schemas/OrderChange' AdminOrderPreview: type: object - description: The return's order preview. + description: A preview of an order if a change, such as exchange, return, edit, or claim is applied on it. x-schemaName: AdminOrderPreview required: - return_requested_total @@ -10760,16 +10689,16 @@ components: return_requested_total: type: number title: return_requested_total - description: The order preview's return requested total. + description: The total of the requested return. order_change: $ref: '#/components/schemas/BaseOrderChange' items: type: array - description: The order preview's items. + description: The order's items. items: allOf: - type: object - description: The item's items. + description: An order's item. x-schemaName: BaseOrderLineItem required: - id @@ -10826,74 +10755,74 @@ components: thumbnail: type: string title: thumbnail - description: The item's thumbnail. + description: The URL of the item's thumbnail. variant: $ref: '#/components/schemas/BaseProductVariant' variant_id: type: string title: variant_id - description: The item's variant id. + description: The ID of the associated variant. product: $ref: '#/components/schemas/BaseProduct' product_id: type: string title: product_id - description: The item's product id. + description: The ID of the associated product. product_title: type: string title: product_title - description: The item's product title. + description: The title of the item's product. product_description: type: string title: product_description - description: The item's product description. + description: The description of the item's product. product_subtitle: type: string title: product_subtitle - description: The item's product subtitle. + description: The subtitle of the item's product. product_type: type: string title: product_type - description: The item's product type. + description: The ID of type of the item's product. product_collection: type: string title: product_collection - description: The item's product collection. + description: The ID of collection of the item's product. product_handle: type: string title: product_handle - description: The item's product handle. + description: The handle of the item's product. variant_sku: type: string title: variant_sku - description: The item's variant sku. + description: The SKU of the item's variant. variant_barcode: type: string title: variant_barcode - description: The item's variant barcode. + description: The barcode of the item's variant. variant_title: type: string title: variant_title - description: The item's variant title. + description: The title of the item's variant. variant_option_values: type: object - description: The item's variant option values. + description: The option values of the item's variant as key-value pairs. The key is the title of an option, and the value is the option's value. requires_shipping: type: boolean title: requires_shipping - description: The item's requires shipping. + description: Whether the item requires shipping. is_discountable: type: boolean title: is_discountable - description: The item's is discountable. + description: Whether the item is discountable. is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The item's is tax inclusive. + description: Whether the item's price includes taxes. compare_at_unit_price: type: number - title: compare_at_unit_price - description: The item's compare at unit price. + title: The original price of the item before a promotion or sale. + description: The unit_price: type: number title: unit_price @@ -10918,84 +10847,84 @@ components: type: string format: date-time title: created_at - description: The item's created at. + description: The date the item was created. updated_at: type: string format: date-time title: updated_at - description: The item's updated at. + description: The date the item was updated. metadata: type: object - description: The item's metadata. + description: The item's metadata, can hold custom key-value pairs. original_total: type: number title: original_total - description: The item's original total. + description: The item's total including taxes, excluding promotions. original_subtotal: type: number title: original_subtotal - description: The item's original subtotal. + description: The item's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The item's original tax total. + description: The tax total of the item excluding promotions. item_total: type: number title: item_total - description: The item's item total. + description: The item's total for a single unit including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The item's item subtotal. + description: The item's total for a single unit excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The item's item tax total. + description: The tax total for a single unit of the item including promotions. total: type: number title: total - description: The item's total. + description: The item's total including taxes and promotions. subtotal: type: number title: subtotal - description: The item's subtotal. + description: The item's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The item's tax total. + description: The tax total of the item including promotions. discount_total: type: number title: discount_total - description: The item's discount total. + description: The total of the item's discount / promotion. discount_tax_total: type: number title: discount_tax_total - description: The item's discount tax total. + description: The tax total of the item's discount / promotion refundable_total: type: number title: refundable_total - description: The item's refundable total. + description: The total refundable amount of the item's total. refundable_total_per_unit: type: number title: refundable_total_per_unit - description: The item's refundable total per unit. + description: The total refundable amount of the item's total for a single unit. - type: object - description: The item's items. + description: An order's item. properties: actions: type: array - description: The item's actions. + description: The actions applied on an item. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction shipping_methods: type: array - description: The order preview's shipping methods. + description: The order's shipping methods. items: allOf: - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. x-schemaName: BaseOrderShippingMethod required: - id @@ -11024,7 +10953,7 @@ components: order_id: type: string title: order_id - description: The shipping method's order id. + description: The ID of the order this shipping method belongs to. name: type: string title: name @@ -11040,17 +10969,19 @@ components: is_tax_inclusive: type: boolean title: is_tax_inclusive - description: The shipping method's is tax inclusive. + description: Whether the shipping method's amount is tax inclusive. shipping_option_id: type: string title: shipping_option_id - description: The shipping method's shipping option id. + description: The ID of the shipping option this method was created from. data: type: object - description: The shipping method's data. + description: The data relevant for the fulfillment provider to process this shipment. + externalDocs: + url: https://docs.medusajs.com/v2/resources/commerce-modules/order/concepts#data-property metadata: type: object - description: The shipping method's metadata. + description: The shipping method's metadata, can hold custom key-value pairs. tax_lines: type: array description: The shipping method's tax lines. @@ -11065,163 +10996,131 @@ components: oneOf: - type: string title: original_total - description: The shipping method's original total. + description: The shipping method's total including taxes, excluding promotions. - type: number title: original_total - description: The shipping method's original total. - - type: string - title: original_total - description: The shipping method's original total. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total including taxes, excluding promotions. original_subtotal: oneOf: - type: string title: original_subtotal - description: The shipping method's original subtotal. + description: The shipping method's total excluding taxes, including promotions. - type: number title: original_subtotal - description: The shipping method's original subtotal. - - type: string - title: original_subtotal - description: The shipping method's original subtotal. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total excluding taxes, including promotions. original_tax_total: oneOf: - type: string title: original_tax_total - description: The shipping method's original tax total. + description: The tax total of the shipping method excluding promotions. - type: number title: original_tax_total - description: The shipping method's original tax total. - - type: string - title: original_tax_total - description: The shipping method's original tax total. - - $ref: '#/components/schemas/IBigNumber' + description: The tax total of the shipping method excluding promotions. total: oneOf: - type: string title: total - description: The shipping method's total. + description: The shipping method's total including taxes and promotions. - type: number title: total - description: The shipping method's total. - - type: string - title: total - description: The shipping method's total. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total including taxes and promotions. subtotal: oneOf: - type: string title: subtotal - description: The shipping method's subtotal. + description: The shipping method's total excluding taxes, including promotions. - type: number title: subtotal - description: The shipping method's subtotal. - - type: string - title: subtotal - description: The shipping method's subtotal. - - $ref: '#/components/schemas/IBigNumber' + description: The shipping method's total excluding taxes, including promotions. tax_total: oneOf: - type: string title: tax_total - description: The shipping method's tax total. + description: The tax total of the shipping method including promotions. - type: number title: tax_total - description: The shipping method's tax total. - - type: string - title: tax_total - description: The shipping method's tax total. - - $ref: '#/components/schemas/IBigNumber' + description: The tax total of the shipping method including promotions. discount_total: oneOf: - type: string title: discount_total - description: The shipping method's discount total. + description: The total of the shipping method's promotion. - type: number title: discount_total - description: The shipping method's discount total. - - type: string - title: discount_total - description: The shipping method's discount total. - - $ref: '#/components/schemas/IBigNumber' + description: The total of the shipping method's promotion. discount_tax_total: oneOf: - type: string title: discount_tax_total - description: The shipping method's discount tax total. + description: The tax total of the shipping method's promotion. - type: number title: discount_tax_total description: The shipping method's discount tax total. - - type: string - title: discount_tax_total - description: The shipping method's discount tax total. - - $ref: '#/components/schemas/IBigNumber' created_at: type: string format: date-time title: created_at - description: The shipping method's created at. + description: The date the shipping method was created. updated_at: type: string format: date-time title: updated_at - description: The shipping method's updated at. + description: The date the shipping method was updated. - type: object - description: The shipping method's shipping methods. + description: The shipping method's details. properties: actions: type: array - description: The shipping method's actions. + description: The actions applied on the shipping method. items: type: object - description: The action's actions. + description: The action's details. x-schemaName: BaseOrderChangeAction currency_code: type: string title: currency_code - description: The order preview's currency code. + description: The order's currency code. version: type: number title: version - description: The order preview's version. + description: The order's version when this preview is applied. id: type: string title: id - description: The order preview's ID. + description: The order's ID. region_id: type: string title: region_id - description: The order preview's region id. + description: The ID of the order's associated region. customer_id: type: string title: customer_id - description: The order preview's customer id. + description: The ID of the customer that placed the order. sales_channel_id: type: string title: sales_channel_id - description: The order preview's sales channel id. + description: The ID of the sales channel that the order was placed in. email: type: string title: email - description: The order preview's email. + description: The email of the customer that placed the order. format: email display_id: type: number title: display_id - description: The order preview's display id. + description: The order's display ID. shipping_address: $ref: '#/components/schemas/AdminOrderAddress' billing_address: $ref: '#/components/schemas/AdminOrderAddress' payment_collections: type: array - description: The order preview's payment collections. + description: The order's payment collections. items: $ref: '#/components/schemas/AdminPaymentCollection' payment_status: type: string - description: The order preview's payment status. + description: The order's payment status. enum: - canceled - not_paid @@ -11235,12 +11134,12 @@ components: - requires_action fulfillments: type: array - description: The order preview's fulfillments. + description: The order's fulfillments. items: $ref: '#/components/schemas/BaseOrderFulfillment' fulfillment_status: type: string - description: The order preview's fulfillment status. + description: The order's fulfillment status. enum: - canceled - not_fulfilled @@ -11252,112 +11151,112 @@ components: - delivered transactions: type: array - description: The order preview's transactions. + description: The order's transactions. items: $ref: '#/components/schemas/BaseOrderTransaction' summary: $ref: '#/components/schemas/BaseOrderSummary' metadata: type: object - description: The order preview's metadata. + description: The order's metadata, can hold custom key-value pairs. created_at: type: string format: date-time title: created_at - description: The order preview's created at. + description: The date the order was created. updated_at: type: string format: date-time title: updated_at - description: The order preview's updated at. + description: The date the order was updated. original_item_total: type: number title: original_item_total - description: The order preview's original item total. + description: The total of the order's items including taxes, excluding promotions. original_item_subtotal: type: number title: original_item_subtotal - description: The order preview's original item subtotal. + description: The total of the order's items excluding taxes, including promotions. original_item_tax_total: type: number title: original_item_tax_total - description: The order preview's original item tax total. + description: The tax total of the order's items excluding promotions. item_total: type: number title: item_total - description: The order preview's item total. + description: The total of the order's items including taxes and promotions. item_subtotal: type: number title: item_subtotal - description: The order preview's item subtotal. + description: The total of the order's items excluding taxes, including promotions. item_tax_total: type: number title: item_tax_total - description: The order preview's item tax total. + description: The tax total of the order's items including promotions. original_total: type: number title: original_total - description: The order preview's original total. + description: The order's total excluding promotions, including taxes. original_subtotal: type: number title: original_subtotal - description: The order preview's original subtotal. + description: The order's total excluding taxes, including promotions. original_tax_total: type: number title: original_tax_total - description: The order preview's original tax total. + description: The order's tax total, excluding promotions. total: type: number title: total - description: The order preview's total. + description: The order's total including taxes and promotions. subtotal: type: number title: subtotal - description: The order preview's subtotal. + description: The order's total excluding taxes, including promotions. tax_total: type: number title: tax_total - description: The order preview's tax total. + description: The order's tax total including promotions. discount_total: type: number title: discount_total - description: The order preview's discount total. + description: The order's discount or promotions total. discount_tax_total: type: number title: discount_tax_total - description: The order preview's discount tax total. + description: The tax total of order's discount or promotion. gift_card_total: type: number title: gift_card_total - description: The order preview's gift card total. + description: The order's gift card total. gift_card_tax_total: type: number title: gift_card_tax_total - description: The order preview's gift card tax total. + description: The tax total of the order's gift card. shipping_total: type: number title: shipping_total - description: The order preview's shipping total. + description: The order's shipping total including taxes and promotions. shipping_subtotal: type: number title: shipping_subtotal - description: The order preview's shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. shipping_tax_total: type: number title: shipping_tax_total - description: The order preview's shipping tax total. + description: The tax total of the order's shipping. original_shipping_total: type: number title: original_shipping_total - description: The order preview's original shipping total. + description: The order's shipping total including taxes, excluding promotions. original_shipping_subtotal: type: number title: original_shipping_subtotal - description: The order preview's original shipping subtotal. + description: The order's shipping total excluding taxes, including promotions. original_shipping_tax_total: type: number title: original_shipping_tax_total - description: The order preview's original shipping tax total. + description: The tax total of the order's shipping excluding promotions. customer: $ref: '#/components/schemas/AdminCustomer' sales_channel: @@ -16794,6 +16693,17 @@ components: title: user description: The logged-in user. $ref: '#/components/schemas/AdminUser' + AuthCallbackResponse: + type: object + description: The authentication's details. + x-schemaName: AuthCallbackResponse + required: + - location + properties: + token: + type: string + title: location + description: The location to redirect the user to for further authentication with the third-party provider. AuthResponse: type: object description: The authentication's details. @@ -17563,6 +17473,80 @@ components: type: object description: The product's collection. x-schemaName: BaseCollection + BaseCustomer: + type: object + description: The customer's details. + x-schemaName: BaseCustomer + required: + - id + - email + - default_billing_address_id + - default_shipping_address_id + - company_name + - first_name + - last_name + - addresses + properties: + id: + type: string + title: id + description: The customer's ID. + email: + type: string + title: email + description: The customer's email. + format: email + default_billing_address_id: + type: string + title: default_billing_address_id + description: The ID of the address used as the default billing address. + default_shipping_address_id: + type: string + title: default_shipping_address_id + description: The ID of the address used as the default shipping address. + company_name: + type: string + title: company_name + description: The customer's company name. + first_name: + type: string + title: first_name + description: The customer's first name. + last_name: + type: string + title: last_name + description: The customer's last name. + addresses: + type: array + description: The customer's addresses. + items: + $ref: '#/components/schemas/BaseCustomerAddress' + phone: + type: string + title: phone + description: The customer's phone. + metadata: + type: object + description: The customer's metadata, used to store custom key-value pairs. + created_by: + type: string + title: created_by + description: The ID of the user that created this customer, if available. + created_at: + type: string + format: date-time + title: created_at + description: The customer's creation date. + updated_at: + type: string + format: date-time + title: updated_at + description: The customer's update date. + deleted_at: + type: string + format: date-time + title: deleted_at + description: The customer's deletion date. BaseCustomerAddress: type: object description: The address's addresses. @@ -22634,6 +22618,40 @@ components: properties: collection: $ref: '#/components/schemas/StoreCollection' + StoreCreateCart: + type: object + description: SUMMARY + x-schemaName: StoreCreateCart + properties: + region_id: + type: string + title: region_id + description: The cart's region id. + shipping_address: + $ref: '#/components/schemas/StoreCartAddress' + billing_address: + $ref: '#/components/schemas/StoreCartAddress' + email: + type: string + title: email + description: The cart's email. + format: email + currency_code: + type: string + title: currency_code + description: The cart's currency code. + items: + type: array + description: The cart's items. + items: + $ref: '#/components/schemas/StoreCartLineItem' + sales_channel_id: + type: string + title: sales_channel_id + description: The cart's sales channel id. + metadata: + type: object + description: The cart's metadata. StoreCreateCustomer: type: object description: SUMMARY diff --git a/www/apps/api-reference/specs/store/openapi.yaml b/www/apps/api-reference/specs/store/openapi.yaml index 1dcec388297ea..43e8bb7a18c0c 100644 --- a/www/apps/api-reference/specs/store/openapi.yaml +++ b/www/apps/api-reference/specs/store/openapi.yaml @@ -197,6 +197,8 @@ paths: $ref: paths/auth_customer_{auth_provider}_register.yaml /auth/session: $ref: paths/auth_session.yaml + /auth/token/refresh: + $ref: paths/auth_token_refresh.yaml /store/carts: $ref: paths/store_carts.yaml /store/carts/{id}: diff --git a/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}.yaml b/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}.yaml index 6ffaa08c93be6..1dee2c6650653 100644 --- a/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}.yaml +++ b/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}.yaml @@ -1,9 +1,18 @@ post: operationId: PostActor_typeAuth_provider summary: Authenticate Customer - description: >- + description: > Authenticate a customer and receive the JWT token to be used in the header of subsequent requests. + + + When used with a third-party provider, such as Google, the request returns a + `location` property. You redirect to the specified URL in your storefront to + continue authentication with the third-party service. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#types-of-authentication-flows + description: Learn about different authentication flows. x-authenticated: false parameters: - name: auth_provider @@ -13,9 +22,26 @@ post: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: >- + The input data necessary for authentication. For example, for + email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell - label: cURL + label: EmailPass Provider + source: + $ref: ../code_samples/Shell/auth_customer_{auth_provider}/post.sh + - lang: Shell + label: Google Provider + source: + $ref: ../code_samples/Shell/auth_customer_{auth_provider}/post.sh + - lang: Shell + label: GitHub Provider source: $ref: ../code_samples/Shell/auth_customer_{auth_provider}/post.sh tags: @@ -26,7 +52,9 @@ post: content: application/json: schema: - $ref: ../components/schemas/AuthResponse.yaml + oneOf: + - $ref: ../components/schemas/AuthResponse.yaml + - $ref: ../components/schemas/AuthCallbackResponse.yaml '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_callback.yaml b/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_callback.yaml index b737b72d35d8f..0f205dabbfeb7 100644 --- a/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_callback.yaml +++ b/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_callback.yaml @@ -1,11 +1,24 @@ post: operationId: PostActor_typeAuth_providerCallback summary: Validate Authentication Callback - description: >- - Third-party authentication providers, such as Google, require an API route - to call once authentication with the third-party provider is finished. This - API route validates callback for customers logged-in with third-party - providers. + description: > + This API route is used by your storefront or frontend application when a + third-party provider redirects to it after authentication. + + + It validates the authentication with the third-party provider and, if + successful, returns an authentication token. + + + You can decode the JWT token using libraries like + [react-jwt](https://www.npmjs.com/package/react-jwt) in the storefront. If + the decoded data doesn't have an `actor_id` property, then you must + register the customer using the Create Customer API route passing the token + in the request's Authorization header. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -17,7 +30,11 @@ post: example: google x-codeSamples: - lang: Shell - label: cURL + label: Google Provider + source: + $ref: ../code_samples/Shell/auth_customer_{auth_provider}_callback/post.sh + - lang: Shell + label: GitHub Provider source: $ref: ../code_samples/Shell/auth_customer_{auth_provider}_callback/post.sh tags: diff --git a/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_register.yaml b/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_register.yaml index fe6a2e3a21dff..c1af35f0d91d2 100644 --- a/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_register.yaml +++ b/www/apps/api-reference/specs/store/paths/auth_customer_{auth_provider}_register.yaml @@ -2,9 +2,13 @@ post: operationId: PostActor_typeAuth_provider_register summary: Retrieve Registration JWT Token description: >- - A registration JWT token is used in the header of requests that create a - customer. This API route retrieves the JWT token of a customer that hasn't - been registered yet. + This API route retrieves a registration JWT token of a customer that hasn't + been registered yet. The token is used in the header of requests that create + a customer. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#1-basic-authentication-flow + description: Learn about the basic authentication flow. x-authenticated: false parameters: - name: auth_provider @@ -14,6 +18,15 @@ post: schema: type: string example: emailpass + requestBody: + content: + application/json: + schema: + type: object + title: input + description: >- + The input data necessary for authentication. For example, for + email-pass authentication, pass `email` and `password` properties. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/auth_token_refresh.yaml b/www/apps/api-reference/specs/store/paths/auth_token_refresh.yaml new file mode 100644 index 0000000000000..575f05071e7bc --- /dev/null +++ b/www/apps/api-reference/specs/store/paths/auth_token_refresh.yaml @@ -0,0 +1,39 @@ +post: + operationId: PostAdminAuthTokenRefresh + summary: Refresh Authentication Token + description: >- + Refresh the authentication token of a customer. This is useful after + authenticating a customer with a third-party service to ensure the token + holds the new user's details, or when you don't want customers to re-login + every day. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow + description: Learn about third-party authentication flow. + x-authenticated: true + x-codeSamples: + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/auth_token_refresh/post.sh + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: ../components/schemas/AuthResponse.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 diff --git a/www/apps/api-reference/specs/store/paths/store_carts.yaml b/www/apps/api-reference/specs/store/paths/store_carts.yaml index d1306fa3b49da..da4213404360a 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts.yaml @@ -35,9 +35,9 @@ post: application/json: schema: allOf: - - $ref: ../components/schemas/CreateCartWorkflowInput.yaml + - $ref: ../components/schemas/StoreCreateCart.yaml - type: object - description: SUMMARY + description: The cart's details. properties: additional_data: type: object @@ -45,7 +45,7 @@ post: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. - description: SUMMARY + description: The cart's details. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml index f006842bafedf..2ad50decf8356 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml @@ -67,7 +67,9 @@ get: post: operationId: PostCartsId summary: Update a Cart - description: Update a cart's details. + description: >- + Update a cart's details. This unsets the shipping an payment methods chosen + before, and the customer would have to choose them again. x-authenticated: false parameters: - name: id @@ -109,7 +111,7 @@ post: allOf: - $ref: ../components/schemas/UpdateCartData.yaml - type: object - description: SUMMARY + description: The properties to update in the cart item. properties: additional_data: type: object @@ -117,7 +119,7 @@ post: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. - description: SUMMARY + description: The properties to update in the cart item. x-codeSamples: - lang: Shell label: cURL @@ -132,7 +134,7 @@ post: application/json: schema: type: object - description: SUMMARY + description: The updated cart's details. required: - cart properties: diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml index 75d1035f225c8..e9220c58afa63 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml @@ -1,8 +1,12 @@ post: operationId: PostCartsIdComplete - summary: Add Completes to Cart - description: Add a list of completes to a cart. + summary: Complete Cart + description: Complete a cart and place an order. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/checkout/complete-cart + description: 'Storefront guide: How to implement cart completion during checkout.' parameters: - name: id in: path @@ -36,17 +40,6 @@ post: 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. - requestBody: - content: - application/json: - schema: - type: object - description: SUMMARY - properties: - idempotency_key: - type: string - title: idempotency_key - description: The cart's idempotency key. x-codeSamples: - lang: Shell label: cURL @@ -62,7 +55,20 @@ post: schema: oneOf: - type: object - description: SUMMARY + description: The created order's details. + required: + - type + - order + properties: + type: + type: string + title: type + description: The type of the returned object. + default: order + order: + $ref: ../components/schemas/StoreOrder.yaml + - type: object + description: The details of why the cart completion failed. required: - type - cart @@ -71,12 +77,13 @@ post: type: type: string title: type - description: The cart's type. + description: The type of the returned object. + default: cart cart: $ref: ../components/schemas/StoreCart.yaml error: type: object - description: The cart's error. + description: The error's details. required: - message - name @@ -93,19 +100,12 @@ post: type: type: string title: type - description: The error's type. - - type: object - description: SUMMARY - required: - - type - - order - properties: - type: - type: string - title: type - description: The cart's type. - order: - $ref: ../components/schemas/StoreOrder.yaml + description: > + The error's type. Can be a [MedusaError + type](https://docs.medusajs.com/v2/advanced-development/api-routes/errors#medusaerror-types) + or `payment_authorization_error` or + `payment_requires_more_error` for payment-related + errors. '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml index 02d54dab32f2b..9bfa14e8fc088 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml @@ -1,7 +1,12 @@ post: operationId: PostCartsIdLineItems - summary: Add Line Items to Cart - description: Add a list of line items to a cart. + summary: Add Line Item to Cart + x-sidebar-summary: Add Line Item + description: Add a product variant as a line item in the cart. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#add-product-variant-to-cart + description: 'Storefront guide: How to add a product variant to the cart.' x-authenticated: false parameters: - name: id diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml index f3fc8f8a2c209..fe22872570ff4 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml @@ -1,7 +1,12 @@ post: operationId: PostCartsIdLineItemsLine_id - summary: Add Line Items to Cart - description: Add a list of line items to a cart. + summary: Update a Line Item in a Cart + x-sidebar-summary: Update Line Item + description: Update a line item's details in the cart. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#update-line-item-in-cart + description: 'Storefront guide: How to update a cart''s line item.' x-authenticated: false parameters: - name: id @@ -12,7 +17,7 @@ post: type: string - name: line_id in: path - description: The cart's line id. + description: The line item's ID. required: true schema: type: string @@ -76,10 +81,13 @@ post: x-workflow: updateLineItemInCartWorkflow delete: operationId: DeleteCartsIdLineItemsLine_id - summary: Remove Line Items from Cart - description: >- - Remove a list of line items from a cart. This doesn't delete the Line Item, - only the association between the Line Item and the cart. + summary: Remove Line Item from Cart + x-sidebar-summary: Remove Line Item + description: Remove a line item from a cart. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items#remove-line-item-from-cart + description: 'Storefront guide: How to remove line item from cart.' x-authenticated: false parameters: - name: id @@ -90,7 +98,7 @@ delete: type: string - name: line_id in: path - description: The cart's line id. + description: The line item's ID. required: true schema: type: string @@ -135,7 +143,7 @@ delete: schema: allOf: - type: object - description: SUMMARY + description: The deletion's details. required: - id - object @@ -144,21 +152,23 @@ delete: id: type: string title: id - description: The cart's ID. + description: The ID of the deleted line item. object: type: string title: object description: The name of the deleted object. + default: line-item deleted: type: boolean title: deleted - description: Whether the Cart was deleted. + description: Whether the item was deleted. - type: object - description: SUMMARY + description: The deletion's details. properties: parent: $ref: ../components/schemas/StoreCart.yaml - description: SUMMARY + description: The cart that the item belonged to. + description: The deletion's details. '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml index 7dafacbc55366..135e79ea63943 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml @@ -1,6 +1,7 @@ post: operationId: PostCartsIdPromotions summary: Add Promotions to Cart + x-sidebar-summary: Add Promotions description: Add a list of promotions to a cart. x-authenticated: false parameters: @@ -41,17 +42,17 @@ post: application/json: schema: type: object - description: SUMMARY + description: The promotion's details. required: - promo_codes properties: promo_codes: type: array - description: The cart's promo codes. + description: Promotion codes to add to the cart. items: type: string title: promo_codes - description: The promo code's promo codes. + description: A promotion code. x-codeSamples: - lang: Shell label: cURL @@ -82,9 +83,7 @@ post: delete: operationId: DeleteCartsIdPromotions summary: Remove Promotions from Cart - description: >- - Remove a list of promotions from a cart. This doesn't delete the Promotion, - only the association between the Promotion and the cart. + description: Remove a list of promotions from a cart. x-authenticated: false parameters: - name: id @@ -133,7 +132,7 @@ delete: application/json: schema: type: object - description: SUMMARY + description: The cart's details. required: - cart properties: diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml index 1d82a764af87e..71bf8f3eedb5e 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml @@ -1,7 +1,14 @@ post: operationId: PostCartsIdShippingMethods - summary: Add Shipping Methods to Cart - description: Add a list of shipping methods to a cart. + summary: Add Shipping Method to Cart + x-sidebar-summary: Add Shipping Method + description: >- + Add a shipping method to a cart. Use this API route when the customer + chooses their preferred shipping option. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping + description: 'Storefront guide: How to implement shipping during checkout.' x-authenticated: false parameters: - name: id @@ -41,17 +48,23 @@ post: application/json: schema: type: object - description: SUMMARY + description: The shipping method's details. required: - option_id properties: option_id: type: string title: option_id - description: The cart's option id. + description: The ID of the shipping option this method is created from. data: type: object - description: The cart's data. + description: >- + Any additional data relevant for the third-party fulfillment + provider to process the shipment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter + description: Learn more about the `data` parameter. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml index 304649c33d898..9096f876acbec 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml @@ -1,7 +1,8 @@ post: operationId: PostCartsIdTaxes - summary: Add Taxes to Cart - description: Add a list of taxes to a cart. + summary: Calculate Cart Taxes + x-sidebar-summary: Calculate Taxes + description: Calculate the cart's tax lines and amounts. x-authenticated: false parameters: - name: id diff --git a/www/apps/api-reference/specs/store/paths/store_collections.yaml b/www/apps/api-reference/specs/store/paths/store_collections.yaml index eb7cc9d0fae44..84190dc75b8e0 100644 --- a/www/apps/api-reference/specs/store/paths/store_collections.yaml +++ b/www/apps/api-reference/specs/store/paths/store_collections.yaml @@ -3,8 +3,12 @@ get: summary: List Collections description: >- Retrieve a list of collections. The collections can be filtered by fields - such as `id`. The collections can also be sorted or paginated. + such as `handle`. The collections can also be sorted or paginated. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list + description: 'Storefront guide: How to retrieve a list of collections.' parameters: - name: expand in: query @@ -63,11 +67,11 @@ get: with `-`. - name: deleted_at in: query - description: The collection's deleted at. + description: Filter by the collection's deletion date. required: false schema: type: object - description: The collection's deleted at. + description: Filter by the collection's deletion date. properties: $and: type: array @@ -351,20 +355,20 @@ get: oneOf: - type: string title: title - description: The collection's title. + description: Filter by a collection's title. - type: array - description: The collection's title. + description: Filter by collection titles. items: type: string title: title - description: The title's details. + description: A title. - name: created_at in: query - description: The collection's created at. + description: Filter by the collection's creation date. required: false schema: type: object - description: The collection's created at. + description: Filter by the collection's creation date. properties: $and: type: array @@ -388,11 +392,11 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -403,21 +407,19 @@ get: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -445,50 +447,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -539,9 +537,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -550,16 +546,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -567,15 +561,11 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -622,32 +612,32 @@ get: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - name: updated_at in: query - description: The collection's updated at. + description: Filter by the collection's update date. required: false schema: type: object - description: The collection's updated at. + description: Filter by the collection's update date. properties: $and: type: array @@ -671,11 +661,11 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -686,21 +676,19 @@ get: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -728,50 +716,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -822,9 +806,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -833,16 +815,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -850,15 +830,11 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -905,21 +881,21 @@ get: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -931,21 +907,21 @@ get: oneOf: - type: string title: handle - description: The collection's handle. + description: Filter by a collection's handle. - type: array - description: The collection's handle. + description: Filter by collection handles. items: type: string title: handle - description: The handle's details. + description: A handle. - name: q in: query - description: The collection's q. + description: Search term to filter the collection's searchable properties. required: false schema: type: string title: q - description: The collection's q. + description: Search term to filter the collection's searchable properties. - name: $and in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml index 4a93fa147aa20..83c4e37a8e5e8 100644 --- a/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml @@ -5,6 +5,10 @@ get: Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/collections/retrieve + description: 'Storefront guide: How to retrieve a collection.' parameters: - name: id in: path diff --git a/www/apps/api-reference/specs/store/paths/store_currencies.yaml b/www/apps/api-reference/specs/store/paths/store_currencies.yaml index 9e098b31671c7..4c770c56d279b 100644 --- a/www/apps/api-reference/specs/store/paths/store_currencies.yaml +++ b/www/apps/api-reference/specs/store/paths/store_currencies.yaml @@ -3,7 +3,7 @@ get: summary: List Currencies description: >- Retrieve a list of currencies. The currencies can be filtered by fields such - as `id`. The currencies can also be sorted or paginated. + as `code`. The currencies can also be sorted or paginated. x-authenticated: false parameters: - name: expand @@ -63,12 +63,12 @@ get: with `-`. - name: q in: query - description: The currency's q. + description: Search term to filter the currency's searchable properties. required: false schema: type: string title: q - description: The currency's q. + description: Search term to filter the currency's searchable properties. - name: code in: query required: false @@ -76,13 +76,13 @@ get: oneOf: - type: string title: code - description: The currency's code. + description: Filter by a currency code. - type: array - description: The currency's code. + description: Filter by currency codes. items: type: string title: code - description: The code's details. + description: A currency code. - name: $and in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml b/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml index a04e6a17ec7c1..a5adc037a78a1 100644 --- a/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml @@ -2,7 +2,7 @@ get: operationId: GetCurrenciesCode summary: Get a Currency description: >- - Retrieve a currency by its ID. You can expand the currency's relations or + Retrieve a currency by its code. You can expand the currency's relations or select the fields that should be returned. x-authenticated: false parameters: diff --git a/www/apps/api-reference/specs/store/paths/store_customers.yaml b/www/apps/api-reference/specs/store/paths/store_customers.yaml index 1d4fed43cb52d..bfefdf2b958cb 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers.yaml @@ -1,8 +1,15 @@ post: operationId: PostCustomers - summary: Create Customer - description: Create a customer. - x-authenticated: false + summary: Register Customer + description: >- + Register a customer. Use the `/auth/customer/emailpass/register` API route + first to retrieve the registration token and pass it in the header of the + request. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/customers/register + description: 'Storefront guide: How to register a customer.' + x-authenticated: true parameters: - name: expand in: query diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me.yaml index 3df4d62e3d525..f6c0668822e5f 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me.yaml @@ -1,10 +1,15 @@ get: operationId: GetCustomersMe - summary: List Customers + summary: Get Logged-in Customer + x-sidebar-summary: Get Customer description: >- - Retrieve a list of customers. The customers can be filtered by fields such - as `id`. The customers can also be sorted or paginated. + Retrieve the logged-in customer. You can expand the customer's relations or + select the fields that should be returned. x-authenticated: true + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/customers/retrieve + description: 'Storefront guide: How to retrieve the logged-in customer.' parameters: - name: expand in: query @@ -63,8 +68,12 @@ get: $ref: ../components/responses/500_error.yaml post: operationId: PostCustomersMe - summary: Create Customer - description: Create a customer. + summary: Update Customer + description: Update the logged-in customer's details. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/customers/profile + description: 'Storefront guide: How to edit a customer''s profile.' x-authenticated: true parameters: - name: expand diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml index add9d9799a122..97175791aaa7c 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml @@ -1,10 +1,16 @@ get: operationId: GetCustomersMeAddresses - summary: List Customers + summary: List Customer's Addresses + x-sidebary-summary: List Addresses description: >- - Retrieve a list of customers. The customers can be filtered by fields such - as `id`. The customers can also be sorted or paginated. + Retrieve the addresses of the logged-in customer. The addresses can be + filtered by fields such as `country_code`. The addresses can also be sorted + or paginated. x-authenticated: true + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#list-customer-addresses + description: 'Storefront guide: How to retrieve the logged-in customer''s addresses.' parameters: - name: expand in: query @@ -63,57 +69,36 @@ get: with `-`. - name: city in: query - description: The customer's city. - required: false + description: Filter by the address's city. + required: true schema: - oneOf: - - type: string - title: city - description: The customer's city. - - type: array - description: The customer's city. - items: - type: string - title: city - description: The city's details. - - name: country_code + type: string + title: city + description: Filter by the address's city. + - name: postal_code in: query - description: The customer's country code. - required: false + description: Filter by the address's postal code. + required: true schema: - oneOf: - - type: string - title: country_code - description: The customer's country code. - - type: array - description: The customer's country code. - items: - type: string - title: country_code - description: The country code's details. - - name: postal_code + type: string + title: postal_code + description: Filter by the address's postal code. + - name: country_code in: query - description: The customer's postal code. - required: false + description: Filter by the address's country code. + required: true schema: - oneOf: - - type: string - title: postal_code - description: The customer's postal code. - - type: array - description: The customer's postal code. - items: - type: string - title: postal_code - description: The postal code's details. + type: string + title: country_code + description: Filter by the address's country code. - name: q in: query - description: The customer's q. - required: false + description: Search term to filter the address's searchable properties. + required: true schema: type: string title: q - description: The customer's q. + description: Search term to filter the address's searchable properties. security: - cookie_auth: [] - jwt_token: [] @@ -145,8 +130,13 @@ get: $ref: ../components/responses/500_error.yaml post: operationId: PostCustomersMeAddresses - summary: Create Customer - description: Create a customer. + summary: Create Address for Logged-In Customer + x-sidebar-summary: Create Address + description: Create an address for the logged-in customer. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#add-customer-address + description: 'Storefront guide: How to create an address for the logged-in customer.' x-authenticated: true parameters: - name: expand @@ -183,11 +173,8 @@ post: application/json: schema: type: object - description: SUMMARY + description: The address's details. properties: - metadata: - type: object - description: The customer's metadata. first_name: type: string title: first_name @@ -203,43 +190,50 @@ post: company: type: string title: company - description: The customer's company. + description: The address's company. address_1: type: string title: address_1 - description: The customer's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The customer's address 2. + description: The address's second line. city: type: string title: city - description: The customer's city. + description: The address's city. country_code: type: string title: country_code - description: The customer's country code. + description: The address's country code. province: type: string title: province - description: The customer's province. + description: The address's province. postal_code: type: string title: postal_code - description: The customer's postal code. + description: The address's postal code. address_name: type: string title: address_name - description: The customer's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The customer's is default shipping. + description: >- + Whether the address is used by default for shipping during + checkout. is_default_billing: type: boolean title: is_default_billing - description: The customer's is default billing. + description: >- + Whether the address is used by default for billing during + checkout. + metadata: + type: object + description: Holds custom key-value pairs. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml index 3dc6c3f2d260a..1e57fb9afef80 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml @@ -1,14 +1,15 @@ get: operationId: GetCustomersMeAddressesAddress_id - summary: List Addresses + summary: Get Customer's Address + x-sidebar-summary: Get Address description: >- - Retrieve a list of addresses in a customer. The addresses can be filtered by - fields like FILTER FIELDS. The addresses can also be paginated. + Retrieve an address of the logged-in customer. You can expand the address's + relations or select the fields that should be returned. x-authenticated: true parameters: - name: address_id in: path - description: The customer's address id. + description: The address's ID. required: true schema: type: string @@ -69,13 +70,18 @@ get: $ref: ../components/responses/500_error.yaml post: operationId: PostCustomersMeAddressesAddress_id - summary: Add Addresses to Customer - description: Add a list of addresses to a customer. + summary: Update Customer's Address + x-sidebar-summary: Update Address + description: Update the logged-in customer's address. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#edit-an-address + description: 'Storefront guide: How to update an address of the logged-in customer.' x-authenticated: true parameters: - name: address_id in: path - description: The customer's address id. + description: The address's ID. required: true schema: type: string @@ -113,11 +119,8 @@ post: application/json: schema: type: object - description: SUMMARY + description: The properties to update in the address. properties: - metadata: - type: object - description: The customer's metadata. first_name: type: string title: first_name @@ -133,43 +136,50 @@ post: company: type: string title: company - description: The customer's company. + description: The address's company. address_1: type: string title: address_1 - description: The customer's address 1. + description: The address's first line. address_2: type: string title: address_2 - description: The customer's address 2. + description: The address's second line. city: type: string title: city - description: The customer's city. + description: The address's city. country_code: type: string title: country_code - description: The customer's country code. + description: The address's country code. province: type: string title: province - description: The customer's province. + description: The address's province. postal_code: type: string title: postal_code - description: The customer's postal code. + description: The address's postal code. address_name: type: string title: address_name - description: The customer's address name. + description: The address's name. is_default_shipping: type: boolean title: is_default_shipping - description: The customer's is default shipping. + description: >- + Whether the address is used by default for shipping during + checkout. is_default_billing: type: boolean title: is_default_billing - description: The customer's is default billing. + description: >- + Whether the address is used by default for billing during + checkout. + metadata: + type: object + description: Holds custom key-value pairs. x-codeSamples: - lang: Shell label: cURL @@ -200,15 +210,18 @@ post: x-workflow: updateCustomerAddressesWorkflow delete: operationId: DeleteCustomersMeAddressesAddress_id - summary: Remove Addresses from Customer - description: >- - Remove a list of addresses from a customer. This doesn't delete the Address, - only the association between the Address and the customer. + summary: Remove Customer's Address + x-sidebar-summary: Remove Address + description: Remove an address of the logged-in customer. x-authenticated: true + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#delete-customer-address + description: 'Storefront guide: How to delete a customer''s address.' parameters: - name: address_id in: path - description: The customer's address id. + description: The address's ID. required: true schema: type: string @@ -257,7 +270,7 @@ delete: schema: allOf: - type: object - description: SUMMARY + description: The deletion's details. required: - id - object @@ -266,21 +279,23 @@ delete: id: type: string title: id - description: The customer's ID. + description: The address's ID. object: type: string title: object description: The name of the deleted object. + default: address deleted: type: boolean title: deleted - description: Whether the Customer was deleted. + description: Whether the address was deleted. - type: object - description: SUMMARY + description: The deletion's details. properties: parent: $ref: ../components/schemas/StoreCustomer.yaml - description: SUMMARY + description: The details of the customer the address belongs to. + description: The deletion's details. '400': $ref: ../components/responses/400_error.yaml '401': diff --git a/www/apps/api-reference/specs/store/paths/store_orders.yaml b/www/apps/api-reference/specs/store/paths/store_orders.yaml index fc8c0c10edf25..aaffc78e24ae8 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders.yaml @@ -1,9 +1,10 @@ get: operationId: GetOrders - summary: List Orders + summary: List Logged-in Customer's Orders + x-sidebar-summary: List Orders description: >- - Retrieve a list of orders. The orders can be filtered by fields such as - `id`. The orders can also be sorted or paginated. + Retrieve the orders of the logged-in customer. The orders can be filtered by + fields such as `id`. The orders can also be sorted or paginated. x-authenticated: true parameters: - name: expand @@ -68,13 +69,13 @@ get: oneOf: - type: string title: id - description: The order's ID. + description: Filter by an order ID. - type: array - description: The order's ID. + description: Filter by order IDs. items: type: string title: id - description: The id's ID. + description: An order ID. - name: $and in: query required: false diff --git a/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml index d0a18d5198947..119b56c25ed52 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml @@ -1,8 +1,8 @@ get: operationId: GetOrdersId - summary: Get a Order + summary: Get an Order description: >- - Retrieve a order by its ID. You can expand the order's relations or select + Retrieve an order by its ID. You can expand the order's relations or select the fields that should be returned. x-authenticated: false parameters: diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml index 87300a047a279..f71a4d82def3f 100644 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml +++ b/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml @@ -1,7 +1,13 @@ post: operationId: PostPaymentCollections summary: Create Payment Collection - description: Create a payment collection. + description: >- + Create a payment collection for a cart. This is used during checkout, where + the payment collection holds the cart's payment sessions. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment + description: 'Storefront guide: How to implement payment during checkout.' x-authenticated: false parameters: - name: expand diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml index 2300507400705..f4367f0599326 100644 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml +++ b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml @@ -1,7 +1,16 @@ post: operationId: PostPaymentCollectionsIdPaymentSessions - summary: Add Payment Sessions to Payment Collection - description: Add a list of payment sessions to a payment collection. + summary: Initialize Payment Session of a Payment Collection + x-sidebar-summary: Initialize Payment Session + description: >- + Initialize and add a payment session to a payment collection. This is used + during checkout, where you create a payment collection for the cart, then + initialize a payment session for the payment provider that the customer + chooses. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment + description: 'Storefront guide: How to implement payment during checkout.' x-authenticated: false parameters: - name: id @@ -41,20 +50,30 @@ post: application/json: schema: type: object - description: SUMMARY + description: The payment session's details. required: - provider_id properties: provider_id: type: string title: provider_id - description: The payment collection's provider id. + description: The ID of the payment provider the customer chose. + example: pp_stripe_stripe context: type: object - description: The payment collection's context. + description: >- + The payment's context, such as the customer or address details. + If the customer is logged-in, the customer `id` is set in the + context under a `customer.id` property. data: type: object - description: The payment collection's data. + description: >- + Any data necessary for the payment provider to process the + payment. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-session#data-property + description: Learn more about the payment session's data property x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml b/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml index 6a1141a6e4d5c..7b6b5498336cf 100644 --- a/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml +++ b/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml @@ -2,10 +2,13 @@ get: operationId: GetPaymentProviders summary: List Payment Providers description: >- - Retrieve a list of payment providers. The payment providers can be filtered - by fields such as `id`. The payment providers can also be sorted or - paginated. + Retrieve a list of payment providers. You must provide the `region_id` query + parameter to retrieve the payment providers enabled in that region. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment + description: 'Storefront guide: How to implement payment during checkout.' parameters: - name: expand in: query @@ -64,12 +67,14 @@ get: with `-`. - name: region_id in: query - description: The payment provider's region id. + description: >- + Filter by a region ID to get the payment providers enabled in that + region. required: true schema: type: string title: region_id - description: The payment provider's region id. + description: Filter by a region ID. x-codeSamples: - lang: Shell label: cURL @@ -85,7 +90,7 @@ get: schema: allOf: - type: object - description: SUMMARY + description: The list of payment providers. required: - limit - offset @@ -94,23 +99,25 @@ get: limit: type: number title: limit - description: The payment provider's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The payment provider's offset. + description: >- + The number of items skipped before retrieving the returned + items. count: type: number title: count - description: The payment provider's count. + description: The total number of items. - type: object - description: SUMMARY + description: The list of payment providers. required: - payment_providers properties: payment_providers: type: array - description: The payment provider's payment providers. + description: The list of payment providers. items: $ref: ../components/schemas/StorePaymentProvider.yaml '400': diff --git a/www/apps/api-reference/specs/store/paths/store_product-categories.yaml b/www/apps/api-reference/specs/store/paths/store_product-categories.yaml index d63a3c4d488f1..855923a5e8078 100644 --- a/www/apps/api-reference/specs/store/paths/store_product-categories.yaml +++ b/www/apps/api-reference/specs/store/paths/store_product-categories.yaml @@ -6,6 +6,10 @@ get: filtered by fields such as `id`. The product categories can also be sorted or paginated. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list + description: 'Storefront guide: How to retrieve a list of product categories.' parameters: - name: expand in: query @@ -64,12 +68,12 @@ get: with `-`. - name: q in: query - description: The product category's q. + description: Search term to filter the product category's properties. required: false schema: type: string title: q - description: The product category's q. + description: Search term to filter the product category's properties. - name: id in: query required: false @@ -77,13 +81,13 @@ get: oneOf: - type: string title: id - description: The product category's ID. + description: Filter by a product category's ID. - type: array - description: The product category's ID. + description: Filter by product category IDs. items: type: string title: id - description: The id's ID. + description: A product category ID. - name: description in: query required: false @@ -91,13 +95,19 @@ get: oneOf: - type: string title: description - description: The product category's description. + description: >- + Filter by a description. This only matches categories with the + exact description. To search by a term or keyword, use the `q` + query parameter instead. - type: array - description: The product category's description. + description: >- + Filter by descriptions. This only matches categories that have one + of the provided descriptions. To search by a term or keyword, use + the `q` query parameter instead. items: type: string title: description - description: The description's details. + description: A description. - name: handle in: query required: false @@ -105,13 +115,13 @@ get: oneOf: - type: string title: handle - description: The product category's handle. + description: Filter by a category's handle. - type: array - description: The product category's handle. + description: Filter by category handles. items: type: string title: handle - description: The handle's details. + description: A handle. - name: parent_category_id in: query required: false @@ -119,36 +129,44 @@ get: oneOf: - type: string title: parent_category_id - description: The product category's parent category id. + description: The ID of a category to retrieve its child categories. - type: array - description: The product category's parent category id. + description: The ID of categories to retrieve their child categories. items: type: string title: parent_category_id - description: The parent category id's details. + description: A product category's ID. - name: include_ancestors_tree in: query - description: The product category's include ancestors tree. + description: >- + Whether to retrieve the category's parent. When enabled, the parent + category is set in the `parent_category` property. required: false schema: type: boolean title: include_ancestors_tree - description: The product category's include ancestors tree. + description: >- + Whether to retrieve the category's parent. When enabled, the parent + category is set in the `parent_category` property. - name: include_descendants_tree in: query - description: The product category's include descendants tree. + description: >- + Whether to retrieve a list of child categories. When enabled, the parent + categories are added to the `category_children` property. required: false schema: type: boolean title: include_descendants_tree - description: The product category's include descendants tree. + description: >- + Whether to retrieve a list of child categories. When enabled, the + parent categories are added to the `category_children` property. - name: created_at in: query - description: The product category's created at. + description: Filter by the category's creation date. required: false schema: type: object - description: The product category's created at. + description: Filter by the category's creation date. properties: $and: type: array @@ -172,11 +190,11 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -187,21 +205,19 @@ get: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -229,50 +245,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -323,9 +335,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -334,16 +344,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -351,15 +359,11 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -406,32 +410,32 @@ get: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - name: updated_at in: query - description: The product category's updated at. + description: Filter by the category's update date. required: false schema: type: object - description: The product category's updated at. + description: Filter by the category's update date. properties: $and: type: array @@ -455,11 +459,11 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -470,21 +474,19 @@ get: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -512,50 +514,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -606,9 +604,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -617,16 +613,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -634,15 +628,11 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -689,32 +679,32 @@ get: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists description: Filter by whether a value for this parameter exists (not `null`). - name: deleted_at in: query - description: The product category's deleted at. + description: Filter by the category's deletion date. required: false schema: type: object - description: The product category's deleted at. + description: Filter by the category's deletion date. properties: $and: type: array @@ -738,11 +728,11 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne @@ -753,21 +743,19 @@ get: items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -795,50 +783,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -889,9 +873,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -900,16 +882,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -917,15 +897,11 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -972,21 +948,21 @@ get: items: type: string title: $overlap - description: Filter arrays that have overlapping values with this parameter. + description: The values to match. $contains: type: array description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: Filter arrays that contain some of the values of this parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -996,7 +972,9 @@ get: required: false schema: type: array - description: The product category's $and. + description: >- + Join query parameters with an AND condition. Each object's content is + the same type as the expected query parameters. items: type: object title: $and @@ -1016,13 +994,13 @@ get: oneOf: - type: string title: name - description: The product category's name. + description: Filter by a product category name. - type: array - description: The product category's name. + description: Filter by product category names. items: type: string title: name - description: The name's details. + description: A product category name. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml index 7bf3c7486187d..c12d3a15db0bf 100644 --- a/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml @@ -5,6 +5,10 @@ get: Retrieve a product category by its ID. You can expand the product category's relations or select the fields that should be returned. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/categories/retrieve + description: 'Storefront guide: How to retrieve a product category.' parameters: - name: id in: path @@ -40,20 +44,28 @@ get: prefix it will replace the entire default fields. - name: include_ancestors_tree in: query - description: The product category's include ancestors tree. + description: >- + Whether to retrieve the category's parent. When enabled, the parent + category is set in the `parent_category` property. required: false schema: type: boolean title: include_ancestors_tree - description: The product category's include ancestors tree. + description: >- + Whether to retrieve the category's parent. When enabled, the parent + category is set in the `parent_category` property. - name: include_descendants_tree in: query - description: The product category's include descendants tree. + description: >- + Whether to retrieve a list of child categories. When enabled, the parent + categories are added to the `category_children` property. required: false schema: type: boolean title: include_descendants_tree - description: The product category's include descendants tree. + description: >- + Whether to retrieve a list of child categories. When enabled, the + parent categories are added to the `category_children` property. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_products.yaml b/www/apps/api-reference/specs/store/paths/store_products.yaml index 4c2804c72f951..d92dd42cf39a0 100644 --- a/www/apps/api-reference/specs/store/paths/store_products.yaml +++ b/www/apps/api-reference/specs/store/paths/store_products.yaml @@ -5,6 +5,10 @@ get: Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/price + description: 'Storefront guide: How to retrieve a product variants'' prices.' parameters: - name: expand in: query @@ -63,32 +67,40 @@ get: with `-`. - name: $and in: query + description: >- + Join query parameters with an AND condition. Each object's content is + the same type as the expected query parameters. required: false schema: type: array - description: The product's $and. + description: >- + Join query parameters with an AND condition. Each object's content is + the same type as the expected query parameters. items: type: object - description: The $and's details. title: $and - name: $or in: query + description: >- + Join query parameters with an OR condition. Each object's content is the + same type as the expected query parameters. required: false schema: type: array - description: The product's $or. + description: >- + Join query parameters with an OR condition. Each object's content is + the same type as the expected query parameters. items: type: object - description: The $or's details. title: $or - name: q in: query - description: The product's q. + description: Search term to filter the product's searchable properties. required: false schema: type: string title: q - description: The product's q. + description: Search term to filter the product's searchable properties. - name: id in: query required: false @@ -96,122 +108,153 @@ get: oneOf: - type: string title: id - description: The product's ID. + description: Filter by a product ID. - type: array - description: The product's ID. + description: Filter by product IDs. items: type: string title: id - description: The id's ID. + description: A product ID. - name: title in: query - description: The product's title. + description: Filter by product titles. required: false schema: oneOf: - type: string title: title - description: The product's title. + description: Filter by a title. - type: array - description: The product's title. + description: Filter by titles. items: type: string title: title - description: The title's details. + description: A title. - name: handle in: query - description: The product's handle. + description: Filter by product handles. required: false schema: oneOf: - type: string title: handle - description: The product's handle. + description: Filter by a product handle. - type: array - description: The product's handle. + description: Filter by product handles. items: type: string title: handle - description: The handle's details. + description: A product handle. - name: is_giftcard in: query - description: The product's is giftcard. + description: Whether the product is a gift card. required: false schema: type: boolean title: is_giftcard - description: The product's is giftcard. + description: Whether the product is a gift card. - name: collection_id in: query - description: The product's collection id. + description: Filter by a collection's ID to retrieve the products in it. required: false schema: - description: The product's collection id. + description: Filter by a collection's ID to retrieve the products in it. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/collections/products + description: 'Storefront guide: Retrieve a collection''s products.' items: type: string title: collection_id - description: The collection id's details. + description: A collection's ID. + - name: tag_id + in: query + description: Filter by a tag's ID to retrieve the products in it. + required: false + schema: + oneOf: + - type: string + title: tag_id + description: Filter by a product tag's ID. + - type: array + description: Filter by product tag IDs. + items: + type: string + title: tag_id + description: A product tag ID. - name: type_id in: query - description: The product's type id. + description: Filter by a type's ID to retrieve the products in it. required: false schema: - description: The product's type id. - items: - type: string - title: type_id - description: The type id's details. + oneOf: + - type: string + title: type_id + description: Filter by a product type's ID. + - type: array + description: Filter by product type IDs. + items: + type: string + title: type_id + description: A product type ID. - name: created_at in: query - description: The product's created at. + description: Filter by the product's creation date. required: false schema: type: object - description: The product's created at. + description: Filter by the product's creation date. properties: $and: type: array - description: The created at's $and. + description: >- + Join query parameters with an AND condition. Each object's content + is the same type as the expected query parameters. items: type: object + title: $and $or: type: array - description: The created at's $or. + description: >- + Join query parameters with an OR condition. Each object's content + is the same type as the expected query parameters. items: type: object + title: $or $eq: oneOf: - type: string title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne + description: Filter by values not equal to this parameter. $in: type: array - description: The created at's $in. + description: Filter by values in this array. items: type: string title: $in + description: The value to match. $nin: type: array - description: The created at's $nin. + description: Filter by values not in this array. items: type: string title: $nin + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -219,13 +262,17 @@ get: properties: $and: type: array - description: The $not's $and. + description: >- + Join query parameters with an AND condition. Each object's + content is the same type as the expected query parameters. items: type: object title: $and $or: type: array - description: The $not's $or. + description: >- + Join query parameters with an OR condition. Each object's + content is the same type as the expected query parameters. items: type: object title: $or @@ -235,50 +282,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -329,9 +372,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -340,16 +381,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -357,119 +396,134 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt + description: >- + Filter by values greater than this parameter. Useful for numbers + and dates only. $gte: type: string title: $gte + description: >- + Filter by values greater than or equal to this parameter. Useful + for numbers and dates only. $lt: type: string title: $lt + description: >- + Filter by values less than this parameter. Useful for numbers and + dates only. $lte: type: string title: $lte + description: >- + Filter by values less than or equal to this parameter. Useful for + numbers and dates only. $like: type: string title: $like - description: The created at's $like. + description: Apply a `like` filter. Useful for strings only. $re: type: string title: $re - description: The created at's $re. + description: Apply a regex filter. Useful for strings only. $ilike: type: string title: $ilike - description: The created at's $ilike. + description: Apply a case-insensitive `like` filter. Useful for strings only. $fulltext: type: string title: $fulltext - description: The created at's $fulltext. + description: Filter to apply on full-text properties. $overlap: type: array - description: The created at's $overlap. + description: Filter arrays that have overlapping values with this parameter. items: type: string title: $overlap - description: The $overlap's details. + description: The values to match. $contains: type: array - description: The created at's $contains. + description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: The $contain's $contains. + description: The values to match. $contained: type: array - description: The created at's $contained. + description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: The $contained's details. + description: The values to match. $exists: type: boolean title: $exists - description: The created at's $exists. + description: Filter by whether a value for this parameter exists (not `null`). - name: updated_at in: query - description: The product's updated at. + description: Filter by the product's update date. required: false schema: type: object - description: The product's updated at. + description: Filter by the product's update date. properties: $and: type: array - description: The updated at's $and. + description: >- + Join query parameters with an AND condition. Each object's content + is the same type as the expected query parameters. items: type: object + title: $and $or: type: array - description: The updated at's $or. + description: >- + Join query parameters with an OR condition. Each object's content + is the same type as the expected query parameters. items: type: object + title: $or $eq: oneOf: - type: string title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne + description: Filter by values not equal to this parameter. $in: type: array - description: The updated at's $in. + description: Filter by values in this array. items: type: string title: $in + description: The value to match. $nin: type: array - description: The updated at's $nin. + description: Filter by values not in this array. items: type: string title: $nin + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -477,13 +531,17 @@ get: properties: $and: type: array - description: The $not's $and. + description: >- + Join query parameters with an AND condition. Each object's + content is the same type as the expected query parameters. items: type: object title: $and $or: type: array - description: The $not's $or. + description: >- + Join query parameters with an OR condition. Each object's + content is the same type as the expected query parameters. items: type: object title: $or @@ -493,50 +551,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -587,9 +641,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -598,16 +650,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -615,119 +665,134 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt + description: >- + Filter by values greater than this parameter. Useful for numbers + and dates only. $gte: type: string title: $gte + description: >- + Filter by values greater than or equal to this parameter. Useful + for numbers and dates only. $lt: type: string title: $lt + description: >- + Filter by values less than this parameter. Useful for numbers and + dates only. $lte: type: string title: $lte + description: >- + Filter by values less than or equal to this parameter. Useful for + numbers and dates only. $like: type: string title: $like - description: The updated at's $like. + description: Apply a `like` filter. Useful for strings only. $re: type: string title: $re - description: The updated at's $re. + description: Apply a regex filter. Useful for strings only. $ilike: type: string title: $ilike - description: The updated at's $ilike. + description: Apply a case-insensitive `like` filter. Useful for strings only. $fulltext: type: string title: $fulltext - description: The updated at's $fulltext. + description: Filter to apply on full-text properties. $overlap: type: array - description: The updated at's $overlap. + description: Filter arrays that have overlapping values with this parameter. items: type: string title: $overlap - description: The $overlap's details. + description: The values to match. $contains: type: array - description: The updated at's $contains. + description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: The $contain's $contains. + description: The values to match. $contained: type: array - description: The updated at's $contained. + description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: The $contained's details. + description: The values to match. $exists: type: boolean title: $exists - description: The updated at's $exists. + description: Filter by whether a value for this parameter exists (not `null`). - name: deleted_at in: query - description: The product's deleted at. + description: Filter by the product's date date. required: false schema: type: object - description: The product's deleted at. + description: Filter by the product's date date. properties: $and: type: array - description: The deleted at's $and. + description: >- + Join query parameters with an AND condition. Each object's content + is the same type as the expected query parameters. items: type: object + title: $and $or: type: array - description: The deleted at's $or. + description: >- + Join query parameters with an OR condition. Each object's content + is the same type as the expected query parameters. items: type: object + title: $or $eq: oneOf: - type: string title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: An exact match. $ne: type: string title: $ne + description: Filter by values not equal to this parameter. $in: type: array - description: The deleted at's $in. + description: Filter by values in this array. items: type: string title: $in + description: The value to match. $nin: type: array - description: The deleted at's $nin. + description: Filter by values not in this array. items: type: string title: $nin + description: The value not to match. $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter. - type: object description: >- Filter by values not matching the conditions in this @@ -735,13 +800,17 @@ get: properties: $and: type: array - description: The $not's $and. + description: >- + Join query parameters with an AND condition. Each object's + content is the same type as the expected query parameters. items: type: object title: $and $or: type: array - description: The $not's $or. + description: >- + Join query parameters with an OR condition. Each object's + content is the same type as the expected query parameters. items: type: object title: $or @@ -751,50 +820,46 @@ get: title: $eq description: Filter by an exact match. - type: array - description: Filter by an exact match. + description: Filter by multiple exact matches. items: type: string title: $eq - description: Filter by an exact match. + description: The value to match. $ne: type: string title: $ne - description: Filter by values not equal to this parameter. + description: Filter by values not matching this parameter. $in: type: array description: Filter by values in this array. items: type: string title: $in - description: Filter by values in this array. + description: The value to match. $nin: type: array description: Filter by values not in this array. items: type: string title: $nin - description: Filter by values not in this array. + description: The value to not match $not: oneOf: - type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching this parameter - type: object description: >- Filter by values not matching the conditions in this parameter. - type: array description: >- - Filter by values not matching the conditions in this + Filter by values not matching the values of this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt @@ -845,9 +910,7 @@ get: items: type: string title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. + description: The value to match. $contains: type: array description: >- @@ -856,16 +919,14 @@ get: items: type: string title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. + description: The values to match. $contained: type: array description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: Filter arrays that contain all values of this parameter. + description: The values to match. $exists: type: boolean title: $exists @@ -873,92 +934,132 @@ get: Filter by whether a value for this parameter exists (not `null`). - type: array - description: >- - Filter by values not matching the conditions in this - parameter. + description: Filter by values not matching those in this parameter. items: type: string title: $not - description: >- - Filter by values not matching the conditions in this - parameter. + description: The values to not match. $gt: type: string title: $gt + description: >- + Filter by values greater than this parameter. Useful for numbers + and dates only. $gte: type: string title: $gte + description: >- + Filter by values greater than or equal to this parameter. Useful + for numbers and dates only. $lt: type: string title: $lt + description: >- + Filter by values less than this parameter. Useful for numbers and + dates only. $lte: type: string title: $lte + description: >- + Filter by values less than or equal to this parameter. Useful for + numbers and dates only. $like: type: string title: $like - description: The deleted at's $like. + description: Apply a `like` filter. Useful for strings only. $re: type: string title: $re - description: The deleted at's $re. + description: Apply a regex filter. Useful for strings only. $ilike: type: string title: $ilike - description: The deleted at's $ilike. + description: Apply a case-insensitive `like` filter. Useful for strings only. $fulltext: type: string title: $fulltext - description: The deleted at's $fulltext. + description: Filter to apply on full-text properties. $overlap: type: array - description: The deleted at's $overlap. + description: Filter arrays that have overlapping values with this parameter. items: type: string title: $overlap - description: The $overlap's details. + description: The values to match. $contains: type: array - description: The deleted at's $contains. + description: Filter arrays that contain some of the values of this parameter. items: type: string title: $contains - description: The $contain's $contains. + description: The values to match. $contained: type: array - description: The deleted at's $contained. + description: Filter arrays that contain all values of this parameter. items: type: string title: $contained - description: The $contained's details. + description: The values to match. $exists: type: boolean title: $exists - description: The deleted at's $exists. + description: Filter by whether a value for this parameter exists (not `null`). - name: region_id in: query - description: The product's region id. + description: >- + The ID of the region the products are being viewed from. This is + required if you're retrieving product variant prices with taxes. required: false schema: type: string title: region_id - description: The product's region id. - - name: currency_code + description: >- + The ID of the region the products are being viewed from. This is + required if you're retrieving product variant prices with taxes. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/price/examples/tax-price + description: 'Storefront guide: How to show product variants'' prices with taxes.' + - name: country_code in: query - description: The product's currency code. + description: >- + The country code the products are being viewed from. This is required if + you're retrieving product variant prices with taxes. required: false schema: type: string - title: currency_code - description: The product's currency code. + title: country_code + description: >- + The country code the products are being viewed from. This is required + if you're retrieving product variant prices with taxes. - name: province in: query - description: The product's province. + description: >- + The province the products are being viewed from. This is useful to + narrow down the tax context when calculating product variant prices with + taxes. required: false schema: type: string title: province - description: The product's province. + description: >- + The province the products are being viewed from. This is useful to + narrow down the tax context when calculating product variant prices + with taxes. + - name: cart_id + in: query + description: >- + The ID of the customer's cart. If set, the cart's region and shipping + address's country code and province are used instead of the `region_id`, + `country_code`, and `province` properties. + required: false + schema: + type: string + title: cart_id + description: >- + The ID of the customer's cart. If set, the cart's region and shipping + address's country code and province are used instead of the + `region_id`, `country_code`, and `province` properties. - name: sales_channel_id in: query required: false @@ -966,13 +1067,13 @@ get: oneOf: - type: string title: sales_channel_id - description: The product's sales channel id. + description: The ID of a sales channel to retrieve products in it. - type: array - description: The product's sales channel id. + description: The IDs of sales channels to retrieve products in them. items: type: string title: sales_channel_id - description: The sales channel id's details. + description: A sales channel's ID. - name: category_id in: query required: false @@ -980,27 +1081,13 @@ get: oneOf: - type: string title: category_id - description: The product's category id. + description: The ID of a product category to retrieve products in it. - type: array - description: The product's category id. + description: The ID of product categories to retrieve products in them. items: type: string title: category_id - description: The category id's details. - - name: tag_id - in: query - required: false - schema: - oneOf: - - type: string - title: tag_id - description: The product's tag id. - - type: array - description: The product's tag id. - items: - type: string - title: tag_id - description: The tag id's details. + description: A product category's ID. x-codeSamples: - lang: Shell label: cURL @@ -1016,7 +1103,7 @@ get: schema: allOf: - type: object - description: SUMMARY + description: The paginated list of products. required: - limit - offset @@ -1025,23 +1112,25 @@ get: limit: type: number title: limit - description: The product's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The product's offset. + description: >- + The number of items skipped before retrieving the returned + items. count: type: number title: count - description: The product's count. + description: The total number of items. - type: object - description: SUMMARY + description: The paginated list of products. required: - products properties: products: type: array - description: The product's products. + description: The list of products. items: type: object '400': diff --git a/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml index e43a682dc759a..181c70e219e29 100644 --- a/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml @@ -5,6 +5,10 @@ get: Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned. x-authenticated: false + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/price + description: 'Storefront guide: How to retrieve a product variants'' prices.' parameters: - name: id in: path @@ -40,36 +44,59 @@ get: prefix it will replace the entire default fields. - name: region_id in: query - description: The product's region id. + description: >- + The ID of the region the product is being viewed from. This is required + if you're retrieving product variant prices with taxes. required: false schema: type: string title: region_id - description: The product's region id. + description: >- + The ID of the region the product is being viewed from. This is + required if you're retrieving product variant prices with taxes. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/products/price/examples/tax-price + description: 'Storefront guide: How to show product variants'' prices with taxes.' - name: country_code in: query - description: The product's country code. + description: >- + The country code the product is being viewed from. This is required if + you're retrieving product variant prices with taxes. required: false schema: type: string title: country_code - description: The product's country code. + description: >- + The country code the product is being viewed from. This is required if + you're retrieving product variant prices with taxes. - name: province in: query - description: The product's province. + description: >- + The province the product is being viewed from. This is useful to narrow + down the tax context when calculating product variant prices with taxes. required: false schema: type: string title: province - description: The product's province. + description: >- + The province the product is being viewed from. This is useful to + narrow down the tax context when calculating product variant prices + with taxes. - name: cart_id in: query - description: The product's cart id. + description: >- + The ID of the customer's cart. If set, the cart's region and shipping + address's country code and province are used instead of the `region_id`, + `country_code`, and `province` properties. required: false schema: type: string title: cart_id - description: The product's cart id. + description: >- + The ID of the customer's cart. If set, the cart's region and shipping + address's country code and province are used instead of the + `region_id`, `country_code`, and `province` properties. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_regions.yaml b/www/apps/api-reference/specs/store/paths/store_regions.yaml index 8c7212bd7dc18..7cf386f27e83b 100644 --- a/www/apps/api-reference/specs/store/paths/store_regions.yaml +++ b/www/apps/api-reference/specs/store/paths/store_regions.yaml @@ -5,6 +5,9 @@ get: Retrieve a list of regions. The regions can be filtered by fields such as `id`. The regions can also be sorted or paginated. x-authenticated: false + externalDocs: + url: https://docs.medusajs.com/v2/resources/storefront-development/regions/list + description: 'Storefront guide: How to retrieve a list of regions.' parameters: - name: expand in: query @@ -63,12 +66,12 @@ get: with `-`. - name: q in: query - description: The region's q. + description: Search term to filter the region's searchable properties. required: false schema: type: string title: q - description: The region's q. + description: Search term to filter the region's searchable properties. - name: id in: query required: false @@ -76,552 +79,13 @@ get: oneOf: - type: string title: id - description: The region's ID. + description: Filter by a region's ID. - type: array - description: The region's ID. + description: Filter by region IDs. items: type: string title: id - description: The id's ID. - - type: object - description: The region's ID. - properties: - $and: - type: array - description: >- - Join query parameters with an AND condition. Each object's - content is the same type as the expected query parameters. - items: - type: object - title: $and - $or: - type: array - description: >- - Join query parameters with an OR condition. Each object's - content is the same type as the expected query parameters. - items: - type: object - title: $or - $eq: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - $ne: - oneOf: - - type: string - title: $ne - description: Filter by values not equal to this parameter. - - type: array - description: Filter by values not equal to this parameter. - items: - type: string - title: $ne - description: Filter by values not equal to this parameter. - $in: - type: array - description: Filter by values in this array. - items: - oneOf: - - type: string - title: $in - description: Filter by values in this array. - - type: array - description: Filter by values in this array. - items: - type: string - title: $in - description: Filter by values in this array. - $nin: - type: array - description: Filter by values not in this array. - items: - oneOf: - - type: string - title: $nin - description: Filter by values not in this array. - - type: array - description: Filter by values not in this array. - items: - type: string - title: $nin - description: Filter by values not in this array. - $not: - oneOf: - - type: string - title: $not - description: >- - Filter by values not matching the conditions in this - parameter. - - type: object - description: >- - Filter by values not matching the conditions in this - parameter. - properties: - $and: - type: array - description: >- - Join query parameters with an AND condition. Each - object's content is the same type as the expected - query parameters. - items: - type: object - title: $and - $or: - type: array - description: >- - Join query parameters with an OR condition. Each - object's content is the same type as the expected - query parameters. - items: - type: object - title: $or - $eq: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - $ne: - type: string - title: $ne - description: Filter by values not equal to this parameter. - $in: - type: array - description: Filter by values in this array. - items: - type: string - title: $in - description: Filter by values in this array. - $nin: - type: array - description: Filter by values not in this array. - items: - type: string - title: $nin - description: Filter by values not in this array. - $not: - oneOf: - - type: string - title: $not - description: >- - Filter by values not matching the conditions in - this parameter. - - type: object - description: >- - Filter by values not matching the conditions in - this parameter. - - type: array - description: >- - Filter by values not matching the conditions in - this parameter. - items: - type: string - title: $not - description: >- - Filter by values not matching the conditions in - this parameter. - $gt: - type: string - title: $gt - description: >- - Filter by values greater than this parameter. Useful - for numbers and dates only. - $gte: - type: string - title: $gte - description: >- - Filter by values greater than or equal to this - parameter. Useful for numbers and dates only. - $lt: - type: string - title: $lt - description: >- - Filter by values less than this parameter. Useful for - numbers and dates only. - $lte: - type: string - title: $lte - description: >- - Filter by values less than or equal to this parameter. - Useful for numbers and dates only. - $like: - type: string - title: $like - description: Apply a `like` filter. Useful for strings only. - $re: - type: string - title: $re - description: Apply a regex filter. Useful for strings only. - $ilike: - type: string - title: $ilike - description: >- - Apply a case-insensitive `like` filter. Useful for - strings only. - $fulltext: - type: string - title: $fulltext - description: Filter to apply on full-text properties. - $overlap: - type: array - description: >- - Filter arrays that have overlapping values with this - parameter. - items: - type: string - title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. - $contains: - type: array - description: >- - Filter arrays that contain some of the values of this - parameter. - items: - type: string - title: $contains - description: >- - Filter arrays that contain some of the values of - this parameter. - $contained: - type: array - description: >- - Filter arrays that contain all values of this - parameter. - items: - type: string - title: $contained - description: >- - Filter arrays that contain all values of this - parameter. - $exists: - type: boolean - title: $exists - description: >- - Filter by whether a value for this parameter exists - (not `null`). - - type: array - description: >- - Filter by values not matching the conditions in this - parameter. - items: - type: string - title: $not - description: >- - Filter by values not matching the conditions in this - parameter. - - type: array - description: >- - Filter by values not matching the conditions in this - parameter. - items: - oneOf: - - type: string - title: $not - description: >- - Filter by values not matching the conditions in this - parameter. - - type: object - description: >- - Filter by values not matching the conditions in this - parameter. - properties: - $and: - type: array - description: >- - Join query parameters with an AND condition. - Each object's content is the same type as the - expected query parameters. - items: - type: object - title: $and - $or: - type: array - description: >- - Join query parameters with an OR condition. Each - object's content is the same type as the - expected query parameters. - items: - type: object - title: $or - $eq: - oneOf: - - type: string - title: $eq - description: Filter by an exact match. - - type: array - description: Filter by an exact match. - items: - type: string - title: $eq - description: Filter by an exact match. - $ne: - type: string - title: $ne - description: Filter by values not equal to this parameter. - $in: - type: array - description: Filter by values in this array. - items: - type: string - title: $in - description: Filter by values in this array. - $nin: - type: array - description: Filter by values not in this array. - items: - type: string - title: $nin - description: Filter by values not in this array. - $not: - oneOf: - - type: string - title: $not - description: >- - Filter by values not matching the conditions - in this parameter. - - type: object - description: >- - Filter by values not matching the conditions - in this parameter. - - type: array - description: >- - Filter by values not matching the conditions - in this parameter. - items: - type: string - title: $not - description: >- - Filter by values not matching the - conditions in this parameter. - $gt: - type: string - title: $gt - description: >- - Filter by values greater than this parameter. - Useful for numbers and dates only. - $gte: - type: string - title: $gte - description: >- - Filter by values greater than or equal to this - parameter. Useful for numbers and dates only. - $lt: - type: string - title: $lt - description: >- - Filter by values less than this parameter. - Useful for numbers and dates only. - $lte: - type: string - title: $lte - description: >- - Filter by values less than or equal to this - parameter. Useful for numbers and dates only. - $like: - type: string - title: $like - description: Apply a `like` filter. Useful for strings only. - $re: - type: string - title: $re - description: Apply a regex filter. Useful for strings only. - $ilike: - type: string - title: $ilike - description: >- - Apply a case-insensitive `like` filter. Useful - for strings only. - $fulltext: - type: string - title: $fulltext - description: Filter to apply on full-text properties. - $overlap: - type: array - description: >- - Filter arrays that have overlapping values with - this parameter. - items: - type: string - title: $overlap - description: >- - Filter arrays that have overlapping values - with this parameter. - $contains: - type: array - description: >- - Filter arrays that contain some of the values of - this parameter. - items: - type: string - title: $contains - description: >- - Filter arrays that contain some of the values - of this parameter. - $contained: - type: array - description: >- - Filter arrays that contain all values of this - parameter. - items: - type: string - title: $contained - description: >- - Filter arrays that contain all values of this - parameter. - $exists: - type: boolean - title: $exists - description: >- - Filter by whether a value for this parameter - exists (not `null`). - $gt: - oneOf: - - type: string - title: $gt - description: >- - Filter by values greater than this parameter. Useful for - numbers and dates only. - - type: array - description: >- - Filter by values greater than this parameter. Useful for - numbers and dates only. - items: - type: string - title: $gt - description: >- - Filter by values greater than this parameter. Useful for - numbers and dates only. - $gte: - oneOf: - - type: string - title: $gte - description: >- - Filter by values greater than or equal to this parameter. - Useful for numbers and dates only. - - type: array - description: >- - Filter by values greater than or equal to this parameter. - Useful for numbers and dates only. - items: - type: string - title: $gte - description: >- - Filter by values greater than or equal to this - parameter. Useful for numbers and dates only. - $lt: - oneOf: - - type: string - title: $lt - description: >- - Filter by values less than this parameter. Useful for - numbers and dates only. - - type: array - description: >- - Filter by values less than this parameter. Useful for - numbers and dates only. - items: - type: string - title: $lt - description: >- - Filter by values less than this parameter. Useful for - numbers and dates only. - $lte: - oneOf: - - type: string - title: $lte - description: >- - Filter by values less than or equal to this parameter. - Useful for numbers and dates only. - - type: array - description: >- - Filter by values less than or equal to this parameter. - Useful for numbers and dates only. - items: - type: string - title: $lte - description: >- - Filter by values less than or equal to this parameter. - Useful for numbers and dates only. - $like: - type: string - title: $like - description: Apply a `like` filter. Useful for strings only. - $re: - type: string - title: $re - description: Apply a regex filter. Useful for strings only. - $ilike: - type: string - title: $ilike - description: >- - Apply a case-insensitive `like` filter. Useful for strings - only. - $fulltext: - type: string - title: $fulltext - description: Filter to apply on full-text properties. - $overlap: - type: array - description: >- - Filter arrays that have overlapping values with this - parameter. - items: - type: string - title: $overlap - description: >- - Filter arrays that have overlapping values with this - parameter. - $contains: - type: array - description: >- - Filter arrays that contain some of the values of this - parameter. - items: - type: string - title: $contains - description: >- - Filter arrays that contain some of the values of this - parameter. - $contained: - type: array - description: Filter arrays that contain all values of this parameter. - items: - type: string - title: $contained - description: Filter arrays that contain all values of this parameter. - $exists: - type: boolean - title: $exists - description: >- - Filter by whether a value for this parameter exists (not - `null`). + description: A region's ID. - name: name in: query required: false @@ -629,13 +93,29 @@ get: oneOf: - type: string title: name - description: The region's name. + description: Filter by a region name. - type: array - description: The region's name. + description: Filter by region names. items: type: string title: name - description: The name's details. + description: A region's name. + - name: currency_code + in: query + required: false + schema: + oneOf: + - type: string + title: currency_code + description: Filter by a currency code to retrieve regions that use that code. + - type: array + description: >- + Filter by currency codes to retrieve regions that use one of these + codes. + items: + type: string + title: currency_code + description: A currency code. - name: $and in: query description: >- @@ -664,20 +144,6 @@ get: items: type: object title: $or - - name: currency_code - in: query - required: false - schema: - oneOf: - - type: string - title: currency_code - description: The region's currency code. - - type: array - description: The region's currency code. - items: - type: string - title: currency_code - description: The currency code's details. x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml b/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml index 41ab0368acaa6..63b8a4156ba69 100644 --- a/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml +++ b/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml @@ -2,8 +2,8 @@ get: operationId: GetReturnReasons summary: List Return Reasons description: >- - Retrieve a list of return reasons. The return reasons can be filtered by - fields such as `id`. The return reasons can also be sorted or paginated. + Retrieve a list of return reasons. The return reasons can be sorted or + paginated. x-authenticated: false parameters: - name: expand @@ -76,7 +76,7 @@ get: schema: allOf: - type: object - description: SUMMARY + description: The paginated list of return reasons. required: - limit - offset @@ -85,23 +85,25 @@ get: limit: type: number title: limit - description: The return reason's limit. + description: The maximum number of items returned. offset: type: number title: offset - description: The return reason's offset. + description: >- + The number of items skipped before retrieving the returned + items. count: type: number title: count - description: The return reason's count. + description: The total number of items. - type: object - description: SUMMARY + description: The paginated list of return reasons. required: - return_reasons properties: return_reasons: type: array - description: The return reason's return reasons. + description: The list of return reasons. items: $ref: ../components/schemas/StoreReturnReason.yaml '400': diff --git a/www/apps/api-reference/specs/store/paths/store_return.yaml b/www/apps/api-reference/specs/store/paths/store_return.yaml index 637d658f9cf18..536d2d6f0bed2 100644 --- a/www/apps/api-reference/specs/store/paths/store_return.yaml +++ b/www/apps/api-reference/specs/store/paths/store_return.yaml @@ -1,7 +1,9 @@ post: operationId: PostReturn summary: Create Return - description: Create a return. + description: >- + Create a return for an order's items. The admin receives the return and + process it from their side. x-authenticated: false requestBody: content: diff --git a/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml b/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml index 4ce4b79b4bbab..a4442cf35d3e4 100644 --- a/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml +++ b/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml @@ -1,9 +1,16 @@ get: operationId: GetShippingOptions - summary: List Shipping Options - description: >- - Retrieve a list of shipping options. The shipping options can be filtered by - fields such as `id`. The shipping options can also be sorted or paginated. + summary: List Shipping Options for Cart + description: > + Retrieve a list of shipping options for a cart. The cart's ID is set in the + required `cart_id` query parameter. + + + The shipping options also be sorted or paginated. + externalDocs: + url: >- + https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping + description: 'Storefront guide: How to implement shipping during checkout.' x-authenticated: false parameters: - name: fields @@ -53,12 +60,12 @@ get: with `-`. - name: cart_id in: query - description: The shipping option's cart id. + description: The ID of the cart to retrieve its shipping options. required: true schema: type: string title: cart_id - description: The shipping option's cart id. + description: The ID of the cart to retrieve its shipping options. - name: $and in: query description: >-