Merge branch 'master' into develop
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
name: Generate API Reference
|
name: Generate API Reference
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
paths:
|
||||||
|
- packages/medusa/src/api/routes/**
|
||||||
|
- '!packages/medusa/src/api/routes/**/index.ts'
|
||||||
|
- '!packages/medusa/src/api/routes/**/index.js'
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- closed
|
- closed
|
||||||
|
|||||||
+2445
-855
File diff suppressed because it is too large
Load Diff
+4674
-3084
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@ medusa.admin.discounts.create({
|
|||||||
value: 10,
|
value: 10,
|
||||||
allocation: AllocationType.ITEM
|
allocation: AllocationType.ITEM
|
||||||
},
|
},
|
||||||
|
regions: ['reg_XXXXXXXX'],
|
||||||
is_dynamic: false,
|
is_dynamic: false,
|
||||||
is_disabled: 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)
|
||||||
|
})
|
||||||
+7
@@ -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.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)
|
||||||
|
})
|
||||||
+7
@@ -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)
|
||||||
|
})
|
||||||
+13
@@ -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);
|
||||||
|
});
|
||||||
+13
@@ -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",
|
"type": "fixed",
|
||||||
"value": 10,
|
"value": 10,
|
||||||
"allocation": "item"
|
"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 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" }'
|
||||||
+2
@@ -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}'
|
||||||
+10
@@ -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}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
+10
@@ -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
|
title: OAuth
|
||||||
description: Represent an OAuth app
|
description: Represent an OAuth app
|
||||||
x-resourceId: OAuth
|
x-resourceId: OAuth
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- display_name
|
- display_name
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Address
|
title: Address
|
||||||
description: An address.
|
description: An address.
|
||||||
x-resourceId: address
|
x-resourceId: address
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Address Fields
|
title: Address Fields
|
||||||
description: Address fields used when creating/updating an address.
|
description: Address fields used when creating/updating an address.
|
||||||
x-resourceId: address
|
x-resourceId: address
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
company:
|
company:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Batch Job
|
title: Batch Job
|
||||||
description: A Batch Job.
|
description: A Batch Job.
|
||||||
x-resourceId: batch_job
|
x-resourceId: batch_job
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Cart
|
title: Cart
|
||||||
description: Represents a user cart
|
description: Represents a user cart
|
||||||
x-resourceId: cart
|
x-resourceId: cart
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Claim Image
|
title: Claim Image
|
||||||
description: Represents photo documentation of a claim.
|
description: Represents photo documentation of a claim.
|
||||||
x-resourceId: claim_image
|
x-resourceId: claim_image
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- claim_item_id
|
- claim_item_id
|
||||||
- url
|
- url
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Represents a claimed item along with information about the reasons for the
|
Represents a claimed item along with information about the reasons for the
|
||||||
claim.
|
claim.
|
||||||
x-resourceId: claim_item
|
x-resourceId: claim_item
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- claim_order_id
|
- claim_order_id
|
||||||
- item_id
|
- item_id
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ description: >-
|
|||||||
consists of a subset of items associated with an original order, and can
|
consists of a subset of items associated with an original order, and can
|
||||||
contain additional information about fulfillments and returns.
|
contain additional information about fulfillments and returns.
|
||||||
x-resourceId: claim_order
|
x-resourceId: claim_order
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- order_id
|
- order_id
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Claim Tags are user defined tags that can be assigned to claim items for easy
|
Claim Tags are user defined tags that can be assigned to claim items for easy
|
||||||
filtering and grouping.
|
filtering and grouping.
|
||||||
x-resourceId: claim_tag
|
x-resourceId: claim_tag
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- value
|
- value
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Country
|
title: Country
|
||||||
description: Country details
|
description: Country details
|
||||||
x-resourceId: country
|
x-resourceId: country
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- iso_2
|
- iso_2
|
||||||
- iso_3
|
- iso_3
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Currency
|
title: Currency
|
||||||
description: Currency
|
description: Currency
|
||||||
x-resourceId: currency
|
x-resourceId: currency
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- code
|
- code
|
||||||
- symbol
|
- symbol
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ description: >-
|
|||||||
attach a Custom Shipping Option to a cart in order to set a custom price for a
|
attach a Custom Shipping Option to a cart in order to set a custom price for a
|
||||||
particular Shipping Option
|
particular Shipping Option
|
||||||
x-resourceId: custom_shipping_option
|
x-resourceId: custom_shipping_option
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- price
|
- price
|
||||||
- shipping_option_id
|
- shipping_option_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Customer
|
title: Customer
|
||||||
description: Represents a customer
|
description: Represents a customer
|
||||||
x-resourceId: customer
|
x-resourceId: customer
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- email
|
- email
|
||||||
properties:
|
properties:
|
||||||
@@ -18,7 +19,7 @@ properties:
|
|||||||
example: Arno
|
example: Arno
|
||||||
last_name:
|
last_name:
|
||||||
type: string
|
type: string
|
||||||
description: The customer's first name
|
description: The customer's last name
|
||||||
example: Willms
|
example: Willms
|
||||||
billing_address_id:
|
billing_address_id:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Customer Group
|
title: Customer Group
|
||||||
description: Represents a customer group
|
description: Represents a customer group
|
||||||
x-resourceId: customer_group
|
x-resourceId: customer_group
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Discount
|
title: Discount
|
||||||
description: Represents a discount that can be applied to a cart for promotional purposes.
|
description: Represents a discount that can be applied to a cart for promotional purposes.
|
||||||
x-resourceId: discount
|
x-resourceId: discount
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- code
|
- code
|
||||||
- is_dynamic
|
- is_dynamic
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Discount Condition
|
title: Discount Condition
|
||||||
description: Holds rule conditions for when a discount is applicable
|
description: Holds rule conditions for when a discount is applicable
|
||||||
x-resourceId: discount_condition
|
x-resourceId: discount_condition
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- operator
|
- operator
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Tag Discount Condition
|
title: Product Tag Discount Condition
|
||||||
description: Associates a discount condition with a customer group
|
description: Associates a discount condition with a customer group
|
||||||
x-resourceId: discount_condition_customer_group
|
x-resourceId: discount_condition_customer_group
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- customer_group_id
|
- customer_group_id
|
||||||
- condition_id
|
- condition_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Discount Condition
|
title: Product Discount Condition
|
||||||
description: Associates a discount condition with a product
|
description: Associates a discount condition with a product
|
||||||
x-resourceId: discount_condition_product
|
x-resourceId: discount_condition_product
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- product_id
|
- product_id
|
||||||
- condition_id
|
- condition_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Collection Discount Condition
|
title: Product Collection Discount Condition
|
||||||
description: Associates a discount condition with a product collection
|
description: Associates a discount condition with a product collection
|
||||||
x-resourceId: discount_condition_product_collection
|
x-resourceId: discount_condition_product_collection
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- product_collection_id
|
- product_collection_id
|
||||||
- condition_id
|
- condition_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Tag Discount Condition
|
title: Product Tag Discount Condition
|
||||||
description: Associates a discount condition with a product tag
|
description: Associates a discount condition with a product tag
|
||||||
x-resourceId: discount_condition_product_tag
|
x-resourceId: discount_condition_product_tag
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- product_tag_id
|
- product_tag_id
|
||||||
- condition_id
|
- condition_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Type Discount Condition
|
title: Product Type Discount Condition
|
||||||
description: Associates a discount condition with a product type
|
description: Associates a discount condition with a product type
|
||||||
x-resourceId: discount_condition_product
|
x-resourceId: discount_condition_product
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- product_type_id
|
- product_type_id
|
||||||
- condition_id
|
- condition_id
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Holds the rules that governs how a Discount is calculated when applied to a
|
Holds the rules that governs how a Discount is calculated when applied to a
|
||||||
Cart.
|
Cart.
|
||||||
x-resourceId: discount_rule
|
x-resourceId: discount_rule
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- value
|
- value
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: DraftOrder
|
title: DraftOrder
|
||||||
description: Represents a draft order
|
description: Represents a draft order
|
||||||
x-resourceId: draft-order
|
x-resourceId: draft-order
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
title: Response Error
|
title: Response Error
|
||||||
x-resourceId: error
|
x-resourceId: error
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
code:
|
code:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ description: >-
|
|||||||
webhooks in order to automatically update and synchronize the state of
|
webhooks in order to automatically update and synchronize the state of
|
||||||
Fulfillments.
|
Fulfillments.
|
||||||
x-resourceId: fulfillment
|
x-resourceId: fulfillment
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- provider_id
|
- provider_id
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Correlates a Line Item with a Fulfillment, keeping track of the quantity of
|
Correlates a Line Item with a Fulfillment, keeping track of the quantity of
|
||||||
the Line Item.
|
the Line Item.
|
||||||
x-resourceId: fulfillment_item
|
x-resourceId: fulfillment_item
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- fulfillment_id
|
- fulfillment_id
|
||||||
- item_id
|
- item_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Fulfillment Provider
|
title: Fulfillment Provider
|
||||||
description: Represents a fulfillment provider plugin and holds its installation status.
|
description: Represents a fulfillment provider plugin and holds its installation status.
|
||||||
x-resourceId: fulfillment_provider
|
x-resourceId: fulfillment_provider
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
description: The id of the fulfillment provider as given by the plugin.
|
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
|
Gift Cards are redeemable and represent a value that can be used towards the
|
||||||
payment of an Order.
|
payment of an Order.
|
||||||
x-resourceId: gift_card
|
x-resourceId: gift_card
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- code
|
- code
|
||||||
- value
|
- value
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Gift Card Transactions are created once a Customer uses a Gift Card to pay for
|
Gift Card Transactions are created once a Customer uses a Gift Card to pay for
|
||||||
their Order
|
their Order
|
||||||
x-resourceId: gift_card_transaction
|
x-resourceId: gift_card_transaction
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- gift_card_id
|
- gift_card_id
|
||||||
- amount
|
- amount
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Idempotency Key is used to continue a process in case of any failure that
|
Idempotency Key is used to continue a process in case of any failure that
|
||||||
might occur.
|
might occur.
|
||||||
x-resourceId: idempotency_key
|
x-resourceId: idempotency_key
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- idempotency_key
|
- idempotency_key
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Image
|
title: Image
|
||||||
description: Images holds a reference to a URL at which the image file can be found.
|
description: Images holds a reference to a URL at which the image file can be found.
|
||||||
x-resourceId: image
|
x-resourceId: image
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- url
|
- url
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Invite
|
title: Invite
|
||||||
description: Represents an invite
|
description: Represents an invite
|
||||||
x-resourceId: invite
|
x-resourceId: invite
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- user_email
|
- user_email
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ description: >-
|
|||||||
order and can eventually be referenced in Fulfillments and Returns. Line Items
|
order and can eventually be referenced in Fulfillments and Returns. Line Items
|
||||||
may also be created when processing Swaps and Claims.
|
may also be created when processing Swaps and Claims.
|
||||||
x-resourceId: line_item
|
x-resourceId: line_item
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- title
|
- title
|
||||||
- unit_price
|
- unit_price
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Line Item Adjustment
|
title: Line Item Adjustment
|
||||||
description: Represents an Line Item Adjustment
|
description: Represents an Line Item Adjustment
|
||||||
x-resourceId: line_item_adjustment
|
x-resourceId: line_item_adjustment
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- item_id
|
- item_id
|
||||||
- description
|
- description
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Line Item Tax Line
|
title: Line Item Tax Line
|
||||||
description: Represents an Line Item Tax Line
|
description: Represents an Line Item Tax Line
|
||||||
x-resourceId: line_item_tax_line
|
x-resourceId: line_item_tax_line
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- item_id
|
- item_id
|
||||||
- rate
|
- rate
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ description: >-
|
|||||||
pricing, the given price in a specific Region. If region-based pricing is used
|
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.
|
the amount will be in the currency defined for the Reigon.
|
||||||
x-resourceId: money_amount
|
x-resourceId: money_amount
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- currency_code
|
- currency_code
|
||||||
- amount
|
- amount
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
title: Multiple Errors
|
title: Multiple Errors
|
||||||
x-resourceId: multiple_errors
|
x-resourceId: multiple_errors
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
errors:
|
errors:
|
||||||
type: array
|
type: array
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Notes are elements which we can use in association with different resources to
|
Notes are elements which we can use in association with different resources to
|
||||||
allow users to describe additional information in relation to these.
|
allow users to describe additional information in relation to these.
|
||||||
x-resourceId: note
|
x-resourceId: note
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- value
|
- value
|
||||||
- resource_type
|
- resource_type
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ description: >-
|
|||||||
chronological timeline for communications sent to a Customer regarding an
|
chronological timeline for communications sent to a Customer regarding an
|
||||||
Order, and enables resends.
|
Order, and enables resends.
|
||||||
x-resourceId: notification
|
x-resourceId: notification
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- resource_type
|
- resource_type
|
||||||
- resource_id
|
- resource_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Notification Provider
|
title: Notification Provider
|
||||||
description: Represents a notification provider plugin and holds its installation status.
|
description: Represents a notification provider plugin and holds its installation status.
|
||||||
x-resourceId: notification_provider
|
x-resourceId: notification_provider
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Notification Resend
|
title: Notification Resend
|
||||||
description: A resend of a Notification.
|
description: A resend of a Notification.
|
||||||
x-resourceId: notification_resend
|
x-resourceId: notification_resend
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
description: The notification resend's ID
|
description: The notification resend's ID
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Order
|
title: Order
|
||||||
description: Represents an order
|
description: Represents an order
|
||||||
x-resourceId: order
|
x-resourceId: order
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- customer_id
|
- customer_id
|
||||||
- email
|
- email
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Order Edit
|
title: Order Edit
|
||||||
description: Order edit keeps track of order items changes.
|
description: Order edit keeps track of order items changes.
|
||||||
x-resourceId: order_edit
|
x-resourceId: order_edit
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- order_id
|
- order_id
|
||||||
- order
|
- order
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Order Item Change
|
title: Order Item Change
|
||||||
description: Represents an order edit item change
|
description: Represents an order edit item change
|
||||||
x-resourceId: order_item_change
|
x-resourceId: order_item_change
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- order_edit_id
|
- order_edit_id
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Payments represent an amount authorized with a given payment method, Payments
|
Payments represent an amount authorized with a given payment method, Payments
|
||||||
can be captured, canceled or refunded.
|
can be captured, canceled or refunded.
|
||||||
x-resourceId: payment
|
x-resourceId: payment
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- amount
|
- amount
|
||||||
- currency_code
|
- currency_code
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Payment Collection
|
title: Payment Collection
|
||||||
description: Payment Collection
|
description: Payment Collection
|
||||||
x-resourceId: payment_collection
|
x-resourceId: payment_collection
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- status
|
- status
|
||||||
@@ -26,12 +27,7 @@ properties:
|
|||||||
- awaiting
|
- awaiting
|
||||||
- authorized
|
- authorized
|
||||||
- partially_authorized
|
- partially_authorized
|
||||||
- captured
|
|
||||||
- partially_captured
|
|
||||||
- refunded
|
|
||||||
- partially_refunded
|
|
||||||
- canceled
|
- canceled
|
||||||
- requires_action
|
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: Description of the payment collection
|
description: Description of the payment collection
|
||||||
@@ -41,12 +37,6 @@ properties:
|
|||||||
authorized_amount:
|
authorized_amount:
|
||||||
type: number
|
type: number
|
||||||
description: Authorized amount of the payment collection.
|
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:
|
region_id:
|
||||||
type: string
|
type: string
|
||||||
description: The region's ID
|
description: The region's ID
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Payment Provider
|
title: Payment Provider
|
||||||
description: Represents a Payment Provider plugin and holds its installation status.
|
description: Represents a Payment Provider plugin and holds its installation status.
|
||||||
x-resourceId: payment_provider
|
x-resourceId: payment_provider
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ description: >-
|
|||||||
get promoted to Payments to indicate that they are authorized for
|
get promoted to Payments to indicate that they are authorized for
|
||||||
capture/refunds/etc.
|
capture/refunds/etc.
|
||||||
x-resourceId: payment_session
|
x-resourceId: payment_session
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- cart_id
|
- cart_id
|
||||||
- provider_id
|
- provider_id
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Price Lists represents a set of prices that overrides the default price for
|
Price Lists represents a set of prices that overrides the default price for
|
||||||
one or more product variants.
|
one or more product variants.
|
||||||
x-resourceId: price_list
|
x-resourceId: price_list
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
- description
|
- description
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ description: >-
|
|||||||
as images and descriptions. Products can have multiple options which define
|
as images and descriptions. Products can have multiple options which define
|
||||||
the properties that Product Variants differ by.
|
the properties that Product Variants differ by.
|
||||||
x-resourceId: product
|
x-resourceId: product
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- title
|
- title
|
||||||
- profile_id
|
- profile_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Collection
|
title: Product Collection
|
||||||
description: Product Collections represents a group of Products that are related.
|
description: Product Collections represents a group of Products that are related.
|
||||||
x-resourceId: product_collection
|
x-resourceId: product_collection
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- title
|
- title
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ description: >-
|
|||||||
a Product. Common Product Options are "Size" and "Color", but Medusa doesn't
|
a Product. Common Product Options are "Size" and "Color", but Medusa doesn't
|
||||||
limit what Product Options that can be defined.
|
limit what Product Options that can be defined.
|
||||||
x-resourceId: product_option
|
x-resourceId: product_option
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- title
|
- title
|
||||||
- product_id
|
- product_id
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
A value given to a Product Variant's option set. Product Variant have a
|
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.
|
Product Option Value for each of the Product Options defined on the Product.
|
||||||
x-resourceId: product_option_value
|
x-resourceId: product_option_value
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- value
|
- value
|
||||||
- option_id
|
- option_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Tag
|
title: Product Tag
|
||||||
description: Product Tags can be added to Products for easy filtering and grouping.
|
description: Product Tags can be added to Products for easy filtering and grouping.
|
||||||
x-resourceId: product_tag
|
x-resourceId: product_tag
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- value
|
- value
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Associates a tax rate with a product to indicate that the product is taxed in
|
Associates a tax rate with a product to indicate that the product is taxed in
|
||||||
a certain way
|
a certain way
|
||||||
x-resourceId: product_tax_rate
|
x-resourceId: product_tax_rate
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- product_id
|
- product_id
|
||||||
- rate_id
|
- rate_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Type
|
title: Product Type
|
||||||
description: Product Type can be added to Products for filtering and reporting purposes.
|
description: Product Type can be added to Products for filtering and reporting purposes.
|
||||||
x-resourceId: product_type
|
x-resourceId: product_type
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- value
|
- value
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ description: >-
|
|||||||
Associates a tax rate with a product type to indicate that the product type is
|
Associates a tax rate with a product type to indicate that the product type is
|
||||||
taxed in a certain way
|
taxed in a certain way
|
||||||
x-resourceId: product_type_tax_rate
|
x-resourceId: product_type_tax_rate
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- product_type_id
|
- product_type_id
|
||||||
- rate_id
|
- rate_id
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ description: >-
|
|||||||
configurations. The maximum number of Product Variants that a Product can have
|
configurations. The maximum number of Product Variants that a Product can have
|
||||||
is given by the number of available Product Option combinations.
|
is given by the number of available Product Option combinations.
|
||||||
x-resourceId: product_variant
|
x-resourceId: product_variant
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- title
|
- title
|
||||||
- product_id
|
- product_id
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
title: Product Variant Prices Fields
|
title: Product Variant Prices Fields
|
||||||
description: Product Variants Prices Fields that are only available in some requests.
|
description: Product Variants Prices Fields that are only available in some requests.
|
||||||
x-resourceId: product_variant_prices_fields
|
x-resourceId: product_variant_prices_fields
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
original_price:
|
original_price:
|
||||||
type: number
|
type: number
|
||||||
|
|||||||
@@ -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
|
given reason. Refunds may occur in relation to Returns, Swaps and Claims, but
|
||||||
can also be initiated by a store operator.
|
can also be initiated by a store operator.
|
||||||
x-resourceId: refund
|
x-resourceId: refund
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- order_id
|
- order_id
|
||||||
- amount
|
- amount
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ description: >-
|
|||||||
consist of multiple countries to accomodate common shopping settings across
|
consist of multiple countries to accomodate common shopping settings across
|
||||||
countries.
|
countries.
|
||||||
x-resourceId: region
|
x-resourceId: region
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
- currency_code
|
- currency_code
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user