chore(docs): Generated API reference (#2788)
This commit is contained in:
@@ -9,6 +9,7 @@ medusa.admin.discounts.create({
|
||||
value: 10,
|
||||
allocation: AllocationType.ITEM
|
||||
},
|
||||
regions: ['reg_XXXXXXXX'],
|
||||
is_dynamic: false,
|
||||
is_disabled: false
|
||||
})
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.paymentCollections.delete(payment_collection_id)
|
||||
.then(({ id, object, deleted }) => {
|
||||
console.log(id)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.paymentCollections.retrieve(paymentCollectionId)
|
||||
.then(({ payment_collection }) => {
|
||||
console.log(payment_collection.id)
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.paymentCollections.update(payment_collection_id, {
|
||||
description: "Description of payCol"
|
||||
})
|
||||
.then(({ payment_collection }) => {
|
||||
console.log(payment_collection.id)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.paymentCollections.markAsAuthorized(payment_collection_id)
|
||||
.then(({ payment_collection }) => {
|
||||
console.log(payment_collection.id)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.payments.retrieve(payment_id)
|
||||
.then(({ payment }) => {
|
||||
console.log(payment.id);
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.payments.capturePayment(payment_id)
|
||||
.then(({ payment }) => {
|
||||
console.log(payment.id);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.payments.refundPayment(payment_id, {
|
||||
amount: 1000,
|
||||
reason: 'return',
|
||||
note: 'Do not like it',
|
||||
})
|
||||
.then(({ payment }) => {
|
||||
console.log(payment.id);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKey.update(publishable_key_id, {
|
||||
title: "new title"
|
||||
})
|
||||
.then(({ publishable_api_key }) => {
|
||||
console.log(publishable_api_key.id)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKeys.list()
|
||||
.then(({ publishable_api_keys }) => {
|
||||
console.log(publishable_api_keys)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKey.create()
|
||||
.then(({ publishable_api_key }) => {
|
||||
console.log(publishable_api_key.id)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKeys.listSalesChannels()
|
||||
.then(({ sales_channels, limit, offset, count }) => {
|
||||
console.log(sales_channels)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKey.delete(key_id)
|
||||
.then(({ id, object, deleted }) => {
|
||||
console.log(id)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKey.retrieve(pubKeyId)
|
||||
.then(({ publishable_api_key }) => {
|
||||
console.log(publishable_api_key.id)
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKey.revoke()
|
||||
.then(({ publishable_api_key }) => {
|
||||
console.log(publishable_api_key.id)
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKeys.removeSalesChannels(publishableApiKeyId, {
|
||||
sales_channel_ids: [
|
||||
{
|
||||
id: channel_id
|
||||
}
|
||||
]
|
||||
})
|
||||
.then(({ publishable_api_key }) => {
|
||||
console.log(publishable_api_key.id);
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.publishableApiKeys.addSalesChannels(publishableApiKeyId, {
|
||||
sales_channel_ids: [
|
||||
{
|
||||
id: channel_id
|
||||
}
|
||||
]
|
||||
})
|
||||
.then(({ publishable_api_key }) => {
|
||||
console.log(publishable_api_key.id);
|
||||
});
|
||||
@@ -7,5 +7,6 @@ curl --location --request POST 'https://medusa-url.com/admin/discounts' \
|
||||
"type": "fixed",
|
||||
"value": 10,
|
||||
"allocation": "item"
|
||||
}
|
||||
},
|
||||
"regions": ['reg_XXXXXXXX']
|
||||
}'
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/admin/payment-collections/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/payment-collections/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payment-collections/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"description": "Description of payCol"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payment-collections/{id}/authorize' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/payments/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payments/{id}/capture' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,8 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payments/pay_123/refund' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"amount": 1000,
|
||||
"reason": "return",
|
||||
"note": "Do not like it"
|
||||
}'
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-key/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"title": "updated title"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/publishable-api-keys' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,3 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-keys' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
-d '{ "created_by": "user_123" }'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/publishable-api-keys/pk_123/sales-channels' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/admin/publishable-api-key/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,3 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/publishable-api-keys/pubkey_123' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
-d '{ "created_by": "user_123" }'
|
||||
@@ -0,0 +1,3 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-keys/pubkey_123/revoke' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
-d '{ "created_by": "user_123", "revoked_by": "user_123" }'
|
||||
@@ -0,0 +1,10 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/admin/publishable-api-keys/afasf/batch' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"sales_channel_ids": [
|
||||
{
|
||||
"id": "{sales_channel_id}"
|
||||
}
|
||||
]
|
||||
}'
|
||||
@@ -0,0 +1,10 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-keys/afasf/batch' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"sales_channel_ids": [
|
||||
{
|
||||
"id": "{sales_channel_id}"
|
||||
}
|
||||
]
|
||||
}'
|
||||
@@ -1,6 +1,7 @@
|
||||
title: OAuth
|
||||
description: Represent an OAuth app
|
||||
x-resourceId: OAuth
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- display_name
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Address
|
||||
description: An address.
|
||||
x-resourceId: address
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Address Fields
|
||||
description: Address fields used when creating/updating an address.
|
||||
x-resourceId: address
|
||||
type: object
|
||||
properties:
|
||||
company:
|
||||
type: string
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Batch Job
|
||||
description: A Batch Job.
|
||||
x-resourceId: batch_job
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
properties:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Cart
|
||||
description: Represents a user cart
|
||||
x-resourceId: cart
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Claim Image
|
||||
description: Represents photo documentation of a claim.
|
||||
x-resourceId: claim_image
|
||||
type: object
|
||||
required:
|
||||
- claim_item_id
|
||||
- url
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Represents a claimed item along with information about the reasons for the
|
||||
claim.
|
||||
x-resourceId: claim_item
|
||||
type: object
|
||||
required:
|
||||
- claim_order_id
|
||||
- item_id
|
||||
|
||||
@@ -4,6 +4,7 @@ description: >-
|
||||
consists of a subset of items associated with an original order, and can
|
||||
contain additional information about fulfillments and returns.
|
||||
x-resourceId: claim_order
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- order_id
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Claim Tags are user defined tags that can be assigned to claim items for easy
|
||||
filtering and grouping.
|
||||
x-resourceId: claim_tag
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Country
|
||||
description: Country details
|
||||
x-resourceId: country
|
||||
type: object
|
||||
required:
|
||||
- iso_2
|
||||
- iso_3
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Currency
|
||||
description: Currency
|
||||
x-resourceId: currency
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- symbol
|
||||
|
||||
@@ -4,6 +4,7 @@ description: >-
|
||||
attach a Custom Shipping Option to a cart in order to set a custom price for a
|
||||
particular Shipping Option
|
||||
x-resourceId: custom_shipping_option
|
||||
type: object
|
||||
required:
|
||||
- price
|
||||
- shipping_option_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Customer
|
||||
description: Represents a customer
|
||||
x-resourceId: customer
|
||||
type: object
|
||||
required:
|
||||
- email
|
||||
properties:
|
||||
@@ -18,7 +19,7 @@ properties:
|
||||
example: Arno
|
||||
last_name:
|
||||
type: string
|
||||
description: The customer's first name
|
||||
description: The customer's last name
|
||||
example: Willms
|
||||
billing_address_id:
|
||||
type: string
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Customer Group
|
||||
description: Represents a customer group
|
||||
x-resourceId: customer_group
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Discount
|
||||
description: Represents a discount that can be applied to a cart for promotional purposes.
|
||||
x-resourceId: discount
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- is_dynamic
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Discount Condition
|
||||
description: Holds rule conditions for when a discount is applicable
|
||||
x-resourceId: discount_condition
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- operator
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Tag Discount Condition
|
||||
description: Associates a discount condition with a customer group
|
||||
x-resourceId: discount_condition_customer_group
|
||||
type: object
|
||||
required:
|
||||
- customer_group_id
|
||||
- condition_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Discount Condition
|
||||
description: Associates a discount condition with a product
|
||||
x-resourceId: discount_condition_product
|
||||
type: object
|
||||
required:
|
||||
- product_id
|
||||
- condition_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Collection Discount Condition
|
||||
description: Associates a discount condition with a product collection
|
||||
x-resourceId: discount_condition_product_collection
|
||||
type: object
|
||||
required:
|
||||
- product_collection_id
|
||||
- condition_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Tag Discount Condition
|
||||
description: Associates a discount condition with a product tag
|
||||
x-resourceId: discount_condition_product_tag
|
||||
type: object
|
||||
required:
|
||||
- product_tag_id
|
||||
- condition_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Type Discount Condition
|
||||
description: Associates a discount condition with a product type
|
||||
x-resourceId: discount_condition_product
|
||||
type: object
|
||||
required:
|
||||
- product_type_id
|
||||
- condition_id
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Holds the rules that governs how a Discount is calculated when applied to a
|
||||
Cart.
|
||||
x-resourceId: discount_rule
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- value
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: DraftOrder
|
||||
description: Represents a draft order
|
||||
x-resourceId: draft-order
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: Response Error
|
||||
x-resourceId: error
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
|
||||
@@ -8,6 +8,7 @@ description: >-
|
||||
webhooks in order to automatically update and synchronize the state of
|
||||
Fulfillments.
|
||||
x-resourceId: fulfillment
|
||||
type: object
|
||||
required:
|
||||
- provider_id
|
||||
properties:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Correlates a Line Item with a Fulfillment, keeping track of the quantity of
|
||||
the Line Item.
|
||||
x-resourceId: fulfillment_item
|
||||
type: object
|
||||
required:
|
||||
- fulfillment_id
|
||||
- item_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Fulfillment Provider
|
||||
description: Represents a fulfillment provider plugin and holds its installation status.
|
||||
x-resourceId: fulfillment_provider
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
description: The id of the fulfillment provider as given by the plugin.
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Gift Cards are redeemable and represent a value that can be used towards the
|
||||
payment of an Order.
|
||||
x-resourceId: gift_card
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- value
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Gift Card Transactions are created once a Customer uses a Gift Card to pay for
|
||||
their Order
|
||||
x-resourceId: gift_card_transaction
|
||||
type: object
|
||||
required:
|
||||
- gift_card_id
|
||||
- amount
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Idempotency Key is used to continue a process in case of any failure that
|
||||
might occur.
|
||||
x-resourceId: idempotency_key
|
||||
type: object
|
||||
required:
|
||||
- idempotency_key
|
||||
properties:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Image
|
||||
description: Images holds a reference to a URL at which the image file can be found.
|
||||
x-resourceId: image
|
||||
type: object
|
||||
required:
|
||||
- url
|
||||
properties:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Invite
|
||||
description: Represents an invite
|
||||
x-resourceId: invite
|
||||
type: object
|
||||
required:
|
||||
- user_email
|
||||
properties:
|
||||
|
||||
@@ -5,6 +5,7 @@ description: >-
|
||||
order and can eventually be referenced in Fulfillments and Returns. Line Items
|
||||
may also be created when processing Swaps and Claims.
|
||||
x-resourceId: line_item
|
||||
type: object
|
||||
required:
|
||||
- title
|
||||
- unit_price
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Line Item Adjustment
|
||||
description: Represents an Line Item Adjustment
|
||||
x-resourceId: line_item_adjustment
|
||||
type: object
|
||||
required:
|
||||
- item_id
|
||||
- description
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Line Item Tax Line
|
||||
description: Represents an Line Item Tax Line
|
||||
x-resourceId: line_item_tax_line
|
||||
type: object
|
||||
required:
|
||||
- item_id
|
||||
- rate
|
||||
|
||||
@@ -6,6 +6,7 @@ description: >-
|
||||
pricing, the given price in a specific Region. If region-based pricing is used
|
||||
the amount will be in the currency defined for the Reigon.
|
||||
x-resourceId: money_amount
|
||||
type: object
|
||||
required:
|
||||
- currency_code
|
||||
- amount
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: Multiple Errors
|
||||
x-resourceId: multiple_errors
|
||||
type: object
|
||||
properties:
|
||||
errors:
|
||||
type: array
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Notes are elements which we can use in association with different resources to
|
||||
allow users to describe additional information in relation to these.
|
||||
x-resourceId: note
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
- resource_type
|
||||
|
||||
@@ -5,6 +5,7 @@ description: >-
|
||||
chronological timeline for communications sent to a Customer regarding an
|
||||
Order, and enables resends.
|
||||
x-resourceId: notification
|
||||
type: object
|
||||
required:
|
||||
- resource_type
|
||||
- resource_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Notification Provider
|
||||
description: Represents a notification provider plugin and holds its installation status.
|
||||
x-resourceId: notification_provider
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Notification Resend
|
||||
description: A resend of a Notification.
|
||||
x-resourceId: notification_resend
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
description: The notification resend's ID
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Order
|
||||
description: Represents an order
|
||||
x-resourceId: order
|
||||
type: object
|
||||
required:
|
||||
- customer_id
|
||||
- email
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Order Edit
|
||||
description: Order edit keeps track of order items changes.
|
||||
x-resourceId: order_edit
|
||||
type: object
|
||||
required:
|
||||
- order_id
|
||||
- order
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Order Item Change
|
||||
description: Represents an order edit item change
|
||||
x-resourceId: order_item_change
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- order_edit_id
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Payments represent an amount authorized with a given payment method, Payments
|
||||
can be captured, canceled or refunded.
|
||||
x-resourceId: payment
|
||||
type: object
|
||||
required:
|
||||
- amount
|
||||
- currency_code
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Payment Collection
|
||||
description: Payment Collection
|
||||
x-resourceId: payment_collection
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- status
|
||||
@@ -26,12 +27,7 @@ properties:
|
||||
- awaiting
|
||||
- authorized
|
||||
- partially_authorized
|
||||
- captured
|
||||
- partially_captured
|
||||
- refunded
|
||||
- partially_refunded
|
||||
- canceled
|
||||
- requires_action
|
||||
description:
|
||||
type: string
|
||||
description: Description of the payment collection
|
||||
@@ -41,12 +37,6 @@ properties:
|
||||
authorized_amount:
|
||||
type: number
|
||||
description: Authorized amount of the payment collection.
|
||||
captured_amount:
|
||||
type: number
|
||||
description: Captured amount of the payment collection.
|
||||
refunded_amount:
|
||||
type: number
|
||||
description: Refunded amount of the payment collection.
|
||||
region_id:
|
||||
type: string
|
||||
description: The region's ID
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Payment Provider
|
||||
description: Represents a Payment Provider plugin and holds its installation status.
|
||||
x-resourceId: payment_provider
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
|
||||
@@ -7,6 +7,7 @@ description: >-
|
||||
get promoted to Payments to indicate that they are authorized for
|
||||
capture/refunds/etc.
|
||||
x-resourceId: payment_session
|
||||
type: object
|
||||
required:
|
||||
- cart_id
|
||||
- provider_id
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Price Lists represents a set of prices that overrides the default price for
|
||||
one or more product variants.
|
||||
x-resourceId: price_list
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
|
||||
@@ -4,6 +4,7 @@ description: >-
|
||||
as images and descriptions. Products can have multiple options which define
|
||||
the properties that Product Variants differ by.
|
||||
x-resourceId: product
|
||||
type: object
|
||||
required:
|
||||
- title
|
||||
- profile_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Collection
|
||||
description: Product Collections represents a group of Products that are related.
|
||||
x-resourceId: product_collection
|
||||
type: object
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
|
||||
@@ -4,6 +4,7 @@ description: >-
|
||||
a Product. Common Product Options are "Size" and "Color", but Medusa doesn't
|
||||
limit what Product Options that can be defined.
|
||||
x-resourceId: product_option
|
||||
type: object
|
||||
required:
|
||||
- title
|
||||
- product_id
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
A value given to a Product Variant's option set. Product Variant have a
|
||||
Product Option Value for each of the Product Options defined on the Product.
|
||||
x-resourceId: product_option_value
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
- option_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Tag
|
||||
description: Product Tags can be added to Products for easy filtering and grouping.
|
||||
x-resourceId: product_tag
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Associates a tax rate with a product to indicate that the product is taxed in
|
||||
a certain way
|
||||
x-resourceId: product_tax_rate
|
||||
type: object
|
||||
required:
|
||||
- product_id
|
||||
- rate_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Type
|
||||
description: Product Type can be added to Products for filtering and reporting purposes.
|
||||
x-resourceId: product_type
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Associates a tax rate with a product type to indicate that the product type is
|
||||
taxed in a certain way
|
||||
x-resourceId: product_type_tax_rate
|
||||
type: object
|
||||
required:
|
||||
- product_type_id
|
||||
- rate_id
|
||||
|
||||
@@ -4,6 +4,7 @@ description: >-
|
||||
configurations. The maximum number of Product Variants that a Product can have
|
||||
is given by the number of available Product Option combinations.
|
||||
x-resourceId: product_variant
|
||||
type: object
|
||||
required:
|
||||
- title
|
||||
- product_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
title: Product Variant Prices Fields
|
||||
description: Product Variants Prices Fields that are only available in some requests.
|
||||
x-resourceId: product_variant_prices_fields
|
||||
type: object
|
||||
properties:
|
||||
original_price:
|
||||
type: number
|
||||
|
||||
37
docs/api/admin/components/schemas/publishable_api_key.yaml
Normal file
37
docs/api/admin/components/schemas/publishable_api_key.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
title: Publishable API key
|
||||
description: >-
|
||||
Publishable API key defines scopes (i.e. resources) that are available within
|
||||
a request.
|
||||
x-resourceId: publishable_api_key
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The key's ID
|
||||
example: pk_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
created_by:
|
||||
type: string
|
||||
description: The unique identifier of the user that created the key.
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
created_by_user:
|
||||
description: A user object. Available if the relation `created_by_user` is expanded.
|
||||
type: object
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
revoked_by:
|
||||
type: string
|
||||
description: The unique identifier of the user that revoked the key.
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
revoked_by_user:
|
||||
description: A user object. Available if the relation `revoked_by_user` is expanded.
|
||||
type: object
|
||||
revoked_at:
|
||||
type: string
|
||||
description: The date with timezone at which the key was revoked.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Publishable API key sales channel
|
||||
description: Holds mapping between Publishable API keys and Sales Channels
|
||||
x-resourceId: publishable_api_key_sales_channel
|
||||
type: object
|
||||
properties:
|
||||
sales_channel_id:
|
||||
type: string
|
||||
description: The sales channel's ID
|
||||
example: sc_01G1G5V21KADXNGH29BJMAJ4B4
|
||||
publishable_key_id:
|
||||
type: string
|
||||
description: The publishable API key's ID
|
||||
example: pak_01G1G5V21KADXNGH29BJMAJ4B4
|
||||
@@ -4,6 +4,7 @@ description: >-
|
||||
given reason. Refunds may occur in relation to Returns, Swaps and Claims, but
|
||||
can also be initiated by a store operator.
|
||||
x-resourceId: refund
|
||||
type: object
|
||||
required:
|
||||
- order_id
|
||||
- amount
|
||||
|
||||
@@ -5,6 +5,7 @@ description: >-
|
||||
consist of multiple countries to accomodate common shopping settings across
|
||||
countries.
|
||||
x-resourceId: region
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- currency_code
|
||||
|
||||
@@ -4,6 +4,7 @@ description: >-
|
||||
back, along with how the items will be returned. Returns can be used as part
|
||||
of a Swap.
|
||||
x-resourceId: return
|
||||
type: object
|
||||
required:
|
||||
- refund_amount
|
||||
properties:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
Correlates a Line Item with a Return, keeping track of the quantity of the
|
||||
Line Item that will be returned.
|
||||
x-resourceId: return_item
|
||||
type: object
|
||||
required:
|
||||
- return_id
|
||||
- item_id
|
||||
|
||||
@@ -3,6 +3,7 @@ description: >-
|
||||
A Reason for why a given product is returned. A Return Reason can be used on
|
||||
Return Items in order to indicate why a Line Item was returned.
|
||||
x-resourceId: return_reason
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
- label
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user