docs: update OAS for loyalty plugin (#12836)

* updates

* cleanup

* generate OAS

* update links
This commit is contained in:
Shahed Nasser
2025-06-26 17:22:18 +03:00
committed by GitHub
parent 2983c7c3a5
commit 7d95eb73d3
81 changed files with 463 additions and 2001 deletions
@@ -132,24 +132,6 @@ const generatedgeneratedStoreSidebarSidebar = {
"loaded": false, "loaded": false,
"showLoadingIfEmpty": true "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", "type": "category",
"title": "Gift Cards", "title": "Gift Cards",
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/gift-cards/{id}/orders' \
-H 'Authorization: Bearer {access_token}'
@@ -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}"
}'
@@ -4,7 +4,6 @@ x-schemaName: AdminGiftCard
required: required:
- line_item - line_item
- customer - customer
- invitation
- id - id
- code - code
- status - status
@@ -65,8 +64,6 @@ properties:
type: string type: string
title: expires_at title: expires_at
description: The date the gift card expires at. description: The date the gift card expires at.
invitation:
$ref: ./AdminGiftCardInvitation.yaml
created_at: created_at:
type: string type: string
format: date-time format: date-time
@@ -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
@@ -24,3 +24,8 @@ properties:
description: The list of gift cards. description: The list of gift cards.
items: items:
$ref: ./AdminGiftCard.yaml $ref: ./AdminGiftCard.yaml
estimate_count:
type: number
title: estimate_count
description: The gift card's estimate count.
x-featureFlag: index_engine
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: ./AdminStoreCreditAccount.yaml $ref: ./AdminStoreCreditAccount.yaml
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
@@ -24,3 +24,8 @@ properties:
description: The list of transaction groups. description: The list of transaction groups.
items: items:
$ref: ./AdminTransactionGroup.yaml $ref: ./AdminTransactionGroup.yaml
estimate_count:
type: number
title: estimate_count
description: The transaction group's estimate count.
x-featureFlag: index_engine
@@ -24,3 +24,8 @@ properties:
description: The list of transactions. description: The list of transactions.
items: items:
$ref: ./AdminTransaction.yaml $ref: ./AdminTransaction.yaml
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
@@ -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.
@@ -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
@@ -4,7 +4,6 @@ x-schemaName: StoreGiftCard
required: required:
- customer - customer
- line_item - line_item
- invitation
- id - id
- code - code
- status - status
@@ -20,6 +19,12 @@ required:
properties: properties:
customer: customer:
$ref: ./StoreCustomer.yaml $ref: ./StoreCustomer.yaml
line_item:
$ref: ./StoreOrderLineItem.yaml
id:
type: string
title: id
description: The gift card's ID.
code: code:
type: string type: string
title: code title: code
@@ -34,22 +39,32 @@ properties:
type: number type: number
title: value title: value
description: The gift card's amount. description: The gift card's amount.
currency_code:
type: string
title: currency_code
description: The gift card's currency code.
example: usd
customer_id: customer_id:
type: string type: string
title: customer_id title: customer_id
description: The ID of the customer that the gift card belongs to. 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: reference_id:
type: string type: string
title: reference_id title: reference_id
description: The gift card's 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: reference:
type: string type: string
title: reference title: reference
description: The gift card's 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: created_at:
type: string type: string
format: date-time format: date-time
@@ -60,20 +75,3 @@ properties:
format: date-time format: date-time
title: updated_at title: updated_at
description: The date the gift card was updated. 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
@@ -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
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: ./StoreStoreCreditAccount.yaml $ref: ./StoreStoreCreditAccount.yaml
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
@@ -20123,6 +20123,65 @@ paths:
- text: Cloud - text: Cloud
description: | description: |
This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). 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: /admin/gift-cards/{id}/redeem:
post: post:
operationId: PostGiftCardsIdRedeem operationId: PostGiftCardsIdRedeem
@@ -20194,77 +20253,6 @@ paths:
- text: Cloud - text: Cloud
description: | description: |
This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). 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: /admin/inventory-items:
get: get:
operationId: GetInventoryItems operationId: GetInventoryItems
@@ -60112,7 +60100,6 @@ components:
required: required:
- line_item - line_item
- customer - customer
- invitation
- id - id
- code - code
- status - status
@@ -60173,8 +60160,6 @@ components:
type: string type: string
title: expires_at title: expires_at
description: The date the gift card expires at. description: The date the gift card expires at.
invitation:
$ref: '#/components/schemas/AdminGiftCardInvitation'
created_at: created_at:
type: string type: string
format: date-time format: date-time
@@ -60185,44 +60170,6 @@ components:
format: date-time format: date-time
title: updated_at title: updated_at
description: The date the gift card was 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: AdminGiftCardResponse:
type: object type: object
description: The gift card's details. description: The gift card's details.
@@ -60259,6 +60206,11 @@ components:
description: The list of gift cards. description: The list of gift cards.
items: items:
$ref: '#/components/schemas/AdminGiftCard' $ref: '#/components/schemas/AdminGiftCard'
estimate_count:
type: number
title: estimate_count
description: The gift card's estimate count.
x-featureFlag: index_engine
AdminImportProductRequest: AdminImportProductRequest:
type: object type: object
description: The import's details. description: The import's details.
@@ -66483,6 +66435,11 @@ components:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: '#/components/schemas/AdminStoreCreditAccount' $ref: '#/components/schemas/AdminStoreCreditAccount'
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
AdminStoreCurrency: AdminStoreCurrency:
type: object type: object
description: The details of a store's currency. description: The details of a store's currency.
@@ -66951,6 +66908,11 @@ components:
description: The list of transaction groups. description: The list of transaction groups.
items: items:
$ref: '#/components/schemas/AdminTransactionGroup' $ref: '#/components/schemas/AdminTransactionGroup'
estimate_count:
type: number
title: estimate_count
description: The transaction group's estimate count.
x-featureFlag: index_engine
AdminTransactionsResponse: AdminTransactionsResponse:
type: object type: object
description: The paginated list of transactions. description: The paginated list of transactions.
@@ -66978,17 +66940,11 @@ components:
description: The list of transactions. description: The list of transactions.
items: items:
$ref: '#/components/schemas/AdminTransaction' $ref: '#/components/schemas/AdminTransaction'
AdminTransferGiftCard: estimate_count:
type: object type: number
description: The details of the gift card transfer request. title: estimate_count
x-schemaName: AdminTransferGiftCard description: The store credit account's estimate count.
required: x-featureFlag: index_engine
- customer_id
properties:
customer_id:
type: string
title: customer_id
description: The ID of the customer to transfer the gift card to.
AdminTransferOrder: AdminTransferOrder:
type: object type: object
description: The details of the request to transfer the order. description: The details of the request to transfer the order.
@@ -75420,23 +75376,6 @@ components:
metadata: metadata:
type: object type: object
description: The customer's metadata, can hold custom key-value pairs. 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: StoreCreatePaymentCollection:
type: object type: object
description: The details of the payment collection to create. description: The details of the payment collection to create.
@@ -75855,7 +75794,6 @@ components:
required: required:
- customer - customer
- line_item - line_item
- invitation
- id - id
- code - code
- status - status
@@ -75871,6 +75809,12 @@ components:
properties: properties:
customer: customer:
$ref: '#/components/schemas/StoreCustomer' $ref: '#/components/schemas/StoreCustomer'
line_item:
$ref: '#/components/schemas/StoreOrderLineItem'
id:
type: string
title: id
description: The gift card's ID.
code: code:
type: string type: string
title: code title: code
@@ -75885,22 +75829,32 @@ components:
type: number type: number
title: value title: value
description: The gift card's amount. description: The gift card's amount.
currency_code:
type: string
title: currency_code
description: The gift card's currency code.
example: usd
customer_id: customer_id:
type: string type: string
title: customer_id title: customer_id
description: The ID of the customer that the gift card belongs to. 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: reference_id:
type: string type: string
title: reference_id title: reference_id
description: The gift card's 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: reference:
type: string type: string
title: reference title: reference
description: The gift card's 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: created_at:
type: string type: string
format: date-time format: date-time
@@ -75911,23 +75865,6 @@ components:
format: date-time format: date-time
title: updated_at title: updated_at
description: The date the gift card was updated. 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: StoreGiftCardInvitation:
type: object type: object
description: The gift card invitation's details. description: The gift card invitation's details.
@@ -75953,15 +75890,6 @@ components:
description: The gift card invitation's status. description: The gift card invitation's status.
gift_card: gift_card:
$ref: '#/components/schemas/StoreGiftCard' $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: StoreGiftCardResponse:
type: object type: object
description: The gift card's details. description: The gift card's details.
@@ -83557,6 +83485,11 @@ components:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: '#/components/schemas/StoreStoreCreditAccount' $ref: '#/components/schemas/StoreStoreCreditAccount'
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
StoreTransactionGroup: StoreTransactionGroup:
type: object type: object
description: The transaction group's details. description: The transaction group's details.
@@ -848,10 +848,10 @@ paths:
$ref: paths/admin_gift-cards.yaml $ref: paths/admin_gift-cards.yaml
/admin/gift-cards/{id}: /admin/gift-cards/{id}:
$ref: paths/admin_gift-cards_{id}.yaml $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: /admin/gift-cards/{id}/redeem:
$ref: paths/admin_gift-cards_{id}_redeem.yaml $ref: paths/admin_gift-cards_{id}_redeem.yaml
/admin/gift-cards/{id}/transfer:
$ref: paths/admin_gift-cards_{id}_transfer.yaml
/admin/inventory-items: /admin/inventory-items:
$ref: paths/admin_inventory-items.yaml $ref: paths/admin_inventory-items.yaml
/admin/inventory-items/location-levels/batch: /admin/inventory-items/location-levels/batch:
@@ -1,7 +1,8 @@
post: get:
operationId: PostGiftCardsIdTransfer operationId: GetGiftCardsIdOrders
summary: Transfer Gift Card summary: List Gift Card's Orders
description: Transfer a gift card to another customer. x-sidebar-summary: List Orders
description: Retrieve the list of orders that a gift card was used in.
x-authenticated: true x-authenticated: true
x-ignoreCleanup: true x-ignoreCleanup: true
parameters: parameters:
@@ -13,13 +14,10 @@ post:
type: string type: string
- name: fields - name: fields
in: query in: query
description: >- description: |-
Comma-separated fields that should be included in the returned data. 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.
if a field is prefixed with `+` it will be added to the default fields, without prefix it will replace the entire default fields.
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false required: false
schema: schema:
type: string type: string
@@ -35,25 +33,16 @@ post:
- api_token: [] - api_token: []
- cookie_auth: [] - cookie_auth: []
- jwt_token: [] - jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminTransferGiftCard.yaml
x-codeSamples: x-codeSamples:
- lang: Shell - lang: Shell
label: cURL label: cURL
source: source:
$ref: ../code_samples/Shell/admin_gift-cards_{id}_transfer/post.sh $ref: ../code_samples/Shell/admin_gift-cards_{id}_orders/get.sh
tags: tags:
- Gift Cards - Gift Cards
responses: responses:
'200': '200':
description: OK description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminGiftCardResponse.yaml
'400': '400':
$ref: ../components/responses/400_error.yaml $ref: ../components/responses/400_error.yaml
'401': '401':
@@ -1,2 +0,0 @@
curl -X POST '{backend_url}/store/gift-card-invitations/{code}/accept' \
-H 'x-publishable-api-key: {your_publishable_api_key}'
@@ -1,2 +0,0 @@
curl -X POST '{backend_url}/store/gift-card-invitations/{code}/reject' \
-H 'x-publishable-api-key: {your_publishable_api_key}'
@@ -1,2 +0,0 @@
curl '{backend_url}/store/gift-cards' \
-H 'x-publishable-api-key: {your_publishable_api_key}'
@@ -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}'
@@ -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}'
@@ -1,2 +0,0 @@
curl '{backend_url}/store/gift-cards/{id}' \
-H 'x-publishable-api-key: {your_publishable_api_key}'
@@ -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"
}'
@@ -1,2 +0,0 @@
curl -X POST '{backend_url}/store/gift-cards/{id}/redeem' \
-H 'x-publishable-api-key: {your_publishable_api_key}'
@@ -4,7 +4,6 @@ x-schemaName: AdminGiftCard
required: required:
- line_item - line_item
- customer - customer
- invitation
- id - id
- code - code
- status - status
@@ -65,8 +64,6 @@ properties:
type: string type: string
title: expires_at title: expires_at
description: The date the gift card expires at. description: The date the gift card expires at.
invitation:
$ref: ./AdminGiftCardInvitation.yaml
created_at: created_at:
type: string type: string
format: date-time format: date-time
@@ -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
@@ -24,3 +24,8 @@ properties:
description: The list of gift cards. description: The list of gift cards.
items: items:
$ref: ./AdminGiftCard.yaml $ref: ./AdminGiftCard.yaml
estimate_count:
type: number
title: estimate_count
description: The gift card's estimate count.
x-featureFlag: index_engine
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: ./AdminStoreCreditAccount.yaml $ref: ./AdminStoreCreditAccount.yaml
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
@@ -24,3 +24,8 @@ properties:
description: The list of transaction groups. description: The list of transaction groups.
items: items:
$ref: ./AdminTransactionGroup.yaml $ref: ./AdminTransactionGroup.yaml
estimate_count:
type: number
title: estimate_count
description: The transaction group's estimate count.
x-featureFlag: index_engine
@@ -24,3 +24,8 @@ properties:
description: The list of transactions. description: The list of transactions.
items: items:
$ref: ./AdminTransaction.yaml $ref: ./AdminTransaction.yaml
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
@@ -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.
@@ -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
@@ -4,7 +4,6 @@ x-schemaName: StoreGiftCard
required: required:
- customer - customer
- line_item - line_item
- invitation
- id - id
- code - code
- status - status
@@ -20,6 +19,12 @@ required:
properties: properties:
customer: customer:
$ref: ./StoreCustomer.yaml $ref: ./StoreCustomer.yaml
line_item:
$ref: ./StoreOrderLineItem.yaml
id:
type: string
title: id
description: The gift card's ID.
code: code:
type: string type: string
title: code title: code
@@ -34,22 +39,32 @@ properties:
type: number type: number
title: value title: value
description: The gift card's amount. description: The gift card's amount.
currency_code:
type: string
title: currency_code
description: The gift card's currency code.
example: usd
customer_id: customer_id:
type: string type: string
title: customer_id title: customer_id
description: The ID of the customer that the gift card belongs to. 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: reference_id:
type: string type: string
title: reference_id title: reference_id
description: The gift card's 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: reference:
type: string type: string
title: reference title: reference
description: The gift card's 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: created_at:
type: string type: string
format: date-time format: date-time
@@ -60,20 +75,3 @@ properties:
format: date-time format: date-time
title: updated_at title: updated_at
description: The date the gift card was updated. 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
@@ -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
@@ -24,3 +24,8 @@ properties:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: ./StoreStoreCreditAccount.yaml $ref: ./StoreStoreCreditAccount.yaml
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
@@ -58,15 +58,6 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/customers url: https://docs.medusajs.com/resources/storefront-development/customers
x-associatedSchema: x-associatedSchema:
$ref: '#/components/schemas/StoreCustomer' $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.
<Note>
Gift Card Invitations are only available for Cloud users using the [Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
</Note>
x-associatedSchema:
$ref: '#/components/schemas/StoreGiftCardInvitation'
- name: Gift Cards - name: Gift Cards
description: | description: |
A gift card is a prepaid card that customers can use to purchase products in the store. 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' $ref: '#/components/responses/500_error'
x-workflow: deleteCustomerAddressesWorkflow x-workflow: deleteCustomerAddressesWorkflow
x-events: [] x-events: []
/store/gift-card-invitations/{code}/accept: /store/gift-cards/{idOrCode}:
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:
get: get:
operationId: GetGiftCards operationId: GetGiftCardsIdorcode
summary: List Customer's Gift Cards summary: Get a Gift Card
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
x-sidebar-summary: Get 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. 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: true x-authenticated: false
x-ignoreCleanup: true x-ignoreCleanup: true
parameters: parameters:
- name: id - name: idOrCode
in: path in: path
description: The gift card's ID. description: The gift card's ID or code.
required: true required: true
schema: schema:
type: string type: string
@@ -4502,8 +4214,8 @@ paths:
in: query in: query
description: |- description: |-
Comma-separated fields that should be included in the returned data. 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. 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. without prefix it will replace the entire default fields.
required: false required: false
schema: schema:
type: string type: string
@@ -4515,7 +4227,8 @@ paths:
- lang: Shell - lang: Shell
label: cURL label: cURL
source: |- 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}' -H 'x-publishable-api-key: {your_publishable_api_key}'
tags: tags:
- Gift Cards - Gift Cards
@@ -4534,104 +4247,22 @@ paths:
$ref: '#/components/responses/invalid_request_error' $ref: '#/components/responses/invalid_request_error'
'500': '500':
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
security:
- cookie_auth: []
- jwt_token: []
x-badges: x-badges:
- text: Cloud - text: Cloud
description: | description: |
This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). 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: post:
operationId: PostGiftCardsIdInvitation operationId: PostGiftCardsIdorcodeRedeem
summary: Send Gift Card Invitation summary: Redeem a Gift Card
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
x-sidebar-summary: Redeem 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-authenticated: true
x-ignoreCleanup: true x-ignoreCleanup: true
parameters: parameters:
- name: id - name: idOrCode
in: path in: path
description: The gift card's ID. description: The gift card's ID or code.
required: true required: true
schema: schema:
type: string type: string
@@ -4647,8 +4278,8 @@ paths:
in: query in: query
description: |- description: |-
Comma-separated fields that should be included in the returned data. 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. 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. without prefix it will replace the entire default fields.
required: false required: false
schema: schema:
type: string 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. 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: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security:
- cookie_auth: []
- jwt_token: []
x-codeSamples: x-codeSamples:
- lang: Shell - lang: Shell
label: cURL label: cURL
source: |- 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}' -H 'x-publishable-api-key: {your_publishable_api_key}'
tags: tags:
- Gift Cards - Gift Cards
@@ -4683,9 +4318,6 @@ paths:
$ref: '#/components/responses/invalid_request_error' $ref: '#/components/responses/invalid_request_error'
'500': '500':
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
security:
- cookie_auth: []
- jwt_token: []
x-badges: x-badges:
- text: Cloud - text: Cloud
description: | description: |
@@ -15295,7 +14927,6 @@ components:
required: required:
- line_item - line_item
- customer - customer
- invitation
- id - id
- code - code
- status - status
@@ -15356,8 +14987,6 @@ components:
type: string type: string
title: expires_at title: expires_at
description: The date the gift card expires at. description: The date the gift card expires at.
invitation:
$ref: '#/components/schemas/AdminGiftCardInvitation'
created_at: created_at:
type: string type: string
format: date-time format: date-time
@@ -15368,44 +14997,6 @@ components:
format: date-time format: date-time
title: updated_at title: updated_at
description: The date the gift card was 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: AdminGiftCardResponse:
type: object type: object
description: The gift card's details. description: The gift card's details.
@@ -15442,6 +15033,11 @@ components:
description: The list of gift cards. description: The list of gift cards.
items: items:
$ref: '#/components/schemas/AdminGiftCard' $ref: '#/components/schemas/AdminGiftCard'
estimate_count:
type: number
title: estimate_count
description: The gift card's estimate count.
x-featureFlag: index_engine
AdminImportProductRequest: AdminImportProductRequest:
type: object type: object
description: The import's details. description: The import's details.
@@ -21666,6 +21262,11 @@ components:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: '#/components/schemas/AdminStoreCreditAccount' $ref: '#/components/schemas/AdminStoreCreditAccount'
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
AdminStoreCurrency: AdminStoreCurrency:
type: object type: object
description: The details of a store's currency. description: The details of a store's currency.
@@ -22134,6 +21735,11 @@ components:
description: The list of transaction groups. description: The list of transaction groups.
items: items:
$ref: '#/components/schemas/AdminTransactionGroup' $ref: '#/components/schemas/AdminTransactionGroup'
estimate_count:
type: number
title: estimate_count
description: The transaction group's estimate count.
x-featureFlag: index_engine
AdminTransactionsResponse: AdminTransactionsResponse:
type: object type: object
description: The paginated list of transactions. description: The paginated list of transactions.
@@ -22161,17 +21767,11 @@ components:
description: The list of transactions. description: The list of transactions.
items: items:
$ref: '#/components/schemas/AdminTransaction' $ref: '#/components/schemas/AdminTransaction'
AdminTransferGiftCard: estimate_count:
type: object type: number
description: The details of the gift card transfer request. title: estimate_count
x-schemaName: AdminTransferGiftCard description: The store credit account's estimate count.
required: x-featureFlag: index_engine
- customer_id
properties:
customer_id:
type: string
title: customer_id
description: The ID of the customer to transfer the gift card to.
AdminTransferOrder: AdminTransferOrder:
type: object type: object
description: The details of the request to transfer the order. description: The details of the request to transfer the order.
@@ -30603,23 +30203,6 @@ components:
metadata: metadata:
type: object type: object
description: The customer's metadata, can hold custom key-value pairs. 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: StoreCreatePaymentCollection:
type: object type: object
description: The details of the payment collection to create. description: The details of the payment collection to create.
@@ -31038,7 +30621,6 @@ components:
required: required:
- customer - customer
- line_item - line_item
- invitation
- id - id
- code - code
- status - status
@@ -31054,6 +30636,12 @@ components:
properties: properties:
customer: customer:
$ref: '#/components/schemas/StoreCustomer' $ref: '#/components/schemas/StoreCustomer'
line_item:
$ref: '#/components/schemas/StoreOrderLineItem'
id:
type: string
title: id
description: The gift card's ID.
code: code:
type: string type: string
title: code title: code
@@ -31068,22 +30656,32 @@ components:
type: number type: number
title: value title: value
description: The gift card's amount. description: The gift card's amount.
currency_code:
type: string
title: currency_code
description: The gift card's currency code.
example: usd
customer_id: customer_id:
type: string type: string
title: customer_id title: customer_id
description: The ID of the customer that the gift card belongs to. 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: reference_id:
type: string type: string
title: reference_id title: reference_id
description: The gift card's 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: reference:
type: string type: string
title: reference title: reference
description: The gift card's 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: created_at:
type: string type: string
format: date-time format: date-time
@@ -31094,23 +30692,6 @@ components:
format: date-time format: date-time
title: updated_at title: updated_at
description: The date the gift card was updated. 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: StoreGiftCardInvitation:
type: object type: object
description: The gift card invitation's details. description: The gift card invitation's details.
@@ -31136,15 +30717,6 @@ components:
description: The gift card invitation's status. description: The gift card invitation's status.
gift_card: gift_card:
$ref: '#/components/schemas/StoreGiftCard' $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: StoreGiftCardResponse:
type: object type: object
description: The gift card's details. description: The gift card's details.
@@ -38740,6 +38312,11 @@ components:
description: The list of store credit accounts. description: The list of store credit accounts.
items: items:
$ref: '#/components/schemas/StoreStoreCreditAccount' $ref: '#/components/schemas/StoreStoreCreditAccount'
estimate_count:
type: number
title: estimate_count
description: The store credit account's estimate count.
x-featureFlag: index_engine
StoreTransactionGroup: StoreTransactionGroup:
type: object type: object
description: The transaction group's details. description: The transaction group's details.
@@ -73,22 +73,6 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/customers url: https://docs.medusajs.com/resources/storefront-development/customers
x-associatedSchema: x-associatedSchema:
$ref: ./components/schemas/StoreCustomer.yaml $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.
<Note>
Gift Card Invitations are only available for Cloud users using the
[Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
</Note>
x-associatedSchema:
$ref: ./components/schemas/StoreGiftCardInvitation.yaml
- name: Gift Cards - name: Gift Cards
description: > description: >
A gift card is a prepaid card that customers can use to purchase products 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 $ref: paths/store_customers_me_addresses.yaml
/store/customers/me/addresses/{address_id}: /store/customers/me/addresses/{address_id}:
$ref: paths/store_customers_me_addresses_{address_id}.yaml $ref: paths/store_customers_me_addresses_{address_id}.yaml
/store/gift-card-invitations/{code}/accept: /store/gift-cards/{idOrCode}:
$ref: paths/store_gift-card-invitations_{code}_accept.yaml $ref: paths/store_gift-cards_{idOrCode}.yaml
/store/gift-card-invitations/{code}/reject: /store/gift-cards/{idOrCode}/redeem:
$ref: paths/store_gift-card-invitations_{code}_reject.yaml $ref: paths/store_gift-cards_{idOrCode}_redeem.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/orders: /store/orders:
$ref: paths/store_orders.yaml $ref: paths/store_orders.yaml
/store/orders/{id}: /store/orders/{id}:
@@ -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).
@@ -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).
@@ -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).
@@ -1,16 +1,16 @@
get: get:
operationId: GetGiftCardsId operationId: GetGiftCardsIdorcode
summary: Get Customer's Gift Card summary: Get a Gift Card
x-sidebar-summary: Get Gift Card x-sidebar-summary: Get Gift Card
description: >- description: >-
Retrieve the logged-in customer's gift card by its ID. You can expand the Retrieve a gift card by its ID or code. You can expand the gift card's
gift card's relations or select the fields that should be returned. relations or select the fields that should be returned.
x-authenticated: true x-authenticated: false
x-ignoreCleanup: true x-ignoreCleanup: true
parameters: parameters:
- name: id - name: idOrCode
in: path in: path
description: The gift card's ID. description: The gift card's ID or code.
required: true required: true
schema: schema:
type: string type: string
@@ -24,13 +24,10 @@ get:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: >- description: |-
Comma-separated fields that should be included in the returned data. 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.
if a field is prefixed with `+` it will be added to the default fields, without prefix it will replace the entire default fields.
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false required: false
schema: schema:
type: string type: string
@@ -46,7 +43,7 @@ get:
- lang: Shell - lang: Shell
label: cURL label: cURL
source: source:
$ref: ../code_samples/Shell/store_gift-cards_{id}/get.sh $ref: ../code_samples/Shell/store_gift-cards_{idOrCode}/get.sh
tags: tags:
- Gift Cards - Gift Cards
responses: responses:
@@ -64,9 +61,6 @@ get:
$ref: ../components/responses/invalid_request_error.yaml $ref: ../components/responses/invalid_request_error.yaml
'500': '500':
$ref: ../components/responses/500_error.yaml $ref: ../components/responses/500_error.yaml
security:
- cookie_auth: []
- jwt_token: []
x-badges: x-badges:
- text: Cloud - text: Cloud
description: > description: >
@@ -1,14 +1,16 @@
post: post:
operationId: PostGiftCardsIdRedeem operationId: PostGiftCardsIdorcodeRedeem
summary: Redeem Customer's Gift Card summary: Redeem a Gift Card
x-sidebar-summary: Redeem 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-authenticated: true
x-ignoreCleanup: true x-ignoreCleanup: true
parameters: parameters:
- name: id - name: idOrCode
in: path in: path
description: The gift card's ID. description: The gift card's ID or code.
required: true required: true
schema: schema:
type: string type: string
@@ -22,13 +24,10 @@ post:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: >- description: |-
Comma-separated fields that should be included in the returned data. 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.
if a field is prefixed with `+` it will be added to the default fields, without prefix it will replace the entire default fields.
using `-` will remove it from the default fields.
without prefix it will replace the entire default fields.
required: false required: false
schema: schema:
type: string type: string
@@ -40,11 +39,14 @@ post:
prefix it will replace the entire default fields. prefix it will replace the entire default fields.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security:
- cookie_auth: []
- jwt_token: []
x-codeSamples: x-codeSamples:
- lang: Shell - lang: Shell
label: cURL label: cURL
source: source:
$ref: ../code_samples/Shell/store_gift-cards_{id}_redeem/post.sh $ref: ../code_samples/Shell/store_gift-cards_{idOrCode}_redeem/post.sh
tags: tags:
- Gift Cards - Gift Cards
responses: responses:
@@ -66,9 +68,6 @@ post:
$ref: ../components/responses/invalid_request_error.yaml $ref: ../components/responses/invalid_request_error.yaml
'500': '500':
$ref: ../components/responses/500_error.yaml $ref: ../components/responses/500_error.yaml
security:
- cookie_auth: []
- jwt_token: []
x-badges: x-badges:
- text: Cloud - text: Cloud
description: > description: >
@@ -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).
@@ -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: You can find the API routes for the Loyalty Plugin within the API reference:
- Store API routes: - Store API routes:
- [Gift Card Invitations](!api!/store#gift-card-invitations)
- [Gift Cards](!api!/store#gift-cards) - [Gift Cards](!api!/store#gift-cards)
- [Store Credit Accounts](!api!/store#store-credit-accounts) - [Store Credit Accounts](!api!/store#store-credit-accounts)
- Admin API routes: - Admin API routes:
+1 -1
View File
@@ -10,7 +10,7 @@ export const generatedEditDates = {
"app/redis/page.mdx": "2025-06-25T07:57:23.246Z", "app/redis/page.mdx": "2025-06-25T07:57:23.246Z",
"app/s3/page.mdx": "2025-06-25T07:57:24.832Z", "app/s3/page.mdx": "2025-06-25T07:57:24.832Z",
"app/draft-order-plugin/page.mdx": "2025-06-25T07:57:14.898Z", "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/billing-usage/page.mdx": "2025-06-25T07:57:03.206Z",
"app/logs/page.mdx": "2025-06-19T07:44:38.336Z", "app/logs/page.mdx": "2025-06-19T07:44:38.336Z",
"app/update-medusa/page.mdx": "2025-06-25T07:57:30.170Z", "app/update-medusa/page.mdx": "2025-06-25T07:57:30.170Z",
@@ -65,20 +65,6 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/customers url: https://docs.medusajs.com/resources/storefront-development/customers
x-associatedSchema: x-associatedSchema:
$ref: "#/components/schemas/StoreCustomer" $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.
<Note>
Gift Card Invitations are only available for Cloud users using the [Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
</Note>
x-associatedSchema:
$ref: "#/components/schemas/StoreGiftCardInvitation"
- name: Gift Cards - name: Gift Cards
description: > description: >
A gift card is a prepaid card that customers can use to purchase products A gift card is a prepaid card that customers can use to purchase products
@@ -366,8 +366,9 @@
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -58,8 +58,9 @@
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -1,8 +1,9 @@
/** /**
* @oas [post] /admin/gift-cards/{id}/transfer * @oas [get] /admin/gift-cards/{id}/orders
* operationId: PostGiftCardsIdTransfer * operationId: GetGiftCardsIdOrders
* summary: Transfer Gift Card * summary: List Gift Card's Orders
* description: Transfer a gift card to another customer. * x-sidebar-summary: List Orders
* description: Retrieve the list of orders that a gift card was used in.
* x-authenticated: true * x-authenticated: true
* x-ignoreCleanup: true * x-ignoreCleanup: true
* parameters: * parameters:
@@ -16,8 +17,8 @@
* in: query * in: query
* description: |- * description: |-
* Comma-separated fields that should be included in the returned data. * 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. * 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. * without prefix it will replace the entire default fields.
* required: false * required: false
* schema: * schema:
* type: string * type: string
@@ -30,30 +31,17 @@
* - api_token: [] * - api_token: []
* - cookie_auth: [] * - cookie_auth: []
* - jwt_token: [] * - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminTransferGiftCard"
* x-codeSamples: * x-codeSamples:
* - lang: Shell * - lang: Shell
* label: cURL * label: cURL
* source: |- * source: |-
* curl -X POST '{backend_url}/admin/gift-cards/{id}/transfer' \ * curl '{backend_url}/admin/gift-cards/{id}/orders' \
* -H 'Authorization: Bearer {access_token}' \ * -H 'Authorization: Bearer {access_token}'
* -H 'Content-Type: application/json' \
* --data-raw '{
* "customer_id": "{value}"
* }'
* tags: * tags:
* - Gift Cards * - Gift Cards
* responses: * responses:
* "200": * "200":
* description: OK * description: OK
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminGiftCardResponse"
* "400": * "400":
* $ref: "#/components/responses/400_error" * $ref: "#/components/responses/400_error"
* "401": * "401":
@@ -66,10 +54,9 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*/ */
@@ -404,10 +404,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -410,10 +410,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -379,10 +379,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -365,10 +365,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -68,10 +68,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -62,10 +62,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -66,10 +66,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -61,10 +61,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -71,10 +71,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -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).
*/
@@ -1,15 +1,15 @@
/** /**
* @oas [get] /store/gift-cards/{id} * @oas [get] /store/gift-cards/{idOrCode}
* operationId: GetGiftCardsId * operationId: GetGiftCardsIdorcode
* summary: Get Customer's Gift Card * summary: Get a Gift Card
* x-sidebar-summary: Get 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. * 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: true * x-authenticated: false
* x-ignoreCleanup: true * x-ignoreCleanup: true
* parameters: * parameters:
* - name: id * - name: idOrCode
* in: path * in: path
* description: The gift card's ID. * description: The gift card's ID or code.
* required: true * required: true
* schema: * schema:
* type: string * type: string
@@ -25,8 +25,8 @@
* in: query * in: query
* description: |- * description: |-
* Comma-separated fields that should be included in the returned data. * 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. * 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. * without prefix it will replace the entire default fields.
* required: false * required: false
* schema: * schema:
* type: string * type: string
@@ -39,7 +39,8 @@
* - lang: Shell * - lang: Shell
* label: cURL * label: cURL
* source: |- * 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}' * -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags: * tags:
* - Gift Cards * - Gift Cards
@@ -58,13 +59,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* security:
* - cookie_auth: []
* - jwt_token: []
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -354,10 +354,10 @@
* security: * security:
* - cookie_auth: [] * - cookie_auth: []
* - jwt_token: [] * - jwt_token: []
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -65,10 +65,10 @@
* security: * security:
* - cookie_auth: [] * - cookie_auth: []
* - jwt_token: [] * - jwt_token: []
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -71,10 +71,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -71,10 +71,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -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).
*/
@@ -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).
*/
@@ -1,15 +1,15 @@
/** /**
* @oas [post] /store/gift-cards/{id}/redeem * @oas [post] /store/gift-cards/{idOrCode}/redeem
* operationId: PostGiftCardsIdRedeem * operationId: PostGiftCardsIdorcodeRedeem
* summary: Redeem Customer's Gift Card * summary: Redeem a Gift Card
* x-sidebar-summary: Redeem 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-authenticated: true
* x-ignoreCleanup: true * x-ignoreCleanup: true
* parameters: * parameters:
* - name: id * - name: idOrCode
* in: path * in: path
* description: The gift card's ID. * description: The gift card's ID or code.
* required: true * required: true
* schema: * schema:
* type: string * type: string
@@ -25,8 +25,8 @@
* in: query * in: query
* description: |- * description: |-
* Comma-separated fields that should be included in the returned data. * 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. * 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. * without prefix it will replace the entire default fields.
* required: false * required: false
* schema: * schema:
* type: string * type: string
@@ -35,11 +35,15 @@
* fields. Without prefix it will replace the entire default fields. * fields. Without prefix it will replace the entire default fields.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security:
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples: * x-codeSamples:
* - lang: Shell * - lang: Shell
* label: cURL * label: cURL
* source: |- * 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}' * -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags: * tags:
* - Gift Cards * - Gift Cards
@@ -62,13 +66,10 @@
* $ref: "#/components/responses/invalid_request_error" * $ref: "#/components/responses/invalid_request_error"
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* security:
* - cookie_auth: []
* - jwt_token: []
*
* x-badges: * x-badges:
* - text: "Cloud" * - text: Cloud
* description: > * description: |
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin). * This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
*
*/ */
@@ -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).
*/
@@ -6,7 +6,6 @@
* required: * required:
* - line_item * - line_item
* - customer * - customer
* - invitation
* - id * - id
* - code * - code
* - status * - status
@@ -67,8 +66,6 @@
* type: string * type: string
* title: expires_at * title: expires_at
* description: The date the gift card expires at. * description: The date the gift card expires at.
* invitation:
* $ref: "#/components/schemas/AdminGiftCardInvitation"
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
@@ -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
*
*/
@@ -26,6 +26,11 @@
* description: The list of gift cards. * description: The list of gift cards.
* items: * items:
* $ref: "#/components/schemas/AdminGiftCard" * $ref: "#/components/schemas/AdminGiftCard"
* estimate_count:
* type: number
* title: estimate_count
* description: The gift card's estimate count.
* x-featureFlag: index_engine
* *
*/ */
@@ -26,6 +26,11 @@
* description: The list of store credit accounts. * description: The list of store credit accounts.
* items: * items:
* $ref: "#/components/schemas/AdminStoreCreditAccount" * $ref: "#/components/schemas/AdminStoreCreditAccount"
* estimate_count:
* type: number
* title: estimate_count
* description: The store credit account's estimate count.
* x-featureFlag: index_engine
* *
*/ */
@@ -26,6 +26,11 @@
* description: The list of transaction groups. * description: The list of transaction groups.
* items: * items:
* $ref: "#/components/schemas/AdminTransactionGroup" * $ref: "#/components/schemas/AdminTransactionGroup"
* estimate_count:
* type: number
* title: estimate_count
* description: The transaction group's estimate count.
* x-featureFlag: index_engine
* *
*/ */
@@ -26,6 +26,11 @@
* description: The list of transactions. * description: The list of transactions.
* items: * items:
* $ref: "#/components/schemas/AdminTransaction" * $ref: "#/components/schemas/AdminTransaction"
* estimate_count:
* type: number
* title: estimate_count
* description: The store credit account's estimate count.
* x-featureFlag: index_engine
* *
*/ */
@@ -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.
*
*/
@@ -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
*
*/
@@ -6,7 +6,6 @@
* required: * required:
* - customer * - customer
* - line_item * - line_item
* - invitation
* - id * - id
* - code * - code
* - status * - status
@@ -22,6 +21,12 @@
* properties: * properties:
* customer: * customer:
* $ref: "#/components/schemas/StoreCustomer" * $ref: "#/components/schemas/StoreCustomer"
* line_item:
* $ref: "#/components/schemas/StoreOrderLineItem"
* id:
* type: string
* title: id
* description: The gift card's ID.
* code: * code:
* type: string * type: string
* title: code * title: code
@@ -36,22 +41,32 @@
* type: number * type: number
* title: value * title: value
* description: The gift card's amount. * description: The gift card's amount.
* currency_code:
* type: string
* title: currency_code
* description: The gift card's currency code.
* example: usd
* customer_id: * customer_id:
* type: string * type: string
* title: customer_id * title: customer_id
* description: The ID of the customer that the gift card belongs to. * 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: * reference_id:
* type: string * type: string
* title: reference_id * title: reference_id
* description: The gift card's 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: * reference:
* type: string * type: string
* title: reference * title: reference
* description: The gift card's 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: * created_at:
* type: string * type: string
* format: date-time * format: date-time
@@ -62,23 +77,6 @@
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The date the gift card was updated. * 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"
*
*/ */
@@ -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"
*
*/
@@ -26,6 +26,11 @@
* description: The list of store credit accounts. * description: The list of store credit accounts.
* items: * items:
* $ref: "#/components/schemas/StoreStoreCreditAccount" * $ref: "#/components/schemas/StoreStoreCreditAccount"
* estimate_count:
* type: number
* title: estimate_count
* description: The store credit account's estimate count.
* x-featureFlag: index_engine
* *
*/ */
@@ -122,7 +122,7 @@ class OasKindGenerator extends FunctionKindGenerator {
allowedAuthTypes: ["cookie_auth", "jwt_token"], allowedAuthTypes: ["cookie_auth", "jwt_token"],
}, },
{ {
startsWith: "store/gift-card", exact: "store/gift-cards/[idOrCode]/redeem",
requiresAuthentication: true, requiresAuthentication: true,
}, },
{ {