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:
@@ -159,6 +159,22 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/item-fulfillment
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/AdminFulfillment"
|
||||
- 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"
|
||||
- name: Inventory Items
|
||||
description: |
|
||||
An inventory item is a stock-kept product whose inventory is managed.
|
||||
@@ -502,6 +518,22 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/commerce-modules/stock-location/concepts
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/AdminStockLocation"
|
||||
- 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"
|
||||
- name: Stores
|
||||
description: >
|
||||
A store holds the main configuration and information of your commerce
|
||||
@@ -558,6 +590,20 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-region
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/AdminTaxRegion"
|
||||
- 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"
|
||||
- name: Uploads
|
||||
description: >
|
||||
Use these API routes to upload files to your Medusa application using the
|
||||
|
||||
@@ -65,6 +65,36 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/storefront-development/customers
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreCustomer"
|
||||
- name: Gift Card Invitations
|
||||
description: >
|
||||
A gift card invitation is a way to send a gift card to a customer. They
|
||||
can be sent from one customer to another.
|
||||
|
||||
These API routes allow logged-in customers to create and manage gift card invitations.
|
||||
|
||||
<Note>
|
||||
|
||||
Gift Card Invitations are only available for Cloud users using the [Loyalty Plugin](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
|
||||
</Note>
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreGiftCardInvitation"
|
||||
- name: Gift Cards
|
||||
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"
|
||||
- name: Orders
|
||||
description: |
|
||||
Guest and registered customers can view orders they placed.
|
||||
@@ -142,6 +172,14 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/storefront-development/regions
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreRegion"
|
||||
- name: Return Reasons
|
||||
description: >
|
||||
A return reason is a possible reason a customer wants to return an item.
|
||||
|
||||
|
||||
Use these API routes when implementing return creation flow in your storefront to allow customers to select their return reason.
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreReturnReason"
|
||||
- name: Returns
|
||||
description: >
|
||||
Customers can request to return items in their order. The admin user then
|
||||
@@ -151,14 +189,6 @@ tags:
|
||||
These API routes allows customers to create a return.
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreReturn"
|
||||
- name: Return Reasons
|
||||
description: >
|
||||
A return reason is a possible reason a customer wants to return an item.
|
||||
|
||||
|
||||
Use these API routes when implementing return creation flow in your storefront to allow customers to select their return reason.
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreReturnReason"
|
||||
- name: Shipping Options
|
||||
description: >
|
||||
A shipping option is a way of shipping an item to or from the customer.
|
||||
@@ -173,6 +203,20 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/storefront-development/checkout/shipping
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreShippingOption"
|
||||
- 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"
|
||||
servers:
|
||||
- url: http://localhost:9000
|
||||
- url: https://api.medusajs.com
|
||||
|
||||
@@ -0,0 +1,373 @@
|
||||
/**
|
||||
* @oas [get] /admin/gift-cards
|
||||
* 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: |-
|
||||
* curl '{backend_url}/admin/gift-cards' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGiftCardsResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* @oas [get] /admin/gift-cards/{id}
|
||||
* 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: |-
|
||||
* curl '{backend_url}/admin/gift-cards/{id}' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGiftCardResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,413 @@
|
||||
/**
|
||||
* @oas [get] /admin/store-credit-accounts
|
||||
* 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: |-
|
||||
* curl '{backend_url}/admin/store-credit-accounts' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Store Credit Accounts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminStoreCreditAccountsResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+419
@@ -0,0 +1,419 @@
|
||||
/**
|
||||
* @oas [get] /admin/store-credit-accounts/{id}
|
||||
* 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: |-
|
||||
* curl '{backend_url}/admin/store-credit-accounts/{id}' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Store Credit Accounts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminStoreCreditAccountResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+388
@@ -0,0 +1,388 @@
|
||||
/**
|
||||
* @oas [get] /admin/store-credit-accounts/{id}/transactions
|
||||
* 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: |-
|
||||
* curl '{backend_url}/admin/store-credit-accounts/{id}/transactions' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Store Credit Accounts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminTransactionsResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,374 @@
|
||||
/**
|
||||
* @oas [get] /admin/transaction-groups
|
||||
* 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: |-
|
||||
* curl '{backend_url}/admin/transaction-groups' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Transaction Groups
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminTransactionGroupsResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* @oas [post] /admin/gift-cards
|
||||
* 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* 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": {}
|
||||
* }'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGiftCardResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* @oas [post] /admin/gift-cards/{id}
|
||||
* 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/admin/gift-cards/{id}' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGiftCardResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @oas [post] /admin/gift-cards/{id}/redeem
|
||||
* 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* 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}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGiftCardResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @oas [post] /admin/gift-cards/{id}/transfer
|
||||
* operationId: PostGiftCardsIdTransfer
|
||||
* summary: Transfer Gift Card
|
||||
* description: Transfer a gift card to another customer.
|
||||
* x-authenticated: true
|
||||
* x-ignoreCleanup: true
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* description: The gift card's ID.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: fields
|
||||
* in: query
|
||||
* description: |-
|
||||
* Comma-separated fields that should be included in the returned data.
|
||||
* if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
|
||||
* without prefix it will replace the entire default fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: fields
|
||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||
* fields. Without prefix it will replace the entire default fields.
|
||||
* externalDocs:
|
||||
* url: "#select-fields-and-relations"
|
||||
* security:
|
||||
* - api_token: []
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminTransferGiftCard"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/admin/gift-cards/{id}/transfer' \
|
||||
* -H 'Authorization: Bearer {access_token}' \
|
||||
* -H 'Content-Type: application/json' \
|
||||
* --data-raw '{
|
||||
* "customer_id": "{value}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGiftCardResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @oas [post] /admin/store-credit-accounts
|
||||
* 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* 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}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Store Credit Accounts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminStoreCreditAccountResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @oas [delete] /store/carts/{id}/gift-cards
|
||||
* 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* 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}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Carts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreCartResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* @oas [get] /store/gift-cards
|
||||
* operationId: GetGiftCards
|
||||
* summary: List Customer's Gift Cards
|
||||
* x-sidebar-summary: List Gift Cards
|
||||
* description: Retrieve a customer's gift cards. The gift cards can be filtered by fields such as `id`. The gift cards can also be sorted or paginated.
|
||||
* x-authenticated: true
|
||||
* x-ignoreCleanup: true
|
||||
* parameters:
|
||||
* - name: x-publishable-api-key
|
||||
* in: header
|
||||
* description: Publishable API Key created in the Medusa Admin.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* externalDocs:
|
||||
* url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
* - name: id
|
||||
* in: query
|
||||
* required: false
|
||||
* schema:
|
||||
* oneOf:
|
||||
* - type: string
|
||||
* title: id
|
||||
* description: Filter by a gift card ID.
|
||||
* - type: array
|
||||
* description: Filter by gift card IDs.
|
||||
* items:
|
||||
* type: string
|
||||
* title: id
|
||||
* description: A gift card's ID.
|
||||
* - name: limit
|
||||
* in: query
|
||||
* description: Limit the number of items returned in the list.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: number
|
||||
* title: limit
|
||||
* description: Limit the number of items returned in the list.
|
||||
* externalDocs:
|
||||
* url: "#pagination"
|
||||
* - name: offset
|
||||
* in: query
|
||||
* description: The number of items to skip when retrieving a list.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: number
|
||||
* title: offset
|
||||
* description: The number of items to skip when retrieving a list.
|
||||
* externalDocs:
|
||||
* url: "#pagination"
|
||||
* - name: order
|
||||
* in: query
|
||||
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: order
|
||||
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
|
||||
* externalDocs:
|
||||
* url: "#pagination"
|
||||
* - name: fields
|
||||
* in: query
|
||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||
* fields. Without prefix it will replace the entire default fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: fields
|
||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||
* fields. Without prefix it will replace the entire default fields.
|
||||
* externalDocs:
|
||||
* url: "#select-fields-and-relations"
|
||||
* - name: $and
|
||||
* in: query
|
||||
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: array
|
||||
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
|
||||
* items:
|
||||
* type: object
|
||||
* title: $and
|
||||
* - name: $or
|
||||
* in: query
|
||||
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: array
|
||||
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
|
||||
* items:
|
||||
* type: object
|
||||
* title: $or
|
||||
* - name: status
|
||||
* in: query
|
||||
* required: false
|
||||
* schema:
|
||||
* oneOf:
|
||||
* - type: string
|
||||
* description: Filter by a gift card's status.
|
||||
* enum:
|
||||
* - pending
|
||||
* - redeemed
|
||||
* - type: array
|
||||
* description: Filter by gift card statuses.
|
||||
* items:
|
||||
* type: string
|
||||
* description: A gift card status.
|
||||
* enum:
|
||||
* - pending
|
||||
* - redeemed
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl '{backend_url}/store/gift-cards' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @oas [get] /store/gift-cards/{id}
|
||||
* 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: |-
|
||||
* curl '{backend_url}/store/gift-cards/{id}' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,363 @@
|
||||
/**
|
||||
* @oas [get] /store/store-credit-accounts
|
||||
* 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: |-
|
||||
* curl '{backend_url}/store/store-credit-accounts' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Store Credit Accounts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreStoreCreditAccountsResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @oas [get] /store/store-credit-accounts/{id}
|
||||
* 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: |-
|
||||
* curl '{backend_url}/store/store-credit-accounts/{id}' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Store Credit Accounts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreStoreCreditAccountResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @oas [post] /store/carts/{id}/gift-cards
|
||||
* 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* 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}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Carts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreCartResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @oas [post] /store/carts/{id}/store-credits
|
||||
* 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* 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
|
||||
* }'
|
||||
* tags:
|
||||
* - Carts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreCartResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @oas [post] /store/gift-card-invitations/{code}/accept
|
||||
* operationId: PostGiftCardInvitationsCodeAccept
|
||||
* summary: Accept Customer's Gift Card Invitation
|
||||
* x-sidebar-summary: Accept Invitation
|
||||
* description: Accept the logged-in customer's gift card invitation
|
||||
* x-authenticated: true
|
||||
* x-ignoreCleanup: true
|
||||
* parameters:
|
||||
* - name: code
|
||||
* in: path
|
||||
* description: The gift card invitation's code.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: x-publishable-api-key
|
||||
* in: header
|
||||
* description: Publishable API Key created in the Medusa Admin.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* externalDocs:
|
||||
* url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
* - name: fields
|
||||
* in: query
|
||||
* description: |-
|
||||
* Comma-separated fields that should be included in the returned data.
|
||||
* if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
|
||||
* without prefix it will replace the entire default fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: fields
|
||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||
* fields. Without prefix it will replace the entire default fields.
|
||||
* externalDocs:
|
||||
* url: "#select-fields-and-relations"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/gift-card-invitations/{code}/accept' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Gift Card Invitations
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreGiftCardInvitationResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @oas [post] /store/gift-card-invitations/{code}/reject
|
||||
* operationId: PostGiftCardInvitationsCodeReject
|
||||
* summary: Reject Customer's Gift Card Invitation
|
||||
* x-sidebar-summary: Reject Invitation
|
||||
* description: Reject the logged-in customer's gift card invitation
|
||||
* x-authenticated: true
|
||||
* x-ignoreCleanup: true
|
||||
* parameters:
|
||||
* - name: code
|
||||
* in: path
|
||||
* description: The gift card invitation's code.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: x-publishable-api-key
|
||||
* in: header
|
||||
* description: Publishable API Key created in the Medusa Admin.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* externalDocs:
|
||||
* url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
* - name: fields
|
||||
* in: query
|
||||
* description: |-
|
||||
* Comma-separated fields that should be included in the returned data.
|
||||
* if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
|
||||
* without prefix it will replace the entire default fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: fields
|
||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||
* fields. Without prefix it will replace the entire default fields.
|
||||
* externalDocs:
|
||||
* url: "#select-fields-and-relations"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/gift-card-invitations/{code}/reject' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Gift Card Invitations
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreGiftCardInvitationResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* @oas [post] /store/gift-cards/{id}/invitation
|
||||
* operationId: PostGiftCardsIdInvitation
|
||||
* summary: Send Gift Card Invitation
|
||||
* x-sidebar-summary: Send Invitation
|
||||
* description: Send a gift card invitation to a customer's email address. The gift card must belong to the logged-in customer, and it must not have been redeemed yet.
|
||||
* x-authenticated: true
|
||||
* x-ignoreCleanup: true
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* description: The gift card's ID.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: x-publishable-api-key
|
||||
* in: header
|
||||
* description: Publishable API Key created in the Medusa Admin.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* externalDocs:
|
||||
* url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
* - name: fields
|
||||
* in: query
|
||||
* description: |-
|
||||
* Comma-separated fields that should be included in the returned data.
|
||||
* if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
|
||||
* without prefix it will replace the entire default fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: fields
|
||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||
* fields. Without prefix it will replace the entire default fields.
|
||||
* externalDocs:
|
||||
* url: "#select-fields-and-relations"
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreCreateGiftCardInvitation"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/gift-cards/{id}/invitation' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}' \
|
||||
* -H 'Content-Type: application/json' \
|
||||
* --data-raw '{
|
||||
* "email": "Morton61@hotmail.com"
|
||||
* }'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreGiftCardResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @oas [post] /store/gift-cards/{id}/redeem
|
||||
* 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: |-
|
||||
* curl -X POST '{backend_url}/store/gift-cards/{id}/redeem' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Gift Cards
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreGiftCardResponse"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
* x-badges:
|
||||
* - text: "Cloud"
|
||||
* description: >
|
||||
* This API route is only available in [Medusa Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @schema AdminCreateGiftCardParams
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @schema AdminCreateStoreCreditAccount
|
||||
* 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,84 @@
|
||||
/**
|
||||
* @schema AdminGiftCard
|
||||
* 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: "#/components/schemas/AdminOrderLineItem"
|
||||
* customer:
|
||||
* $ref: "#/components/schemas/AdminCustomer"
|
||||
* 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: "#/components/schemas/AdminGiftCardInvitation"
|
||||
* 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,42 @@
|
||||
/**
|
||||
* @schema AdminGiftCardInvitation
|
||||
* type: object
|
||||
* description: The gift card invitation details.
|
||||
* required:
|
||||
* - gift_card
|
||||
* - id
|
||||
* - code
|
||||
* - status
|
||||
* - expires_at
|
||||
* - email
|
||||
* properties:
|
||||
* id:
|
||||
* type: string
|
||||
* title: id
|
||||
* description: The invitation's ID.
|
||||
* email:
|
||||
* type: string
|
||||
* title: email
|
||||
* description: The invitation's email.
|
||||
* format: email
|
||||
* code:
|
||||
* type: string
|
||||
* title: code
|
||||
* description: The invitation's code.
|
||||
* status:
|
||||
* type: string
|
||||
* description: The invitation's status.
|
||||
* enum:
|
||||
* - pending
|
||||
* - accepted
|
||||
* - rejected
|
||||
* expires_at:
|
||||
* type: string
|
||||
* title: expires_at
|
||||
* description: The date the invitation expires at.
|
||||
* gift_card:
|
||||
* $ref: "#/components/schemas/AdminGiftCard"
|
||||
* x-schemaName: AdminGiftCardInvitation
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @schema AdminGiftCardResponse
|
||||
* type: object
|
||||
* description: The gift card's details.
|
||||
* x-schemaName: AdminGiftCardResponse
|
||||
* required:
|
||||
* - gift_card
|
||||
* properties:
|
||||
* gift_card:
|
||||
* $ref: "#/components/schemas/AdminGiftCard"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @schema AdminGiftCardsResponse
|
||||
* 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: "#/components/schemas/AdminGiftCard"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @schema AdminRedeemGiftCard
|
||||
* 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,66 @@
|
||||
/**
|
||||
* @schema AdminStoreCreditAccount
|
||||
* 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: "#/components/schemas/AdminCustomer"
|
||||
* 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: "#/components/schemas/AdminTransactionGroup"
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @schema AdminStoreCreditAccountResponse
|
||||
* type: object
|
||||
* description: The store credit account's details.
|
||||
* x-schemaName: AdminStoreCreditAccountResponse
|
||||
* required:
|
||||
* - store_credit_account
|
||||
* properties:
|
||||
* store_credit_account:
|
||||
* $ref: "#/components/schemas/AdminStoreCreditAccount"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @schema AdminStoreCreditAccountsResponse
|
||||
* 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: "#/components/schemas/AdminStoreCreditAccount"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @schema AdminTransaction
|
||||
* 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: "#/components/schemas/AdminStoreCreditAccount"
|
||||
* 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,42 @@
|
||||
/**
|
||||
* @schema AdminTransactionGroup
|
||||
* 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:
|
||||
* $ref: "#/components/schemas/AdminStoreCreditAccount"
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The transaction group's metadata, can hold custom key-value pairs.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @schema AdminTransactionGroupsResponse
|
||||
* 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: "#/components/schemas/AdminTransactionGroup"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @schema AdminTransactionsResponse
|
||||
* 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: "#/components/schemas/AdminTransaction"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @schema AdminTransferGiftCard
|
||||
* type: object
|
||||
* description: The details of the gift card transfer request.
|
||||
* x-schemaName: AdminTransferGiftCard
|
||||
* required:
|
||||
* - customer_id
|
||||
* properties:
|
||||
* customer_id:
|
||||
* type: string
|
||||
* title: customer_id
|
||||
* description: The ID of the customer to transfer the gift card to.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @schema AdminUpdateGiftCardParams
|
||||
* 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,15 @@
|
||||
/**
|
||||
* @schema StoreAddGiftCardToCart
|
||||
* 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,15 @@
|
||||
/**
|
||||
* @schema StoreAddStoreCreditsToCart
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @schema StoreCreateGiftCardInvitation
|
||||
* type: object
|
||||
* description: The details to create a gift card invitation.
|
||||
* x-schemaName: StoreCreateGiftCardInvitation
|
||||
* required:
|
||||
* - email
|
||||
* properties:
|
||||
* email:
|
||||
* type: string
|
||||
* title: email
|
||||
* description: The email address to send the gift card invitation to.
|
||||
* format: email
|
||||
* expires_at:
|
||||
* type: string
|
||||
* title: expires_at
|
||||
* description: The date the gift card invitation expires.
|
||||
* format: date-time
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* @schema StoreGiftCard
|
||||
* 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: "#/components/schemas/StoreCustomer"
|
||||
* 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:
|
||||
* $ref: "#/components/schemas/StoreGiftCardInvitation"
|
||||
* line_item:
|
||||
* $ref: "#/components/schemas/StoreOrderLineItem"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @schema StoreGiftCardInvitation
|
||||
* 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: "#/components/schemas/StoreGiftCard"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @schema StoreGiftCardInvitationResponse
|
||||
* type: object
|
||||
* description: The gift card invitation's details.
|
||||
* x-schemaName: StoreGiftCardInvitationResponse
|
||||
* required:
|
||||
* - gift_card_invitation
|
||||
* properties:
|
||||
* gift_card_invitation:
|
||||
* $ref: "#/components/schemas/StoreGiftCardInvitation"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @schema StoreGiftCardResponse
|
||||
* type: object
|
||||
* description: The gift card's details.
|
||||
* x-schemaName: StoreGiftCardResponse
|
||||
* required:
|
||||
* - gift_card
|
||||
* properties:
|
||||
* gift_card:
|
||||
* $ref: "#/components/schemas/StoreGiftCard"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @schema StoreRemoveGiftCardFromCart
|
||||
* 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,66 @@
|
||||
/**
|
||||
* @schema StoreStoreCreditAccount
|
||||
* 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: "#/components/schemas/StoreCustomer"
|
||||
* 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: "#/components/schemas/StoreTransactionGroup"
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @schema StoreStoreCreditAccountResponse
|
||||
* type: object
|
||||
* description: The store credit account's details.
|
||||
* x-schemaName: StoreStoreCreditAccountResponse
|
||||
* required:
|
||||
* - store_credit_account
|
||||
* properties:
|
||||
* store_credit_account:
|
||||
* $ref: "#/components/schemas/StoreStoreCreditAccount"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @schema StoreStoreCreditAccountsResponse
|
||||
* 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: "#/components/schemas/StoreStoreCreditAccount"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @schema StoreTransactionGroup
|
||||
* 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:
|
||||
* $ref: "#/components/schemas/StoreStoreCreditAccount"
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The transaction group's metadata, can hold custom key-value pairs.
|
||||
* x-schemaName: StoreTransactionGroup
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user