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:
Shahed Nasser
2025-06-24 19:17:55 +03:00
committed by GitHub
parent 3826bde591
commit 93cf79cb0f
164 changed files with 16001 additions and 88 deletions

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/admin/gift-cards' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -0,0 +1,14 @@
curl -X POST '{backend_url}/admin/gift-cards' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"code": "{value}",
"value": 19,
"currency_code": "bwp",
"expires_at": "2025-07-20T15:47:23.951Z",
"reference_id": "{value}",
"reference": "{value}",
"line_item_id": "{value}",
"customer_id": "{value}",
"metadata": {}
}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/admin/gift-cards/{id}' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/gift-cards/{id}' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/admin/gift-cards/{id}/redeem' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"customer_id": "{value}"
}'

View File

@@ -0,0 +1,6 @@
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}"
}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/admin/store-credit-accounts' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -0,0 +1,7 @@
curl -X POST '{backend_url}/admin/store-credit-accounts' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"currency_code": "nzd",
"customer_id": "{value}"
}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/admin/store-credit-accounts/{id}' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/admin/store-credit-accounts/{id}/transactions' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/admin/transaction-groups' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -0,0 +1,8 @@
type: object
description: The gift card's details.
x-schemaName: AdminGiftCardResponse
required:
- gift_card
properties:
gift_card:
$ref: ./AdminGiftCard.yaml

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,8 @@
type: object
description: The gift card's details.
x-schemaName: StoreGiftCardResponse
required:
- gift_card
properties:
gift_card:
$ref: ./StoreGiftCard.yaml

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -175,6 +175,26 @@ tags:
https://docs.medusajs.com/resources/commerce-modules/fulfillment/item-fulfillment
x-associatedSchema:
$ref: ./components/schemas/AdminFulfillment.yaml
- name: Gift Cards
description: >
A gift card is a prepaid card that can be used to pay for items during
checkout.
Gift cards can be purchased by customers, or created by admin users. When
a gift card is redeemed, its amount is added to the customer's store
credit account, which can then be used to pay for items during checkout.
These API routes allow admin users to manage gift cards, transfer gift
cards between customers, and more.
<Note>
Gift Card routes are only available for Cloud users using the [Loyalty
Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
</Note>
x-associatedSchema:
$ref: ./components/schemas/AdminGiftCard.yaml
- name: Inventory Items
description: |
An inventory item is a stock-kept product whose inventory is managed.
@@ -551,6 +571,27 @@ tags:
https://docs.medusajs.com/resources/commerce-modules/stock-location/concepts
x-associatedSchema:
$ref: ./components/schemas/AdminStockLocation.yaml
- name: Store Credit Accounts
description: >
A store credit account is a ledger of store credit transactions for a
customer. They hold the customer's store credit balance, including their
credit and debit amounts.
Store credit accounts allow you to build features that let customers pay
for items using their store credit balance, such as gift cards or loyalty
points.
These API routes allow admin users to manage store credit accounts, their
transactions, and more.
<Note>
Store Credit Account routes are only available for Cloud users using the
[Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
</Note>
x-associatedSchema:
$ref: ./components/schemas/AdminStoreCreditAccount.yaml
- name: Stores
description: >
A store holds the main configuration and information of your commerce
@@ -612,6 +653,22 @@ tags:
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-region
x-associatedSchema:
$ref: ./components/schemas/AdminTaxRegion.yaml
- name: Transaction Groups
description: >
A transaction group is a group of transactions that belong to a store
credit account. It allows you to group transactions together, such as all
transactions related to a specific gift card.
These API routes allow admin users to list transaction groups.
<Note>
Transaction Group routes are only available for Cloud users using the
[Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
</Note>
x-associatedSchema:
$ref: ./components/schemas/AdminTransactionGroup.yaml
- name: Uploads
description: >
Use these API routes to upload files to your Medusa application using the
@@ -787,6 +844,14 @@ paths:
$ref: paths/admin_fulfillments_{id}_cancel.yaml
/admin/fulfillments/{id}/shipment:
$ref: paths/admin_fulfillments_{id}_shipment.yaml
/admin/gift-cards:
$ref: paths/admin_gift-cards.yaml
/admin/gift-cards/{id}:
$ref: paths/admin_gift-cards_{id}.yaml
/admin/gift-cards/{id}/redeem:
$ref: paths/admin_gift-cards_{id}_redeem.yaml
/admin/gift-cards/{id}/transfer:
$ref: paths/admin_gift-cards_{id}_transfer.yaml
/admin/inventory-items:
$ref: paths/admin_inventory-items.yaml
/admin/inventory-items/location-levels/batch:
@@ -1022,6 +1087,12 @@ paths:
$ref: paths/admin_stock-locations_{id}_fulfillment-sets.yaml
/admin/stock-locations/{id}/sales-channels:
$ref: paths/admin_stock-locations_{id}_sales-channels.yaml
/admin/store-credit-accounts:
$ref: paths/admin_store-credit-accounts.yaml
/admin/store-credit-accounts/{id}:
$ref: paths/admin_store-credit-accounts_{id}.yaml
/admin/store-credit-accounts/{id}/transactions:
$ref: paths/admin_store-credit-accounts_{id}_transactions.yaml
/admin/stores:
$ref: paths/admin_stores.yaml
/admin/stores/{id}:
@@ -1040,6 +1111,8 @@ paths:
$ref: paths/admin_tax-regions.yaml
/admin/tax-regions/{id}:
$ref: paths/admin_tax-regions_{id}.yaml
/admin/transaction-groups:
$ref: paths/admin_transaction-groups.yaml
/admin/uploads:
$ref: paths/admin_uploads.yaml
/admin/uploads/{id}:

View File

@@ -0,0 +1,498 @@
get:
operationId: GetGiftCards
summary: List Gift Cards
description: >-
Retrieve a list of 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: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: The gift card's ID.
- type: array
description: The gift card's ID.
items:
type: string
title: id
description: The id's ID.
- name: customer_id
in: query
required: false
schema:
oneOf:
- type: string
title: customer_id
description: Filter by a customer ID to retrieve their gift cards.
- type: array
description: Filter by customer IDs to retrieve their gift cards.
items:
type: string
title: customer_id
description: A customer ID.
- name: created_at
in: query
description: Filter by a gift card's creation date.
required: false
schema:
type: object
description: Filter by a gift card'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 gift card's update date.
required: false
schema:
type: object
description: Filter by a gift card'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
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_gift-cards/get.sh
tags:
- Gift Cards
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminGiftCardsResponse.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).
post:
operationId: PostGiftCards
summary: Create Gift Card
description: Create a gift card.
x-authenticated: true
x-ignoreCleanup: true
parameters:
- 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/AdminCreateGiftCardParams.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_gift-cards/post.sh
tags:
- Gift Cards
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminGiftCardResponse.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$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).

View File

@@ -0,0 +1,143 @@
get:
operationId: GetGiftCardsId
summary: Get a Gift Card
description: >-
Retrieve a 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: 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:
$ref: ../code_samples/Shell/admin_gift-cards_{id}/get.sh
tags:
- Gift Cards
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminGiftCardResponse.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$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).
post:
operationId: PostGiftCardsId
summary: Update a Gift Card
description: Update a gift card's details.
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/AdminUpdateGiftCardParams.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_gift-cards_{id}/post.sh
tags:
- Gift Cards
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminGiftCardResponse.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$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).

