docs: add loyalty plugin routes to OAS (#12811)
* generated OAS * remove unused schemas * generated specs * add cloud badge for routes * add to loyalty plugin page * allow clicking the tooltip
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
curl -X DELETE '{backend_url}/store/carts/{id}/gift-cards' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"code": "{value}"
|
||||
}'
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
curl -X POST '{backend_url}/store/carts/{id}/gift-cards' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"code": "{value}"
|
||||
}'
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
curl -X POST '{backend_url}/store/carts/{id}/store-credits' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"amount": 48
|
||||
}'
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
curl -X POST '{backend_url}/store/gift-card-invitations/{code}/accept' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
curl -X POST '{backend_url}/store/gift-card-invitations/{code}/reject' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl '{backend_url}/store/gift-cards' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl '{backend_url}/store/gift-cards/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
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"
|
||||
}'
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
curl -X POST '{backend_url}/store/gift-cards/{id}/redeem' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
curl '{backend_url}/store/store-credit-accounts' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
curl '{backend_url}/store/store-credit-accounts/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -0,0 +1,51 @@
|
||||
type: object
|
||||
description: The details of the gift card to create.
|
||||
x-schemaName: AdminCreateGiftCardParams
|
||||
required:
|
||||
- code
|
||||
- value
|
||||
- currency_code
|
||||
- expires_at
|
||||
- reference_id
|
||||
- reference
|
||||
- line_item_id
|
||||
- customer_id
|
||||
- metadata
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
title: code
|
||||
description: The gift card's code.
|
||||
value:
|
||||
type: number
|
||||
title: value
|
||||
description: The gift card's amount.
|
||||
example: 20
|
||||
currency_code:
|
||||
type: string
|
||||
title: currency_code
|
||||
description: The gift card's currency code.
|
||||
example: usd
|
||||
expires_at:
|
||||
type: string
|
||||
title: expires_at
|
||||
description: The date the gift card expires at.
|
||||
reference_id:
|
||||
type: string
|
||||
title: reference_id
|
||||
description: The gift card's reference ID.
|
||||
reference:
|
||||
type: string
|
||||
title: reference
|
||||
description: The gift card's reference.
|
||||
line_item_id:
|
||||
type: string
|
||||
title: line_item_id
|
||||
description: The ID of the line item associated with the gift card.
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: The ID of the customer associated with the gift card.
|
||||
metadata:
|
||||
type: object
|
||||
description: The gift card's metadata, can hold custom key-value pairs.
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
type: object
|
||||
description: The details of the store credit account to create.
|
||||
x-schemaName: AdminCreateStoreCreditAccount
|
||||
required:
|
||||
- currency_code
|
||||
- customer_id
|
||||
properties:
|
||||
currency_code:
|
||||
type: string
|
||||
title: currency_code
|
||||
description: The store credit account's currency code.
|
||||
example: usd
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: The ID of the customer that the store credit account belongs to.
|
||||
metadata:
|
||||
type: object
|
||||
description: The store credit account's metadata, can hold custom key-value pairs.
|
||||
@@ -0,0 +1,79 @@
|
||||
type: object
|
||||
description: The gift card's details.
|
||||
x-schemaName: AdminGiftCard
|
||||
required:
|
||||
- line_item
|
||||
- customer
|
||||
- invitation
|
||||
- id
|
||||
- code
|
||||
- status
|
||||
- value
|
||||
- currency_code
|
||||
- customer_id
|
||||
- reference_id
|
||||
- note
|
||||
- reference
|
||||
- expires_at
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
line_item:
|
||||
$ref: ./AdminOrderLineItem.yaml
|
||||
customer:
|
||||
$ref: ./AdminCustomer.yaml
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The gift card's ID.
|
||||
code:
|
||||
type: string
|
||||
title: code
|
||||
description: The gift card's code.
|
||||
status:
|
||||
type: string
|
||||
description: The gift card's status.
|
||||
enum:
|
||||
- pending
|
||||
- redeemed
|
||||
value:
|
||||
type: number
|
||||
title: value
|
||||
description: The gift card's amount.
|
||||
currency_code:
|
||||
type: string
|
||||
title: currency_code
|
||||
description: The gift card's currency code.
|
||||
example: usd
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: The ID of the customer associated with the gift card.
|
||||
reference_id:
|
||||
type: string
|
||||
title: reference_id
|
||||
description: The gift card's reference ID.
|
||||
note:
|
||||
type: string
|
||||
title: note
|
||||
description: The gift card's note.
|
||||
reference:
|
||||
type: string
|
||||
title: reference
|
||||
description: The gift card's reference.
|
||||
expires_at:
|
||||
type: string
|
||||
title: expires_at
|
||||
description: The date the gift card expires at.
|
||||
invitation:
|
||||
$ref: ./AdminGiftCardInvitation.yaml
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: created_at
|
||||
description: The date the gift card was created at.
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: updated_at
|
||||
description: The date the gift card was updated at.
|
||||
@@ -0,0 +1,37 @@
|
||||
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
|
||||
@@ -0,0 +1,8 @@
|
||||
type: object
|
||||
description: The gift card's details.
|
||||
x-schemaName: AdminGiftCardResponse
|
||||
required:
|
||||
- gift_card
|
||||
properties:
|
||||
gift_card:
|
||||
$ref: ./AdminGiftCard.yaml
|
||||
@@ -0,0 +1,26 @@
|
||||
type: object
|
||||
description: The paginated list of gift cards.
|
||||
x-schemaName: AdminGiftCardsResponse
|
||||
required:
|
||||
- limit
|
||||
- offset
|
||||
- count
|
||||
- gift_cards
|
||||
properties:
|
||||
limit:
|
||||
type: number
|
||||
title: limit
|
||||
description: The maximum number of gift cards to return.
|
||||
offset:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of gift cards to skip before retrieving the results.
|
||||
count:
|
||||
type: number
|
||||
title: count
|
||||
description: The total number of gift cards available.
|
||||
gift_cards:
|
||||
type: array
|
||||
description: The list of gift cards.
|
||||
items:
|
||||
$ref: ./AdminGiftCard.yaml
|
||||
@@ -0,0 +1,12 @@
|
||||
type: object
|
||||
description: The details of the gift card to redeem.
|
||||
x-schemaName: AdminRedeemGiftCard
|
||||
required:
|
||||
- customer_id
|
||||
properties:
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: >-
|
||||
The ID of the customer that the gift card belongs to. The gift card's
|
||||
value will be added to the customer's store credit account.
|
||||
@@ -0,0 +1,61 @@
|
||||
type: object
|
||||
description: The store credit account's details.
|
||||
x-schemaName: AdminStoreCreditAccount
|
||||
required:
|
||||
- customer
|
||||
- transaction_groups
|
||||
- id
|
||||
- customer_id
|
||||
- currency_code
|
||||
- credits
|
||||
- debits
|
||||
- balance
|
||||
- metadata
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
customer:
|
||||
$ref: ./AdminCustomer.yaml
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The store credit account's ID.
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: The ID of the customer that the store credit account belongs to.
|
||||
currency_code:
|
||||
type: string
|
||||
title: currency_code
|
||||
description: The store credit account's currency code.
|
||||
example: usd
|
||||
credits:
|
||||
type: number
|
||||
title: credits
|
||||
description: The account's credits.
|
||||
debits:
|
||||
type: number
|
||||
title: debits
|
||||
description: The account's debits.
|
||||
balance:
|
||||
type: number
|
||||
title: balance
|
||||
description: The account's balance.
|
||||
transaction_groups:
|
||||
type: array
|
||||
description: The store credit account's transaction groups.
|
||||
items:
|
||||
$ref: ./AdminTransactionGroup.yaml
|
||||
metadata:
|
||||
type: object
|
||||
description: The store credit account's metadata, can hold custom key-value pairs.
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: created_at
|
||||
description: The date the store credit account was created at.
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: updated_at
|
||||
description: The date the store credit account was updated at.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
type: object
|
||||
description: The store credit account's details.
|
||||
x-schemaName: AdminStoreCreditAccountResponse
|
||||
required:
|
||||
- store_credit_account
|
||||
properties:
|
||||
store_credit_account:
|
||||
$ref: ./AdminStoreCreditAccount.yaml
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
type: object
|
||||
description: The paginated list of store credit accounts.
|
||||
x-schemaName: AdminStoreCreditAccountsResponse
|
||||
required:
|
||||
- limit
|
||||
- offset
|
||||
- count
|
||||
- store_credit_accounts
|
||||
properties:
|
||||
limit:
|
||||
type: number
|
||||
title: limit
|
||||
description: The maximum number of store credit accounts to return.
|
||||
offset:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of store credit accounts to skip before retrieving the results.
|
||||
count:
|
||||
type: number
|
||||
title: count
|
||||
description: The total number of store credit accounts available.
|
||||
store_credit_accounts:
|
||||
type: array
|
||||
description: The list of store credit accounts.
|
||||
items:
|
||||
$ref: ./AdminStoreCreditAccount.yaml
|
||||
@@ -0,0 +1,63 @@
|
||||
type: object
|
||||
description: The transaction's details.
|
||||
x-schemaName: AdminTransaction
|
||||
required:
|
||||
- account
|
||||
- id
|
||||
- account_id
|
||||
- transaction_group_id
|
||||
- type
|
||||
- amount
|
||||
- metadata
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The transaction's ID.
|
||||
account_id:
|
||||
type: string
|
||||
title: account_id
|
||||
description: The ID of the store credit account that the transaction belongs to.
|
||||
transaction_group_id:
|
||||
type: string
|
||||
title: transaction_group_id
|
||||
description: The ID of the transaction group that the transaction belongs to.
|
||||
type:
|
||||
type: string
|
||||
description: The transaction's type.
|
||||
enum:
|
||||
- credit
|
||||
- debit
|
||||
amount:
|
||||
type: number
|
||||
title: amount
|
||||
description: The transaction's amount.
|
||||
account:
|
||||
$ref: ./AdminStoreCreditAccount.yaml
|
||||
note:
|
||||
type: string
|
||||
title: note
|
||||
description: The transaction's note.
|
||||
reference:
|
||||
type: string
|
||||
title: reference
|
||||
description: The transaction's reference.
|
||||
reference_id:
|
||||
type: string
|
||||
title: reference_id
|
||||
description: The transaction's reference ID.
|
||||
metadata:
|
||||
type: object
|
||||
description: The transaction's metadata, can hold custom key-value pairs.
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: created_at
|
||||
description: The date the transaction was created at.
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: updated_at
|
||||
description: The date the transaction was updated at.
|
||||
@@ -0,0 +1,37 @@
|
||||
type: object
|
||||
description: The transaction group's details.
|
||||
x-schemaName: AdminTransactionGroup
|
||||
required:
|
||||
- account
|
||||
- id
|
||||
- code
|
||||
- credits
|
||||
- debits
|
||||
- balance
|
||||
- metadata
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The transaction group's ID.
|
||||
code:
|
||||
type: string
|
||||
title: code
|
||||
description: The transaction group's code.
|
||||
credits:
|
||||
type: number
|
||||
title: credits
|
||||
description: The transaction group's credits.
|
||||
debits:
|
||||
type: number
|
||||
title: debits
|
||||
description: The transaction group's debits.
|
||||
balance:
|
||||
type: number
|
||||
title: balance
|
||||
description: The transaction group's balance.
|
||||
account:
|
||||
type: object
|
||||
metadata:
|
||||
type: object
|
||||
description: The transaction group's metadata, can hold custom key-value pairs.
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
type: object
|
||||
description: The paginated list of transaction groups.
|
||||
x-schemaName: AdminTransactionGroupsResponse
|
||||
required:
|
||||
- limit
|
||||
- offset
|
||||
- count
|
||||
- transaction_groups
|
||||
properties:
|
||||
limit:
|
||||
type: number
|
||||
title: limit
|
||||
description: The maximum number of transaction groups to return.
|
||||
offset:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of transaction groups to skip before retrieving the results.
|
||||
count:
|
||||
type: number
|
||||
title: count
|
||||
description: The total number of transaction groups available.
|
||||
transaction_groups:
|
||||
type: array
|
||||
description: The list of transaction groups.
|
||||
items:
|
||||
$ref: ./AdminTransactionGroup.yaml
|
||||
@@ -0,0 +1,26 @@
|
||||
type: object
|
||||
description: The paginated list of transactions.
|
||||
x-schemaName: AdminTransactionsResponse
|
||||
required:
|
||||
- limit
|
||||
- offset
|
||||
- count
|
||||
- transactions
|
||||
properties:
|
||||
limit:
|
||||
type: number
|
||||
title: limit
|
||||
description: The maximum number of transactions to return.
|
||||
offset:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of transactions to skip before retrieving the results.
|
||||
count:
|
||||
type: number
|
||||
title: count
|
||||
description: The total number of transactions available.
|
||||
transactions:
|
||||
type: array
|
||||
description: The list of transactions.
|
||||
items:
|
||||
$ref: ./AdminTransaction.yaml
|
||||
@@ -0,0 +1,10 @@
|
||||
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.
|
||||
@@ -0,0 +1,34 @@
|
||||
type: object
|
||||
description: The details to update in the gift card.
|
||||
x-schemaName: AdminUpdateGiftCardParams
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
description: The gift card's status.
|
||||
enum:
|
||||
- pending
|
||||
- redeemed
|
||||
value:
|
||||
type: number
|
||||
title: value
|
||||
description: The gift card's amount.
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: The ID of the customer that the gift card belongs to.
|
||||
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 at.
|
||||
metadata:
|
||||
type: object
|
||||
description: The gift card's metadata.
|
||||
@@ -0,0 +1,10 @@
|
||||
type: object
|
||||
description: The details to add a gift card to the cart.
|
||||
x-schemaName: StoreAddGiftCardToCart
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
title: code
|
||||
description: The gift card's code.
|
||||
@@ -0,0 +1,10 @@
|
||||
type: object
|
||||
description: The details to add store credits to the cart.
|
||||
x-schemaName: StoreAddStoreCreditsToCart
|
||||
required:
|
||||
- amount
|
||||
properties:
|
||||
amount:
|
||||
type: number
|
||||
title: amount
|
||||
description: The amount of store credits to add to the cart.
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
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
|
||||
@@ -0,0 +1,79 @@
|
||||
type: object
|
||||
description: The gift card's details.
|
||||
x-schemaName: StoreGiftCard
|
||||
required:
|
||||
- customer
|
||||
- line_item
|
||||
- invitation
|
||||
- id
|
||||
- code
|
||||
- status
|
||||
- value
|
||||
- currency_code
|
||||
- customer_id
|
||||
- reference_id
|
||||
- note
|
||||
- reference
|
||||
- expires_at
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
customer:
|
||||
$ref: ./StoreCustomer.yaml
|
||||
code:
|
||||
type: string
|
||||
title: code
|
||||
description: The gift card's code.
|
||||
status:
|
||||
type: string
|
||||
description: The gift card's status.
|
||||
enum:
|
||||
- pending
|
||||
- redeemed
|
||||
value:
|
||||
type: number
|
||||
title: value
|
||||
description: The gift card's amount.
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: The ID of the customer that the gift card belongs to.
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The gift card's ID.
|
||||
reference_id:
|
||||
type: string
|
||||
title: reference_id
|
||||
description: The gift card's reference ID.
|
||||
reference:
|
||||
type: string
|
||||
title: reference
|
||||
description: The gift card's reference.
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: created_at
|
||||
description: The date the gift card was created.
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: updated_at
|
||||
description: The date the gift card was updated.
|
||||
currency_code:
|
||||
type: string
|
||||
title: currency_code
|
||||
description: The gift card's currency code.
|
||||
example: usd
|
||||
note:
|
||||
type: string
|
||||
title: note
|
||||
description: The gift card's note.
|
||||
expires_at:
|
||||
type: string
|
||||
title: expires_at
|
||||
description: The date the gift card expires.
|
||||
invitation:
|
||||
type: object
|
||||
line_item:
|
||||
$ref: ./StoreOrderLineItem.yaml
|
||||
@@ -0,0 +1,24 @@
|
||||
type: object
|
||||
description: The gift card invitation's details.
|
||||
x-schemaName: StoreGiftCardInvitation
|
||||
required:
|
||||
- id
|
||||
- email
|
||||
- status
|
||||
- gift_card
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The gift card invitation's ID.
|
||||
email:
|
||||
type: string
|
||||
title: email
|
||||
description: The gift card invitation's email.
|
||||
format: email
|
||||
status:
|
||||
type: string
|
||||
title: status
|
||||
description: The gift card invitation's status.
|
||||
gift_card:
|
||||
$ref: ./StoreGiftCard.yaml
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
type: object
|
||||
description: The gift card invitation's details.
|
||||
x-schemaName: StoreGiftCardInvitationResponse
|
||||
required:
|
||||
- gift_card_invitation
|
||||
properties:
|
||||
gift_card_invitation:
|
||||
$ref: ./StoreGiftCardInvitation.yaml
|
||||
@@ -0,0 +1,8 @@
|
||||
type: object
|
||||
description: The gift card's details.
|
||||
x-schemaName: StoreGiftCardResponse
|
||||
required:
|
||||
- gift_card
|
||||
properties:
|
||||
gift_card:
|
||||
$ref: ./StoreGiftCard.yaml
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
type: object
|
||||
description: The details to remove a gift card from the cart.
|
||||
x-schemaName: StoreRemoveGiftCardFromCart
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
title: code
|
||||
description: The gift card code to remove from the cart.
|
||||
@@ -0,0 +1,61 @@
|
||||
type: object
|
||||
description: The store credit account's details.
|
||||
x-schemaName: StoreStoreCreditAccount
|
||||
required:
|
||||
- customer
|
||||
- transaction_groups
|
||||
- id
|
||||
- customer_id
|
||||
- currency_code
|
||||
- credits
|
||||
- debits
|
||||
- balance
|
||||
- metadata
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
customer:
|
||||
$ref: ./StoreCustomer.yaml
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The store credit account's ID.
|
||||
customer_id:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: The ID of the customer that the store credit account belongs to.
|
||||
currency_code:
|
||||
type: string
|
||||
title: currency_code
|
||||
description: The store credit account's currency code.
|
||||
example: usd
|
||||
credits:
|
||||
type: number
|
||||
title: credits
|
||||
description: The account's credits.
|
||||
debits:
|
||||
type: number
|
||||
title: debits
|
||||
description: The account's debits.
|
||||
balance:
|
||||
type: number
|
||||
title: balance
|
||||
description: The store credit account's balance.
|
||||
transaction_groups:
|
||||
type: array
|
||||
description: The store credit account's transaction groups.
|
||||
items:
|
||||
$ref: ./StoreTransactionGroup.yaml
|
||||
metadata:
|
||||
type: object
|
||||
description: The store credit account's metadata, can hold custom key-value pairs.
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: created_at
|
||||
description: The date the store credit account was created.
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: updated_at
|
||||
description: The date the store credit account was updated.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
type: object
|
||||
description: The store credit account's details.
|
||||
x-schemaName: StoreStoreCreditAccountResponse
|
||||
required:
|
||||
- store_credit_account
|
||||
properties:
|
||||
store_credit_account:
|
||||
$ref: ./StoreStoreCreditAccount.yaml
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
type: object
|
||||
description: The paginated list of store credit accounts.
|
||||
x-schemaName: StoreStoreCreditAccountsResponse
|
||||
required:
|
||||
- limit
|
||||
- offset
|
||||
- count
|
||||
- store_credit_accounts
|
||||
properties:
|
||||
limit:
|
||||
type: number
|
||||
title: limit
|
||||
description: The maximum number of store credit accounts to return.
|
||||
offset:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of store credit accounts to skip before retrieving the results.
|
||||
count:
|
||||
type: number
|
||||
title: count
|
||||
description: The total number of store credit accounts available.
|
||||
store_credit_accounts:
|
||||
type: array
|
||||
description: The list of store credit accounts.
|
||||
items:
|
||||
$ref: ./StoreStoreCreditAccount.yaml
|
||||
@@ -0,0 +1,37 @@
|
||||
type: object
|
||||
description: The transaction group's details.
|
||||
required:
|
||||
- account
|
||||
- id
|
||||
- code
|
||||
- credits
|
||||
- debits
|
||||
- balance
|
||||
- metadata
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The transaction group's ID.
|
||||
code:
|
||||
type: string
|
||||
title: code
|
||||
description: The transaction group's code.
|
||||
credits:
|
||||
type: number
|
||||
title: credits
|
||||
description: The transaction group's credits.
|
||||
debits:
|
||||
type: number
|
||||
title: debits
|
||||
description: The transaction group's debits.
|
||||
balance:
|
||||
type: number
|
||||
title: balance
|
||||
description: The transaction group's balance.
|
||||
account:
|
||||
type: object
|
||||
metadata:
|
||||
type: object
|
||||
description: The transaction group's metadata, can hold custom key-value pairs.
|
||||
x-schemaName: StoreTransactionGroup
|
||||
File diff suppressed because it is too large
Load Diff
@@ -73,6 +73,41 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/storefront-development/customers
|
||||
x-associatedSchema:
|
||||
$ref: ./components/schemas/StoreCustomer.yaml
|
||||
- name: Gift Card Invitations
|
||||
description: >
|
||||
A gift card invitation is a way to send a gift card to a customer. They
|
||||
can be sent from one customer to another.
|
||||
|
||||
These API routes allow logged-in customers to create and manage gift card
|
||||
invitations.
|
||||
|
||||
<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
|
||||
description: >
|
||||
A gift card is a prepaid card that customers can use to purchase products
|
||||
in the store.
|
||||
|
||||
Customers can purchase gift cards for themselves or others, and then use
|
||||
them to pay for their orders.
|
||||
|
||||
These API routes allow logged-in customers to create and manage their gift
|
||||
cards.
|
||||
|
||||
<Note>
|
||||
|
||||
Gift Cards are only available for Cloud users using the [Loyalty
|
||||
Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
|
||||
</Note>
|
||||
x-associatedSchema:
|
||||
$ref: ./components/schemas/StoreGiftCard.yaml
|
||||
- name: Orders
|
||||
description: |
|
||||
Guest and registered customers can view orders they placed.
|
||||
@@ -159,15 +194,6 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/storefront-development/regions
|
||||
x-associatedSchema:
|
||||
$ref: ./components/schemas/StoreRegion.yaml
|
||||
- name: Returns
|
||||
description: >
|
||||
Customers can request to return items in their order. The admin user then
|
||||
receives and handles the return.
|
||||
|
||||
|
||||
These API routes allows customers to create a return.
|
||||
x-associatedSchema:
|
||||
$ref: ./components/schemas/StoreReturn.yaml
|
||||
- name: Return Reasons
|
||||
description: >
|
||||
A return reason is a possible reason a customer wants to return an item.
|
||||
@@ -177,6 +203,15 @@ tags:
|
||||
storefront to allow customers to select their return reason.
|
||||
x-associatedSchema:
|
||||
$ref: ./components/schemas/StoreReturnReason.yaml
|
||||
- name: Returns
|
||||
description: >
|
||||
Customers can request to return items in their order. The admin user then
|
||||
receives and handles the return.
|
||||
|
||||
|
||||
These API routes allows customers to create a return.
|
||||
x-associatedSchema:
|
||||
$ref: ./components/schemas/StoreReturn.yaml
|
||||
- name: Shipping Options
|
||||
description: >
|
||||
A shipping option is a way of shipping an item to or from the customer.
|
||||
@@ -194,6 +229,22 @@ tags:
|
||||
https://docs.medusajs.com/resources/storefront-development/checkout/shipping
|
||||
x-associatedSchema:
|
||||
$ref: ./components/schemas/StoreShippingOption.yaml
|
||||
- name: Store Credit Accounts
|
||||
x-associatedSchema:
|
||||
description: >
|
||||
A store credit account is a way for customers to manage their store
|
||||
credit balance. Customers can use their store credit to pay for orders,
|
||||
and view their store credit balance.
|
||||
|
||||
These API routes allow customers to view their store credit accounts.
|
||||
|
||||
<Note>
|
||||
|
||||
Store Credit Accounts are only available for Cloud users using the
|
||||
[Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
|
||||
</Note>
|
||||
$ref: ./components/schemas/StoreStoreCreditAccount.yaml
|
||||
paths:
|
||||
/auth/customer/{auth_provider}:
|
||||
$ref: paths/auth_customer_{auth_provider}.yaml
|
||||
@@ -217,6 +268,8 @@ paths:
|
||||
$ref: paths/store_carts_{id}_complete.yaml
|
||||
/store/carts/{id}/customer:
|
||||
$ref: paths/store_carts_{id}_customer.yaml
|
||||
/store/carts/{id}/gift-cards:
|
||||
$ref: paths/store_carts_{id}_gift-cards.yaml
|
||||
/store/carts/{id}/line-items:
|
||||
$ref: paths/store_carts_{id}_line-items.yaml
|
||||
/store/carts/{id}/line-items/{line_id}:
|
||||
@@ -225,6 +278,8 @@ paths:
|
||||
$ref: paths/store_carts_{id}_promotions.yaml
|
||||
/store/carts/{id}/shipping-methods:
|
||||
$ref: paths/store_carts_{id}_shipping-methods.yaml
|
||||
/store/carts/{id}/store-credits:
|
||||
$ref: paths/store_carts_{id}_store-credits.yaml
|
||||
/store/carts/{id}/taxes:
|
||||
$ref: paths/store_carts_{id}_taxes.yaml
|
||||
/store/collections:
|
||||
@@ -243,6 +298,18 @@ paths:
|
||||
$ref: paths/store_customers_me_addresses.yaml
|
||||
/store/customers/me/addresses/{address_id}:
|
||||
$ref: paths/store_customers_me_addresses_{address_id}.yaml
|
||||
/store/gift-card-invitations/{code}/accept:
|
||||
$ref: paths/store_gift-card-invitations_{code}_accept.yaml
|
||||
/store/gift-card-invitations/{code}/reject:
|
||||
$ref: paths/store_gift-card-invitations_{code}_reject.yaml
|
||||
/store/gift-cards:
|
||||
$ref: paths/store_gift-cards.yaml
|
||||
/store/gift-cards/{id}:
|
||||
$ref: paths/store_gift-cards_{id}.yaml
|
||||
/store/gift-cards/{id}/invitation:
|
||||
$ref: paths/store_gift-cards_{id}_invitation.yaml
|
||||
/store/gift-cards/{id}/redeem:
|
||||
$ref: paths/store_gift-cards_{id}_redeem.yaml
|
||||
/store/orders:
|
||||
$ref: paths/store_orders.yaml
|
||||
/store/orders/{id}:
|
||||
@@ -291,6 +358,10 @@ paths:
|
||||
$ref: paths/store_shipping-options.yaml
|
||||
/store/shipping-options/{id}/calculate:
|
||||
$ref: paths/store_shipping-options_{id}_calculate.yaml
|
||||
/store/store-credit-accounts:
|
||||
$ref: paths/store_store-credit-accounts.yaml
|
||||
/store/store-credit-accounts/{id}:
|
||||
$ref: paths/store_store-credit-accounts_{id}.yaml
|
||||
components:
|
||||
securitySchemes:
|
||||
jwt_token:
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
post:
|
||||
operationId: PostCartsIdGiftCards
|
||||
summary: Add Gift Card to Cart
|
||||
x-sidebar-summary: Add Gift Card
|
||||
description: Add a Gift Card to a cart
|
||||
x-authenticated: false
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: The cart'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/StoreAddGiftCardToCart.yaml
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_carts_{id}_gift-cards/post.sh
|
||||
tags:
|
||||
- Carts
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreCartResponse.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
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
This API route is only available in [Medusa
|
||||
Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
delete:
|
||||
operationId: DeleteCartsIdGiftCards
|
||||
summary: Remove Gift Card from Cart
|
||||
x-sidebar-summary: Remove Gift Card
|
||||
description: Remove a Gift Card from a cart.
|
||||
x-authenticated: false
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: The cart'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/StoreRemoveGiftCardFromCart.yaml
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_carts_{id}_gift-cards/delete.sh
|
||||
tags:
|
||||
- Carts
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreCartResponse.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
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
This API route is only available in [Medusa
|
||||
Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
@@ -0,0 +1,78 @@
|
||||
post:
|
||||
operationId: PostCartsIdStoreCredits
|
||||
summary: Add Store Credit to Cart
|
||||
x-sidebar-summary: Add Store Credit
|
||||
description: Add a Store Credit to a cart
|
||||
x-authenticated: false
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: The cart'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/StoreAddStoreCreditsToCart.yaml
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_carts_{id}_store-credits/post.sh
|
||||
tags:
|
||||
- Carts
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreCartResponse.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
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
This API route is only available in [Medusa
|
||||
Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
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).
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
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).
|
||||
@@ -0,0 +1,161 @@
|
||||
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).
|
||||
@@ -0,0 +1,74 @@
|
||||
get:
|
||||
operationId: GetGiftCardsId
|
||||
summary: Get Customer's Gift Card
|
||||
x-sidebar-summary: Get Gift Card
|
||||
description: >-
|
||||
Retrieve the logged-in customer's gift card by its ID. You can expand the
|
||||
gift card's relations or select the fields that should be returned.
|
||||
x-authenticated: true
|
||||
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'
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_gift-cards_{id}/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).
|
||||
@@ -0,0 +1,84 @@
|
||||
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).
|
||||
@@ -0,0 +1,76 @@
|
||||
post:
|
||||
operationId: PostGiftCardsIdRedeem
|
||||
summary: Redeem Customer's Gift Card
|
||||
x-sidebar-summary: Redeem Gift Card
|
||||
description: Redeem the logged-in customer's gift card
|
||||
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'
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_gift-cards_{id}_redeem/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).
|
||||
@@ -0,0 +1,421 @@
|
||||
get:
|
||||
operationId: GetStoreCreditAccounts
|
||||
summary: List Customer's Store Credit Accounts
|
||||
x-sidebar-summary: List Store Credit Accounts
|
||||
description: >-
|
||||
Retrieve the logged-in customer's store credit accounts. The store credit
|
||||
accounts can be filtered by fields such as `id`. The store credit accounts
|
||||
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: currency_code
|
||||
in: query
|
||||
description: Filter by the store credit account's currency code.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: currency_code
|
||||
description: Filter by the store credit account's currency code.
|
||||
example: usd
|
||||
- name: created_at
|
||||
in: query
|
||||
description: Filter by a store credit account's creation date.
|
||||
required: false
|
||||
schema:
|
||||
type: object
|
||||
description: Filter by a store credit account's creation date.
|
||||
properties:
|
||||
$and:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
$or:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
$eq:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
- type: array
|
||||
description: Filter by an exact match.
|
||||
items:
|
||||
type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
$ne:
|
||||
type: string
|
||||
title: $ne
|
||||
description: Filter by values not equal to this parameter.
|
||||
$in:
|
||||
type: array
|
||||
description: Filter by values in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $in
|
||||
description: Filter by values in this array.
|
||||
$nin:
|
||||
type: array
|
||||
description: Filter by values not in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $nin
|
||||
description: Filter by values not in this array.
|
||||
$not:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: object
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: array
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
$gt:
|
||||
type: string
|
||||
title: $gt
|
||||
description: >-
|
||||
Filter by values greater than this parameter. Useful for numbers
|
||||
and dates only.
|
||||
$gte:
|
||||
type: string
|
||||
title: $gte
|
||||
description: >-
|
||||
Filter by values greater than or equal to this parameter. Useful
|
||||
for numbers and dates only.
|
||||
$lt:
|
||||
type: string
|
||||
title: $lt
|
||||
description: >-
|
||||
Filter by values less than this parameter. Useful for numbers and
|
||||
dates only.
|
||||
$lte:
|
||||
type: string
|
||||
title: $lte
|
||||
description: >-
|
||||
Filter by values less than or equal to this parameter. Useful for
|
||||
numbers and dates only.
|
||||
$like:
|
||||
type: string
|
||||
title: $like
|
||||
description: Apply a `like` filter. Useful for strings only.
|
||||
$re:
|
||||
type: string
|
||||
title: $re
|
||||
description: Apply a regex filter. Useful for strings only.
|
||||
$ilike:
|
||||
type: string
|
||||
title: $ilike
|
||||
description: Apply a case-insensitive `like` filter. Useful for strings only.
|
||||
$fulltext:
|
||||
type: string
|
||||
title: $fulltext
|
||||
description: Filter to apply on full-text properties.
|
||||
$overlap:
|
||||
type: array
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $overlap
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
$contains:
|
||||
type: array
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contains
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
$contained:
|
||||
type: array
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contained
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
$exists:
|
||||
type: boolean
|
||||
title: $exists
|
||||
description: Filter by whether a value for this parameter exists (not `null`).
|
||||
- name: updated_at
|
||||
in: query
|
||||
description: Filter by a store credit account's update date.
|
||||
required: false
|
||||
schema:
|
||||
type: object
|
||||
description: Filter by a store credit account's update date.
|
||||
properties:
|
||||
$and:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
$or:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
$eq:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
- type: array
|
||||
description: Filter by an exact match.
|
||||
items:
|
||||
type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
$ne:
|
||||
type: string
|
||||
title: $ne
|
||||
description: Filter by values not equal to this parameter.
|
||||
$in:
|
||||
type: array
|
||||
description: Filter by values in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $in
|
||||
description: Filter by values in this array.
|
||||
$nin:
|
||||
type: array
|
||||
description: Filter by values not in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $nin
|
||||
description: Filter by values not in this array.
|
||||
$not:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: object
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: array
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
$gt:
|
||||
type: string
|
||||
title: $gt
|
||||
description: >-
|
||||
Filter by values greater than this parameter. Useful for numbers
|
||||
and dates only.
|
||||
$gte:
|
||||
type: string
|
||||
title: $gte
|
||||
description: >-
|
||||
Filter by values greater than or equal to this parameter. Useful
|
||||
for numbers and dates only.
|
||||
$lt:
|
||||
type: string
|
||||
title: $lt
|
||||
description: >-
|
||||
Filter by values less than this parameter. Useful for numbers and
|
||||
dates only.
|
||||
$lte:
|
||||
type: string
|
||||
title: $lte
|
||||
description: >-
|
||||
Filter by values less than or equal to this parameter. Useful for
|
||||
numbers and dates only.
|
||||
$like:
|
||||
type: string
|
||||
title: $like
|
||||
description: Apply a `like` filter. Useful for strings only.
|
||||
$re:
|
||||
type: string
|
||||
title: $re
|
||||
description: Apply a regex filter. Useful for strings only.
|
||||
$ilike:
|
||||
type: string
|
||||
title: $ilike
|
||||
description: Apply a case-insensitive `like` filter. Useful for strings only.
|
||||
$fulltext:
|
||||
type: string
|
||||
title: $fulltext
|
||||
description: Filter to apply on full-text properties.
|
||||
$overlap:
|
||||
type: array
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $overlap
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
$contains:
|
||||
type: array
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contains
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
$contained:
|
||||
type: array
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contained
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
$exists:
|
||||
type: boolean
|
||||
title: $exists
|
||||
description: Filter by whether a value for this parameter exists (not `null`).
|
||||
- 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
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_store-credit-accounts/get.sh
|
||||
tags:
|
||||
- Store Credit Accounts
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreStoreCreditAccountsResponse.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).
|
||||
@@ -0,0 +1,79 @@
|
||||
get:
|
||||
operationId: GetStoreCreditAccountsId
|
||||
summary: Get Customer's Store Credit Account
|
||||
x-sidebar-summary: Get Store Credit Account
|
||||
description: >-
|
||||
Retrieve logged-in customer's store credit account by its ID. You can expand
|
||||
the store credit account's relations or select the fields that should be
|
||||
returned.
|
||||
x-authenticated: true
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: The store credit account'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'
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_store-credit-accounts_{id}/get.sh
|
||||
tags:
|
||||
- Store Credit Accounts
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreStoreCreditAccountResponse.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).
|
||||
Reference in New Issue
Block a user