diff --git a/www/apps/api-reference/generated/generated-store-sidebar.mjs b/www/apps/api-reference/generated/generated-store-sidebar.mjs
index 6252f3f9ea..556852701d 100644
--- a/www/apps/api-reference/generated/generated-store-sidebar.mjs
+++ b/www/apps/api-reference/generated/generated-store-sidebar.mjs
@@ -132,24 +132,6 @@ const generatedgeneratedStoreSidebarSidebar = {
"loaded": false,
"showLoadingIfEmpty": true
},
- {
- "type": "category",
- "title": "Gift Card Invitations",
- "children": [
- {
- "type": "link",
- "path": "gift-card-invitations_giftcardinvitation_schema",
- "title": "GiftCardInvitation Object",
- "loaded": true,
- "badge": {
- "variant": "neutral",
- "text": "Schema"
- }
- }
- ],
- "loaded": false,
- "showLoadingIfEmpty": true
- },
{
"type": "category",
"title": "Gift Cards",
diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}_orders/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}_orders/get.sh
new file mode 100644
index 0000000000..de89d83325
--- /dev/null
+++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}_orders/get.sh
@@ -0,0 +1,2 @@
+curl '{backend_url}/admin/gift-cards/{id}/orders' \
+-H 'Authorization: Bearer {access_token}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}_transfer/post.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}_transfer/post.sh
deleted file mode 100644
index 0a581c9a48..0000000000
--- a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}_transfer/post.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-curl -X POST '{backend_url}/admin/gift-cards/{id}/transfer' \
--H 'Authorization: Bearer {access_token}' \
--H 'Content-Type: application/json' \
---data-raw '{
- "customer_id": "{value}"
-}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCard.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCard.yaml
index 8841c09e93..9b11dda115 100644
--- a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCard.yaml
+++ b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCard.yaml
@@ -4,7 +4,6 @@ x-schemaName: AdminGiftCard
required:
- line_item
- customer
- - invitation
- id
- code
- status
@@ -65,8 +64,6 @@ properties:
type: string
title: expires_at
description: The date the gift card expires at.
- invitation:
- $ref: ./AdminGiftCardInvitation.yaml
created_at:
type: string
format: date-time
diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardInvitation.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardInvitation.yaml
deleted file mode 100644
index 221cdc59ad..0000000000
--- a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardInvitation.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-type: object
-description: The gift card invitation details.
-required:
- - gift_card
- - id
- - code
- - status
- - expires_at
- - email
-properties:
- id:
- type: string
- title: id
- description: The invitation's ID.
- email:
- type: string
- title: email
- description: The invitation's email.
- format: email
- code:
- type: string
- title: code
- description: The invitation's code.
- status:
- type: string
- description: The invitation's status.
- enum:
- - pending
- - accepted
- - rejected
- expires_at:
- type: string
- title: expires_at
- description: The date the invitation expires at.
- gift_card:
- type: object
-x-schemaName: AdminGiftCardInvitation
diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsResponse.yaml
index eda7affe60..b798a97033 100644
--- a/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsResponse.yaml
+++ b/www/apps/api-reference/specs/admin/components/schemas/AdminGiftCardsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of gift cards.
items:
$ref: ./AdminGiftCard.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The gift card's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminStoreCreditAccountsResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminStoreCreditAccountsResponse.yaml
index 7f93a469e6..033f91d9db 100644
--- a/www/apps/api-reference/specs/admin/components/schemas/AdminStoreCreditAccountsResponse.yaml
+++ b/www/apps/api-reference/specs/admin/components/schemas/AdminStoreCreditAccountsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts.
items:
$ref: ./AdminStoreCreditAccount.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionGroupsResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionGroupsResponse.yaml
index b97a557331..744f99a346 100644
--- a/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionGroupsResponse.yaml
+++ b/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionGroupsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of transaction groups.
items:
$ref: ./AdminTransactionGroup.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The transaction group's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionsResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionsResponse.yaml
index 0d55e47604..b8e5b882b7 100644
--- a/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionsResponse.yaml
+++ b/www/apps/api-reference/specs/admin/components/schemas/AdminTransactionsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of transactions.
items:
$ref: ./AdminTransaction.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTransferGiftCard.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTransferGiftCard.yaml
deleted file mode 100644
index 9a445317ce..0000000000
--- a/www/apps/api-reference/specs/admin/components/schemas/AdminTransferGiftCard.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-type: object
-description: The details of the gift card transfer request.
-x-schemaName: AdminTransferGiftCard
-required:
- - customer_id
-properties:
- customer_id:
- type: string
- title: customer_id
- description: The ID of the customer to transfer the gift card to.
diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreCreateGiftCardInvitation.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreCreateGiftCardInvitation.yaml
deleted file mode 100644
index f953a5e531..0000000000
--- a/www/apps/api-reference/specs/admin/components/schemas/StoreCreateGiftCardInvitation.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-type: object
-description: The details to create a gift card invitation.
-x-schemaName: StoreCreateGiftCardInvitation
-required:
- - email
-properties:
- email:
- type: string
- title: email
- description: The email address to send the gift card invitation to.
- format: email
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card invitation expires.
- format: date-time
diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreGiftCard.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreGiftCard.yaml
index 7235e9ee70..cd556e46c4 100644
--- a/www/apps/api-reference/specs/admin/components/schemas/StoreGiftCard.yaml
+++ b/www/apps/api-reference/specs/admin/components/schemas/StoreGiftCard.yaml
@@ -4,7 +4,6 @@ x-schemaName: StoreGiftCard
required:
- customer
- line_item
- - invitation
- id
- code
- status
@@ -20,6 +19,12 @@ required:
properties:
customer:
$ref: ./StoreCustomer.yaml
+ line_item:
+ $ref: ./StoreOrderLineItem.yaml
+ id:
+ type: string
+ title: id
+ description: The gift card's ID.
code:
type: string
title: code
@@ -34,22 +39,32 @@ properties:
type: number
title: value
description: The gift card's amount.
+ currency_code:
+ type: string
+ title: currency_code
+ description: The gift card's currency code.
+ example: usd
customer_id:
type: string
title: customer_id
description: The ID of the customer that the gift card belongs to.
- id:
- type: string
- title: id
- description: The gift card's ID.
reference_id:
type: string
title: reference_id
description: The gift card's reference ID.
+ note:
+ type: string
+ title: note
+ description: A note with more information about the gift card.
reference:
type: string
title: reference
description: The gift card's reference.
+ expires_at:
+ type: string
+ title: expires_at
+ description: The date the gift card expires.
+ format: date-time
created_at:
type: string
format: date-time
@@ -60,20 +75,3 @@ properties:
format: date-time
title: updated_at
description: The date the gift card was updated.
- currency_code:
- type: string
- title: currency_code
- description: The gift card's currency code.
- example: usd
- note:
- type: string
- title: note
- description: The gift card's note.
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card expires.
- invitation:
- type: object
- line_item:
- $ref: ./StoreOrderLineItem.yaml
diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreGiftCardInvitationResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreGiftCardInvitationResponse.yaml
deleted file mode 100644
index 178bc96d8d..0000000000
--- a/www/apps/api-reference/specs/admin/components/schemas/StoreGiftCardInvitationResponse.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-type: object
-description: The gift card invitation's details.
-x-schemaName: StoreGiftCardInvitationResponse
-required:
- - gift_card_invitation
-properties:
- gift_card_invitation:
- $ref: ./StoreGiftCardInvitation.yaml
diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreStoreCreditAccountsResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreStoreCreditAccountsResponse.yaml
index 3ba7a0059e..94b1a8272b 100644
--- a/www/apps/api-reference/specs/admin/components/schemas/StoreStoreCreditAccountsResponse.yaml
+++ b/www/apps/api-reference/specs/admin/components/schemas/StoreStoreCreditAccountsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts.
items:
$ref: ./StoreStoreCreditAccount.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml
index 7b37e63101..562339250e 100644
--- a/www/apps/api-reference/specs/admin/openapi.full.yaml
+++ b/www/apps/api-reference/specs/admin/openapi.full.yaml
@@ -20123,6 +20123,65 @@ paths:
- text: Cloud
description: |
This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ /admin/gift-cards/{id}/orders:
+ get:
+ operationId: GetGiftCardsIdOrders
+ summary: List Gift Card's Orders
+ x-sidebar-summary: List Orders
+ description: Retrieve the list of orders that a gift card was used in.
+ x-authenticated: true
+ x-ignoreCleanup: true
+ parameters:
+ - name: id
+ in: path
+ description: The gift card's ID.
+ required: true
+ schema:
+ type: string
+ - name: fields
+ in: query
+ description: |-
+ Comma-separated fields that should be included in the returned data.
+ if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ without prefix it will replace the entire default fields.
+ required: false
+ schema:
+ type: string
+ title: fields
+ description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields.
+ externalDocs:
+ url: '#select-fields-and-relations'
+ security:
+ - api_token: []
+ - cookie_auth: []
+ - jwt_token: []
+ x-codeSamples:
+ - lang: Shell
+ label: cURL
+ source: |-
+ curl '{backend_url}/admin/gift-cards/{id}/orders' \
+ -H 'Authorization: Bearer {access_token}'
+ tags:
+ - Gift Cards
+ responses:
+ '200':
+ description: OK
+ '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'
+ x-badges:
+ - text: Cloud
+ description: |
+ This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
/admin/gift-cards/{id}/redeem:
post:
operationId: PostGiftCardsIdRedeem
@@ -20194,77 +20253,6 @@ paths:
- text: Cloud
description: |
This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
- /admin/gift-cards/{id}/transfer:
- post:
- operationId: PostGiftCardsIdTransfer
- summary: Transfer Gift Card
- description: Transfer a gift card to another customer.
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: id
- in: path
- description: The gift card's ID.
- required: true
- schema:
- type: string
- - name: fields
- in: query
- description: |-
- Comma-separated fields that should be included in the returned data.
- if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- security:
- - api_token: []
- - cookie_auth: []
- - jwt_token: []
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AdminTransferGiftCard'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |-
- curl -X POST '{backend_url}/admin/gift-cards/{id}/transfer' \
- -H 'Authorization: Bearer {access_token}' \
- -H 'Content-Type: application/json' \
- --data-raw '{
- "customer_id": "{value}"
- }'
- tags:
- - Gift Cards
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AdminGiftCardResponse'
- '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'
- x-badges:
- - text: Cloud
- description: |
- This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
/admin/inventory-items:
get:
operationId: GetInventoryItems
@@ -60112,7 +60100,6 @@ components:
required:
- line_item
- customer
- - invitation
- id
- code
- status
@@ -60173,8 +60160,6 @@ components:
type: string
title: expires_at
description: The date the gift card expires at.
- invitation:
- $ref: '#/components/schemas/AdminGiftCardInvitation'
created_at:
type: string
format: date-time
@@ -60185,44 +60170,6 @@ components:
format: date-time
title: updated_at
description: The date the gift card was updated at.
- AdminGiftCardInvitation:
- type: object
- description: The gift card invitation details.
- required:
- - gift_card
- - id
- - code
- - status
- - expires_at
- - email
- properties:
- id:
- type: string
- title: id
- description: The invitation's ID.
- email:
- type: string
- title: email
- description: The invitation's email.
- format: email
- code:
- type: string
- title: code
- description: The invitation's code.
- status:
- type: string
- description: The invitation's status.
- enum:
- - pending
- - accepted
- - rejected
- expires_at:
- type: string
- title: expires_at
- description: The date the invitation expires at.
- gift_card:
- type: object
- x-schemaName: AdminGiftCardInvitation
AdminGiftCardResponse:
type: object
description: The gift card's details.
@@ -60259,6 +60206,11 @@ components:
description: The list of gift cards.
items:
$ref: '#/components/schemas/AdminGiftCard'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The gift card's estimate count.
+ x-featureFlag: index_engine
AdminImportProductRequest:
type: object
description: The import's details.
@@ -66483,6 +66435,11 @@ components:
description: The list of store credit accounts.
items:
$ref: '#/components/schemas/AdminStoreCreditAccount'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
AdminStoreCurrency:
type: object
description: The details of a store's currency.
@@ -66951,6 +66908,11 @@ components:
description: The list of transaction groups.
items:
$ref: '#/components/schemas/AdminTransactionGroup'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The transaction group's estimate count.
+ x-featureFlag: index_engine
AdminTransactionsResponse:
type: object
description: The paginated list of transactions.
@@ -66978,17 +66940,11 @@ components:
description: The list of transactions.
items:
$ref: '#/components/schemas/AdminTransaction'
- AdminTransferGiftCard:
- type: object
- description: The details of the gift card transfer request.
- x-schemaName: AdminTransferGiftCard
- required:
- - customer_id
- properties:
- customer_id:
- type: string
- title: customer_id
- description: The ID of the customer to transfer the gift card to.
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
AdminTransferOrder:
type: object
description: The details of the request to transfer the order.
@@ -75420,23 +75376,6 @@ components:
metadata:
type: object
description: The customer's metadata, can hold custom key-value pairs.
- StoreCreateGiftCardInvitation:
- type: object
- description: The details to create a gift card invitation.
- x-schemaName: StoreCreateGiftCardInvitation
- required:
- - email
- properties:
- email:
- type: string
- title: email
- description: The email address to send the gift card invitation to.
- format: email
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card invitation expires.
- format: date-time
StoreCreatePaymentCollection:
type: object
description: The details of the payment collection to create.
@@ -75855,7 +75794,6 @@ components:
required:
- customer
- line_item
- - invitation
- id
- code
- status
@@ -75871,6 +75809,12 @@ components:
properties:
customer:
$ref: '#/components/schemas/StoreCustomer'
+ line_item:
+ $ref: '#/components/schemas/StoreOrderLineItem'
+ id:
+ type: string
+ title: id
+ description: The gift card's ID.
code:
type: string
title: code
@@ -75885,22 +75829,32 @@ components:
type: number
title: value
description: The gift card's amount.
+ currency_code:
+ type: string
+ title: currency_code
+ description: The gift card's currency code.
+ example: usd
customer_id:
type: string
title: customer_id
description: The ID of the customer that the gift card belongs to.
- id:
- type: string
- title: id
- description: The gift card's ID.
reference_id:
type: string
title: reference_id
description: The gift card's reference ID.
+ note:
+ type: string
+ title: note
+ description: A note with more information about the gift card.
reference:
type: string
title: reference
description: The gift card's reference.
+ expires_at:
+ type: string
+ title: expires_at
+ description: The date the gift card expires.
+ format: date-time
created_at:
type: string
format: date-time
@@ -75911,23 +75865,6 @@ components:
format: date-time
title: updated_at
description: The date the gift card was updated.
- currency_code:
- type: string
- title: currency_code
- description: The gift card's currency code.
- example: usd
- note:
- type: string
- title: note
- description: The gift card's note.
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card expires.
- invitation:
- type: object
- line_item:
- $ref: '#/components/schemas/StoreOrderLineItem'
StoreGiftCardInvitation:
type: object
description: The gift card invitation's details.
@@ -75953,15 +75890,6 @@ components:
description: The gift card invitation's status.
gift_card:
$ref: '#/components/schemas/StoreGiftCard'
- StoreGiftCardInvitationResponse:
- type: object
- description: The gift card invitation's details.
- x-schemaName: StoreGiftCardInvitationResponse
- required:
- - gift_card_invitation
- properties:
- gift_card_invitation:
- $ref: '#/components/schemas/StoreGiftCardInvitation'
StoreGiftCardResponse:
type: object
description: The gift card's details.
@@ -83557,6 +83485,11 @@ components:
description: The list of store credit accounts.
items:
$ref: '#/components/schemas/StoreStoreCreditAccount'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
StoreTransactionGroup:
type: object
description: The transaction group's details.
diff --git a/www/apps/api-reference/specs/admin/openapi.yaml b/www/apps/api-reference/specs/admin/openapi.yaml
index 4e54385350..26435aba6e 100644
--- a/www/apps/api-reference/specs/admin/openapi.yaml
+++ b/www/apps/api-reference/specs/admin/openapi.yaml
@@ -848,10 +848,10 @@ paths:
$ref: paths/admin_gift-cards.yaml
/admin/gift-cards/{id}:
$ref: paths/admin_gift-cards_{id}.yaml
+ /admin/gift-cards/{id}/orders:
+ $ref: paths/admin_gift-cards_{id}_orders.yaml
/admin/gift-cards/{id}/redeem:
$ref: paths/admin_gift-cards_{id}_redeem.yaml
- /admin/gift-cards/{id}/transfer:
- $ref: paths/admin_gift-cards_{id}_transfer.yaml
/admin/inventory-items:
$ref: paths/admin_inventory-items.yaml
/admin/inventory-items/location-levels/batch:
diff --git a/www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}_transfer.yaml b/www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}_orders.yaml
similarity index 68%
rename from www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}_transfer.yaml
rename to www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}_orders.yaml
index 4febb955d4..2181ef56f5 100644
--- a/www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}_transfer.yaml
+++ b/www/apps/api-reference/specs/admin/paths/admin_gift-cards_{id}_orders.yaml
@@ -1,7 +1,8 @@
-post:
- operationId: PostGiftCardsIdTransfer
- summary: Transfer Gift Card
- description: Transfer a gift card to another customer.
+get:
+ operationId: GetGiftCardsIdOrders
+ summary: List Gift Card's Orders
+ x-sidebar-summary: List Orders
+ description: Retrieve the list of orders that a gift card was used in.
x-authenticated: true
x-ignoreCleanup: true
parameters:
@@ -13,13 +14,10 @@ post:
type: string
- name: fields
in: query
- description: >-
+ 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.
+ if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ without prefix it will replace the entire default fields.
required: false
schema:
type: string
@@ -35,25 +33,16 @@ post:
- api_token: []
- cookie_auth: []
- jwt_token: []
- requestBody:
- content:
- application/json:
- schema:
- $ref: ../components/schemas/AdminTransferGiftCard.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
- $ref: ../code_samples/Shell/admin_gift-cards_{id}_transfer/post.sh
+ $ref: ../code_samples/Shell/admin_gift-cards_{id}_orders/get.sh
tags:
- Gift Cards
responses:
'200':
description: OK
- content:
- application/json:
- schema:
- $ref: ../components/schemas/AdminGiftCardResponse.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-card-invitations_{code}_accept/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-card-invitations_{code}_accept/post.sh
deleted file mode 100644
index cb670e327f..0000000000
--- a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-card-invitations_{code}_accept/post.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-curl -X POST '{backend_url}/store/gift-card-invitations/{code}/accept' \
--H 'x-publishable-api-key: {your_publishable_api_key}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-card-invitations_{code}_reject/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-card-invitations_{code}_reject/post.sh
deleted file mode 100644
index 3a98a80831..0000000000
--- a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-card-invitations_{code}_reject/post.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-curl -X POST '{backend_url}/store/gift-card-invitations/{code}/reject' \
--H 'x-publishable-api-key: {your_publishable_api_key}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards/get.sh
deleted file mode 100644
index cc9652c544..0000000000
--- a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards/get.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-curl '{backend_url}/store/gift-cards' \
--H 'x-publishable-api-key: {your_publishable_api_key}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{idOrCode}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{idOrCode}/get.sh
new file mode 100644
index 0000000000..ab8767b3df
--- /dev/null
+++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{idOrCode}/get.sh
@@ -0,0 +1,3 @@
+curl '{backend_url}/store/gift-cards/{idOrCode}' \
+-H 'Authorization: Bearer {access_token}' \
+-H 'x-publishable-api-key: {your_publishable_api_key}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{idOrCode}_redeem/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{idOrCode}_redeem/post.sh
new file mode 100644
index 0000000000..69d41dbfd6
--- /dev/null
+++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{idOrCode}_redeem/post.sh
@@ -0,0 +1,3 @@
+curl -X POST '{backend_url}/store/gift-cards/{idOrCode}/redeem' \
+-H 'Authorization: Bearer {access_token}' \
+-H 'x-publishable-api-key: {your_publishable_api_key}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}/get.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}/get.sh
deleted file mode 100644
index 0c1325eb31..0000000000
--- a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}/get.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-curl '{backend_url}/store/gift-cards/{id}' \
--H 'x-publishable-api-key: {your_publishable_api_key}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}_invitation/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}_invitation/post.sh
deleted file mode 100644
index db0211b1ce..0000000000
--- a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}_invitation/post.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-curl -X POST '{backend_url}/store/gift-cards/{id}/invitation' \
--H 'x-publishable-api-key: {your_publishable_api_key}' \
--H 'Content-Type: application/json' \
---data-raw '{
- "email": "Morton61@hotmail.com"
-}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}_redeem/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}_redeem/post.sh
deleted file mode 100644
index b15d828ab7..0000000000
--- a/www/apps/api-reference/specs/store/code_samples/Shell/store_gift-cards_{id}_redeem/post.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-curl -X POST '{backend_url}/store/gift-cards/{id}/redeem' \
--H 'x-publishable-api-key: {your_publishable_api_key}'
\ No newline at end of file
diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminGiftCard.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGiftCard.yaml
index 8841c09e93..9b11dda115 100644
--- a/www/apps/api-reference/specs/store/components/schemas/AdminGiftCard.yaml
+++ b/www/apps/api-reference/specs/store/components/schemas/AdminGiftCard.yaml
@@ -4,7 +4,6 @@ x-schemaName: AdminGiftCard
required:
- line_item
- customer
- - invitation
- id
- code
- status
@@ -65,8 +64,6 @@ properties:
type: string
title: expires_at
description: The date the gift card expires at.
- invitation:
- $ref: ./AdminGiftCardInvitation.yaml
created_at:
type: string
format: date-time
diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminGiftCardInvitation.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGiftCardInvitation.yaml
deleted file mode 100644
index 221cdc59ad..0000000000
--- a/www/apps/api-reference/specs/store/components/schemas/AdminGiftCardInvitation.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-type: object
-description: The gift card invitation details.
-required:
- - gift_card
- - id
- - code
- - status
- - expires_at
- - email
-properties:
- id:
- type: string
- title: id
- description: The invitation's ID.
- email:
- type: string
- title: email
- description: The invitation's email.
- format: email
- code:
- type: string
- title: code
- description: The invitation's code.
- status:
- type: string
- description: The invitation's status.
- enum:
- - pending
- - accepted
- - rejected
- expires_at:
- type: string
- title: expires_at
- description: The date the invitation expires at.
- gift_card:
- type: object
-x-schemaName: AdminGiftCardInvitation
diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminGiftCardsResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminGiftCardsResponse.yaml
index eda7affe60..b798a97033 100644
--- a/www/apps/api-reference/specs/store/components/schemas/AdminGiftCardsResponse.yaml
+++ b/www/apps/api-reference/specs/store/components/schemas/AdminGiftCardsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of gift cards.
items:
$ref: ./AdminGiftCard.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The gift card's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminStoreCreditAccountsResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminStoreCreditAccountsResponse.yaml
index 7f93a469e6..033f91d9db 100644
--- a/www/apps/api-reference/specs/store/components/schemas/AdminStoreCreditAccountsResponse.yaml
+++ b/www/apps/api-reference/specs/store/components/schemas/AdminStoreCreditAccountsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts.
items:
$ref: ./AdminStoreCreditAccount.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminTransactionGroupsResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminTransactionGroupsResponse.yaml
index b97a557331..744f99a346 100644
--- a/www/apps/api-reference/specs/store/components/schemas/AdminTransactionGroupsResponse.yaml
+++ b/www/apps/api-reference/specs/store/components/schemas/AdminTransactionGroupsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of transaction groups.
items:
$ref: ./AdminTransactionGroup.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The transaction group's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminTransactionsResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminTransactionsResponse.yaml
index 0d55e47604..b8e5b882b7 100644
--- a/www/apps/api-reference/specs/store/components/schemas/AdminTransactionsResponse.yaml
+++ b/www/apps/api-reference/specs/store/components/schemas/AdminTransactionsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of transactions.
items:
$ref: ./AdminTransaction.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminTransferGiftCard.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminTransferGiftCard.yaml
deleted file mode 100644
index 9a445317ce..0000000000
--- a/www/apps/api-reference/specs/store/components/schemas/AdminTransferGiftCard.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-type: object
-description: The details of the gift card transfer request.
-x-schemaName: AdminTransferGiftCard
-required:
- - customer_id
-properties:
- customer_id:
- type: string
- title: customer_id
- description: The ID of the customer to transfer the gift card to.
diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCreateGiftCardInvitation.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCreateGiftCardInvitation.yaml
deleted file mode 100644
index f953a5e531..0000000000
--- a/www/apps/api-reference/specs/store/components/schemas/StoreCreateGiftCardInvitation.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-type: object
-description: The details to create a gift card invitation.
-x-schemaName: StoreCreateGiftCardInvitation
-required:
- - email
-properties:
- email:
- type: string
- title: email
- description: The email address to send the gift card invitation to.
- format: email
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card invitation expires.
- format: date-time
diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreGiftCard.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreGiftCard.yaml
index 7235e9ee70..cd556e46c4 100644
--- a/www/apps/api-reference/specs/store/components/schemas/StoreGiftCard.yaml
+++ b/www/apps/api-reference/specs/store/components/schemas/StoreGiftCard.yaml
@@ -4,7 +4,6 @@ x-schemaName: StoreGiftCard
required:
- customer
- line_item
- - invitation
- id
- code
- status
@@ -20,6 +19,12 @@ required:
properties:
customer:
$ref: ./StoreCustomer.yaml
+ line_item:
+ $ref: ./StoreOrderLineItem.yaml
+ id:
+ type: string
+ title: id
+ description: The gift card's ID.
code:
type: string
title: code
@@ -34,22 +39,32 @@ properties:
type: number
title: value
description: The gift card's amount.
+ currency_code:
+ type: string
+ title: currency_code
+ description: The gift card's currency code.
+ example: usd
customer_id:
type: string
title: customer_id
description: The ID of the customer that the gift card belongs to.
- id:
- type: string
- title: id
- description: The gift card's ID.
reference_id:
type: string
title: reference_id
description: The gift card's reference ID.
+ note:
+ type: string
+ title: note
+ description: A note with more information about the gift card.
reference:
type: string
title: reference
description: The gift card's reference.
+ expires_at:
+ type: string
+ title: expires_at
+ description: The date the gift card expires.
+ format: date-time
created_at:
type: string
format: date-time
@@ -60,20 +75,3 @@ properties:
format: date-time
title: updated_at
description: The date the gift card was updated.
- currency_code:
- type: string
- title: currency_code
- description: The gift card's currency code.
- example: usd
- note:
- type: string
- title: note
- description: The gift card's note.
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card expires.
- invitation:
- type: object
- line_item:
- $ref: ./StoreOrderLineItem.yaml
diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreGiftCardInvitationResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreGiftCardInvitationResponse.yaml
deleted file mode 100644
index 178bc96d8d..0000000000
--- a/www/apps/api-reference/specs/store/components/schemas/StoreGiftCardInvitationResponse.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-type: object
-description: The gift card invitation's details.
-x-schemaName: StoreGiftCardInvitationResponse
-required:
- - gift_card_invitation
-properties:
- gift_card_invitation:
- $ref: ./StoreGiftCardInvitation.yaml
diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreStoreCreditAccountsResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreStoreCreditAccountsResponse.yaml
index 3ba7a0059e..94b1a8272b 100644
--- a/www/apps/api-reference/specs/store/components/schemas/StoreStoreCreditAccountsResponse.yaml
+++ b/www/apps/api-reference/specs/store/components/schemas/StoreStoreCreditAccountsResponse.yaml
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts.
items:
$ref: ./StoreStoreCreditAccount.yaml
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml
index 1a59bbda8d..a064f6bedd 100644
--- a/www/apps/api-reference/specs/store/openapi.full.yaml
+++ b/www/apps/api-reference/specs/store/openapi.full.yaml
@@ -58,15 +58,6 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/customers
x-associatedSchema:
$ref: '#/components/schemas/StoreCustomer'
- - name: Gift Card Invitations
- description: |
- A gift card invitation is a way to send a gift card to a customer. They can be sent from one customer to another.
- These API routes allow logged-in customers to create and manage gift card invitations.
-
- Gift Card Invitations are only available for Cloud users using the [Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
-
- x-associatedSchema:
- $ref: '#/components/schemas/StoreGiftCardInvitation'
- name: Gift Cards
description: |
A gift card is a prepaid card that customers can use to purchase products in the store.
@@ -4196,297 +4187,18 @@ paths:
$ref: '#/components/responses/500_error'
x-workflow: deleteCustomerAddressesWorkflow
x-events: []
- /store/gift-card-invitations/{code}/accept:
- post:
- operationId: PostGiftCardInvitationsCodeAccept
- summary: Accept Customer's Gift Card Invitation
- x-sidebar-summary: Accept Invitation
- description: Accept the logged-in customer's gift card invitation
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: code
- in: path
- description: The gift card invitation's code.
- required: true
- schema:
- type: string
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: fields
- in: query
- description: |-
- Comma-separated fields that should be included in the returned data.
- if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |-
- curl -X POST '{backend_url}/store/gift-card-invitations/{code}/accept' \
- -H 'x-publishable-api-key: {your_publishable_api_key}'
- tags:
- - Gift Card Invitations
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/StoreGiftCardInvitationResponse'
- '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'
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: |
- This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
- /store/gift-card-invitations/{code}/reject:
- post:
- operationId: PostGiftCardInvitationsCodeReject
- summary: Reject Customer's Gift Card Invitation
- x-sidebar-summary: Reject Invitation
- description: Reject the logged-in customer's gift card invitation
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: code
- in: path
- description: The gift card invitation's code.
- required: true
- schema:
- type: string
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: fields
- in: query
- description: |-
- Comma-separated fields that should be included in the returned data.
- if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |-
- curl -X POST '{backend_url}/store/gift-card-invitations/{code}/reject' \
- -H 'x-publishable-api-key: {your_publishable_api_key}'
- tags:
- - Gift Card Invitations
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/StoreGiftCardInvitationResponse'
- '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'
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: |
- This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
- /store/gift-cards:
+ /store/gift-cards/{idOrCode}:
get:
- operationId: GetGiftCards
- summary: List Customer's Gift Cards
- x-sidebar-summary: List Gift Cards
- description: Retrieve a customer's gift cards. The gift cards can be filtered by fields such as `id`. The gift cards can also be sorted or paginated.
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: id
- in: query
- required: false
- schema:
- oneOf:
- - type: string
- title: id
- description: Filter by a gift card ID.
- - type: array
- description: Filter by gift card IDs.
- items:
- type: string
- title: id
- description: A gift card's ID.
- - name: limit
- in: query
- description: Limit the number of items returned in the list.
- required: false
- schema:
- type: number
- title: limit
- description: Limit the number of items returned in the list.
- externalDocs:
- url: '#pagination'
- - name: offset
- in: query
- description: The number of items to skip when retrieving a list.
- required: false
- schema:
- type: number
- title: offset
- description: The number of items to skip when retrieving a list.
- externalDocs:
- url: '#pagination'
- - name: order
- in: query
- 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 `-`.
- required: false
- schema:
- type: string
- title: order
- 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 `-`.
- externalDocs:
- url: '#pagination'
- - name: fields
- in: query
- description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- - 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: 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
- - 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: 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
- - name: status
- in: query
- required: false
- schema:
- oneOf:
- - type: string
- description: Filter by a gift card's status.
- enum:
- - pending
- - redeemed
- - type: array
- description: Filter by gift card statuses.
- items:
- type: string
- description: A gift card status.
- enum:
- - pending
- - redeemed
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |-
- curl '{backend_url}/store/gift-cards' \
- -H 'x-publishable-api-key: {your_publishable_api_key}'
- tags:
- - Gift Cards
- responses:
- '200':
- description: OK
- '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'
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: |
- This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
- /store/gift-cards/{id}:
- get:
- operationId: GetGiftCardsId
- summary: Get Customer's Gift Card
+ operationId: GetGiftCardsIdorcode
+ summary: Get a Gift Card
x-sidebar-summary: Get Gift Card
- description: Retrieve the logged-in customer's gift card by its ID. You can expand the gift card's relations or select the fields that should be returned.
- x-authenticated: true
+ description: Retrieve a gift card by its ID or code. You can expand the gift card's relations or select the fields that should be returned.
+ x-authenticated: false
x-ignoreCleanup: true
parameters:
- - name: id
+ - name: idOrCode
in: path
- description: The gift card's ID.
+ description: The gift card's ID or code.
required: true
schema:
type: string
@@ -4502,8 +4214,8 @@ paths:
in: query
description: |-
Comma-separated fields that should be included in the returned data.
- if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- without prefix it will replace the entire default fields.
+ if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ without prefix it will replace the entire default fields.
required: false
schema:
type: string
@@ -4515,7 +4227,8 @@ paths:
- lang: Shell
label: cURL
source: |-
- curl '{backend_url}/store/gift-cards/{id}' \
+ curl '{backend_url}/store/gift-cards/{idOrCode}' \
+ -H 'Authorization: Bearer {access_token}' \
-H 'x-publishable-api-key: {your_publishable_api_key}'
tags:
- Gift Cards
@@ -4534,104 +4247,22 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
- security:
- - cookie_auth: []
- - jwt_token: []
x-badges:
- text: Cloud
description: |
This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
- /store/gift-cards/{id}/invitation:
+ /store/gift-cards/{idOrCode}/redeem:
post:
- operationId: PostGiftCardsIdInvitation
- summary: Send Gift Card Invitation
- x-sidebar-summary: Send Invitation
- description: Send a gift card invitation to a customer's email address. The gift card must belong to the logged-in customer, and it must not have been redeemed yet.
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: id
- in: path
- description: The gift card's ID.
- required: true
- schema:
- type: string
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: fields
- in: query
- description: |-
- Comma-separated fields that should be included in the returned data.
- if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/StoreCreateGiftCardInvitation'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |-
- curl -X POST '{backend_url}/store/gift-cards/{id}/invitation' \
- -H 'x-publishable-api-key: {your_publishable_api_key}' \
- -H 'Content-Type: application/json' \
- --data-raw '{
- "email": "Morton61@hotmail.com"
- }'
- tags:
- - Gift Cards
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/StoreGiftCardResponse'
- '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'
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: |
- This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
- /store/gift-cards/{id}/redeem:
- post:
- operationId: PostGiftCardsIdRedeem
- summary: Redeem Customer's Gift Card
+ operationId: PostGiftCardsIdorcodeRedeem
+ summary: Redeem a Gift Card
x-sidebar-summary: Redeem Gift Card
- description: Redeem the logged-in customer's gift card
+ description: Redeem a gift card by its ID or code. The gift card will be added to the logged-in customer's store credit account.
x-authenticated: true
x-ignoreCleanup: true
parameters:
- - name: id
+ - name: idOrCode
in: path
- description: The gift card's ID.
+ description: The gift card's ID or code.
required: true
schema:
type: string
@@ -4647,8 +4278,8 @@ paths:
in: query
description: |-
Comma-separated fields that should be included in the returned data.
- if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- without prefix it will replace the entire default fields.
+ if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ without prefix it will replace the entire default fields.
required: false
schema:
type: string
@@ -4656,11 +4287,15 @@ 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.
externalDocs:
url: '#select-fields-and-relations'
+ security:
+ - cookie_auth: []
+ - jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source: |-
- curl -X POST '{backend_url}/store/gift-cards/{id}/redeem' \
+ curl -X POST '{backend_url}/store/gift-cards/{idOrCode}/redeem' \
+ -H 'Authorization: Bearer {access_token}' \
-H 'x-publishable-api-key: {your_publishable_api_key}'
tags:
- Gift Cards
@@ -4683,9 +4318,6 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
- security:
- - cookie_auth: []
- - jwt_token: []
x-badges:
- text: Cloud
description: |
@@ -15295,7 +14927,6 @@ components:
required:
- line_item
- customer
- - invitation
- id
- code
- status
@@ -15356,8 +14987,6 @@ components:
type: string
title: expires_at
description: The date the gift card expires at.
- invitation:
- $ref: '#/components/schemas/AdminGiftCardInvitation'
created_at:
type: string
format: date-time
@@ -15368,44 +14997,6 @@ components:
format: date-time
title: updated_at
description: The date the gift card was updated at.
- AdminGiftCardInvitation:
- type: object
- description: The gift card invitation details.
- required:
- - gift_card
- - id
- - code
- - status
- - expires_at
- - email
- properties:
- id:
- type: string
- title: id
- description: The invitation's ID.
- email:
- type: string
- title: email
- description: The invitation's email.
- format: email
- code:
- type: string
- title: code
- description: The invitation's code.
- status:
- type: string
- description: The invitation's status.
- enum:
- - pending
- - accepted
- - rejected
- expires_at:
- type: string
- title: expires_at
- description: The date the invitation expires at.
- gift_card:
- type: object
- x-schemaName: AdminGiftCardInvitation
AdminGiftCardResponse:
type: object
description: The gift card's details.
@@ -15442,6 +15033,11 @@ components:
description: The list of gift cards.
items:
$ref: '#/components/schemas/AdminGiftCard'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The gift card's estimate count.
+ x-featureFlag: index_engine
AdminImportProductRequest:
type: object
description: The import's details.
@@ -21666,6 +21262,11 @@ components:
description: The list of store credit accounts.
items:
$ref: '#/components/schemas/AdminStoreCreditAccount'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
AdminStoreCurrency:
type: object
description: The details of a store's currency.
@@ -22134,6 +21735,11 @@ components:
description: The list of transaction groups.
items:
$ref: '#/components/schemas/AdminTransactionGroup'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The transaction group's estimate count.
+ x-featureFlag: index_engine
AdminTransactionsResponse:
type: object
description: The paginated list of transactions.
@@ -22161,17 +21767,11 @@ components:
description: The list of transactions.
items:
$ref: '#/components/schemas/AdminTransaction'
- AdminTransferGiftCard:
- type: object
- description: The details of the gift card transfer request.
- x-schemaName: AdminTransferGiftCard
- required:
- - customer_id
- properties:
- customer_id:
- type: string
- title: customer_id
- description: The ID of the customer to transfer the gift card to.
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
AdminTransferOrder:
type: object
description: The details of the request to transfer the order.
@@ -30603,23 +30203,6 @@ components:
metadata:
type: object
description: The customer's metadata, can hold custom key-value pairs.
- StoreCreateGiftCardInvitation:
- type: object
- description: The details to create a gift card invitation.
- x-schemaName: StoreCreateGiftCardInvitation
- required:
- - email
- properties:
- email:
- type: string
- title: email
- description: The email address to send the gift card invitation to.
- format: email
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card invitation expires.
- format: date-time
StoreCreatePaymentCollection:
type: object
description: The details of the payment collection to create.
@@ -31038,7 +30621,6 @@ components:
required:
- customer
- line_item
- - invitation
- id
- code
- status
@@ -31054,6 +30636,12 @@ components:
properties:
customer:
$ref: '#/components/schemas/StoreCustomer'
+ line_item:
+ $ref: '#/components/schemas/StoreOrderLineItem'
+ id:
+ type: string
+ title: id
+ description: The gift card's ID.
code:
type: string
title: code
@@ -31068,22 +30656,32 @@ components:
type: number
title: value
description: The gift card's amount.
+ currency_code:
+ type: string
+ title: currency_code
+ description: The gift card's currency code.
+ example: usd
customer_id:
type: string
title: customer_id
description: The ID of the customer that the gift card belongs to.
- id:
- type: string
- title: id
- description: The gift card's ID.
reference_id:
type: string
title: reference_id
description: The gift card's reference ID.
+ note:
+ type: string
+ title: note
+ description: A note with more information about the gift card.
reference:
type: string
title: reference
description: The gift card's reference.
+ expires_at:
+ type: string
+ title: expires_at
+ description: The date the gift card expires.
+ format: date-time
created_at:
type: string
format: date-time
@@ -31094,23 +30692,6 @@ components:
format: date-time
title: updated_at
description: The date the gift card was updated.
- currency_code:
- type: string
- title: currency_code
- description: The gift card's currency code.
- example: usd
- note:
- type: string
- title: note
- description: The gift card's note.
- expires_at:
- type: string
- title: expires_at
- description: The date the gift card expires.
- invitation:
- type: object
- line_item:
- $ref: '#/components/schemas/StoreOrderLineItem'
StoreGiftCardInvitation:
type: object
description: The gift card invitation's details.
@@ -31136,15 +30717,6 @@ components:
description: The gift card invitation's status.
gift_card:
$ref: '#/components/schemas/StoreGiftCard'
- StoreGiftCardInvitationResponse:
- type: object
- description: The gift card invitation's details.
- x-schemaName: StoreGiftCardInvitationResponse
- required:
- - gift_card_invitation
- properties:
- gift_card_invitation:
- $ref: '#/components/schemas/StoreGiftCardInvitation'
StoreGiftCardResponse:
type: object
description: The gift card's details.
@@ -38740,6 +38312,11 @@ components:
description: The list of store credit accounts.
items:
$ref: '#/components/schemas/StoreStoreCreditAccount'
+ estimate_count:
+ type: number
+ title: estimate_count
+ description: The store credit account's estimate count.
+ x-featureFlag: index_engine
StoreTransactionGroup:
type: object
description: The transaction group's details.
diff --git a/www/apps/api-reference/specs/store/openapi.yaml b/www/apps/api-reference/specs/store/openapi.yaml
index 517bebc234..e390ed1d69 100644
--- a/www/apps/api-reference/specs/store/openapi.yaml
+++ b/www/apps/api-reference/specs/store/openapi.yaml
@@ -73,22 +73,6 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/customers
x-associatedSchema:
$ref: ./components/schemas/StoreCustomer.yaml
- - name: Gift Card Invitations
- description: >
- A gift card invitation is a way to send a gift card to a customer. They
- can be sent from one customer to another.
-
- These API routes allow logged-in customers to create and manage gift card
- invitations.
-
-
-
- Gift Card Invitations are only available for Cloud users using the
- [Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
-
-
- x-associatedSchema:
- $ref: ./components/schemas/StoreGiftCardInvitation.yaml
- name: Gift Cards
description: >
A gift card is a prepaid card that customers can use to purchase products
@@ -298,18 +282,10 @@ paths:
$ref: paths/store_customers_me_addresses.yaml
/store/customers/me/addresses/{address_id}:
$ref: paths/store_customers_me_addresses_{address_id}.yaml
- /store/gift-card-invitations/{code}/accept:
- $ref: paths/store_gift-card-invitations_{code}_accept.yaml
- /store/gift-card-invitations/{code}/reject:
- $ref: paths/store_gift-card-invitations_{code}_reject.yaml
- /store/gift-cards:
- $ref: paths/store_gift-cards.yaml
- /store/gift-cards/{id}:
- $ref: paths/store_gift-cards_{id}.yaml
- /store/gift-cards/{id}/invitation:
- $ref: paths/store_gift-cards_{id}_invitation.yaml
- /store/gift-cards/{id}/redeem:
- $ref: paths/store_gift-cards_{id}_redeem.yaml
+ /store/gift-cards/{idOrCode}:
+ $ref: paths/store_gift-cards_{idOrCode}.yaml
+ /store/gift-cards/{idOrCode}/redeem:
+ $ref: paths/store_gift-cards_{idOrCode}_redeem.yaml
/store/orders:
$ref: paths/store_orders.yaml
/store/orders/{id}:
diff --git a/www/apps/api-reference/specs/store/paths/store_gift-card-invitations_{code}_accept.yaml b/www/apps/api-reference/specs/store/paths/store_gift-card-invitations_{code}_accept.yaml
deleted file mode 100644
index 75160ef3a6..0000000000
--- a/www/apps/api-reference/specs/store/paths/store_gift-card-invitations_{code}_accept.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
-post:
- operationId: PostGiftCardInvitationsCodeAccept
- summary: Accept Customer's Gift Card Invitation
- x-sidebar-summary: Accept Invitation
- description: Accept the logged-in customer's gift card invitation
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: code
- in: path
- description: The gift card invitation's code.
- required: true
- schema:
- type: string
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: fields
- in: query
- description: >-
- Comma-separated fields that should be included in the returned data.
-
- if a field is prefixed with `+` it will be added to the default fields,
- using `-` will remove it from the default fields.
-
- without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: >-
- Comma-separated fields that should be included in the returned data.
- If a field is prefixed with `+` it will be added to the default
- fields, using `-` will remove it from the default fields. Without
- prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source:
- $ref: >-
- ../code_samples/Shell/store_gift-card-invitations_{code}_accept/post.sh
- tags:
- - Gift Card Invitations
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: ../components/schemas/StoreGiftCardInvitationResponse.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
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: >
- This API route is only available in [Medusa
- Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
diff --git a/www/apps/api-reference/specs/store/paths/store_gift-card-invitations_{code}_reject.yaml b/www/apps/api-reference/specs/store/paths/store_gift-card-invitations_{code}_reject.yaml
deleted file mode 100644
index fa9253f843..0000000000
--- a/www/apps/api-reference/specs/store/paths/store_gift-card-invitations_{code}_reject.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
-post:
- operationId: PostGiftCardInvitationsCodeReject
- summary: Reject Customer's Gift Card Invitation
- x-sidebar-summary: Reject Invitation
- description: Reject the logged-in customer's gift card invitation
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: code
- in: path
- description: The gift card invitation's code.
- required: true
- schema:
- type: string
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: fields
- in: query
- description: >-
- Comma-separated fields that should be included in the returned data.
-
- if a field is prefixed with `+` it will be added to the default fields,
- using `-` will remove it from the default fields.
-
- without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: >-
- Comma-separated fields that should be included in the returned data.
- If a field is prefixed with `+` it will be added to the default
- fields, using `-` will remove it from the default fields. Without
- prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source:
- $ref: >-
- ../code_samples/Shell/store_gift-card-invitations_{code}_reject/post.sh
- tags:
- - Gift Card Invitations
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: ../components/schemas/StoreGiftCardInvitationResponse.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
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: >
- This API route is only available in [Medusa
- Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
diff --git a/www/apps/api-reference/specs/store/paths/store_gift-cards.yaml b/www/apps/api-reference/specs/store/paths/store_gift-cards.yaml
deleted file mode 100644
index 75ef1749a9..0000000000
--- a/www/apps/api-reference/specs/store/paths/store_gift-cards.yaml
+++ /dev/null
@@ -1,161 +0,0 @@
-get:
- operationId: GetGiftCards
- summary: List Customer's Gift Cards
- x-sidebar-summary: List Gift Cards
- description: >-
- Retrieve a customer's gift cards. The gift cards can be filtered by fields
- such as `id`. The gift cards can also be sorted or paginated.
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: id
- in: query
- required: false
- schema:
- oneOf:
- - type: string
- title: id
- description: Filter by a gift card ID.
- - type: array
- description: Filter by gift card IDs.
- items:
- type: string
- title: id
- description: A gift card's ID.
- - name: limit
- in: query
- description: Limit the number of items returned in the list.
- required: false
- schema:
- type: number
- title: limit
- description: Limit the number of items returned in the list.
- externalDocs:
- url: '#pagination'
- - name: offset
- in: query
- description: The number of items to skip when retrieving a list.
- required: false
- schema:
- type: number
- title: offset
- description: The number of items to skip when retrieving a list.
- externalDocs:
- url: '#pagination'
- - name: order
- in: query
- 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 `-`.
- required: false
- schema:
- type: string
- title: order
- 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 `-`.
- externalDocs:
- url: '#pagination'
- - name: fields
- in: query
- description: >-
- Comma-separated fields that should be included in the returned data. If
- a field is prefixed with `+` it will be added to the default fields,
- using `-` will remove it from the default fields. Without prefix it will
- replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: >-
- Comma-separated fields that should be included in the returned data.
- If a field is prefixed with `+` it will be added to the default
- fields, using `-` will remove it from the default fields. Without
- prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- - 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: >-
- 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
- - 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: >-
- 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
- - name: status
- in: query
- required: false
- schema:
- oneOf:
- - type: string
- description: Filter by a gift card's status.
- enum:
- - pending
- - redeemed
- - type: array
- description: Filter by gift card statuses.
- items:
- type: string
- description: A gift card status.
- enum:
- - pending
- - redeemed
- x-codeSamples:
- - lang: Shell
- label: cURL
- source:
- $ref: ../code_samples/Shell/store_gift-cards/get.sh
- tags:
- - Gift Cards
- responses:
- '200':
- description: OK
- '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
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: >
- This API route is only available in [Medusa
- Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
diff --git a/www/apps/api-reference/specs/store/paths/store_gift-cards_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_gift-cards_{idOrCode}.yaml
similarity index 72%
rename from www/apps/api-reference/specs/store/paths/store_gift-cards_{id}.yaml
rename to www/apps/api-reference/specs/store/paths/store_gift-cards_{idOrCode}.yaml
index 426eef46ef..b4a32689c5 100644
--- a/www/apps/api-reference/specs/store/paths/store_gift-cards_{id}.yaml
+++ b/www/apps/api-reference/specs/store/paths/store_gift-cards_{idOrCode}.yaml
@@ -1,16 +1,16 @@
get:
- operationId: GetGiftCardsId
- summary: Get Customer's Gift Card
+ operationId: GetGiftCardsIdorcode
+ summary: Get a Gift Card
x-sidebar-summary: Get Gift Card
description: >-
- Retrieve the logged-in customer's gift card by its ID. You can expand the
- gift card's relations or select the fields that should be returned.
- x-authenticated: true
+ Retrieve a gift card by its ID or code. You can expand the gift card's
+ relations or select the fields that should be returned.
+ x-authenticated: false
x-ignoreCleanup: true
parameters:
- - name: id
+ - name: idOrCode
in: path
- description: The gift card's ID.
+ description: The gift card's ID or code.
required: true
schema:
type: string
@@ -24,13 +24,10 @@ get:
url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields
in: query
- description: >-
+ 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.
+ if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ without prefix it will replace the entire default fields.
required: false
schema:
type: string
@@ -46,7 +43,7 @@ get:
- lang: Shell
label: cURL
source:
- $ref: ../code_samples/Shell/store_gift-cards_{id}/get.sh
+ $ref: ../code_samples/Shell/store_gift-cards_{idOrCode}/get.sh
tags:
- Gift Cards
responses:
@@ -64,9 +61,6 @@ get:
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
- security:
- - cookie_auth: []
- - jwt_token: []
x-badges:
- text: Cloud
description: >
diff --git a/www/apps/api-reference/specs/store/paths/store_gift-cards_{id}_redeem.yaml b/www/apps/api-reference/specs/store/paths/store_gift-cards_{idOrCode}_redeem.yaml
similarity index 76%
rename from www/apps/api-reference/specs/store/paths/store_gift-cards_{id}_redeem.yaml
rename to www/apps/api-reference/specs/store/paths/store_gift-cards_{idOrCode}_redeem.yaml
index 43581a88b7..8027f032ba 100644
--- a/www/apps/api-reference/specs/store/paths/store_gift-cards_{id}_redeem.yaml
+++ b/www/apps/api-reference/specs/store/paths/store_gift-cards_{idOrCode}_redeem.yaml
@@ -1,14 +1,16 @@
post:
- operationId: PostGiftCardsIdRedeem
- summary: Redeem Customer's Gift Card
+ operationId: PostGiftCardsIdorcodeRedeem
+ summary: Redeem a Gift Card
x-sidebar-summary: Redeem Gift Card
- description: Redeem the logged-in customer's gift card
+ description: >-
+ Redeem a gift card by its ID or code. The gift card will be added to the
+ logged-in customer's store credit account.
x-authenticated: true
x-ignoreCleanup: true
parameters:
- - name: id
+ - name: idOrCode
in: path
- description: The gift card's ID.
+ description: The gift card's ID or code.
required: true
schema:
type: string
@@ -22,13 +24,10 @@ post:
url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields
in: query
- description: >-
+ 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.
+ if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ without prefix it will replace the entire default fields.
required: false
schema:
type: string
@@ -40,11 +39,14 @@ post:
prefix it will replace the entire default fields.
externalDocs:
url: '#select-fields-and-relations'
+ security:
+ - cookie_auth: []
+ - jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
- $ref: ../code_samples/Shell/store_gift-cards_{id}_redeem/post.sh
+ $ref: ../code_samples/Shell/store_gift-cards_{idOrCode}_redeem/post.sh
tags:
- Gift Cards
responses:
@@ -66,9 +68,6 @@ post:
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
- security:
- - cookie_auth: []
- - jwt_token: []
x-badges:
- text: Cloud
description: >
diff --git a/www/apps/api-reference/specs/store/paths/store_gift-cards_{id}_invitation.yaml b/www/apps/api-reference/specs/store/paths/store_gift-cards_{id}_invitation.yaml
deleted file mode 100644
index f82c015346..0000000000
--- a/www/apps/api-reference/specs/store/paths/store_gift-cards_{id}_invitation.yaml
+++ /dev/null
@@ -1,84 +0,0 @@
-post:
- operationId: PostGiftCardsIdInvitation
- summary: Send Gift Card Invitation
- x-sidebar-summary: Send Invitation
- description: >-
- Send a gift card invitation to a customer's email address. The gift card
- must belong to the logged-in customer, and it must not have been redeemed
- yet.
- x-authenticated: true
- x-ignoreCleanup: true
- parameters:
- - name: id
- in: path
- description: The gift card's ID.
- required: true
- schema:
- type: string
- - name: x-publishable-api-key
- in: header
- description: Publishable API Key created in the Medusa Admin.
- required: true
- schema:
- type: string
- externalDocs:
- url: https://docs.medusajs.com/api/store#publishable-api-key
- - name: fields
- in: query
- description: >-
- Comma-separated fields that should be included in the returned data.
-
- if a field is prefixed with `+` it will be added to the default fields,
- using `-` will remove it from the default fields.
-
- without prefix it will replace the entire default fields.
- required: false
- schema:
- type: string
- title: fields
- description: >-
- Comma-separated fields that should be included in the returned data.
- If a field is prefixed with `+` it will be added to the default
- fields, using `-` will remove it from the default fields. Without
- prefix it will replace the entire default fields.
- externalDocs:
- url: '#select-fields-and-relations'
- requestBody:
- content:
- application/json:
- schema:
- $ref: ../components/schemas/StoreCreateGiftCardInvitation.yaml
- x-codeSamples:
- - lang: Shell
- label: cURL
- source:
- $ref: ../code_samples/Shell/store_gift-cards_{id}_invitation/post.sh
- tags:
- - Gift Cards
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: ../components/schemas/StoreGiftCardResponse.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
- security:
- - cookie_auth: []
- - jwt_token: []
- x-badges:
- - text: Cloud
- description: >
- This API route is only available in [Medusa
- Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
diff --git a/www/apps/cloud/app/loyalty-plugin/page.mdx b/www/apps/cloud/app/loyalty-plugin/page.mdx
index 859e015f91..438e3a5c44 100644
--- a/www/apps/cloud/app/loyalty-plugin/page.mdx
+++ b/www/apps/cloud/app/loyalty-plugin/page.mdx
@@ -43,7 +43,6 @@ Then, you can contact support for assistance in installing the Loyalty Plugin in
You can find the API routes for the Loyalty Plugin within the API reference:
- Store API routes:
- - [Gift Card Invitations](!api!/store#gift-card-invitations)
- [Gift Cards](!api!/store#gift-cards)
- [Store Credit Accounts](!api!/store#store-credit-accounts)
- Admin API routes:
diff --git a/www/apps/cloud/generated/edit-dates.mjs b/www/apps/cloud/generated/edit-dates.mjs
index 6b4fff2cf6..ae4c4cb840 100644
--- a/www/apps/cloud/generated/edit-dates.mjs
+++ b/www/apps/cloud/generated/edit-dates.mjs
@@ -10,7 +10,7 @@ export const generatedEditDates = {
"app/redis/page.mdx": "2025-06-25T07:57:23.246Z",
"app/s3/page.mdx": "2025-06-25T07:57:24.832Z",
"app/draft-order-plugin/page.mdx": "2025-06-25T07:57:14.898Z",
- "app/loyalty-plugin/page.mdx": "2025-06-25T07:57:16.691Z",
+ "app/loyalty-plugin/page.mdx": "2025-06-26T11:11:02.320Z",
"app/billing-usage/page.mdx": "2025-06-25T07:57:03.206Z",
"app/logs/page.mdx": "2025-06-19T07:44:38.336Z",
"app/update-medusa/page.mdx": "2025-06-25T07:57:30.170Z",
diff --git a/www/utils/generated/oas-output/base/store.oas.base.yaml b/www/utils/generated/oas-output/base/store.oas.base.yaml
index e55c5a5062..fbc5278991 100644
--- a/www/utils/generated/oas-output/base/store.oas.base.yaml
+++ b/www/utils/generated/oas-output/base/store.oas.base.yaml
@@ -65,20 +65,6 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/customers
x-associatedSchema:
$ref: "#/components/schemas/StoreCustomer"
- - name: Gift Card Invitations
- description: >
- A gift card invitation is a way to send a gift card to a customer. They
- can be sent from one customer to another.
-
- These API routes allow logged-in customers to create and manage gift card invitations.
-
-
-
- Gift Card Invitations are only available for Cloud users using the [Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
-
-
- x-associatedSchema:
- $ref: "#/components/schemas/StoreGiftCardInvitation"
- name: Gift Cards
description: >
A gift card is a prepaid card that customers can use to purchase products
diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards.ts b/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards.ts
index 68b423c37f..b28f3cdc26 100644
--- a/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards.ts
+++ b/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards.ts
@@ -366,8 +366,9 @@
* "500":
* $ref: "#/components/responses/500_error"
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards_[id].ts b/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards_[id].ts
index b7e7ac15e0..1cda759073 100644
--- a/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards_[id].ts
+++ b/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards_[id].ts
@@ -58,8 +58,9 @@
* "500":
* $ref: "#/components/responses/500_error"
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id]_transfer.ts b/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards_[id]_orders.ts
similarity index 57%
rename from www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id]_transfer.ts
rename to www/utils/generated/oas-output/operations/admin/get_admin_gift-cards_[id]_orders.ts
index a491410151..c889640116 100644
--- a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id]_transfer.ts
+++ b/www/utils/generated/oas-output/operations/admin/get_admin_gift-cards_[id]_orders.ts
@@ -1,8 +1,9 @@
/**
- * @oas [post] /admin/gift-cards/{id}/transfer
- * operationId: PostGiftCardsIdTransfer
- * summary: Transfer Gift Card
- * description: Transfer a gift card to another customer.
+ * @oas [get] /admin/gift-cards/{id}/orders
+ * operationId: GetGiftCardsIdOrders
+ * summary: List Gift Card's Orders
+ * x-sidebar-summary: List Orders
+ * description: Retrieve the list of orders that a gift card was used in.
* x-authenticated: true
* x-ignoreCleanup: true
* parameters:
@@ -16,8 +17,8 @@
* in: query
* description: |-
* Comma-separated fields that should be included in the returned data.
- * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- * without prefix it will replace the entire default fields.
+ * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ * without prefix it will replace the entire default fields.
* required: false
* schema:
* type: string
@@ -30,30 +31,17 @@
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
- * requestBody:
- * content:
- * application/json:
- * schema:
- * $ref: "#/components/schemas/AdminTransferGiftCard"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
- * curl -X POST '{backend_url}/admin/gift-cards/{id}/transfer' \
- * -H 'Authorization: Bearer {access_token}' \
- * -H 'Content-Type: application/json' \
- * --data-raw '{
- * "customer_id": "{value}"
- * }'
+ * curl '{backend_url}/admin/gift-cards/{id}/orders' \
+ * -H 'Authorization: Bearer {access_token}'
* tags:
* - Gift Cards
* responses:
* "200":
* description: OK
- * content:
- * application/json:
- * schema:
- * $ref: "#/components/schemas/AdminGiftCardResponse"
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -66,10 +54,9 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*/
diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts.ts b/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts.ts
index 7b4d005f07..16a7e0349b 100644
--- a/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts.ts
+++ b/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts.ts
@@ -404,10 +404,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id].ts b/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id].ts
index f80d8999bc..11db071cc4 100644
--- a/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id].ts
+++ b/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id].ts
@@ -410,10 +410,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id]_transactions.ts b/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id]_transactions.ts
index a15c2e7b67..60debb159d 100644
--- a/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id]_transactions.ts
+++ b/www/utils/generated/oas-output/operations/admin/get_admin_store-credit-accounts_[id]_transactions.ts
@@ -379,10 +379,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_transaction-groups.ts b/www/utils/generated/oas-output/operations/admin/get_admin_transaction-groups.ts
index 4857c0c8bf..fb68cb98cc 100644
--- a/www/utils/generated/oas-output/operations/admin/get_admin_transaction-groups.ts
+++ b/www/utils/generated/oas-output/operations/admin/get_admin_transaction-groups.ts
@@ -365,10 +365,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards.ts b/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards.ts
index b41e60faa3..4671b235e3 100644
--- a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards.ts
+++ b/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards.ts
@@ -68,10 +68,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id].ts b/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id].ts
index 699858d15b..12f60abc77 100644
--- a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id].ts
+++ b/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id].ts
@@ -62,10 +62,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id]_redeem.ts b/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id]_redeem.ts
index 2776f41dd6..ca76711883 100644
--- a/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id]_redeem.ts
+++ b/www/utils/generated/oas-output/operations/admin/post_admin_gift-cards_[id]_redeem.ts
@@ -66,10 +66,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_store-credit-accounts.ts b/www/utils/generated/oas-output/operations/admin/post_admin_store-credit-accounts.ts
index ec692d101a..ee96cd6bdd 100644
--- a/www/utils/generated/oas-output/operations/admin/post_admin_store-credit-accounts.ts
+++ b/www/utils/generated/oas-output/operations/admin/post_admin_store-credit-accounts.ts
@@ -61,10 +61,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_gift-cards.ts b/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_gift-cards.ts
index 4783d683a9..e28d124502 100644
--- a/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_gift-cards.ts
+++ b/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_gift-cards.ts
@@ -71,10 +71,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/get_store_gift-cards.ts b/www/utils/generated/oas-output/operations/store/get_store_gift-cards.ts
deleted file mode 100644
index d9017a0d9f..0000000000
--- a/www/utils/generated/oas-output/operations/store/get_store_gift-cards.ts
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * @oas [get] /store/gift-cards
- * operationId: GetGiftCards
- * summary: List Customer's Gift Cards
- * x-sidebar-summary: List Gift Cards
- * description: Retrieve a customer's gift cards. The gift cards can be filtered by fields such as `id`. The gift cards can also be sorted or paginated.
- * x-authenticated: true
- * x-ignoreCleanup: true
- * parameters:
- * - name: x-publishable-api-key
- * in: header
- * description: Publishable API Key created in the Medusa Admin.
- * required: true
- * schema:
- * type: string
- * externalDocs:
- * url: https://docs.medusajs.com/api/store#publishable-api-key
- * - name: id
- * in: query
- * required: false
- * schema:
- * oneOf:
- * - type: string
- * title: id
- * description: Filter by a gift card ID.
- * - type: array
- * description: Filter by gift card IDs.
- * items:
- * type: string
- * title: id
- * description: A gift card's ID.
- * - name: limit
- * in: query
- * description: Limit the number of items returned in the list.
- * required: false
- * schema:
- * type: number
- * title: limit
- * description: Limit the number of items returned in the list.
- * externalDocs:
- * url: "#pagination"
- * - name: offset
- * in: query
- * description: The number of items to skip when retrieving a list.
- * required: false
- * schema:
- * type: number
- * title: offset
- * description: The number of items to skip when retrieving a list.
- * externalDocs:
- * url: "#pagination"
- * - name: order
- * in: query
- * 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 `-`.
- * required: false
- * schema:
- * type: string
- * title: order
- * 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 `-`.
- * externalDocs:
- * url: "#pagination"
- * - name: fields
- * in: query
- * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
- * fields. Without prefix it will replace the entire default fields.
- * required: false
- * schema:
- * type: string
- * title: fields
- * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
- * fields. Without prefix it will replace the entire default fields.
- * externalDocs:
- * url: "#select-fields-and-relations"
- * - 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: 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
- * - 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: 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
- * - name: status
- * in: query
- * required: false
- * schema:
- * oneOf:
- * - type: string
- * description: Filter by a gift card's status.
- * enum:
- * - pending
- * - redeemed
- * - type: array
- * description: Filter by gift card statuses.
- * items:
- * type: string
- * description: A gift card status.
- * enum:
- * - pending
- * - redeemed
- * x-codeSamples:
- * - lang: Shell
- * label: cURL
- * source: |-
- * curl '{backend_url}/store/gift-cards' \
- * -H 'x-publishable-api-key: {your_publishable_api_key}'
- * tags:
- * - Gift Cards
- * responses:
- * "200":
- * description: OK
- * "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"
- * security:
- * - cookie_auth: []
- * - jwt_token: []
- *
- * x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
-*/
-
diff --git a/www/utils/generated/oas-output/operations/store/get_store_gift-cards_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_gift-cards_[idOrCode].ts
similarity index 66%
rename from www/utils/generated/oas-output/operations/store/get_store_gift-cards_[id].ts
rename to www/utils/generated/oas-output/operations/store/get_store_gift-cards_[idOrCode].ts
index fc3d919d1d..6a2080fbe4 100644
--- a/www/utils/generated/oas-output/operations/store/get_store_gift-cards_[id].ts
+++ b/www/utils/generated/oas-output/operations/store/get_store_gift-cards_[idOrCode].ts
@@ -1,15 +1,15 @@
/**
- * @oas [get] /store/gift-cards/{id}
- * operationId: GetGiftCardsId
- * summary: Get Customer's Gift Card
+ * @oas [get] /store/gift-cards/{idOrCode}
+ * operationId: GetGiftCardsIdorcode
+ * summary: Get a Gift Card
* x-sidebar-summary: Get Gift Card
- * description: Retrieve the logged-in customer's gift card by its ID. You can expand the gift card's relations or select the fields that should be returned.
- * x-authenticated: true
+ * description: Retrieve a gift card by its ID or code. You can expand the gift card's relations or select the fields that should be returned.
+ * x-authenticated: false
* x-ignoreCleanup: true
* parameters:
- * - name: id
+ * - name: idOrCode
* in: path
- * description: The gift card's ID.
+ * description: The gift card's ID or code.
* required: true
* schema:
* type: string
@@ -25,8 +25,8 @@
* in: query
* description: |-
* Comma-separated fields that should be included in the returned data.
- * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- * without prefix it will replace the entire default fields.
+ * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ * without prefix it will replace the entire default fields.
* required: false
* schema:
* type: string
@@ -39,7 +39,8 @@
* - lang: Shell
* label: cURL
* source: |-
- * curl '{backend_url}/store/gift-cards/{id}' \
+ * curl '{backend_url}/store/gift-cards/{idOrCode}' \
+ * -H 'Authorization: Bearer {access_token}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Gift Cards
@@ -58,13 +59,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- * security:
- * - cookie_auth: []
- * - jwt_token: []
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts.ts b/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts.ts
index b2a8bafbe5..3cfb961986 100644
--- a/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts.ts
+++ b/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts.ts
@@ -354,10 +354,10 @@
* security:
* - cookie_auth: []
* - jwt_token: []
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts_[id].ts
index 5742782bbf..4aa99cb603 100644
--- a/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts_[id].ts
+++ b/www/utils/generated/oas-output/operations/store/get_store_store-credit-accounts_[id].ts
@@ -65,10 +65,10 @@
* security:
* - cookie_auth: []
* - jwt_token: []
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_gift-cards.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_gift-cards.ts
index cbe0f115e2..1fafbb1300 100644
--- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_gift-cards.ts
+++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_gift-cards.ts
@@ -71,10 +71,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_store-credits.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_store-credits.ts
index 2e675f0f24..2a5d6a3a59 100644
--- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_store-credits.ts
+++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_store-credits.ts
@@ -71,10 +71,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/post_store_gift-card-invitations_[code]_accept.ts b/www/utils/generated/oas-output/operations/store/post_store_gift-card-invitations_[code]_accept.ts
deleted file mode 100644
index 53c0314af8..0000000000
--- a/www/utils/generated/oas-output/operations/store/post_store_gift-card-invitations_[code]_accept.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @oas [post] /store/gift-card-invitations/{code}/accept
- * operationId: PostGiftCardInvitationsCodeAccept
- * summary: Accept Customer's Gift Card Invitation
- * x-sidebar-summary: Accept Invitation
- * description: Accept the logged-in customer's gift card invitation
- * x-authenticated: true
- * x-ignoreCleanup: true
- * parameters:
- * - name: code
- * in: path
- * description: The gift card invitation's code.
- * required: true
- * schema:
- * type: string
- * - name: x-publishable-api-key
- * in: header
- * description: Publishable API Key created in the Medusa Admin.
- * required: true
- * schema:
- * type: string
- * externalDocs:
- * url: https://docs.medusajs.com/api/store#publishable-api-key
- * - name: fields
- * in: query
- * description: |-
- * Comma-separated fields that should be included in the returned data.
- * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- * without prefix it will replace the entire default fields.
- * required: false
- * schema:
- * type: string
- * title: fields
- * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
- * fields. Without prefix it will replace the entire default fields.
- * externalDocs:
- * url: "#select-fields-and-relations"
- * x-codeSamples:
- * - lang: Shell
- * label: cURL
- * source: |-
- * curl -X POST '{backend_url}/store/gift-card-invitations/{code}/accept' \
- * -H 'x-publishable-api-key: {your_publishable_api_key}'
- * tags:
- * - Gift Card Invitations
- * responses:
- * "200":
- * description: OK
- * content:
- * application/json:
- * schema:
- * $ref: "#/components/schemas/StoreGiftCardInvitationResponse"
- * "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"
- * security:
- * - cookie_auth: []
- * - jwt_token: []
- *
- * x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
-*/
-
diff --git a/www/utils/generated/oas-output/operations/store/post_store_gift-card-invitations_[code]_reject.ts b/www/utils/generated/oas-output/operations/store/post_store_gift-card-invitations_[code]_reject.ts
deleted file mode 100644
index e8b6056b9d..0000000000
--- a/www/utils/generated/oas-output/operations/store/post_store_gift-card-invitations_[code]_reject.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @oas [post] /store/gift-card-invitations/{code}/reject
- * operationId: PostGiftCardInvitationsCodeReject
- * summary: Reject Customer's Gift Card Invitation
- * x-sidebar-summary: Reject Invitation
- * description: Reject the logged-in customer's gift card invitation
- * x-authenticated: true
- * x-ignoreCleanup: true
- * parameters:
- * - name: code
- * in: path
- * description: The gift card invitation's code.
- * required: true
- * schema:
- * type: string
- * - name: x-publishable-api-key
- * in: header
- * description: Publishable API Key created in the Medusa Admin.
- * required: true
- * schema:
- * type: string
- * externalDocs:
- * url: https://docs.medusajs.com/api/store#publishable-api-key
- * - name: fields
- * in: query
- * description: |-
- * Comma-separated fields that should be included in the returned data.
- * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- * without prefix it will replace the entire default fields.
- * required: false
- * schema:
- * type: string
- * title: fields
- * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
- * fields. Without prefix it will replace the entire default fields.
- * externalDocs:
- * url: "#select-fields-and-relations"
- * x-codeSamples:
- * - lang: Shell
- * label: cURL
- * source: |-
- * curl -X POST '{backend_url}/store/gift-card-invitations/{code}/reject' \
- * -H 'x-publishable-api-key: {your_publishable_api_key}'
- * tags:
- * - Gift Card Invitations
- * responses:
- * "200":
- * description: OK
- * content:
- * application/json:
- * schema:
- * $ref: "#/components/schemas/StoreGiftCardInvitationResponse"
- * "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"
- * security:
- * - cookie_auth: []
- * - jwt_token: []
- *
- * x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
-*/
-
diff --git a/www/utils/generated/oas-output/operations/store/post_store_gift-cards_[id]_redeem.ts b/www/utils/generated/oas-output/operations/store/post_store_gift-cards_[idOrCode]_redeem.ts
similarity index 69%
rename from www/utils/generated/oas-output/operations/store/post_store_gift-cards_[id]_redeem.ts
rename to www/utils/generated/oas-output/operations/store/post_store_gift-cards_[idOrCode]_redeem.ts
index 6d0a20be5c..1b71475643 100644
--- a/www/utils/generated/oas-output/operations/store/post_store_gift-cards_[id]_redeem.ts
+++ b/www/utils/generated/oas-output/operations/store/post_store_gift-cards_[idOrCode]_redeem.ts
@@ -1,15 +1,15 @@
/**
- * @oas [post] /store/gift-cards/{id}/redeem
- * operationId: PostGiftCardsIdRedeem
- * summary: Redeem Customer's Gift Card
+ * @oas [post] /store/gift-cards/{idOrCode}/redeem
+ * operationId: PostGiftCardsIdorcodeRedeem
+ * summary: Redeem a Gift Card
* x-sidebar-summary: Redeem Gift Card
- * description: Redeem the logged-in customer's gift card
+ * description: Redeem a gift card by its ID or code. The gift card will be added to the logged-in customer's store credit account.
* x-authenticated: true
* x-ignoreCleanup: true
* parameters:
- * - name: id
+ * - name: idOrCode
* in: path
- * description: The gift card's ID.
+ * description: The gift card's ID or code.
* required: true
* schema:
* type: string
@@ -25,8 +25,8 @@
* in: query
* description: |-
* Comma-separated fields that should be included in the returned data.
- * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- * without prefix it will replace the entire default fields.
+ * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
+ * without prefix it will replace the entire default fields.
* required: false
* schema:
* type: string
@@ -35,11 +35,15 @@
* fields. Without prefix it will replace the entire default fields.
* externalDocs:
* url: "#select-fields-and-relations"
+ * security:
+ * - cookie_auth: []
+ * - jwt_token: []
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
- * curl -X POST '{backend_url}/store/gift-cards/{id}/redeem' \
+ * curl -X POST '{backend_url}/store/gift-cards/{idOrCode}/redeem' \
+ * -H 'Authorization: Bearer {access_token}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Gift Cards
@@ -62,13 +66,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
- * security:
- * - cookie_auth: []
- * - jwt_token: []
- *
* x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ * - text: Cloud
+ * description: |
+ * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
+ *
*/
diff --git a/www/utils/generated/oas-output/operations/store/post_store_gift-cards_[id]_invitation.ts b/www/utils/generated/oas-output/operations/store/post_store_gift-cards_[id]_invitation.ts
deleted file mode 100644
index e54c0940f1..0000000000
--- a/www/utils/generated/oas-output/operations/store/post_store_gift-cards_[id]_invitation.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * @oas [post] /store/gift-cards/{id}/invitation
- * operationId: PostGiftCardsIdInvitation
- * summary: Send Gift Card Invitation
- * x-sidebar-summary: Send Invitation
- * description: Send a gift card invitation to a customer's email address. The gift card must belong to the logged-in customer, and it must not have been redeemed yet.
- * x-authenticated: true
- * x-ignoreCleanup: true
- * parameters:
- * - name: id
- * in: path
- * description: The gift card's ID.
- * required: true
- * schema:
- * type: string
- * - name: x-publishable-api-key
- * in: header
- * description: Publishable API Key created in the Medusa Admin.
- * required: true
- * schema:
- * type: string
- * externalDocs:
- * url: https://docs.medusajs.com/api/store#publishable-api-key
- * - name: fields
- * in: query
- * description: |-
- * Comma-separated fields that should be included in the returned data.
- * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
- * without prefix it will replace the entire default fields.
- * required: false
- * schema:
- * type: string
- * title: fields
- * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
- * fields. Without prefix it will replace the entire default fields.
- * externalDocs:
- * url: "#select-fields-and-relations"
- * requestBody:
- * content:
- * application/json:
- * schema:
- * $ref: "#/components/schemas/StoreCreateGiftCardInvitation"
- * x-codeSamples:
- * - lang: Shell
- * label: cURL
- * source: |-
- * curl -X POST '{backend_url}/store/gift-cards/{id}/invitation' \
- * -H 'x-publishable-api-key: {your_publishable_api_key}' \
- * -H 'Content-Type: application/json' \
- * --data-raw '{
- * "email": "Morton61@hotmail.com"
- * }'
- * tags:
- * - Gift Cards
- * responses:
- * "200":
- * description: OK
- * content:
- * application/json:
- * schema:
- * $ref: "#/components/schemas/StoreGiftCardResponse"
- * "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"
- * security:
- * - cookie_auth: []
- * - jwt_token: []
- *
- * x-badges:
- * - text: "Cloud"
- * description: >
- * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
-*/
-
diff --git a/www/utils/generated/oas-output/schemas/AdminGiftCard.ts b/www/utils/generated/oas-output/schemas/AdminGiftCard.ts
index a71c0bed4f..73ab61f6b5 100644
--- a/www/utils/generated/oas-output/schemas/AdminGiftCard.ts
+++ b/www/utils/generated/oas-output/schemas/AdminGiftCard.ts
@@ -6,7 +6,6 @@
* required:
* - line_item
* - customer
- * - invitation
* - id
* - code
* - status
@@ -67,8 +66,6 @@
* type: string
* title: expires_at
* description: The date the gift card expires at.
- * invitation:
- * $ref: "#/components/schemas/AdminGiftCardInvitation"
* created_at:
* type: string
* format: date-time
diff --git a/www/utils/generated/oas-output/schemas/AdminGiftCardInvitation.ts b/www/utils/generated/oas-output/schemas/AdminGiftCardInvitation.ts
deleted file mode 100644
index 3e203b8dd7..0000000000
--- a/www/utils/generated/oas-output/schemas/AdminGiftCardInvitation.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @schema AdminGiftCardInvitation
- * type: object
- * description: The gift card invitation details.
- * required:
- * - gift_card
- * - id
- * - code
- * - status
- * - expires_at
- * - email
- * properties:
- * id:
- * type: string
- * title: id
- * description: The invitation's ID.
- * email:
- * type: string
- * title: email
- * description: The invitation's email.
- * format: email
- * code:
- * type: string
- * title: code
- * description: The invitation's code.
- * status:
- * type: string
- * description: The invitation's status.
- * enum:
- * - pending
- * - accepted
- * - rejected
- * expires_at:
- * type: string
- * title: expires_at
- * description: The date the invitation expires at.
- * gift_card:
- * $ref: "#/components/schemas/AdminGiftCard"
- * x-schemaName: AdminGiftCardInvitation
- *
-*/
-
diff --git a/www/utils/generated/oas-output/schemas/AdminGiftCardsResponse.ts b/www/utils/generated/oas-output/schemas/AdminGiftCardsResponse.ts
index 560a955308..c972d9fcff 100644
--- a/www/utils/generated/oas-output/schemas/AdminGiftCardsResponse.ts
+++ b/www/utils/generated/oas-output/schemas/AdminGiftCardsResponse.ts
@@ -26,6 +26,11 @@
* description: The list of gift cards.
* items:
* $ref: "#/components/schemas/AdminGiftCard"
+ * estimate_count:
+ * type: number
+ * title: estimate_count
+ * description: The gift card's estimate count.
+ * x-featureFlag: index_engine
*
*/
diff --git a/www/utils/generated/oas-output/schemas/AdminStoreCreditAccountsResponse.ts b/www/utils/generated/oas-output/schemas/AdminStoreCreditAccountsResponse.ts
index 5dbe156c0e..0f21633905 100644
--- a/www/utils/generated/oas-output/schemas/AdminStoreCreditAccountsResponse.ts
+++ b/www/utils/generated/oas-output/schemas/AdminStoreCreditAccountsResponse.ts
@@ -26,6 +26,11 @@
* description: The list of store credit accounts.
* items:
* $ref: "#/components/schemas/AdminStoreCreditAccount"
+ * estimate_count:
+ * type: number
+ * title: estimate_count
+ * description: The store credit account's estimate count.
+ * x-featureFlag: index_engine
*
*/
diff --git a/www/utils/generated/oas-output/schemas/AdminTransactionGroupsResponse.ts b/www/utils/generated/oas-output/schemas/AdminTransactionGroupsResponse.ts
index 350b528cab..da56de734b 100644
--- a/www/utils/generated/oas-output/schemas/AdminTransactionGroupsResponse.ts
+++ b/www/utils/generated/oas-output/schemas/AdminTransactionGroupsResponse.ts
@@ -26,6 +26,11 @@
* description: The list of transaction groups.
* items:
* $ref: "#/components/schemas/AdminTransactionGroup"
+ * estimate_count:
+ * type: number
+ * title: estimate_count
+ * description: The transaction group's estimate count.
+ * x-featureFlag: index_engine
*
*/
diff --git a/www/utils/generated/oas-output/schemas/AdminTransactionsResponse.ts b/www/utils/generated/oas-output/schemas/AdminTransactionsResponse.ts
index 99c035e1f5..e7b37f5250 100644
--- a/www/utils/generated/oas-output/schemas/AdminTransactionsResponse.ts
+++ b/www/utils/generated/oas-output/schemas/AdminTransactionsResponse.ts
@@ -26,6 +26,11 @@
* description: The list of transactions.
* items:
* $ref: "#/components/schemas/AdminTransaction"
+ * estimate_count:
+ * type: number
+ * title: estimate_count
+ * description: The store credit account's estimate count.
+ * x-featureFlag: index_engine
*
*/
diff --git a/www/utils/generated/oas-output/schemas/AdminTransferGiftCard.ts b/www/utils/generated/oas-output/schemas/AdminTransferGiftCard.ts
deleted file mode 100644
index 9056ea7c08..0000000000
--- a/www/utils/generated/oas-output/schemas/AdminTransferGiftCard.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * @schema AdminTransferGiftCard
- * type: object
- * description: The details of the gift card transfer request.
- * x-schemaName: AdminTransferGiftCard
- * required:
- * - customer_id
- * properties:
- * customer_id:
- * type: string
- * title: customer_id
- * description: The ID of the customer to transfer the gift card to.
- *
-*/
-
diff --git a/www/utils/generated/oas-output/schemas/StoreCreateGiftCardInvitation.ts b/www/utils/generated/oas-output/schemas/StoreCreateGiftCardInvitation.ts
deleted file mode 100644
index 91a8d4b588..0000000000
--- a/www/utils/generated/oas-output/schemas/StoreCreateGiftCardInvitation.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * @schema StoreCreateGiftCardInvitation
- * type: object
- * description: The details to create a gift card invitation.
- * x-schemaName: StoreCreateGiftCardInvitation
- * required:
- * - email
- * properties:
- * email:
- * type: string
- * title: email
- * description: The email address to send the gift card invitation to.
- * format: email
- * expires_at:
- * type: string
- * title: expires_at
- * description: The date the gift card invitation expires.
- * format: date-time
- *
-*/
-
diff --git a/www/utils/generated/oas-output/schemas/StoreGiftCard.ts b/www/utils/generated/oas-output/schemas/StoreGiftCard.ts
index d3c8b1e66e..1b72dfee27 100644
--- a/www/utils/generated/oas-output/schemas/StoreGiftCard.ts
+++ b/www/utils/generated/oas-output/schemas/StoreGiftCard.ts
@@ -6,7 +6,6 @@
* required:
* - customer
* - line_item
- * - invitation
* - id
* - code
* - status
@@ -22,6 +21,12 @@
* properties:
* customer:
* $ref: "#/components/schemas/StoreCustomer"
+ * line_item:
+ * $ref: "#/components/schemas/StoreOrderLineItem"
+ * id:
+ * type: string
+ * title: id
+ * description: The gift card's ID.
* code:
* type: string
* title: code
@@ -36,22 +41,32 @@
* type: number
* title: value
* description: The gift card's amount.
+ * currency_code:
+ * type: string
+ * title: currency_code
+ * description: The gift card's currency code.
+ * example: usd
* customer_id:
* type: string
* title: customer_id
* description: The ID of the customer that the gift card belongs to.
- * id:
- * type: string
- * title: id
- * description: The gift card's ID.
* reference_id:
* type: string
* title: reference_id
* description: The gift card's reference ID.
+ * note:
+ * type: string
+ * title: note
+ * description: A note with more information about the gift card.
* reference:
* type: string
* title: reference
* description: The gift card's reference.
+ * expires_at:
+ * type: string
+ * title: expires_at
+ * description: The date the gift card expires.
+ * format: date-time
* created_at:
* type: string
* format: date-time
@@ -62,23 +77,6 @@
* format: date-time
* title: updated_at
* description: The date the gift card was updated.
- * currency_code:
- * type: string
- * title: currency_code
- * description: The gift card's currency code.
- * example: usd
- * note:
- * type: string
- * title: note
- * description: The gift card's note.
- * expires_at:
- * type: string
- * title: expires_at
- * description: The date the gift card expires.
- * invitation:
- * $ref: "#/components/schemas/StoreGiftCardInvitation"
- * line_item:
- * $ref: "#/components/schemas/StoreOrderLineItem"
- *
+ *
*/
diff --git a/www/utils/generated/oas-output/schemas/StoreGiftCardInvitationResponse.ts b/www/utils/generated/oas-output/schemas/StoreGiftCardInvitationResponse.ts
deleted file mode 100644
index 367c1e3c07..0000000000
--- a/www/utils/generated/oas-output/schemas/StoreGiftCardInvitationResponse.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * @schema StoreGiftCardInvitationResponse
- * type: object
- * description: The gift card invitation's details.
- * x-schemaName: StoreGiftCardInvitationResponse
- * required:
- * - gift_card_invitation
- * properties:
- * gift_card_invitation:
- * $ref: "#/components/schemas/StoreGiftCardInvitation"
- *
-*/
-
diff --git a/www/utils/generated/oas-output/schemas/StoreStoreCreditAccountsResponse.ts b/www/utils/generated/oas-output/schemas/StoreStoreCreditAccountsResponse.ts
index d90ac31722..85cdc2ed58 100644
--- a/www/utils/generated/oas-output/schemas/StoreStoreCreditAccountsResponse.ts
+++ b/www/utils/generated/oas-output/schemas/StoreStoreCreditAccountsResponse.ts
@@ -26,6 +26,11 @@
* description: The list of store credit accounts.
* items:
* $ref: "#/components/schemas/StoreStoreCreditAccount"
+ * estimate_count:
+ * type: number
+ * title: estimate_count
+ * description: The store credit account's estimate count.
+ * x-featureFlag: index_engine
*
*/
diff --git a/www/utils/packages/docs-generator/src/classes/kinds/oas.ts b/www/utils/packages/docs-generator/src/classes/kinds/oas.ts
index 8546da64c9..5b7795164d 100644
--- a/www/utils/packages/docs-generator/src/classes/kinds/oas.ts
+++ b/www/utils/packages/docs-generator/src/classes/kinds/oas.ts
@@ -122,7 +122,7 @@ class OasKindGenerator extends FunctionKindGenerator {
allowedAuthTypes: ["cookie_auth", "jwt_token"],
},
{
- startsWith: "store/gift-card",
+ exact: "store/gift-cards/[idOrCode]/redeem",
requiresAuthentication: true,
},
{