View File

@@ -0,0 +1,73 @@
post:
operationId: PostGiftCardsIdRedeem
summary: Redeem a Gift Card
description: Redeem a gift card and add it to the customer's store credit account.
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/AdminRedeemGiftCard.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_gift-cards_{id}_redeem/post.sh
tags:
- Gift Cards
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminGiftCardResponse.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$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).

View File

@@ -0,0 +1,73 @@
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.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_gift-cards_{id}_transfer/post.sh
tags:
- Gift Cards
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminGiftCardResponse.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$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).

View File

@@ -0,0 +1,549 @@
get:
operationId: GetStoreCreditAccounts
summary: List Store Credit Accounts
description: >-
Retrieve a list of 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: 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.
The fields and relations to retrieve separated by commas.
Learn more in the [API
reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
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: id
in: query
description: Filter by the store credit account's ID.
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a store credit account ID.
- type: array
description: Filter by store credit account IDs.
items:
type: string
title: id
description: A store credit account ID.
- name: customer_id
in: query
description: Filter by customer ID(s) to retrieve their store credit accounts.
required: false
schema:
oneOf:
- type: string
title: customer_id
description: Filter by a customer ID to retrieve their store credit accounts.
- type: array
description: Filter by customer ID(s) to retrieve their store credit accounts.
items:
type: string
title: customer_id
description: A customer ID.
- name: transaction_group_id
in: query
description: Filter by the associated transaction group's ID.
required: false
schema:
oneOf:
- type: string
title: transaction_group_id
description: Filter by the associated transaction group ID.
- type: array
description: Filter by transaction group IDs.
items:
type: string
title: transaction_group_id
description: A transaction group ID.
- name: currency_code
in: query
description: >-
Filter by currency code(s) to retrieve store credit accounts in specific
currencies.
required: false
schema:
oneOf:
- type: string
title: currency_code
description: >-
Filter by a currency code to retrieve store credit accounts in
that currency.
example: usd
- type: array
description: >-
Filter by currency codes to retrieve store credit accounts in
specific currencies.
items:
type: string
title: currency_code
description: >-
Filter by a currency code to retrieve store credit accounts in
that currency.
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: $and
in: query
description: >-
An array of filters to apply on the entity, where each item in the array
is joined with an "and" condition.
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: >-
An array of filters to apply on the entity, where each item in the array
is joined with an "or" condition.
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: 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'
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_store-credit-accounts/get.sh
tags:
- Store Credit Accounts
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminStoreCreditAccountsResponse.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).
post:
operationId: PostStoreCreditAccounts
summary: Create Store Credit Account
description: Create a store credit account.
x-authenticated: true
x-ignoreCleanup: true
parameters:
- 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/AdminCreateStoreCreditAccount.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_store-credit-accounts/post.sh
tags:
- Store Credit Accounts
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminStoreCreditAccountResponse.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).

View File

@@ -0,0 +1,487 @@
get:
operationId: GetStoreCreditAccountsId
summary: Get a Store Credit Account
description: >-
Retrieve a 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: 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.
The fields and relations to retrieve separated by commas.
Learn more in the [API
reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
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: id
in: query
description: Filter by the store credit account's ID.
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a store credit account ID.
- type: array
description: Filter by store credit account IDs.
items:
type: string
title: id
description: A store credit account ID.
- name: customer_id
in: query
description: Filter by customer ID(s) to retrieve their store credit accounts.
required: false
schema:
oneOf:
- type: string
title: customer_id
description: Filter by a customer ID to retrieve their store credit accounts.
- type: array
description: Filter by customer ID(s) to retrieve their store credit accounts.
items:
type: string
title: customer_id
description: A customer ID.
- name: transaction_group_id
in: query
description: Filter by the associated transaction group's ID.
required: false
schema:
oneOf:
- type: string
title: transaction_group_id
description: Filter by the associated transaction group ID.
- type: array
description: Filter by transaction group IDs.
items:
type: string
title: transaction_group_id
description: A transaction group ID.
- name: currency_code
in: query
description: >-
Filter by currency code(s) to retrieve store credit accounts in specific
currencies.
required: false
schema:
oneOf:
- type: string
title: currency_code
description: >-
Filter by a currency code to retrieve store credit accounts in
that currency.
example: usd
- type: array
description: >-
Filter by currency codes to retrieve store credit accounts in
specific currencies.
items:
type: string
title: currency_code
description: >-
Filter by a currency code to retrieve store credit accounts in
that currency.
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: $and
in: query
description: >-
An array of filters to apply on the entity, where each item in the array
is joined with an "and" condition.
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: >-
An array of filters to apply on the entity, where each item in the array
is joined with an "or" condition.
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: 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'
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_store-credit-accounts_{id}/get.sh
tags:
- Store Credit Accounts
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminStoreCreditAccountResponse.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).

View File

@@ -0,0 +1,447 @@
get:
operationId: GetStoreCreditAccountsIdTransactions
summary: List Transactions
description: >-
Retrieve a list of transactions in a store credit account. The transactions
can be filtered by fields like FILTER FIELDS. The transactions can also be
paginated.
x-authenticated: true
x-ignoreCleanup: true
parameters:
- name: id
in: path
description: The store credit account's ID.
required: true
schema:
type: string
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a transaction ID.
- type: array
description: Filter by transaction IDs.
items:
type: string
title: id
description: A transaction ID.
- name: transaction_group_id
in: query
required: false
schema:
oneOf:
- type: string
title: transaction_group_id
description: Filter by a transaction group ID.
- type: array
description: Filter by transaction group IDs.
items:
type: string
title: transaction_group_id
description: A transaction group ID.
- name: created_at
in: query
description: Filter by a transaction's creation date.
required: false
schema:
type: object
description: Filter by a transaction'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 transaction's update date.
required: false
schema:
type: object
description: Filter by a transaction'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
- name: q
in: query
description: Search query to filter the transactions by their searchable fields.
required: false
schema:
type: string
title: q
description: Search query to filter the transactions by their searchable fields.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: >-
../code_samples/Shell/admin_store-credit-accounts_{id}_transactions/get.sh
tags:
- Store Credit Accounts
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminTransactionsResponse.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).

View File

@@ -0,0 +1,432 @@
get:
operationId: GetTransactionGroups
summary: List Transaction Groups
description: >-
Retrieve a list of transaction groups. The transaction groups can be
filtered by fields such as `id`. The transaction groups can also be sorted
or paginated.
x-authenticated: true
x-ignoreCleanup: true
parameters:
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by the transaction group's ID.
- type: array
description: Filter by the transaction group IDs.
items:
type: string
title: id
description: A transaction group's ID.
- name: code
in: query
required: false
schema:
oneOf:
- type: string
title: code
description: Filter by the transaction group's code.
- type: array
description: Filter by the transaction group codes.
items:
type: string
title: code
description: A transaction group's code.
- name: created_at
in: query
description: Filter by a transaction group's creation date.
required: false
schema:
type: object
description: Filter by a transaction group'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 transaction group's update date.
required: false
schema:
type: object
description: Filter by a transaction group'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
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_transaction-groups/get.sh
tags:
- Transaction Groups
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminTransactionGroupsResponse.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).